Modeling, Management, and Control of an Autonomous Wind/Fuel Cell Micro-Grid System

: 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.


Introduction
Modern industries, transportation means, and nearly all mankind's requirements mainly depend on electrical power. Traditionally, electrical power generation is essentially based on fossil fuel resources. Nevertheless, fossil fuels suffer from several drawbacks, such as depletion by 2050. However, the rapid growth of the world's population increases the world electrical power demand. The global energy demand estimated 2.1% in 2017 (more than twice the average increase over the previous five years) [1]. Also, it generates harmful emissions that form the essential cause of the phenomena of global warming and many environmental problems. Energy-related carbon dioxide (CO 2 ) emissions rose-by an estimated 1.4% in 2017-for the first time in four years, at a time when climate scientists said that emissions needed to be in steep decline [1]. Several decades ago, renewable energy resources have gained more attention as a sustainable replacement for fossil fuels. Renewable energy resources have great advantages as they are clean, do not deplete, and are available everywhere. Many renewable energy resources [2][3][4][5] have been introduced recently, such as photovoltaic (PV), wind, ocean wave, ocean tides, and micro hydro. Thanks to technology advances and rapid growth, dramatic reductions in the costs of solar PV and wind energy systems have occurred [6]. In the same context, new energy alternative technologies like biomass, geothermal, microturbines, and fuel cells (FCs) have been investigated [7]. Now, electricity generation by renewable systems is less expensive than the newly installed fossil and nuclear power plants in many parts of the world. An assessment of different In this study, the microelectrical power grid is managed and controlled based on an optimal controller using mine blast algorithm. The proposed microgrid system mainly consists of R-L static load, IM as a dynamic load, a wind generation system, FC generation system, water electrolyzer, uncontrolled rectifier, and controlled DC/AC converter.
The power system management is adapted to make the wind power generation is the master source for the loads. Also, hydrogen gas is produced using a water electrolyzer during wind power generation peaks. Hydrogen is fed back to the FC system adding to its energy storage.
The main contribution of this study can be seen from the obtained results that the proposed renewable generation system can supply the system loads perfectly in addition to a better prediction of the electrical parameter waveforms. Also, the controller response follows up the desired load demand with a small maximum overshoot and little settling time. In addition to, the generated power is managed such that the load required power is supplied by the wind power and the more needed power is covered by the fuel cell generation unit.
This paper is arranged as follows. Section 2 includes the discussion of the system description. Section 3 presents the proposed system dynamic model. Details of the system controllers are found in Section 4. The simulation results and their discussion are presented in Section 5. Finally, Section 6 shows the conclusions.

System Description
The proposed system is a hybrid wind/FC microgrid supplies two loads, as shown in Figure 1. The wind turbine drives a 3-ϕ Induction Generator (IG) The output voltage of the IG is rectified via a diode rectifier producing the Direct Current (DC) bus voltage. That bus supplies a water electrolyzer that produces hydrogen gas to be saved in the FC generator. Then, the output voltage of the FC is connected to the system DC bus. In addition, the DC bus supplies the 3-ϕ inverter that converts DC power into Alternating Current (AC) power to feed the system loads. General R-L impedance represents the static load. In addition, the dynamic load is a speed controlled induction motor. That inverter is controlled in such a way to supply loads with a regulated AC voltage and frequency.

The Dynamic Model of the System
The detailed dynamic model of all proposed system components will be discussed in the following paragraphs.  Usually, wind speed variations cause the IG output power to vary as well. Therefore, an FC unit supplies power to loads when the power of the wind generation unit drops. Hence, it acts as a slave to compensate for any decrease in the generated wind energy. In addition, it can supply additional power demanded by the loads.
Frequently, the load voltage of the system is not regulated due to the speed variations of the wind and load changes. Therefore, the voltage controller is used for the main inverter to regulate the load voltage and frequency. Also, the optimization algorithm is applied to control the speed of a vector controlled induction motor.

The Dynamic Model of the System
The detailed dynamic model of all proposed system components will be discussed in the following paragraphs.

