Dynamic Simulation of Fuel Cell Driven by Wind Turbine Using Simulink / Matlab Approach

A dynamic numerical simulation has been carried out using the Matlab Simulink tool for simulation of a hybrid Power generation system using wind turbine (400w) and a fuel cell of Proton Exchange Membrane (PEM). The system has a battery banc to store excess energy not consumed by the load, and an electrolyzer when wind power is unavailable. The numerical model has been developed through blocks of Simulink that contains the data and the system parameters, considering the different elements and characteristics of the different elements of the system. The hybrid system supplies at least 3 hours a day, at 2000 Whr / day. Experiments were conducted using PEM fuel cell type to collect different characteristics of the hybrid system. It was found that the hybrid system efficiency can be increased using more fuel cells in series and the active area of the battery. The numerical model that has been represented in Simulink / Matlab and was validated with the experimental data obtained after the fuel Cell setup. Good agreement has been obtained between the experimental data and the model presented.


Introduction
Wind generation has been increasing over recent years, because they are considered as effective means to control and reduce the emissions to the environment, and this type of power generation is one of the most viable solutions to reduce emissions and generate green energy. It has been reported extensively in the literature that power generation with wind turbine using renewable sources are the most environmentally sound technology [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19].
There are different types of fuel cells, in this research work, the PEM fuel cell is used in low temperature applications. Proton-exchange membrane fuel cells, also known as polymer electrolyte membrane, and also known as polymer electrolyte membrane fuel cells, are a type of fuel cell being developed mainly for transport applications, as well as for stationary fuelcell applications and portable fuel-cell applications as reported by Martinez Reyes [12]. Fuel cells can be classified by different parameters such as temperature, fuel and oxidant used, if fuel direct or indirect, or the electrolyte. Also, can be classified by the working temperature. Therefore, fuel cells can be divided into two groups, low temperature and high temperature, as per Martinez Reyes [12]. In the lowtemperature fuel cells, working temperatures range between 20°C and 100°C. PEM cells use fuel as hydrogen, and oxygen as an oxidant to initiate the chemical reaction that releases electrons which pass through external power circuit. The PEM fuel cell uses water, which was considered as one of the fluids friendlier to the environment Khater, Abdelraouf, Beshr, [4].
On the other hand, Ogawa, Takeuchi, & Kajikawa [6] analyzed the several publications on about fuel cell systems that work with electrolysers. Reference [6] reported on an increase in the percentage of efficiency at an optimal level, although more work is needed for the automotive industry. Moreover, reference [6] has not performed electrolyzers studies or on the PEME type and any other type electrolyzer.
Our research at the University is intended to enhance our experience of the PEM fuel cell integrated together with other power generation systems such as wind, solar, biomass, tidal wave, etc. In the renewable energy center (CER) of the Catholic University Cuenca, research has been done on hybrid systems-based PV solar panels with fuel cells to determine the efficiency of different types of load power as reported by Sami and Marin [9].
In Esmaeili and Shafiee, [2], a hybrid system used a small power cogeneration composed of wind power, solar and fuel cell, in which the interaction between different sources of energy can be seen to compensate a one source when the other 2 sources do not have the necessary energy and to maintain an electric load. Also, Onar, Uzunoglu, and Alam [7] developed a system that is very similar to that of Esmaeili and Shafiee [9] that does not with use the solar panels to power the electrolyzers output voltage level.
In a research carried out by Khan & Iqbal [3]. they proposed a power generation system that simpler with high capacity generation, using only wind energy combined with a fuel cell for powering a variable load in time, and also used ultracapacitors to compensate for sudden load fluctuations and avoid failures. However, one disadvantage had been faced that with no or little wind, the electrolyzer could not generate the hydrogen needed for fuel cell activation. In their system, the output voltage level of the fuel cell was 65 V nominal, in which case it activated flow controller to allow the passage of more fuel hydrogen as per Khan & Iqbal [3].
In reference [17], a wind turbine model for wind energy conversion system study was presented. The turbine static characteristics were modeled using the relationship between the turbine power, the wind speed and the blade pitch angle. The dynamic characteristics of the wind turbine were also modeled through a two-mass oscillating system, that represented the mechanical coupling of the turbine and the generator. The turbine performance was subjected to a real wind speed pattern by modeling the wind speed as a sum of harmonics with wide ranges of frequency. The turbine model included the effect of the tower shadow and wind shear. A pitch angle controller was designed to protect the coupled generator by limiting the turbine output power to the rated value. Simulation results were also reported to verify the wind turbine simulator performance.
Reference [18], in his thesis proposed models that were developed for positive-sequence phasor time-domain dynamic simulations and were implemented in the standard power system simulation tool PSS/E with a 10 ms time step. The accuracy of the response by the proposed models was validated against the detailed models results and, in some cases, against field measurement data. A direct solution method was proposed for initializing a DFIG wind turbine model. A model of a DC-link braking resistor with limited energy capacity was proposed, thus, a unified model of a FCWT for a power system stability analysis can be obtained. The results showed that the proposed models were able to simulate wind turbine responses with sufficient accuracy. The generic models proposed in his thesis can be seen as a contribution to the ongoing discourse on standardized models of wind power generation for power system stability studies.
One of the main reasons for conducting this study is because Fuel Cell driven by wind turbine has less no negative direct environmental impact compared to other types of power generation. In addition, this particular hybrid system is suitable to supply power in remote areas where new power lines are costly and difficult to erect. The simulation of the system presented hereby took into account the nominal power generation turbine (400 W) and a 650 W load that could be fed during the day, but the simulation used on the average time of 3 hours to represent time of consumption for one day, with the total and the total consumption per day was 2000 Wh.
The dynamic simulator was built with the help of the platform Matlab /Simulink [20]. This allows to develop a simulator platform Matlab / Simulink and visualize how the system behaves with the variation of different parameters. Secondly, a computational algorithm was developed for the simulation of the behavior of the fuel-cell. And, finally, the hybrid system was analyzed and validated using data on wind turbine and fuel-cell set up.

