## 2 Materials and Methods
### Design of the Fuzzy Logic Controller  
The structure of the fuzzy logic controller is shown in Figure 7. The input variables are the error signal and the error derivate. The error signal is the signal at the output of the algorithm that follows up the maximum power point MPP. The basis of rules used in the case of this controller is shown at Table 1.  
The rule base for the fuzzy logic regulator was made according to Table 1. To create the rule base, the following operators were used: if, and, and then. NB--high negative, NM--medium negative, NS--small negative, ZE--zero, PS--small positive, PM--medium positive, PB--large positive. Examples of rules are:  
1. If (E(K) is NM) and (dE(k) is NB), then (u(k) is ZE);
2. If (E(K) is PB) and (dE(k) is NS), then (u(k) is PB).  
For the design of the fuzzy logic controller, the max-min inference method was used for the input variables [24]. To determine the output variable from the logical fuzzy controller, the center of gravity method was used for defuzzification [24].  
Model in MATLAB-Simulink of the Buck DC-DC Converter Controlled through the Perturb and Observe (P&O) Algorithm without a Fuzzy Logic Controller  
The block diagram of the model elaborated in MATLAB-Simulink for the photovoltaic system connected to a resistive load by means of the step-down converter is presented in Figure 8. The main components of the model are: (a) photovoltaic module, (b) source of solar radiation incident on the solar panels and the ambient temperature, (c) DC-DC buck converter, (d) resistive load, (e) measurement blocks, and (f) control subsystem of the P&O algorithm. The photovoltaic system was composed of two photovoltaic panels in parallel connection. The running point at the maximum power of the photovoltaic system was determined as shown at Figure 4 and had the following coordinates: \(P_{max}=448.7\): W, \(U_{max}=29.6\) V. For the source of solar radiation incident on the solar panels and ambient temperature, the variation characteristics were imposed for a simulation time equal to 2 s. To implement the Perturb and Observe algorithm, the MATLAB function and function  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & & & & & & & & & \\ \cline{3-8}  & & **NB** & **NM** & **NS** & **ZE** & **PS** & **PM** & **PB** \\ \hline \multirow{8}{*}{E(k)} & NB & ZE & ZE & ZE & NB & NB & NB & NB \\ \cline{2-8}  & NM & ZE & ZE & ZE & NM & NM & NM & NM \\ \cline{2-8}  & NS & NS & ZE & ZE & NS & NS & NS & NS \\ \cline{2-8}  & ZE & NM & NS & ZE & ZE & ZE & PS & PM \\ \cline{2-8}  & PS & PM & PS & PS & PS & ZE & ZE & ZE \\ \cline{2-8}  & PM & PM & PM & PM & ZE & ZE & ZE & ZE \\ \cline{2-8}  & PB & PB & PB & PB & ZE & ZE & ZE & ZE \\ \hline \hline \end{tabular}
\end{table}
Table 1: Basis of rules for the fuzzy logic controller.  
Figure 7: Structure of the fuzzy logic controller.  
were used, for which a program was issued in the programming environment C++. The Perturb and Observe (P&O) algorithm is an MPPT conventional algorithm.  
Model in MATLAB-Simulink of the Buck DC-DC Converter Controlled through the Perturb and Observe (P&O) Algorithm with a Fuzzy Logic Controller  
The model shown in Figure 9 has received the fuzzy logic controller between the implementing block of the P&O algorithm and the pulse generating block PWM to control the power transistor in the structure of the buck-type step-down converter. The input data in this controller are the error and error derivate. The basis of rules was elaborated within the Simulink program. For de-fuzzying, the method of the gravity center was used. The Perturb and Observe algorithm with a fuzzy logic controller is an intelligent hybrid MPPT algorithm.  
Figure 8: Block diagram of the model for the P&O algorithm.  
Figure 9: Block diagram of the model for the P&O algorithm with a fuzzy logic controller.