## 6 Results and Discussion
### Testing the Accuracy of the WSO-WOA Algorithm
#### 6.1.1 Cascading PI-PI Controller  
This study employed the PI-PI controller with 16 decision-making variables, as shown in Table 4. These variables are crucial in determining the controller's performance, as they directly influence the system's response to dynamic changes. Figure 9 visually compares the convergence curves for five optimization algorithms: WSO-WOA, WSO, WOA, SCA, and GWO. Convergence curves are essential for evaluating the effectiveness of optimization algorithms, as they depict how quickly and efficiently an algorithm can reach the optimal solution. The curves shown in Figure 9 represent the best performance achieved by each algorithm over ten independent runs, highlighting the consistency and robustness of the optimization process. \begin{table}
\begin{tabular}{c c c c c c} \hline
**Parameter** & **SCA** & **GWO** & **WOA** & **WSO** & **WSO-WOA** \\ \hline \(K_{1}^{dc}\) & 0.00171 & 0.00194 & 0.00181 & 0.001 & 0.00112 \\ \(K_{1}^{dc}\) & 0.1612 & 0.2103 & 0.192 & 0.3011 & 0.151 \\ \(K_{2}^{dc}\) & 1 & 1 & 1 & 1 & 1 \\ \(K_{2}^{dc}\) & 0.639 & 0.9998 & 0.00144 & 0.0495 & 0.01225 \\ \(K_{p1}^{\prime}\) & 0 & 5.7909 & 0.8899 & 0.0584 & 1.43608 \\ \(K_{11}^{\prime}\) & 273.94 & 225.105 & 336.973 & 202.414 & 458.893 \\ \(K_{p2}^{\prime}\) & 1.5798 & 1 & 1.7258 & 1.707 & 1.12575 \\ \(K_{12}^{\prime}\) & 0 & 99.8739 & 0 & 0 & 0.0148 \\ \(K_{p1}^{\prime\prime}\) & 0.3395 & 1.253 & 0.4061 & 1.456 & 1.30186 \\ \(K_{11}^{\prime\prime}\) & 134.1448 & 110.299 & 100 & 100.097 & 100.1945 \\ \(K_{p2}^{\prime\prime}\) & 2.949742 & 1.1638 & 3.2445 & 1.0008 & 1.05625 \\ \(K_{2}^{\prime\prime}\) & 0 & 19.443 & 0 & 0.1305 & 2.8177 \\ \(K_{p1}^{\prime\prime}\) & 0.582805 & 0.468 & 0.27564 & 0.1712 & 0.38197 \\ \(K_{11}^{\prime\prime\prime}\) & 104.52832 & 100 & 100 & 207.699 & 103.154 \\ \(K_{p2}^{\prime\prime}\) & 1 & 1.0117 & 1 & 1.7164 & 1.47876 \\ \(K_{l2}^{\prime\prime}\) & 0.0002 & 14.123 & 0 & 0 & 1.03239 \\ Best fitness value (ITSE) & 40.803 p.u & 40.123 p.u & 39.149 p.u & 44.141 p.u & 36.052 p.u \\ Time (hour) & 2.5 & 2.7 & 2.9 & 2.7 & 5.3 \\ \hline \end{tabular}
\end{table} 
Table 4: The optimal parameters of the considered algorithms for tuning the PI-PI controller. \begin{table}
\begin{tabular}{c c c c} \hline
**Parameters** & **Scenario \#1** & **Scenario \#2** & **Scenario \#3** \\ \hline Time & From 0.5 s to 0.6 s & From 0.8 s to 0.9 s & From 1.1 s to 1.14 s \\ Solar radiation (\(\mathrm{W/m^{2}}\)) & 600 & 900 & 900 \\ PV cell temperature (\({}^{\circ}\)C) & 45 & 30 & 30 \\ Temperature of the PEMFC (K) & 310 & 340 & 340 \\ Fault & - & - & Three-phase to ground fault at \\ Grid voltage & 0.8 p.u & 1.1 p.u & 1 p.u \\ \hline \end{tabular}
\end{table} 
Table 3: Tested scenarios of the considered optimization algorithms. Each of these simulations was run for 50 iterations, allowing enough time for the algorithms to explore the solution space and converge on an optimal set of parameters. The results of these simulations provide valuable insights into the efficiency and reliability of each algorithm in fine-tuning the PI-PI controller. Table 4 summarizes the optimal parameters derived from each optimizer. These parameters are the key outputs of the optimization process and enhance the performance of the PI-PI controller. By comparing these parameters, one can assess each optimization technique's relative strengths and weaknesses in the context of the specific application. Table 4 reveals that the proposed WSO-WOA algorithm delivered the most optimal solution among the algorithms tested. The best OF value obtained by WSO-WOA was 36.052 p.u., a significant achievement demonstrating the algorithm's effectiveness in fine-tuning the controller parameters. This superior performance underscores the WSO-WOA's ability to efficiently navigate the solution space, avoiding local minima and converging on a highly effective solution. The WOA algorithm emerged as the second-best performer, achieving the best fitness value of 39.149 p.u.