Wind Turbine Model
The power output of the wind turbine can be represented as [32] where, A = πR 2 is the swept area (m 2 ) by the blades, β is the blade pitch angle (in degrees), R is the radius of the turbine blade, v w is the wind speed, ρ is the air density (kg/m 3 ), λ is the tip-speed ratio as defined by Equation (2), C p is the performance coefficient of the turbine that is given by Equation (3), and ω m is the turbine mechanical angular rotor speed.
The wind turbine torque (T m ) is related to its power by the classical relation: The dynamic equation of the wind turbine and the electrical generator mechanical system can be written as where, T e is the electrical generator electromagnetic torque (N·m), J is the combined inertia of the generator rotor and the wind turbine (kg·m), and B is the mechanical viscous friction (N·m·s/rad).

Dynamic Model of the Induction Machine
In a synchronous reference frame, the induction motor dynamic model may be represented by [33] di ds dt = 1 Processes 2019, 7, 85 where, r r is the rotor resistance; (v ds and v qs ) are the stator d-and q-axis voltage components, respectively; (i ds and i qs ) are the stator d-and q-axis current components, respectively; (λ dr and λ qr ) are the rotor d-and q-axis flux linkage components, respectively; (L s , L r , and L m ) are the stator inductance, rotor, and mutual inductances, respectively; ω r is the motor speed; ω s is the motor synchronous speed; T em is the motor electromagnetic torque (N·m); J m is the inertia of the IM rotor (kg·m); and B m is the viscous friction of the coupling (N·m·s/rad).

Fuel Cell Model
Typically, the Proton-Exchange Membrane Fuel Cell (PEM FC) has an electrical characteristic at normal environmental conditions as shown in Figure 2. Normally, FCs are subjected to internal voltage losses that cause a voltage drop beyond the nominal voltage values. Three kinds of voltage losses are presented: the ohmic polarization, the concentration polarization, and the activation polarization. The slowness of the chemical reactions is the cause behind the cell activation losses; it can be reduced by maximizing the catalyst contact area. However, the cause of the resistive losses is the resistance of all the FC electrical circuit and their connections. This part of losses can be alleviated by well hydrating the membrane. Finally, the concentration losses come from the changes in gas concentration at the electrodes surface. where, rr is the rotor resistance; (vds and vqs) are the stator d-and q-axis voltage components, respectively; (ids and iqs) are the stator d-and q-axis current components, respectively; (λdr and λqr) are the rotor d-and q-axis flux linkage components, respectively; (Ls, Lr, and Lm) are the stator inductance, rotor, and mutual inductances, respectively; ωr is the motor speed; ωs is the motor synchronous speed; Tem is the motor electromagnetic torque (N•m); Jm is the inertia of the IM rotor (kg•m); and Bm is the viscous friction of the coupling (N•m•s/rad).

Fuel Cell Model
Typically, the Proton-Exchange Membrane Fuel Cell (PEM FC) has an electrical characteristic at normal environmental conditions as shown in Figure 2. Normally, FCs are subjected to internal voltage losses that cause a voltage drop beyond the nominal voltage values. Three kinds of voltage losses are presented: the ohmic polarization, the concentration polarization, and the activation polarization. The slowness of the chemical reactions is the cause behind the cell activation losses; it can be reduced by maximizing the catalyst contact area. However, the cause of the resistive losses is the resistance of all the FC electrical circuit and their connections. This part of losses can be alleviated by well hydrating the membrane. Finally, the concentration losses come from the changes in gas concentration at the electrodes surface. The model of the PEM FC is given by [34][35][36]  The model of the PEM FC is given by [34][35][36] where, E is the stack output voltage, E o is the cell open circuit voltage at standard pressure, N is the number of cells in stack, F is Faraday's constant, n is the number of transferred electrons in the electrochemical reaction, R ' is the universal gas constant, T is the operating temperature, P H2 is the partial pressure of hydrogen, P O2 is the partial pressure of oxygen, P H2Oc is the partial pressure of gas water, P std is the standard pressure, V drop is the voltage losses, i is the output current density, i n is the internal current density related to internal current losses, i o is the exchange current density related to activation losses, i L is the limiting current density related to concentration losses, and α is the area specific resistance related to resistive losses.