Mathematical Model: Hybrid Wind Turbine and PEM Fuel Cell System
In this section, the different equations and formulas used to develop the simulated system platform Simulink / Matlab [20] are presented. The general hybrid system is composed of different elements/subsystems that were shown in Figure 1. In the following, we present the different mathematical equations describing the behavior of each element/subsystem. As shown in Figure 1, the wind turbine activated the electrolyzer and in turn generated the hydrogen and oxygen where was stored in separate tanks and in turn energy was sent to the power controller, the stored hydrogen and oxygen were used in the fuel cell for generating DC power. The power generated by the fuel cell stack was directed to the load controller where the control strategy was realized. Then, total power that in the load controller was directed to the inverter to convert to AC power. The battery bank function was to store power to compensate when the load is less generated and also when the wind turbine system was unable to harness this wind energy, due to low wind speeds, and whereby, the batteries can feed the electrolyzer.

Wind Turbine
The wind turbine implemented in this study can extract maximum power at wind speed of 17.9m/s. when this speed was exceeded the turbine will lock to prevent over-speed at the turbine. This may be damaging to the wind turbine according to wind power curve of the wind turbine. This wind power curve was obtained from the manufacturer AIR403 [19], therefore, this wind power curve results were used in this simulation.
To obtain the power generated by the wind turbine simulator, the following transfer function developed by Khan & Iqbal, [15] was used.
Where, is the power obtained from the power curve for a speed of Wind already established, while is current power is obtained at the output of the wind turbine by Sami and Garzon, [8]

