## 3 Numerical Results
### Tracking Performance of the Proposed Q-Learning-Based GMPPT Method  
Figure 8 presents the variations of the duty cycle and PV array output power during the execution of the proposed Q-learning-based GMPPT process for shading pattern 1. It is observed that, in this case, the Q-learning-based GMPPT algorithm needed a relatively long period of time in order to converge close to the GMPP. This is due to the fact that initially the agent has no prior knowledge of where the GMPP may be located at. Thus, it has to visit many states, until it converges to the duty cycle value, which corresponds to an operating point close to the GMPP. When the oscillations start (i.e., time = 29 s), the exploration by the agent of the Q-learning-based GMPPT algorithm stops and the P&O MPPT algorithm starts its execution. Figure 6: The distribution of incident solar irradiation in W/m\({}^{2}\) over each PV module of the PV array for: (**a**) shading pattern 1, (**b**) shading pattern 2, (**c**) shading pattern 3, (**d**) shading pattern 4, (**e**) shading pattern 5, (**f**) shading pattern 6, (**g**) shading pattern 7, (**h**) shading pattern 8 and (**i**) shading pattern 9. Figure 7: The PV array output power–voltage curves for shading patterns 1–9. Figures 9 and 10, respectively, illustrate the duty cycle and PV array output power versus time during the execution of the proposed Q-learning-based GMPPT process for shading patterns 2 and 3. The knowledge gained by the agent during the execution of the GMPPT process for shading pattern 1 did not affect the speed of the GMPP location-detection process for shading pattern 2, since the agent needs to be trained in more shading patterns. Similarly, the knowledge gained during the GMPPT process for shading patterns 1 and 2 did not affect the GMPPT process for locating the GMPP for shading pattern 3. The variations of duty cycle and PV array output power versus time for shading pattern 4, which corresponds to an intermediate power-voltage curve with respect to those of shading patterns 1-3 (Figure 7), are displayed in Figure 11. Since the GMPPT process for shading patterns 1-3 had been executed previously, the agent was now able to detect the GMPP in a shorter period of time by exploiting the knowledge acquired before. As shown in Figure 12, when shading pattern 5 was applied, which was unknown till that time, the time required for detecting the position of the GMPP was further reduced. Figures 13 and 14 present the results of the simulations for shading patterns 6 and 7. After this point, the agent of the Q-learning-based GMPPT process is able to detect the GMPP in unknown intermediate power-voltage curve conditions with respect to those of shading patterns 1 and 2 (Figures 8 and 9) in much less time compared to the previous shading patterns. This happens because the agent had previously acquired enough knowledge from the learning process performed during the GMPPT execution for shading patterns 1-5. Figure 8: Results during execution of the proposed Q-learning-based GMPPT process for shading pattern 1: (**a**) Duty cycle versus time and (**b**) PV array output power versus time. Figure 9: Results during execution of the proposed Q-learning-based GMPPT process for shading pattern 2: (**a**) duty cycle versus time and (**b**) PV array output power versus time. Figure 11: Results during execution of the proposed Q-learning-based GMPPT process for shading pattern 4: (**a**) duty cycle versus time and (**b**) PV array output power versus time. Figure 12: Results during execution of the proposed Q-learning-based GMPPT process for shading pattern 5: (**a**) duty cycle versus time and (**b**) PV array output power versus time. Figure 10: Results during execution of the proposed Q-learning-based GMPPT process for shading pattern 3: (**a**) duty cycle versus time and (**b**) PV array output power versus time. Figure 13: Results during execution of the proposed Q-learning-based GMPPT process for shading pattern 6: (**a**) duty cycle versus time and (**b**) PV array output power versus time.