Uncontrolled Rectifier Model
The IG speed is directly related to the wind speed that changes usually with time. Hence, the IG output voltage is not regulated in terms of its magnitude or frequency. This issue is not suitable for many applications that require regulated sources. That problem can be alleviated by rectifying the IG output voltage to form the DC bus then converting it to an AC voltage via a power inverter. The rectifier is simply a diode bridge rectifier. Neglecting the source inductance, the average model of the rectifier is given by [37] V d = 3 where, (I g , V g ) are the phase RMS current and voltage of the IG, respectively, and (I d , V d ) are the average rectifier output current and voltage, respectively.

Boost Converter Model
The classical circuit diagram of the boost converter is shown in Figure 3. The input of the boost converter is the DC bus voltage. However, its output feeds the water electrolyzer. Its function is to regulate the power transfer to the water electrolyzer in turn to the fuel cell. The average model of the boost converter is given by [38] where, d is the duty ratio of the switch and (V fc , I fc ) are the fuel cell output voltage and current, respectively. partial pressure of hydrogen, PO2 is the partial pressure of oxygen, PH2Oc is the partial pressure of gas water, Pstd is the standard pressure, Vdrop is the voltage losses, i is the output current density, in is the internal current density related to internal current losses, io is the exchange current density related to activation losses, iL is the limiting current density related to concentration losses, and α is the area specific resistance related to resistive losses.

Uncontrolled Rectifier Model
The IG speed is directly related to the wind speed that changes usually with time. Hence, the IG output voltage is not regulated in terms of its magnitude or frequency. This issue is not suitable for many applications that require regulated sources. That problem can be alleviated by rectifying the IG output voltage to form the DC bus then converting it to an AC voltage via a power inverter. The rectifier is simply a diode bridge rectifier. Neglecting the source inductance, the average model of the rectifier is given by [37] 3√3/ , /2√3 where, (Ig, Vg) are the phase RMS current and voltage of the IG, respectively, and (Id, Vd) are the average rectifier output current and voltage, respectively.

Boost Converter Model
The classical circuit diagram of the boost converter is shown in Figure 3. The input of the boost converter is the DC bus voltage. However, its output feeds the water electrolyzer. Its function is to regulate the power transfer to the water electrolyzer in turn to the fuel cell. The average model of the boost converter is given by [38] / 1 , 1 where, d is the duty ratio of the switch and (Vfc, Ifc) are the fuel cell output voltage and current, respectively.

Main Power Inverter Model
The power circuit diagram of a 3-ϕ inverter connected to L-C filter is shown in Figure 4a. The output voltage V c , the inverter voltage V i , the output current I o , and the filter current I f are expressed as space vectors by where, (f a , f b , and f c ) are the phase values, F is the space vector of the quantity, and a = e j(2π/3) . The switching states of the inverter are determined by its gate signals (S a , S b , and S c ). These states can also be expressed as space vector S using Equation (13). Considering the possible combinations of the gate signals, there are eight switching states. These states generate eight voltage vectors as shown in Figure 4b. There are two zero voltage vectors (V 0 = V 7 ) and six active voltage vectors. The system dynamic behavior can be expressed by where, (L, C) are the filter inductance and capacitance, respectively.
Processes 2019, 7, 85 7 of 22 The power circuit diagram of a 3- inverter connected to L-C filter is shown in Figure 4a. The output voltage Vc, the inverter voltage Vi, the output current Io, and the filter current If are expressed as space vectors by 2/3 (15) where, (fa, fb, and fc) are the phase values, F is the space vector of the quantity, and a = e j(2π/3) .
(a) (b) The switching states of the inverter are determined by its gate signals (Sa, Sb, and Sc). These states can also be expressed as space vector S using Equation (13). Considering the possible combinations of the gate signals, there are eight switching states. These states generate eight voltage vectors as shown in Figure 4b. There are two zero voltage vectors (V0 = V7) and six active voltage vectors. The system dynamic behavior can be expressed by (16) (17) (18) where, (L, C) are the filter inductance and capacitance, respectively.

System Controllers
The control system of the proposed wind/FC system consists of three controllers. The first controller is the main inverter controller that regulates the load voltage and frequency. The second controller is the boost converter controller. However, the third controller is the induction motor controller that controls the speed of the induction motor. The three controllers will be discussed in the following paragraphs.

