## 4 Implementation and Simulation Results
### Third case of partial shading  
Table 5 presents a comparative study between the two MPPT algorithms for different types of shading distribution on the panels. The essential criteria for a judicious comparison between the two algorithms are:  
- Track of the point of maximum power under the different levels of partial shading.  
- Rapid convergence towards the point of the global maximum.  
As can be observed, the simulation results from Figure 10 to Figure 13 show the evolution of the power, current, voltage and duty cycle of the PV system for the four types of shading distribution we have tested on the panels. From these results, it can be observed that the two solutions ensure a good MPP tracking. The advantage of the PSO MPPT over the GWO MPPT is related to two issues: (i) the amplitude of the oscillations at the transient state and (ii) the accuracy to track the point of maximum power. A high oscillation exists for the case of GWO, which can be one the weaknesses of this algorithm. There is also a small oscillation when executing the PSO at the beginning, when the radiation form changes. However, this will not cause a problem as in the real situation, the modification of the radiation comes very slow. So, we a look a better performance in a real situation.  
The application of these algorithms in real time requires the use of the high-speed processor given the large number of operations to be carried out in one second (processing and control measurement). Therefore, the time needed to converge towards the best  
Figure 13: PV characteristics under partial shading: (200 W/m\({}^{2}\), 300 W/m\({}^{2}\), 700 W/m\({}^{2}\), 1000 W/m\({}^{2}\)).  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**Uniform Irradiation**} & \multicolumn{2}{c}{**First Case of Partial**} & \multicolumn{2}{c}{**Second Case of Partial**} & \multicolumn{2}{c}{**Third Case of Partial**} \\
**MPPT Techniques** & & & & & **Shading** & & & **Shading** \\ \cline{2-9}  & **PSO** & **GWO** & **PSO** & **GWO** & **PSO** & **GWO** & **PSO** & **GWO** \\ \hline
**Time to reach the MPP (s)** & 0.081 & 0.096 & 0.071 & 0.106 & 0.079 & 0.091 & 0.0561 & 0.105 \\ \hline
**Extracted Power at MPP (W)** & 993.2 & 994.7 & 645.6 & 645.1 & 633.9 & 628 & 359.1 & 357.5 \\ \hline
**Tracking Efficiency (\%)** & 99.71 & 99.86 & 99.89 & 99.81 & 99.37 & 98.44 & 98.81 & 98.37 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Comparative study between PSO-MPPT and GWO-MPPT.  
response depends on the speed of the algorithm used and the material available (essentially the speed of the processor). In addition, the presence of high amplitude oscillations during the transient phase is a harmful phenomenon for electrical systems and can cause a variety of problems. According to the simulation results and the criteria indicated above, the PSO MPPT algorithm shows itself well for the real-time application.  
We have also studied how these algorithms impact on the battery State-of-Charge (SoC). In particular, we have studied the effects on a representative lithium-ion battery characterized by the parameters in Table 6. Figure 14 shows the efficiency of PSO MPPT versus GWO MPPT in terms of storage charge in the battery under uniform irradiation. A gain of about 0.0014% SoC for 1 s corresponds to almost 5.04% of battery charge for one hour.