Improved PSO: A Comparative Study in MPPT Algorithm for PV System Control under Partial Shading Conditions

This paper deals with the implementation and analysis of a new maximum power point tracking (MPPT) control method, which is tested under variable climatic conditions. This new MPPT strategy has been created for photovoltaic systems based on Particle Swarm Optimization (PSO). The novel Improved Particle Swarm Optimization (IPSO) algorithm is tested in several simulations which have been implemented in view of the various system responses such as: voltage, current, and power. The performances of the proposed IPSO algorithm have been completed and compared with results of well-established methods adopted in the literature showing a higher accuracy.


Introduction
In recent years, solar energy has become one of the most popular renewable energy sources due to several advantages related to its availability and environmental sustainability [1][2][3]. Photovoltaic (PV) cells, as well as PV modules, strings, and arrays, are characterized by a nonlinear power-voltage (P-V) curve that depends on the incident irradiance, PV cells temperature [4,5] and, when they exist, partial shadings. One of the fundamental issues in PV generators is how to operate the generator at its maximum power point (MPP). Recently, a large number of research proposed different maximum power point tracking (MPPT) techniques. Traditional MPPT algorithms, such as power feedback, incremental conductance [6], short circuit current [7,8], open circuit voltage, ripple correlation control (RCC), and perturb and observe methods [9] require little hardware equipment and low computational burden. Nevertheless, they suffer of some drawbacks such as poor tracking accuracy, oscillations around the MPP, and/or long tracking time which reduces the system efficiency under rapidly changing environmental conditions. Several advanced MPPT techniques have been proposed to overcome these issues, as well as for tracking under various irradiance conditions and under partial shadings. They include methods based on Fuzzy Logic [5,10], Neural Network [11,12], Genetic Algorithms [13], and Particle Swarm Optimization (PSO) [14]. These MPPT algorithms differ in many features such as their complexity and the resulting computational burden, their steady state accuracy and efficiency, their range of effectiveness, their tracking speed, and their ability to track the MPP under changing environmental conditions and partial shading. PSO is a meta-heuristic algorithm and could be assigned to the group of optimization methods. The PSO algorithm was first implemented in a MPPT system by Miyateke et al. [15]. Authors have investigated the performance of the PSO algorithm under partial shading conditions, and the results show that PSO is capable of carrying out the global MPP search in the PV systems power output, under partial shading conditions. This is true only in the case that the partial shading has a very slow dynamic, that is, if the I-V characteristic does not change significantly during the global optimum research process [16].
The Improved Particle Swarm Optimization (IPSO) here proposed and implemented enhances the controller capabilities in the convergence speed and the MPPT detection accuracy when temperature and/or irradiation change. The enhancement of the PV system performance, in terms of convergence speed, stability, and accuracy, is based on the development of the controller algorithm. This controller process is responsible for computing the duty cycle value sending every sample time. Hence, the here proposed Improved Particle Swarm Optimization (IPSO) method is mainly affected by the determination of the correct duty cycle based on a mixed metric. This metric is able to converge the PV system towards the MPP under an environmental conditions change (especially shading conditions) and guarantee the highest accuracy. In addition, a comparison with the considered methods available in literature (ANN-PSO, P&O and GA) is presented.
The paper is organized as follows: Section 2 illustrates the modeling and the fundamental characteristics of the PV system used to test the proposed IPSO, Section 3 explains the IPSO algorithm, and Section 4 analyzes simulation results.

Characteristic of the Photovoltaic System
To validate the efficiency of generic IPSO algorithm, the modeling and programming of different PV system compositions: PV panel, IPSO controller, DC/DC boost converter and a resistive load are fundamental and they are associated as illustrated in Figure 1.