Main Inverter Controller
The proposed controller is shown in Figure 5, a current controlled voltage source inverter (VSI) is employed. The inverter output voltage is compared to the reference voltage generating an error signal. The error is sent to an optimized Proportional-Integral (PI) controller that generates the reference three-phase currents. These reference currents are compared to the actual three-phase currents producing error signals that are fed to hysteresis controllers to produce the inverter switches driving pulses.

System Controllers
The control system of the proposed wind/FC system consists of three controllers. The first controller is the main inverter controller that regulates the load voltage and frequency. The second controller is the boost converter controller. However, the third controller is the induction motor controller that controls the speed of the induction motor. The three controllers will be discussed in the following paragraphs.

Main Inverter Controller
The proposed controller is shown in Figure 5, a current controlled voltage source inverter (VSI) is employed. The inverter output voltage is compared to the reference voltage generating an error signal. The error is sent to an optimized Proportional-Integral (PI) controller that generates the reference three-phase currents. These reference currents are compared to the actual three-phase currents producing error signals that are fed to hysteresis controllers to produce the inverter switches driving pulses.

Mine Blast Optimization Algorithm
The idea behind this algorithm is the exploration technique of landmines. An initial shot point (zo) is adapted using [39,40] ⃗ ⃗ ⃗ , 0 1 where, zo is the first shot point and (SB and LB) are the problem upper and lower limits, respectively. Assume that the population has Ns Shrapnel pieces. Mine blast algorithm has two phases named exploitation and exploration. The function of the exploitation phase is to encourage and to converge the solution. On the other hand, the exploration has the responsibility of exploring the search space. During the starting iterations of MBA, the exploration factor () explores the search spaces then check the number of iterations (i). The exploration phase ends when ( ) is greater than (i) which is given by

Mine Blast Optimization Algorithm
The idea behind this algorithm is the exploration technique of landmines. An initial shot point (z o ) is adapted using [39,40] where, z o is the first shot point and (SB and LB) are the problem upper and lower limits, respectively. Assume that the population has N s Shrapnel pieces. Mine blast algorithm has two phases named exploitation and exploration. The function of the exploitation phase is to encourage and to converge the solution. On the other hand, the exploration has the responsibility of exploring the search space.
During the starting iterations of MBA, the exploration factor (γ) explores the search spaces then check the number of iterations (i). The exploration phase ends when (γ ) is greater than (i) which is given by [40] → z e(i) = Hence, the directions of the shrapnel pieces are given by The best locations of the shrapnel pieces are calculated by where → d i−1 is the shrapnel distance of the exploded mines, F is the fitness function, and → z e is the best location.
Exploitation phase can be defined as The initial distances of the shrapnel pieces are gradually reduced in the exploitation phase. This can be achieved by reducing the user to converge constant (σ). The reduction in the initial distance is determined using The mine blast algorithm may be summarized in the flowchart of Figure 6. Usually, MBA uses an objective function check the optimality of the resulted parameters. There are several forms of the objective function [41], such as the Integral Time Absolute Error (ITAE), Integral Square Error (ISE), and Integral Time Square Error (ITSE). Nevertheless, ITAE is selected due to its better performance. Therefore, the suggested objective function in this paper is ITAE that is given by where, t s is the simulation time and [K p1 , K i1 , K p2 , and K i2 ] are the parameters to be estimated, x =, and the constraints are assumed to be 0.45 ≤ K pz < 15 , 0.45 ≤ K iz < 15 z = 1, 2 The proposed optimal controlling parameters of MBA are given in Table 1.  Figure 6. Mine blast algorithm flowchart.
The proposed optimal controlling parameters of MBA are given in Table 1.

Boost Converter Controller
The boost converter control circuit is shown in Figure 7. It is a simple voltage regulator. The reference voltage signal is generated based on the voltage error. Then the error is fed to the Proportional-Integral-Differentiator (PID) controller that generates the modulating signal to the Pulse Width Modulator (PWM) unit. In turn, the PWM unit generates the suitable duty cycle pulses for the converter switch.

