## 3 Fuzzy MPPT algorithms
If  
Figure 7: Membership functions for Algorithm (i): (**a**) Membership function for P-V slope, (**b**) Membership function for changes of slope; (**c**) Membership function for increment of duty ratio command. \(\Delta S(k)\) is NB, then the operating point would be rapidly approaching the MPP from the left side (duty ratio decreased). In order to prevent the operating point from moving to the right side of the MPP, the controller would use PS to suppress the change of magnitude of the duty ratio in the opposite direction. When \(\Delta S(k)\) is PB, the operating point would be located on the right side of the MPP. In order to prevent sudden over-increases of the duty ratio that may cause the operating point to cross-over to the left side of the MPP, the controller would use NS to suppress the magnitude of change of the duty ratio. * When \(S(k)\) is positive, the operating point would be located on the left side of the MPP. Under such conditions, the duty ratio should be decreased for MPPT. A second set of input variables would be used to determine the magnitude of duty ratio to be decreased. When both \(S(k)\) and \(\Delta S(k)\) are PB, the controller may generate the wrong outputs owing to the reasons similar to that with Region 1. Hence, the output should be set to ZE to avoid such conditions. When the system determines that \(S(k)\) is PS and that \(\Delta S(k)\) is positive or zero, the operating point would be on the left side of the MPP and is tending to move to left further. The rule database would be set to reduce duty ratio under such conditions. When \(\Delta S(k)\) is negative at this point, the operating point would be approaching the MPP from the left side. At this time, the output would be set to ZE in order to prevent over-decreasing the duty ratio and system oscillation. In order to verify the design of the fuzzy logic MPPT algorithm, a solar power MPPT simulation system was established on MATLAB as the verification model. As the MPPT system must be capable of maintaining normal operations during changing irradiations, the simulation system would therefore change irradiation levels every 0.2 seconds using the sequence \(G=1\to 0.8\to 0.5\to 0.6\to 0.4\). Updating rate of the fuzzy controller was set to 100 Hz and the load resistance set to 8 \(\Omega\). Figure 8 shows the simulation results. Dotted red lines in the figure show the maximum power output under different irradiation. The marks with (X, Y) values show the steady state results. Y-value indicates power delivered from the PV panel. X-value is the corresponding instant of time. Results show that even with changing irradiation, the MPPT system was still capable of successfully tracking the MPP. Hence, this MPPT system design would be considered successful. Figure 8: Simulation results using P-V slope and changes of slope as the inputs. **Algorithm (ii): P-V Slope and Variation of Power as the Inputs**  
Algorithm (ii) of the fuzzy logic MPPT system used the slope \(S(k)\) and variation of power (\(\Delta P_{pv}\)) as the fuzzy input variables. Figure 9 shows the database for fuzzy rules designed according to the fuzzy input variables. Figure 10 shows the corresponding input and output membership functions. Figure 10: Membership functions for Algorithm (ii): (**a**). Membership function for P-V slope; (**b**) Membership function for changes of slope; (**c**). Membership function for increment of duty ratio command. Figure 9: Fuzzy rules for P-V slope and variation of power as the inputs. The fuzzy rules database was divided into 4 regions according to the characteristics of the P-V curve of the PV cell. Detailed analysis and discussions are provided below. **Region 1**. The main determinant in this region is a negative slope, with the operating point located on the right side of the MPP. Hence, the system is able to conclude that duty ratio needs to be increased to track the MPP. Variation to power output would be used to acquire the magnitude of increase for the duty ratio. **Region 2**. The slope is ZE in this region.