Improving the dynamic performances of an MPPT controller for a Photovoltaic system using fuzzy logic

This paper deals with analysis, modeling, and simulation of a Photovoltaic (PV) system with an intelligent Maximum Power Point Tracking (MPPT) controller based on fuzzy logic and to compare the dynamic performances: rapidity and stability of a fuzzy controller with the traditional controller based on the “Perturb and Observe” algorithm (P&O). The system is simulated under Simulink/Matlab environment. The simulation results show that the fuzzy MPPT controller is faster and more stable during abrupt changes in irradiation values.


Introduction
In order to integrate the renewable energies in the electric grid and minimizing the pollution resulting from the use of fossil fuels and to guarantee a better yield of green electricity production. It is necessary to control the sources of renewable energies such as solar photovoltaic or wind power. In this context we began with photovoltaic energy; nevertheless, the production of this energy is nonlinear and it varies according to the irradiance and the temperature. This paper is organized as follows: paragraph 2 is reserved for the study of the photovoltaic system; the first sub-paragraph is reserved for the presentation of the photovoltaic panel and their mathematical model. After that, we will simulate this model on SIMULINK software. The second subparagraph is reserved for the study of the DC-DC converter. In the third sub-paragraph, we are interested in the MPPT control; which we will simulate two algorithms: one based on the conventional P&O algorithm and the other based on fuzzy logic. Finally, we will conclude the simulation results of this work 2 The photovoltaic system The photovoltaic system is controlled by the MPPT command; it is presented in Figure 1 Fig. 1. The photovoltaic system.
A photovoltaic system is divided in four blocks: the first block represents the energy source of the photovoltaic panel whose role is to convert the solar irradiance to direct current, the second block is a DC-DC static converter that allows making an impedance matching so that the panel delivers the maximum power, the third block represents the MPPT control system based on an algorithm that allows acting on the duty cycle to continuously extract maximum power, and The fourth block represents the DC load.

PV Array Modeling
A PV module consists of a number of solar cells connected in series and parallel to obtain the desired voltage and current output levels. A solar panel cell is a p-n semiconductor junction. When exposed to the solar irradiance, a DC current is generated. The generated current varies linearly with the solar irradiance. For simplicity, the single-diode model of Figure 2 is used in this paper. This model presents a perfect compromise in terms of simplicity and precision [1,2]. The equivalent circuit of the general model which consists of a photocurrent (Iph), a diode, a shunt resistor (Rp) representing a leakage current, and a series resistor (Rs) expressing an internal resistance to the circulation of the current, is shown in Figure 2 [3].

Fig. 2. Equivalent Model of PV cell
In Figure 2 By applying Kirchhoff law, the current will be obtained through this equation: Where: Ipv: PV generator current supplied (A), and Iph is the photocurrent that mainly depends on the solar irradiance and cell's working temperature, which is described in Equation (2) [4] . ( ) .
Where Isc is the cell's short-circuit current at a 25°C and (1000W/m 2 ), Ki is the cell's short-circuit current temperature coefficient, Tref is the cell's reference temperature in Kelvin (K) (=25C°+273), G is the solar irradiance in W/m 2 and Gref is the cell's reference irradiation (=1000W/m 2 ), and Ip is the current leak in the parallel resistor and is given in this following Equation (3) (4) Where: Vpv: PV Output voltage (V), q is the Electron charge (1.6×10-19 C), K is the Boltzman constant (1.38×10-23 J/K), Tc: is a Cell temperature in Kelvin (K), A is the ideal factor dependent on PV technology, and Rs: is a series resistance (Ω), and Is is the cell's saturation current varies with the cell temperature, which is described in Equation (5) (5) Where Irs is the cell's reverse saturation current at a reference temperature and solar radiation, Eg: is the bang-gap energy of the semiconductor in the cell in electron-volt (eV). The Reverse saturation current can be described in Equation (6) (6) Where Isc: is the short-circuit current and Voc: is the open-circuit voltage.
If we replace the equations (3) and (4) in equation (1), the Vpv-Ipv characteristic equation of a solar panel is given as in Equation (7) where Np is Cell number parallel of the module and Ns is the Cell number in series (Np=1 and Ns=36) [4].