Boost Converter Controller
The boost converter control circuit is shown in Figure 7. It is a simple voltage regulator. The reference voltage signal is generated based on the voltage error. Then the error is fed to the Proportional-Integral-Differentiator (PID) controller that generates the modulating signal to the Pulse Width Modulator (PWM) unit. In turn, the PWM unit generates the suitable duty cycle pulses for the converter switch.

Induction Motor Controller
There are two techniques to control IM: vector and scalar control. The vector control technique is precise and has a high-performance operation. Hence, the speed of the induction motor is controlled using an optimal vector control technique as shown in Figure 8. The actual speed is measured and compared to the reference speed producing the error that is manipulated by an optimal PI controller. The controller generates the reference torque for the vector control. The rotor flux and torque of the IM are estimated using the IM model. The details of vector control and estimators are presented by Trzynadlowski et al. [42].

Simulation Results
Computer simulations have been carried out to prove the performance of the proposed system under loads and wind speed changes. The proposed system shown in Figure 2 is simulated using MATLAB software package (MATLAB 16, Math Works, Torrance, CA, USA) and tested under various values of wind velocity, IM speed changes, and static load changes. The management of the energy exchange algorithm of the proposed island microgrid is shown by the flowchart of Figure 9. Figure 10 shows the obtained results for various system parameters like wind speed, FC power, IG (torque-stator-current-speed), the FC pressure of hydrogen and oxygen, the power required by the load, Dc bus voltage, static load (current-voltage), and IM (speed-torque-stator current). The system response is tested at step changes in wind velocity, load impedance, IM speed, and IM load torque. This figure shows that the wind speed varies between 11 and 14 m/s, as shown in Figure 10a. This figure shows also that as the wind speed increases the IG (speed-torque-stator current) increases as well, as indicated in Figure 10b-d, respectively. Enlarging of Figure 10d is shown in Figure 10e. The FC pressure of H2 and O2 are present in Figure 10f. Also, the wind power increases with the wind speed increase as shown in Figure 10g. On the other hand, Figure 10g shows that the fuel cell compensates any reduction in wind power and the load power is the sum of the wind power plus FC power.

Induction Motor Controller
There are two techniques to control IM: vector and scalar control. The vector control technique is precise and has a high-performance operation. Hence, the speed of the induction motor is controlled using an optimal vector control technique as shown in Figure 8. The actual speed is measured and compared to the reference speed producing the error that is manipulated by an optimal PI controller. The controller generates the reference torque for the vector control. The rotor flux and torque of the IM are estimated using the IM model. The details of vector control and estimators are presented by Trzynadlowski et al. [42].

