## 3 Fuzzy MPPT algorithms  
This study made a thorough investigation on common fuzzy input variables for fuzzy logic based MPPT algorithms by reviewing the characteristics of PV cells and past literature on fuzzy MPPT controller designs. Advantages and disadvantages of various designs were reviewed and provided with detailed discussions on issues encountered during the design process. Finally, the designs were verified using computer simulation. **Algorithm (i): P-V Slope and Variation of Slope as the Inputs**  
Algorithm (i) of the fuzzy logic MPPT system used the slope of the PV cell's Power-Voltage (P-V) curve ( \(S(k)\) ) and variation of slope ( \(\Delta S(k)\) ) as the fuzzy input variables. These variables were defined using the following equations:  
\[S(k)=\frac{\Delta P_{PV}}{\Delta V_{PV}}=\frac{I_{PV}(k)\cdot V_{PV}(k)-I_{PV} (k-1)\cdot V_{PV}(k-1)}{V_{PV}(k)-V_{PV}(k-1)} \tag{3}\]  
\[\Delta S(k)=S(k)-S(k-1) \tag{4}\]  
Figure 6 shows the database for fuzzy rules designed according to the fuzzy input variables. A five-term fuzzy set, positive big (PB), positive small (PS), zero (ZE), negative small (NS), and negative big (NB), is defined to describe each linguistic variable. Output from the fuzzy controller (duty ratio command of the buck-boost converter) would change the output voltage and current of the PV cell. Once PV cell outputs change, it would affect the values of the next round of fuzzy input variables. The controller would then re-adjust the output commands accordingly. According to fuzzy logic, the selection of the domain of the inputs and outputs (universe of discourse) will also directly affect the results, so careful designs must be implemented. The general guidelines for determining the membership functions are: (1) defining the boundaries of the PB and NB regions first based the characteristics of the input variables; (2) the range of ZE is then determined based on the predetermined MPPT goal (efficiency criteria); (3) the boundaries of PM and NM are then determined following the selection of the boundaries of PB, NB, and ZE. Design iterations are usually required to reach a satisfactory result. Figure 7 shows the corresponding input and output membership functions. Figure 6: Fuzzy rules for P-V slope and changes of slope as the inputs. According to Figure 6, the fuzzy rule database was divided into three regions. The following provides detailed explanations on the design considerations for the rule database of each region. **Region 1. **: The slope is negative in this region, showing that the operating point of the PV cell is located on the right side of the MPP. At this time, duty ratio should be increased in order to track and achieve the MPP. The second set of input variables would be used to determine the magnitude of the duty ratio to be increased. However, when \(S(k)\) and \(\Delta S(k)\) are both NB, the calculations may lead to the wrong outputs given that \(S(k)=\Delta P_{{}_{pr}}\ /\ \Delta V_{{}_{pr}}\). When the operating point is close to the MPP with both \(\Delta P_{{}_{pr}}\) and \(\Delta V_{{}_{pr}}\) being very small values, output would be set as ZE in order to avoid \(S(k)\) from becoming NB and generate error output after division. When \(S(k)\) is NS and \(\Delta S(k)\) is either negative or zero, it would mean that the operating point would be located on the right side of the MPP and is tending to move to the right side further. Hence, the rule database was set to increase duty ratio under this condition. If \(\Delta S(k)\) is positive at this point, it would mean that the operating point is approaching the MPP from the right side. At this time, the output would be set to ZE in order to prevent over-increasing the duty ratio and causing the system to oscillate. **Region 2. **: In this region, \(S(k)\) is ZE, meaning that the operating point would be close to the MPP. Hence, the principle would be to maintain the same duty ratio under such conditions.