PV Module Modeling
The PV module taken into account in this work is the polycrystalline BP Solar MSX 120, whose ratings are reported in Table 1. This PV module consists of 72 polycrystalline silicon solar cells electrically arranged as four series strings of 18 cells, allowing three array configurations and the installation of bypass diodes on each 18-cell string. In this work, the 72-cell series configuration with 4 bypass diodes is taken into account.
The equivalent circuit of the PV cell is based on the five-parameter model, as shown in Figure 2, where I ph represents the light-generated current, I 0 and n are the dark saturation current of the PN junction and the diode ideality factor, respectively [17,18], R sh is the cell shunt resistance, and R s is the cell series resistance. Hence, the I-V curve of the PV cell is defined by the following implicit equation: V t is the thermal voltage: where k is the Boltzmann's constant, q is the charge on the electron, and T is the PN junction temperature, which is the PV cell temperature T c , in Kelvin. The light generated current depends on the irradiance, G, and the cell temperature as: where the subscript re f stands for reference conditions that usually are the Standard Test Conditions (STC) that are G re f equal to 1000 W/m 2 , cell temperature equal to 25 • C and Air Mass equal to 1.5. The reverse saturation current depends on the cell temperature as: where E g is the bandgap energy of the silicon that is in turn temperature dependent as: The shunt resistance represents the whole set of mechanisms that can bring a photo-excited electron from the conduction band back to the valence band without flowing through the external circuit, mainly radiative recombination and recombination through defects. Hence, shunt resistance changes with solar radiation. The inversely proportional dependence of shunt resistance with irradiance is a good trade-off between simplicity and accuracy: Ideality factor of the cell and the series resistance are considered not dependent on irradiance and cell temperature. The set of five values that characterize the equivalent circuit in the reference conditions are calculated from the PV module ratings (reported in Table 1) following the methodology described in [19]; the results are reported in Table 2. The I-V curve of each PV cell into the module is calculated according to Equations (1)-(6) for a given pair of incident irradiance and cell temperature.
Then, the PV module I-V curve is calculated combining the I-V curves of each cell and the I-V curves of each bypass diode in order to comply with the series and parallel electrical connection constraints. In this paper, the most commonly used crystalline silicon PV module model has been adopted and simulations parameters are also those presented in the above-mentioned tables according to an existing manufactured PV module. However, the here proposed IPSO method is also valid for other PV modules' technologies as thin film and, more in general, in any case the here presented control algorithm should be calibrated for the peculiarities of the chosen type of PV module. Finally, the temperature effect could be added in the simulations, by matching the thermal model with the electrical model and calculate the I-V (or P-V) curve as a function of the temperature determined by the thermal model. However, thermal time constants are usually longer than the time frame of the simulation made in the context of this paper, which aims to analyze the behavior of the control logic against sudden irradiation steps. Therefore, we neglected thermal behavior in the simulations presented here.

Modeling of DC-DC Boost Converter and Design
The average state space model of the boost converter connected to the PV module is represented by the following set of equations [20][21][22][23]: where I pv is the PV module output current V pv is the output voltage of the PV, as well as the DC/DC converter input voltage and the voltage across the capacitor C 1 , I L is the current through the inductor L and V out is the voltage across the capacitor C 2 , R load is the resistance of the load. The DC-DC boost converter is controlled to achieve the MPP by adjusting its duty cycle D (D ∈ D inf ...D sup ). This is generated by an adequate MPPT controller that is a Particle Swarm Optimization (PSO) algorithm.

MPPT Controller Based on the PSO Algorithm
In order to properly track the MPP, the PSO algorithm is generated, developed, and integrated as a PV system controller.

Traditional PSO Method
The PSO algorithm, called cooperative particles, consists of solving the problem of nonlinear systems optimization using a group of N p particles (P i ) 2≤i≤N p . This technique is based on five steps: [24][25][26][27][28][29]: -Step 1: Randomize the position of each particle D i using Equation (8): where α is a random number [D in f ...D sup ] -Step 2: Each particle finds its local best position (D Pbesti ). -Step 3: All particles should follow the global best position ( D Gbest ). -Step 4: Adjustment of each particle position using Equations (9) and (10): where D k+1 i is the new particle position; D k i is the actual particle position, ∆D k+1 i is the perturbation to apply at the actual position; ∆D k i is the perturbation in the previous iteration; ω is the inertia weight; r 1 and r 2 are random variables within [0,1]; c 1 is the cognitive coefficient; c 2 is the social coefficient; D Gbest is the global best position of the leader swarm particle; D Pbest,i is the local best position of the ith-particle.