Simulation Results
Computer simulations have been carried out to prove the performance of the proposed system under loads and wind speed changes. The proposed system shown in Figure 2 is simulated using MATLAB software package (MATLAB 16, Math Works, Torrance, CA, USA) and tested under various values of wind velocity, IM speed changes, and static load changes. The management of the energy exchange algorithm of the proposed island microgrid is shown by the flowchart of Figure 9. Figure 10 shows the obtained results for various system parameters like wind speed, FC power, IG (torque-stator-current-speed), the FC pressure of hydrogen and oxygen, the power required by the load, Dc bus voltage, static load (current-voltage), and IM (speed-torque-stator current). The system response is tested at step changes in wind velocity, load impedance, IM speed, and IM load torque. This figure shows that the wind speed varies between 11 and 14 m/s, as shown in Figure 10a. This figure shows also that as the wind speed increases the IG (speed-torque-stator current) increases as well, as indicated in Figure 10b-d, respectively. Enlarging of Figure 10d is shown in Figure 10e. The FC pressure of H 2 and O 2 are present in Figure 10f. Also, the wind power increases with the wind speed increase as shown in Figure 10g. On the other hand, Figure 10g shows that the fuel cell compensates any reduction in wind power and the load power is the sum of the wind power plus FC power.  Per unit DC-link actual and desired load voltage and its enlarging are shown in Figure 10h,i, respectively. These figures show that the applied controller tracks well the desired load voltage. It is clear that the response has little overshoot and settling time against all disturbances. This leads also to constant AC output voltage of the inverter as shown in Figure 10j,k.
The FC power increased at a time of 2 s, where the static load current is increased as shown in Figure 10g,l. Also, Figure 10g shows that the fuel cell generated power is more increased in time 2.25 s, where the wind power is decreased. However, the FC power is increased to recover the load power increase. Figure 10g shows also that the FC power decreased when the static load current decreased at time 4.5 s as shown in Figure 10l and 10m. Figure 10n and 10o show the speed response of the induction motor and its enlarging respectively. From these figures it is seen that the vector controller tracks very well the reference speed of the induction motor. As indicated there is no overshoot and without settling time. Figure  10q shows the stator current of the IM at different speeds and torques. However, the IM load torque  Per unit DC-link actual and desired load voltage and its enlarging are shown in Figure 10h,i, respectively. These figures show that the applied controller tracks well the desired load voltage. It is clear that the response has little overshoot and settling time against all disturbances. This leads also to constant AC output voltage of the inverter as shown in Figure 10j,k.
The FC power increased at a time of 2 s, where the static load current is increased as shown in Figure 10g,l. Also, Figure 10g shows that the fuel cell generated power is more increased in time 2.25 s, where the wind power is decreased. However, the FC power is increased to recover the load power increase. Figure 10g shows also that the FC power decreased when the static load current decreased at time 4.5 s as shown in Figure 10l and 10m. Figure 10n and 10o show the speed response of the induction motor and its enlarging respectively. From these figures it is seen that the vector controller tracks very well the reference speed of the induction motor. As indicated there is no overshoot and without settling time. Figure  10q shows the stator current of the IM at different speeds and torques. However, the IM load torque Per unit DC-link actual and desired load voltage and its enlarging are shown in Figure 10h,i, respectively. These figures show that the applied controller tracks well the desired load voltage. It is clear that the response has little overshoot and settling time against all disturbances. This leads also to constant AC output voltage of the inverter as shown in Figure 10j,k.
The FC power increased at a time of 2 s, where the static load current is increased as shown in Figure 10g,l. Also, Figure 10g shows that the fuel cell generated power is more increased in time 2.25 s, where the wind power is decreased. However, the FC power is increased to recover the load power increase. Figure 10g shows also that the FC power decreased when the static load current decreased at time 4.5 s as shown in Figure 10l,m. Figure 10n,o show the speed response of the induction motor and its enlarging respectively. From these figures it is seen that the vector controller tracks very well the reference speed of the induction motor. As indicated there is no overshoot and without settling time. Figure 10q shows the stator current of the IM at different speeds and torques. However, the IM load torque changes between 7 and 10 Nm and the IM speed varies between 120 and 200 rad/s, as shown in Figure 10p,n, respectively.
The obtained results are compared with the results obtained in [37], where sliding mode control (SMC) and NARMA-control are applied. The results show that both the proposed optimal control and the robust SMC are able to achieve good voltage and current waveforms parameters and to track the reference DC-link voltage and motor speed with very small overshoot and zero steady state error.
Processes 2019, 7, 85 13 of 22 changes between 7 and 10 Nm and the IM speed varies between 120 and 200 rad/s, as shown in Figure  10p,n, respectively. The obtained results are compared with the results obtained in [37], where sliding mode control (SMC) and NARMA-control are applied. The results show that both the proposed optimal control and the robust SMC are able to achieve good voltage and current waveforms parameters and to track the reference DC-link voltage and motor speed with very small overshoot and zero steady state error.  current, (e) enlarging of (d), (f) FC pressure of H2 and O2, (g) generated power, (h) DClink voltage (pu), (i) enlarging of (h), (j) static load voltage, (k) enlarging of (j), (l) static load current, (m) enlarging of (l), (n) IM speed, (o) enlarging of (n), (p) IM torque, and (q) IM stator current.

