This paper proposes a microelectric power grid that includes wind and fuel cell power generation units, as well as a water electrolyzer for producing hydrogen gas. The grid is loaded by an induction motor (IM) as a dynamic load and constant impedance load. An optimal control algorithm using the Mine Blast Algorithm (MBA) is designed to improve the performance of the proposed renewable energy system. Normally, wind power is adapted to feed the loads at normal circumstances. Nevertheless, the fuel cell compensates extra load power demand. An optimal controller is applied to regulate the load voltage and frequency of the main power inverter. Also, optimal vector control is applied to the IM speed control. The response of the microgrid with the proposed optimal control is obtained under step variation in wind speed, load impedance, IM rotor speed, and motor mechanical load torque. The simulation results indicate that the proposed renewable generation system supplies the system loads perfectly and keeps up the desired load demand. Furthermore, the IM speed performance is acceptable under turbulent wind speed.