Sensitivity Analysis of the PSO Parameters (w, α, β)
To adapt the PSO technique in MPPT field, the particle position Di is considered as a duty cycle and is the duty cycle step that is based on the weighted summation of three criteria. This metric is expressed as follows: where w + α + β = 1. D Gbest is the duty cycle which corresponds to the global best power, while D Pbesti designed the duty cycle value of i-th particle, which corresponds to the local best power generated during k iteration. For example, if w = 1 (α = β = 0), the duty cycle step (∆D k+1 i ) never changes and it continues to increase or decrease until the maximum or the minimum limits (D sup or D in f ) of duty cycle are reached. It causes the PV system to never achieve the MPP.
In addition, if α = 1 (w = β = 0), the new duty cycle value of particle i-th (D k+1 i ) converges to the local best duty cycle P besti . This choice makes each particle insensitive to the global best position. Finally, if β = 1 (α = w = 0), all particles converge to the first global best duty cycle D Gbest .
The tuning of these three weighting coefficients results in different static and dynamic behaviour of the controller. A sensitivity analysis should be performed in order to assess the effectiveness of the three parameters mix. Three main scenarios are presented in Table 3 after the sensitivity analysis which was carried out. Before testing the PV system in different sets under constant environmental conditions (irradiance G = 800 W/m 2 and cell temperature Tc = 25 • C), under these conditions, the maximum power (P mp ) is 94.907 W, corresponding to a PV module voltage that is equal to 33.33 V. Figure 3 shows the simulation results obtained by using the sets of parameters reported in Table 3.   (12) and (13), respectively: where P ss is the PV power in steady state, P mpp is the power of the global maximum power point, and E L (%) is the energy loss as the share of the overall energy computed in the time frame E tot . To compare the PSO controller performances in the three sets of parameters, as shown in Table 4, the PV system controlled by PSO has been simulated for a time frame of 5 s, with t 0 = 0 s and t n = 5 s. It can be observed that set 1 is the fastest at achieving the steady state, but with the worst accuracy compared to other sets. The transient of PV output voltage, and consequently the transient of power, of set 1 has a small ripple and the less tracking losses due to its rapidity to achieve the steady state. On the other hand, the accuracy in the steady state is the lowest. These features are related to the high value of β, compared to the other two parameters. On the contrary, the parameters set 3 ensures the best steady state accuracy, almost equal to 100%, but the steady state is reached after a long transient response characterized by a lot of oscillations between the D Gbest and D Pbesti . A large scanning interval allows the system to search the optimum duty cycle that carries the PV system to the MPP. These features are related to the high value of α, compared to the other two parameters. A balanced metric, which corresponds to set 2, achieves a trade-off between time required to reach the steady state and steady state accuracy. Due to this metric, the duty cycle will be evolved with different steps and, after some iterations, the PV system converges to the MPP with acceptable rapidity and high precision.

Improved PSO Method
To guarantee the convergence of PV system towards the MPP regardless of environment conditions variations, the Improved PSO (IPSO) algorithm was created and presented in the following steps: -Step 1: Initialize N p, w, α, and β parameters. -Step 2: Initialize the k-th iteration and the index of the i-th particle at 1. -Step 3: If k ≤ N p, the command which will be generated by the i-th particle is determined by applying Equation (8).
If k > N p, the algorithm selected the i-th particle, which satisfies the following condition: the division remainder of (k-i) by N p is equal to 0, in order to complete the step and the new duty cycle D i using Equations (9) and (10). -Step 4: Send the command U = D i to Boost converter. Measured the voltage V pv and current I pv to calculate the output power that corresponds to the i-th particle. -Step 5: The i-th particle must update its own best duty cycle which is designated D Pbesti . Moreover, it is necessary to put a comparison between the best powers generated by N p particles during k iteration in order to update D Gbest generated by the leader particle. -Step 6: If the convergence of each duty cycle produced by the particle i to D Gbest is not reached yet, increase k by 1 and return to step 3. If D Gbest is reached by all the particles that is to say (D Pbesti ) 1≤i≤N p = D Gbest , then the converter must be operating in a regular way with this optimal duty cycle until a change in environmental conditions occurs which causes the return to step 2 for tracking the new MPP. These steps were summarized in the following flowchart ( Figure 4):