Simulation of PV panel using Matlab/Simulink
The used PV Panel for validation of our approach and our algorithms has the specifications summarized in Table 1.   From the previous curves, it can be seen that the current produced by the Iph cell and the power is practically proportional to the solar irradiance G.
The maximum point of the product of V and I represent the maximum power point (MPP) Pmax of the solar module, this point corresponds to the MPP whose coordinates are (Vmpp, Impp). The solar panel must always be operated around this point in order to extract the maximum power and to achieve this objective various MPPT algorithms can be used.

Boost Converter Modeling
To get the maximum power, a boost converter is installed between the panel and the charge resistor and we use the duty cycle D to modify the equivalent charge resistor viewed by the source so that the maximum power is delivered. Consider a boost type converter connected to a PV module with a resistive load as illustrated in Figure 5.  Supposing that the inductor current is continuous, the input voltage and output voltage of a boost dc-dc converter at steady state can be expressed in Equation (8): Where Vout is the output voltage, Vpv is the voltage input (PV voltage), and D: is the duty cycle D.
PV out V D V  (9) We consider an ideal model, neglecting the switching time of the transistor and the values of the internal resistors of the inductor and capacitor. The design of the boost converter leads to the values summarized in Table 2.

MPPT algorithm control
The major challenge of MPPT algorithms is to automatically search the point of coordinates (VMPP, IMPP). This point corresponds to the maximum PMPP power supplied by a photovoltaic panel under a given temperature and irradiance [5,6]. Various [7,8]; nevertheless, the perturb and observe (P&O) technique is widely used, especially for low-cost implementation. But the use of this algorithm has some disadvantages that we will present in section 3.

Perturb and Observe (P&O):
The P&O control principle consists in generating a perturbation of the operating point (by increasing or decreasing the voltage Vpv ) then observe the effect on PV power (Ppv). If the power increases (∆Ppv > 0), we are in the right direction; we continue the perturbation in the same direction .if not (∆Ppv < 0), we're moving away from the MPP we reverse the perturbation direction [9] as illustrated in Figure 6 The flowchart for the P&O algorithm is shown in Figure 7 where ΔD is the perturbation step size

Fuzzy Logic Controller (FLC)
Fuzzy logic control has been used in MPPT systems; this control offers the advantage of being a robust and fast controller. It does not need exact knowledge of the mathematical model to be regulated [10]. Besides, fuzzy logic simplifies dealing with nonlinearities in systems [11]. The FLC system as shown in Figure 8 has four functional blocks namely: fuzzification, inference mechanism, rule base, and defuzzification [12,13].  Switching frequency 20 KHz the fuzzy logic controller will be error E(k) and Change in Error CE(k), which are shown in Equation (10) and Equation (11) for sample times k [14].
The output ΔD(k) allows adjusting the duty cycle that controls the boost converter in order to track the MPP according to climate variations. The duty cycle D(k) value was calculated using Equation (12) [15].
Input E(k) shows if the operating point at time k is placed to the right or to the left of the MPP on the PV characteristic curve, as shown in Figure 6, while input CE(k) gives the direction of this point. The command action D is the duty cycle of the PWM signal that commands the boost converter. [14,16,17] Fuzzy processing follows three essential steps:  Fuzzification: Fuzzification consists of converting the digital input variables E, CE, and output variable ΔD, to linguistic variables and defining the membership functions for the input and output variables.
For this article, five membership functions are used according to the following linguistic variables: Negative Big (NB), Negative Small (NS), Zero (ZE), Positive Small (PS), and Positive Big (PB). Figure  9,a,b and c, shows the membership functions for the inputs and output of the FLC. The inference makes the link between an output variable and the input variables transformed into linguistic variables. In our case, the inference is composed of 25 rules listed in Table 3.

Table 3: fuzzy control rules
For this article, the inference method preferred is Mamdani's method, and for the digital processing of inference, we use the Max-min method.

 Defuzzification
In the defuzzification step, the linguistic variables based on the rules of inference are converted to crisp output. The Center of gravity method for defuzzification is used in this paper; the principle consists in determining the center of gravity of the area calculated previously by the inference method used. The crisp value of the control output ΔD is computed by Equation (13) [18,19]:

Simulation results and discussion
The PV system is implemented under the SIMULINK/MATLAB environment. we started to simulate the PV system with the MPPT command based on the P&O algorithm, with two fixed steps ΔD=0.001 and ΔD=0.01 at G=1000 W/m 2 and T=25°C. The evolution of the PV panel output power and the dynamic power response of the system are presented in Figure 10 that shows the simulation results of the classical P&O method Fig. 10. The response of the PV power using the P&O algorithm Figure 10 shows that the MPP is achieved in the steady-state and the MPPT control based on the P&O algorithm converges to a maximum power point (Pmpp=40W). However, the dynamic response is not the same for the two-step sizes. For ΔD=0.001 the power response is quite slow (65ms) but we notice a small oscillation around MPP.With a higher step size ΔD=0.01, the response time is reduced (9.5 ms) but the oscillations around MPP are increased. Figure 11 shows the response of the Vpv voltage using the P&O algorithm which gives us the order of magnitude of the Vmpp overshoot which equals approximately 18% of Vmpp (Vmpp=17.8 V) for the two-step sizes, and the value of that overshoot is quite high. We also notice that the overshoot duration for ΔD=0.001 is longer than the overshoot duration for ΔD=0.01 and this affects the efficiency of the PV system. Fig. 11. The response of the Voltage Vpv using P&O algorithm So the difficulty in the MPPT based on the P&O algorithm is the choice of perturbation step size; this step value has a significant influence on the rapidity of tracking the MPP. In fact, better rapidity can be achieved with a large value of this step. But in this case, the operating point will be oscillated significantly around the MPP which results in low system efficiency; this situation is reversed when the value of this step is low.

E(k)
So, the idea is to have an intelligent MPPT algorithm with variable and flexible step size, that's why we proposed an MPPT controller based on fuzzy logic.
In order to evaluate the dynamic performances of a fuzzy MPPT controller with the conventional P&O controller, we modeled and simulated the system using SIMULINK/MATLAB software In the beginning, the PV system is tested at standard test conditions (STC), which are an irradiance of 1000W/m 2 , a cell temperature of 25°C. The results of the power response by comparing the two MPPT commands FLC and P&O with fixed step size ΔD=0.001 which are shown in Figure 12 indicate that the proposed FLC compared to classical P&O is fast to achieve the PPM perfectly, the response time of FLC is assimilated to 3.5 ms. However, for P&O MPPT, the response time equals approximately 65ms; moreover, the use of the FLC command allows us to have a very stable power response in steady-state as opposed in the P&O control which presents oscillations around PPM

Fig. 12. Output PV power with P&O and proposed FLC
We can clearly see that the overshoot of the voltage response is a very short peak and practically invisible when using an FLC controller as shown in Figure 13. The next simulation consists in testing the dynamics of the two algorithms according to different irradiance levels at a fixed temperature set at 25°C. Figure 14 shows the varying levels of irradiance   Figure 15 we notice that the designed FLC has a good starting dynamic to reach the MPP at different irradiance levels. This dynamic is perfectly in alignment with the direction of the MPP. Note also the stability of the power response due to a low oscillation in the permanent regime.
To confirm the dynamic performance of our method we have simulated the second scenario of irradiance levels shown in Figure 16. Figure 17, Figure 18 and Figure 19 show respectively the response of PV Power; PV Voltage and PV current. The figures display the good behavior of our FLC model to follow different parameters in terms of rapidity and stability such as Pmpp, Vmpp, and Impp, which improves the solar panel performances and PV system efficiency.

Conclusion and Perspectives
This paper has presented complete modeling and simulation of a PV system using SIMULINK (PV module, boost converter, fuzzy and P&O controllers). We have proposed a Fuzzy logic controller (FLC) and evaluated the performances of the recommended MPPT control under different irradiance levels to track the maximum power point of the PV panel. We have demonstrated that the FLC has high dynamic performances in case of rapid changes in PV operating irradiation. With the proposed method, the response time for tracking the maximum power point MPP is improved from 65 ms for the classical P&O algorithm to 3.5 ms for the proposed fuzzy logic controller. We have demonstrated also that the use of the P&O algorithm makes the maximum point tracking very slow and affects the system stability because it introduces oscillations around the MPP.
So, the main contribution of this article is the guarantee of supplying the maximum possible power with better rapidity and stability by using the proposed method, which improves the efficiency of a PV system. The next step of this work is to implement this controller on the Arduino board.