PEM Fuel Cell
Khan & Iqbal, [15] stated that the ideal voltage standard of a fuel cell PEM 1.229 V obtained as residual and the battery voltage decays because irreversible losses. The thermodynamic potential was then determined by the equation of Nernst. = 1.229 − 0.85 10 − + 4.3085 10 * * !" # $ + 0.5 !" % $ Where " # $ is the pressure in atmospheres of hydrogen, " % is pressure is oxygen and T is the temperature in degree Kelvin.
T is the reference temperature (298.15 K). The concentration of oxygen in the gas or liquid can be defined by the law Henry as shown in (2) Voltage ohmic losses are given by equation (6) and the following figure 2 presented the graph of the equivalent circuit of the fuel cell, which can be noted that the internal resistance was in series. The voltage drop was considered for calculating the actual voltage that would be off the stack fuel; 1 ;<=73 = −5 * 6 784 (7) Combining the above equations resulted in the output voltage of the stack and was defined as; > = − ? 234 + 1 ;<=73 (8) The output voltage of the fuel cell was described by the differential equation (9), which had as parameters the current required (i) to supply the load and compensate when the wind turbine is not in the ability to provide the necessary power to load.
The amount of hydrogen and oxygen consumed by the fuel cell was determined by the current of the fuel cell, in addition to the incoming and outgoing flows (mol /s), if flows into and out of the hydrogen and oxygen was known, the gas pressures within the humidifier can be described using the principle of conservation of mass. To calculate the pressure of hydrogen and oxygen, equations (10) and (12) were used Knowing the flow rates of hydrogen and oxygen can be described pressure (atm) of the anode with the following equation.
Where > 2 is the volume in liters, U is the velocity of the fuel, 6 is the constant of Universal Gas (1 atm 0.0821 / mol K), T is the temperature in Kelvin degrees (K), M # $ is the molecular hydrogen density, A is the area of the flow channel and S is the constant of Faraday's law. The pressure in the cathode can be calcualted using equation (11), > 3 is the volume in liters and the cathode M % $ is the molecular density of oxygen.
The internal resistance and the current of the fuel cell can be used to calculating internal heat losses GIC= 5 6 2 + 6 784 * !UV (13) Where !UV is the number of cells of the fuel cell are in series.
Where & 4 is the heat capacity of the fuel cell stack fuel of the same which is assumed as 10,000 J/°C.
2 is the temperature and is assumed as 25°C and 6 4 = 0.04°C