Conclusions
This article proposed a microelectrical power grid system composed of an optimal controller design using an MBA algorithm. This studied controlled power system mainly includes hybrid wind/fuel cell generation unit which feeding both dynamic and static loads. These loads are fed by the fuel cell and the wind power generation system. At high values of wind speed wind power acts as the master source that supplies the loads and store hydrogen in the FC via the electrolyzer. Consequently, at low values of the wind speed, the FC acts as a slave that supplies the loads.
IM as a dynamic load, a series R-L load, and as a static load are considered in this paper. The main inverter controller has two nested control loops. The outer loop (voltage loop) uses an optimal PI controller, while the inner loop (current loop) uses hysteresis controller current. On the other hand, the rotor speed of the IM is controlled using optimal vector control. The proposed microgrid system is simulated using Simulink/MATLAB software and is tested in step variations of wind speed, IM rotor speed, IM torque, and static load current. The results of the simulation show that the proposed generation system success to supply the loads perfectly under all disturbances. It is indicated that the performance of the main inverter controller is excellent, as the load power responses have low overshoot accompanied by small settling time. Also, the proposed optimal controller is able to maintain the DC-link voltage and hence the AC load voltage at its reference value for any variations in wind velocity and the current of the static load and/or dynamic

Conclusions
This article proposed a microelectrical power grid system composed of an optimal controller design using an MBA algorithm. This studied controlled power system mainly includes hybrid wind/fuel cell generation unit which feeding both dynamic and static loads. These loads are fed by the fuel cell and the wind power generation system. At high values of wind speed wind power acts as the master source that supplies the loads and store hydrogen in the FC via the electrolyzer. Consequently, at low values of the wind speed, the FC acts as a slave that supplies the loads.
IM as a dynamic load, a series R-L load, and as a static load are considered in this paper. The main inverter controller has two nested control loops. The outer loop (voltage loop) uses an optimal PI controller, while the inner loop (current loop) uses hysteresis controller current. On the other hand, the rotor speed of the IM is controlled using optimal vector control. The proposed microgrid system is simulated using Simulink/MATLAB software and is tested in step variations of wind speed, IM rotor speed, IM torque, and static load current. The results of the simulation show that the proposed generation system success to supply the loads perfectly under all disturbances. It is indicated that the performance of the main inverter controller is excellent, as the load power responses have low overshoot accompanied by small settling time. Also, the proposed optimal controller is able to maintain the DC-link voltage and hence the AC load voltage at its reference value for any variations in wind velocity and the current of the static load and/or dynamic load parameters variations. We also found that the speed of the IM follows its desired value without any settling time or any overshoot. The obtained results show that both the generated wind and fuel cell powers are generated so that the wind power feeds the load power demand, while the fuel cell power compensates for any extra needed power.
Author Contributions: I.E.A., A.M.K., and S.A.Z. conceived, designed the system model, analyzed the results, and wrote the paper.
Funding: This research received no external funding.

Conflicts of Interest:
The authors declare no conflict of interest.
Nomenclatures P m the power output of the wind turbine β the blade pitch angle (in degrees) ρ the air density (kg/m 3 ) v w the wind speed R the radius of the turbine blade C p the performance coefficient of the turbine ω m the turbine mechanical angular rotor speed T m the wind turbine torque T e the electrical generator electromagnetic torque (N·m), J the combined inertia of the generator rotor and the wind turbine (kg·m) B the mechanical viscous friction (N·m·s/rad) r r the rotor resistance v ds , v qs the stator d-and q-axis voltage components i ds , i qs the stator d-and q-axis current components λ dr , λ qr the rotor d-and q-axis flux linkage components L s , L r , L m the stator inductance, rotor, and mutual inductances ω r the motor speed, ω s is the motor synchronous speed T em the motor electromagnetic torque (N·m) J m the inertia of the IM rotor (kg·m) B m the viscous friction of the coupling (N·m·s/rad) E the stack output voltage E o the cell open circuit voltage at standard pressure N the number of cells in stack F the Faraday's constant n the number of transferred electrons in the electrochemical reaction R ' the universal gas constant T the operating temperature P H2 the partial pressure of hydrogen P O2 the partial pressure of oxygen P H2Oc the partial pressure of gas water P std the standard pressure V drop the voltage losses i the output current density i n the internal current density related to internal current losses i o the exchange current density related to activation losses i L the limiting current density related to concentration losses α the area specific resistance related to resistive losses (I g , V g ) the phase rms current and voltage of the IG (I d , V d ) the average rectifier output current and voltage d the duty ratio of the switch (V fc , I fc ) the fuel cell output voltage and current