Simulation Results under Different Environment Conditions
In order to highlight the IPSO method, different environmental conditions were adopted and applied on the PV system.

IPSO Method under Different Particles Number and Fixed Environment Conditions
To test the ability of IPSO algorithm for MPP reaching and know the effect of Np variation on performance satisfaction, a simple environment condition (G = 800 W/m 2 , Tc = 48 • C) was applied on the PV system. The simulations results are presented in Figures 5-8, which corresponds to N p = 2, N p = 3, N p = 6 and N p = 10, respectively.    To be able to interpret the performance of Figures 5-8, a comparative table is generated. Table 5 shows that the precision when N p = 3 is more important than N p = 2, whereas, for the same interval time, the precision begins to decline when N p becomes greater than 3. It is remarkable also that the tracking losses energy grow when the N p increase due to the alternation between particle decisions, while the transient response for N p = 3 is smaller than N p = 2, and it increases beyond N p = 3. Hence, the existence of threshold N p value that must be completed to guarantee the best performances.

IPSO Method under a Series of Uniform Irradiation
In order to assess the IPSO method, a comparison with different methods that were found in literature [30,31], is presented. Therefore, the IPSO method was tested under a steep variation of the irradiance conditions, which is distributed over four intervals, while keeping the constant temperature equal to 25 • C as indicated in Figure 9 which are the same conditions found in literature [30,31]. This distribution is just an example which allows for knowing the robustness of the IPSO method and make a comparison with other works. A series of simulations has been carried out with a different number of particles (N p) that will be defined when the error between the power resulting from G best and the maximum power (P mpp ) tends towards 0. In Figure 10, the maximum power (P mpp ) and the optimal voltage (V mpp ) were determined after the simulation of the model under different values of irradiance which are showed in Table 6.  In order to track the MPP using IPSO method, it is indispensable to choose the adequate number of particles N p. The simulation should be started using the minimum N p which is equal to 2 and then, if the performances such as rapidity and accuracy are not satisfied, the N p should be increased.
In this context, a PSO method based on 2 and 3 particles has been tested to verify the ability of the IPSO algorithm to track the MPP and to analyze the effects of increasing N p on transient duration, tracking losses, and steady state accuracy. The simulation results are presented in Figure 11 (N p = 2) and 12 (N p = 3).  Figures 11 and 12 show not only the ability of the IPSO algorithm to follow the MPP but especially the increase in accuracy when the particles number N p increases. Indeed, they approve that the IPSO method is able to follow MPP in all irradiation values and with different Np. Table 7 summarizes the results of the sensitive analysis concerning the number of particles, showing the steady state values of the duty cycle, the PV voltage (V ss ), the PV output power, and the response time (T r ) for each irradiance value (P, Q, R, and S).   Table 7 shows the effect of N p increasing on energy losses and accuracy. Thus, it is clear that, if the number of particles (N p) increases, the accuracy of the PV system response towards MPP grows, and the energy losses increases. In order to highlight the importance of the IPSO method based on a balanced metric, a comparison with other referenced methods, ANN-PSO [30] and PSO-P&O [31], is made and presented in Table 8. This is based on the calculation of accuracy between the power in the steady state (P ss ) and P mpp for the same environmental conditions by applying Equation (12). Table 8. Comparison accuracy between the Improved Particle Swarm Optimisation (IPSO), Neural Network (NN)-Particle Swarm Optimisation (PSO) [30], and PSO-Perturb & Observe (P&O) [31].  Table 8 presents an equitable comparison, between the results derived from the application of IPSO strategy and other methods used in literature and the same environment conditions [30,31]. From the two values of Power in the steady state and MPP in each set, the accuracy performance and the average precisions of different methods are calculated. It can be seen that the average accuracy of IPSO method based on balanced metric during the steady states is equal to 100%, while it is 82.65% with the ANN-PSO algorithm [30] and 98.47% for PSO-P&O [31]. Therefore, due to the integration of the mixed metric, exposed by Equation (11), IPSO becomes the best choice as it has the best performances in terms of simplicity and accuracy.