Electrolyzer
For the decomposition of water into hydrogen and oxygen it was required an electric current between the two electrodes separated by aqueous electrolyte, and was obtained from the following reaction.
The characteristics of the voltage and current of an electrolyzer temperature were dependent upon the operation. Thereof, these characteristics were highly nonlinear, following the lineament Faraday's law, the production of hydrogen in an electrolyzer cell was directly proportional to the number of electrodes transferred to the electrodes, and this in turn, it was equivalent to the electric current in the circuit.
Where 5 _ is the current of the electrolyzer, ! 3 is the number of cells in series and electrolyser 1 R is the Faraday efficiency to calculate the efficiency Faraday used the following equation.
1 R = 96.5V ` 0,09/5 _ − 75.5/ 5 _ The Faraday efficiency is the relationship between the current and the maximum amount of hydrogen produced in the electrolyzer.

Ultra-capacitor
The ultra-capacitor was used to compensate for sudden changes in voltage and current load, because in this energy was stored. The ultra-capacitor can be modeled with the transfer function as follow; Because Simulink allowed the use the aforementioned components directly chose such a solution as shown in Figure 3.
For the inverter, a Universal Bridge was adopted from the library Simulink, having as output 120Vac at a frequency of 60Hz, a pulse generator used with a PWM carrier wave 1.08 KHz also was using the single phase, full bridge option 4 pulses.

Drivers
PID controllers were used to control the flow of hydrogen and oxygen according to the voltage level having the fuel cell when the voltage of the fuel cell down over 48 V. The controller allowed the passage of a greater flow of hydrogen and oxygen to stabilize the voltage and current. The general transfer function for PID controllers can be described as follows.
Where all parameter in equation (21) are given in Table 1.

Hydrogen Storage Tank
In order to calculate the amount of hydrogen stored, the difference between the quantity produced and consumed was calculated and stored in the tank and can be found by the following equation which can be used calculate the hydrogen pressure directly. It was assumed in the dynamic model that all auxiliary equipment such as valves, pumps, fans or compression were neglected. Where > is he output voltage of the fuel cell Marin [5];

Battery Bank
The power consumption of the electrolyzer was considered in the calculation of the battery bank and was used when the wind turbine does not have the adequate wind speed for operation. Therefore, it activated the electrolyser to generate the necessary hydrogen needed by fuel cell system.
To calculate the charging time of the battery, equation (24) was used and took into account the energy storage capacity of the battery (Ah) and the ability to charge current (A), which can estimate time it to charge the battery.
Where Tc = Charging time (h) Cb = Battery capacity (Ah) Cc = capacity charger (A) Figure 4 showed the block diagram that represented the strategy control system for the following operating conditions;

Energy Control Strategies of the Proposed System
First case: If the power of the load (P load) exceeded the power of the wind turbine and Battery power (P battery) the fuel cell will act. Therefore, the sum of the powers would be as follows.
" 32n~2 " A7_84; " x24_ní2 " RE , " 7 € 0 (25) Second case: If the power generated by the wind turbine plus obtained from the battery bank exceeded power load demand, the surplus power will be delivered to the electrolyzer, therefore, the sum of the powers would be as follows.

Flowchart Wind Turbine -Fuel Cell Hybrid System
The flow chart of the hybrid system of wind turbine-Fuel cell presented in equations (1) through (27) was depicted in Figure 4., Where it was shown that the power received by the controller from the fuel cell, wind turbine and battery was added while the power consumed by the load were subtracted from power delivered to the electrolyzer subsystem. As previously noted, the electrolyzer required energy to produce, to be activated and hydrogen and the fuel cell system.

Results and Discussions: Results of the Simulation Matlab / Simulink and Data Experimental
In this section, the results of the simulations carried out are presented with screenshots of different power curves, voltages, currents, production of hydrogen, oxygen, load variations, and temperatures. It was assumed in this analysis that the operating temperature of the electrolyzer is 40 ᵒC. The equations (1) through (27) presented a simple model of electrolyzer in which it was assumed that the electrolyzer has a separate cooling system to maintain at 40ᵒC. To release hydrogen and oxygen, distilled water is used, because it contains ions and has very low or almost no conductivity, these are important characteristics of the distilled water.

Wind Profiles
Wind speeds, and wind direction were collected using a measurement monitoring system, weather station HOBO [21]. Measurement of the wind speeds on obtained on site showed that the wind speed was too low as can be seen in Figure 5. From the Data collected over a period of two months, February and March, one can observe from the results presented in Figure 5 that the average wind speed is too low, with only 1.6 m/s to 2.08 m/s. The average maximum speed of wind gusts was 3.59 m / s during the month of March, and the maximum speed was recorded on March 2 at 13:49 hours, having a speed of 4.78 m / s, but with very short duration.

Results of Dynamic Simulation of the Wind-battery Hybrid System Fuel
The performed simulation results are presented and discussed in the following sections and compared with the laboratory tests. Figure 6 displayed the Simulink/Matlab modeling system, which included the several subsystems: fuel cell subsystem, electrolyzer, subsystem flow controller, wind generation subsystem, power controller subsystem, and battery bank subsystem. Because this simulation used parts of Simulink as known as SimPowerSystems, it was necessary to include in the simulation block PowerGUI, where in this block, the data normally were selected in three different ways; Continuous, Discrete and Phasor. In this simulation the option "Discrete" was considered because if the option "Continuous" was used a significant data had to be processed and the system became slow. Figure 6 showed the power controller in the subsystems for all the powers and was used as a reference. Also, Figure 6 presented the power controller for all the powers such as the wind power battery bank, and load power consumption. The output signals for either the fuel cell or electrolyser depended on the test case considered in the control strategies. The battery bank consisted of four batteries in series 12 VDC and have 70 Ah each and supplied a total voltage of 48 V nominal and was connected to the power controller. Moreover, the battery bank delivered power the electrolyzer when no and/or low wind to power generation through the turbine were available.
To model the ultra-capacitor, the Maxwell module 435 F 14V has been used and connected in series to obtain the voltage range of the fuel cell, where a resistor and a capacitor were integrated as shown in Figure 7.
The power generation subsystem through the stack fuel has been presented in Figure 8 where the input parameters as the current flow of hydrogen and oxygen, and the battery voltage were displayed. The upconverter used the duty cycle (C. F. equation 22) to raise the output voltage of the fuel cell (48v-80v) to a level of 120 VDC and forwarded to the inverter. The inverter used the block "Universal Bridge" to convert the DC voltage AC and within the "Power Electronic Device" option used an "Ideal Switches" as well as the inverter that had a pulse generator sent a signal pulse to the inverter bridge fullwave AC 120V, 60 Hz, and the signal of the carrier wave was 1080 Hz. The fuel cell subsystem used different equations to determine temperature, pressure that controlled both oxygen and hydrogen. The output voltage of the fuel cell was between 48 and 80 volts. When the voltage dropped below 48 volts, the flow controller allowed the passage of more of hydrogen and oxygen and increased the pressure due to the increased flow in order to have the required voltage. The internal temperature of the fuel cell depended on the current generated, and to obtain the current, the internal resistance and activation resistance was multiplied by the number of resistance cells connected in series. This also considered the temperature of the environment, and in this case, it was assumed as reference of 25°C.
In Figure 9 showed the relationship between wind speed and power generated, which is known as the wind power-curve and was obtained from the manufacturer manual [21], the diameter of the turbine was 1.14 m and had an output power of 400 W when the wind speed was to about 12.5 m / s (28 MPH). The wind power was generated at different speeds of the wind and presented in Figure 9, where the wind speed was plotted against the power generated. The power curve was obtained from the wind turbine manual 403 Air Power [19]. It was also found that the results displayed in the powercurve were consistent with the measured wind speeds.
In Figure 10 the subsystem power generation by the wind turbine has been presented. It can be noted that when the wind speed exceeded 18 m /s, the embedded protection system of the wind turbine was activated by blocking the blades rotation to avoid no-over speed condition and to protect against system failure. Also, it can be seen from the results displayed in this figure that the battery generated the necessary power to compensate the power difference between the load and the wind turbine output.
The load-power curves were presented in Figures 11 and   12. in this particular case it was estimated a period of three hours took into account that certain electrical appliances on average house were not used all day, therefore, the hybrid system in question can supply an energy demand of 2000 Whr for a constant period of 3 hours with a power of 650 W load with no issue and having a nominal output power of 400W. Figure 13 showed a comparison between the power-load stack in the wind turbine, in a home connected constantly at different periods depending on the needs. It can be seen from the results in this figure that in the second 20, 25, 60, 75, and 85 there was a sudden change in load power, that was caused by the load resistors that were scheduled to change at instantaneous time. It can also be seen in this figure that the power controller adapted the subsystem to the power-load supplied by the fuel cell and wind turbine stack subsystems.  As seen in Figure 13 in the second 54 the power generated by the turbine wind exceeded the power required for the load, therefore, the fuel cell did not generate any power, and load was completely satisfied by the wind turbine. The overused power was used in the electrolyzer for hydrogen generation and subsequent energy storage in the tanks. Also, in Figure   13, it can be observed that the changes in output current of the wind turbine and had similar trends and were observed for the output power.
It can be noted that these variations in the current occurred only when there was a change in wind speed. In Figure 14 one can observe the different temperatures of the fuel stack in response to load change and the current to be supplied. Also, it can be seen that the changes in temperature were relatively low, when the battery was not in operation (t = 55 s from t = 94 s), and the temperature was maintained at 25°C, which is the room temperature. Figure 15 showed the variations in pressures of the hydrogen and oxygen of the fuel cell. It was quite clear that the pressure varied from 0 s to 54 s time and was dependent on the current needed to be produced, also, during the period of time between 54 s and 94 s, no generation was observed in hydrogen by the fuel cell.  It should be noted that the amount of hydrogen generated that was delivered to the stack generation fuel for electricity was shown in Figure 16. This amount of hydrogen increased when the fuel cell needed to generate more power and when the battery output was low. Also, as seen in Figure 16 the voltage output of the boost converter, had experienced a slight drop /and or sudden elevations voltage during simulation, this was caused by the load changes, however, the voltage was restored instantly as seen In Figure 16 where one can observe the output of the inverter voltage at 120 V and 60 Hz, and had sinusoidal signal, and also it can be noted that in the second 25 output current of the inverter was low when the load resistance rose.   Figure 17 showed the load current variation when there was a change of resistance, the current load was supplied in part by the wind turbine system and partly by the fuel cell. Figure 17 presented the graph of the load-current and it can be seen that the current varied from 6 A to 10.5 A and in the second 20 and second 25 changed from 10.5 A to 7A, respectively. Figure 18 presented the discharge-curve of the battery and indicated that the battery can support the constant load for 14 hours and was fully discharged over a period of 21 hours. It should also be noted that the battery bank had 4 batteries in series 12 VDC and 70 Ah, and the nominal consumption of the electrolyzer was 5A to 48 V.

Model Validation
This section was intended to validate the model prediction presented hereby in equations (1) through (27). A comparison between the numerical model presented hereby and the experimental data collected at the fuel cell installed at the Research for Center Renewable Energy, at the Catholic University was presented in Figures 19 through .24. The wind power was used to activate the electrolyzer with 2 VDC voltage and a current of 350 mA, power the electrolyser, where water was decomposed into hydrogen and oxygen, and stored in a small tank. Then, the stored hydrogen and oxygen were sent to the fuel cell where chemical reaction took place and resulted in a potential difference between terminals of 0.4 V to 0.9 V. In Figures 19 through Figure 24 the different key performance parameters of the fuel cell were presented and discussed. Figure 19 presented a comparison of the voltage drop in the fuel cell when the load of 0.30 W was connected. It can be seen that the predicted voltage decayed below experimental curve but was restored and both curves had a similar trend. The predicted voltage curve fell to 0.62 V and was maintained while experimental voltage curve experienced variations due to measurement error in the sensors. In Figure 20 one can see that the current had a free fall over time in both curves, and the current curve value dropped to 0.487 A while the current experimental data experienced variations that can be attributed to the measurement error of the sensors. Same trends were observed in Figures 20 through Figure 24. A comparison between the fuel cell voltage measured for 10 seconds, was presented in Figure 20, where the voltage dropped at a load of 0.37 W, voltage while the experimental data were around 0.43 V with slight variations, and the predicted voltage curve stabilized at a voltage of 0.44 V. Figure 22 presented a comparison between the current curve experimental data and numerical predicted results. One can see that the experimental data experienced variations in the first few seconds, but generally both experimental and numerical curves had very similar trends. In Figures 21 and  24, it can be observed that the predicted efficiency dropped to 0.4 (40%), while the efficiency experimental data had dropped to a 39.5%. Therefore, we feel our model predicted well the experimental data of the key parameters of the hybrid system under investigation.

Conclusions
A hybrid system composed of a fuel cell driven by wind turbines that can be implemented in isolated or/and remote areas disconnected from national or local grid has been developed and simulated by Simulink / Matlab. The model has been developed after the conservation equations describing the behavior of the hybrid system, and the subsystems such as the fuel cell, electrolyzer and the wind turbine.
Validation of the model has been done with the experimental data obtained from the fuel cell set up at the Center for Renewable Energy (CER), demonstrated that the predicted efficiency of the hybrid system dropped to 40%, while the efficiency obtained from the experimental data had dropped to a 39.5%. Therefore, we feel our model predicted fairly well the experimental data of the key parameters of the hybrid system under investigation and the simulation model presented hereby was reliable and can be used as a design tool.

Recommendations
In larger fuel cell systems care should be exercised to handle the produced hydrogen and oxygen because these are highly flammable and may cause catastrophic accident, thereby, it is recommended installing gas sensors that alert, should a leak occurred in the system, Maintenance of the hydrogen generation systems must be periodic in order to ensure the pipes and equipment were in good conditions in general to ensure safety of the personnel. Further research work should be done to calculate the mass of water accumulated in the fuel cell as a result of the chemical reaction that should be validated by the measurements of amount of water built up in storage tank.