## 2 Methodology
### Control System Description  
For the control system of the hybrid generation system, steady-state operational values are required. These values were defined for both the fuel cell and the photovoltaic cell based on research results presented in the literature [32]. The values for the fuel cell are presented in Table 3. \begin{table}
\begin{tabular}{c c} \hline \hline
**Variable** & **Model** \\ \hline Thermodynamic potential, \(E\) [V] & \(E=1.229-0.00085\cdot(T-298.15)+\) \\  & \(4.3085\cdot 10^{-5}T\cdot\left[ln\left(p_{t_{2}}\right)+0.5\cdot ln\left(p_{t_{ 2}}\right)\right]\) (6) \\ Oxygen concentration, \(C_{O_{2}}\) [mol/m\({}^{3}\)] & \(C_{O_{2}}=\frac{P_{O_{2}}}{5.8\cdot 10^{5}\cdot e^{-\frac{1}{2}}}\) (7) \\ Overvoltage activation, \(n_{act}\) [V] & \(n_{act}=-0.96514+0.00312T-0.000187\cdot ln\left(i\right)+74-5T\cdot\ln\left(C_ {O_{2}}\right)\) (8) \\ Internal resistance, \(R_{int}\) [\(\Omega\)] & \(R_{int}=0.01605-3.5\cdot 10^{-5}T+8\cdot 10^{-5}i\) (9) \\ PEM output voltage, \(V\) [V] & \(V=E-V_{act}+\frac{1}{P_{thmic}}\) (10) \\ Hydrogen production rate, \(n_{H_{2}}\) [mol/s] & \(n_{H_{2}}=\frac{n_{H_{2}}+n_{act}}{2T}\) (11) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Proton exchange membrane (PEM) fuel cell model. Figure 3: Wind turbine transient response curve. For the photovoltaic cell, the assigned constant values are presented in Table 4.  
A PID control is used to control the hybrid system, and the tuning of these controllers was done using the Ziegler-Nichols open-loop method [33]. The approach of the plant to a first-order process plus dead time was made by a set of open-loop tests. First, the gain, tao, and dead time were determined for the first-order equation, following the procedures outlined in [PERSON] and Corripio [34]. The procedure was performed for a variation in the hydrogen flow rate from 0.005 to 0.008 mol/s while keeping the oxygen flow constant. Then, the oxygen flow rate was changed while keeping the hydrogen flow constant. The transfer functions obtained for hydrogen and oxygen are presented in Equations (12) and (13), respectively. \[G(S)_{\text{oxygen}}=\frac{125\cdot e^{-1.21s}}{18.20\cdot s+1} \tag{12}\]  
\[G(S)_{\text{hydrogen}}=\frac{62\cdot e^{-0.21s}}{23.22\cdot s+1} \tag{13}\]  
Having obtained the values, tuning was carried out using the Ziegler-Nichols rules [35], resulting in the tuning parameters for the oxygen and hydrogen PID controllers shown in Table 5.  
To evaluate the performance of the PIDs for the different load profiles, four indices were used to calculate the time taken to reach system stabilization [36]. The first index is defined by the integral of the square of the error, as seen in Equation (14). \[\text{ISE}=\sum_{\text{i=2}}^{n}\int_{0}^{\text{tsim}}(\text{w}_{\text{i}}- \text{w}_{1})^{2}\text{dt} \tag{14}\] \begin{table}
\begin{tabular}{l l} \hline \hline
**Variables** & **Values** \\ \hline Rated power & 37.08 W \\ Voltage in maximum power point, (\(V_{mp}\)) & 16.56 V \\ Current in maximum power point, (\(I_{mp}\)) & 2.25 A \\ Open circuit voltage, (\(V_{OC}\)) & 21.24 V \\ Short-circuit current, (\(I_{SC}\)) & 2.55 A \\ Total number of cells in series, (\(N_{s}\)) & 36 \\ Total number of cells in parallel, (\(N_{p}\)) & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Constants for the Photovoltaic cell. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **Values** & **Parameters** & **Values** \\ \hline Gas constant & 0.0821 L-atm/mol K & Cell PEM output current & 8.26 A \\ Faraday constant & 96,500 C/mol & PEM output voltage & 48 V \\ Heat capacity & 10,000 J/\({}^{\circ}\)C & PEM cell power & 401.23 W \\ Anode temperature & 25 \({}^{\circ}\)C & Molar hydrogen flow & 0.005 mol/s \\ Thermal resistance & 0.04 \({}^{\circ}\)C/W & Molar oxygen flow & 0.005 mol/s \\ Capacitance & 108.75 uF & Demanded charge power & 200 W \\ Cathode resistance & 4 m\(\Omega\) & - & - \\ Resistance of a PV module & 0.01 \(\Omega\) & - & - \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Steady-state values for the fuel cell.