IPSO Method under Partial Shading
In order to test the robustness of IPSO technique, it is fundamental to analyze this method under partial shading conditions. Thus, a variable partially shade scenarios was adopted from [32]. The module's model (BP MSX-120 panel) adopted here includes four bypass diodes which means four substrings. The scenario of partially shading, used in this paper, needs two levels of irradiance affecting the substrings: the first is G and the second is designed by GS, which is defined in Equation (15): where SI is the shading intensity. The partial shading GS affects the 25% of the panel area, as illustrated in Figure 13. The changes in irradiance (G) and shading intensity (SI) were produced under four sets, as shown in Table 9 and Figure 14. The power voltage curve under partial shading conditions is characterized by multiple peaks; then, the controller has to make the differentiation between global MPP (GMPP) and local MPP (LMPP), as shown in Figure 15.
To verify the effectiveness of the IPSO method to track the GMPPs, a simulation in the partially shaded scenarios defined in Table 9 has been performed using two and three particles, which corresponds to Figure 16 and Figure 17, respectively. Table 9. Global MPP (GMPP) and local MPP (LMPP) for photovoltaic (PV)generator under different sets of partial shading at 25 • C.     The noticeable difference between Figures 16 and 17 is represented in the modification of accuracy values which occurred especially in the P sets. Table 10 illustrated all parts of partially shading sets in terms of duty cycle, operating voltage, convergence power, energy losses, and transient response for two sets N p = 2 and N p = 3. In fact, the passage from N p = 2 to N p = 3, provides the accuracy increasing. In order to highlight the IPSO technique related to other methods cited in [32] (PSO and Genetic Algorithm-GA), it is fundamental to calculate the accuracy using Equation (12) and complete Table 11. Table 11. Accuracy comparison between techniques (Improved Particle Swarm Optimization (IPSO)) and (Particle Swarm Optimization (PSO), Genetic Algorithm(GA)) methods under partial shading. As it was shown for Table 8, it is noted that the average accuracy of IPSO technique during the steady states takes the high value compared to others methods in [32]. Therefore, due to the collaboration between the integration of the mixed metric of Equation (11), the proposed IPSO becomes the best choice. It has the best performances in terms of simplicity because it is based on a small number of particles and accuracy.

Conclusions
In this work, the new Improved Particle Swarm Optimization (IPSO) method was designed and implemented to track the maximum PV system power point for feeding the DC-DC boost converter. The method presented here is based on the search for the maximum point and therefore the algorithm performance (which are usually calculated on the convergence time and the steady-state error) strongly depends on the shape of the fitness function (which in our case is the P-V characteristic curve) and does not depend on the absolute values characterizing it. Given that, a partial shading completely changes the shape of the P-V curve, whereas the non-uniformity of the temperature in the PV module cells (those cells receiving less solar irradiation) causes a stretched P-V curve, but is not affecting its shape. Temperature effects and other noise sources have been neglected here and are currently under study. The sensitivity analysis in order to test the overall robustness of the presented algorithm is the subject of future work.
Hence, IPSO simulations performed under different irradiation conditions made the particles converge, according to consecutive iterations, to the leader swarm particle known by optimal duty cycle that moves the outputs' PV system to the maximum power point. Furthermore, the accuracy of the IPSO method is on average larger than 99%, even using a minimum number of particles, in comparison with the considered methods available in literature: ANN-PSO, P&O, and GA. Thus, the IPSO strategy is not only robust, but also it guarantees a higher efficiency of the PV system regardless of environment changing and partially shading.