Auto-tuning of PV controllers to improve the speed response and stability of the P&O algorithm

This paper proposes an auto-tuning control system to ensure a fast response of the photovoltaic (PV) voltage by reducing the perturbation time of a P&O algorithm. This solution accelerates the tracking of the maximum power point and, at the same time, guarantees the system stability, which increases the amount of energy produced by the PV system. The control system consists of three cascaded controllers: a P&O algorithm dynamically parameterized by the adaptive law in order to guarantee stability; an adaptive PI controller whose parameters are modified by the adaptive law, depending on the operating conditions, to reduce the settling time of the system as much as possible; and a sliding mode current controller to mitigate environmental and load perturbations and ensure global stability. The design of the new control structure is supported by mathematical analyses and validated with simulations performed in PSIM in order to demonstrate the robustness of the proposed solution.

. Photovoltaic modules (PVM) transform sunlight into electricity (Esram & Chapman, 2007), (Jiménez, Cadavid, & Franco, 2014), and there exists an optimal operation point for each environmental condition in which the PVM produces maximum power, named Maximum Power Point (MPP).Figure 1 shows the power profile of a BP585 PV module (Trejos, Gonzalez, & Ramos-Paja, 2012) under two different irradiance levels S 1 and S 2 , the change in the MPP depending on such environmental conditions can be observed.
In order to increase the power production of the PVM, which leads to increase the profitability of the PV installation, the module must be operated at the MPP.However, since such a condition significantly changes depending on external and unpredictable sources (sunlight and temperature), and due to the strong nonlinear behavior of the PVM (Petrone, Spagnuolo, & Vitelli, 2007), (Petrone & Ramos-Paja, 2011), the MPP cannot be predicted offline and it must be tracked online (Esram & Chapman, 2007), (Yau & Wu, 2011).Such a requirement has been addressed in scientific literature by introducing a special controller aimed at searching the MPP, named Maximum Power Point Tracker (MPPT) (Femia, Petrone, Spagnuolo, & Vitelli, 2005).Moreover, PV systems require a power converter to interface the PVM and load, so that the impedance of the load does not define the PVM operating point, which usually does not match the MPP.Hence, the power converter (usually a DC/DC conversion stage) enables the MPPT controller to operate the PVM at the MPP, independently from the load impedance.This converter can be regulated by a direct action of the MPPT, as shown in the loop (a) of Figure 2, or through an additional controller as described in the loop (b) of the same figure.(Femia, Petrone, Spagnuolo, & Vitelli, 2009).In the second case, the DC component of C b voltage is not properly regulated, which produces multiple harmonic components with amplitude inversely proportional to the load capacitance (Femia et al., 2009).In both cases the DC/DC converter output terminals are exposed to voltage perturbations that could be transferred to the PVM terminals, thus degrading the MPP tracking process.Hence, the DC/DC converter must be regulated to mitigate such voltage oscillations as in loop (b) of Figure 2.
Concerning the MPPT controller, several online optimization techniques have been adopted, where the Perturb and Observe (P&O) algorithm is the most widely adopted due to its simplicity and satisfactory performance (Femia et al., 2005).This optimization algorithm is based on the following criterion: the operating voltage of the PVM is perturbed in a given direction, if the power drawn from the PVM increases, the operating voltage must be further perturbed in the same direction.Otherwise, if the power drawn from the PVM decreases, the direction of the operating voltage perturbation must be reversed (Femia et al., 2005).Such simple algorithm is able to be implement in cheap digital processors, which makes the P&O a widely adopted solution in commercial devices.Moreover, the P&O algorithm provides high efficiencies if the algorithm parameters are properly designed; however, such design typically depends on the operating point defined by the environmental conditions, which are unpredictable (Femia et al., 2005).
Different approaches to optimize the P&O algorithm have been published; for instance, the work in (Femia, Granozio, Petrone, Spagnuolo, & Vitelli, 2007) presents an optimizing of the P&O algorithm using a predictive-adaptive control, where the magnitude of the duty cycle perturbation changes to speed up the tracking the MPP.Similarly, in (Kumar, Student, Kumar, & Senior, 2013), (Piegari & Rizzo, 2010), and (Wang, Wang, & Meng, 2012), adaptive techniques are used to optimize the P&O algorithm with two main objectives: to ensure stability at both transients and steady state, and to improve the tracking speed when the MPP changes due to climatic perturbations.However, the works reported in (Femia et al., 2007), (Kumar et al., 2013), (Piegari & Rizzo, 2010) and (Wang et al., 2012) do not take into account the C b voltage oscillations generated by the inverter; hence, such techniques do not ensure a stable operation of a grid-connected PV system.
This paper is focused on the improvement of the tracking speed of the P&O algorithm, whose operation is defined by two parameters: the disturbance period T a and the disturbance magnitude ΔV.High ΔV values provide a fast tracking of the MPP, but at the expense of large losses in steady state.
Inversely, low ΔV values provide slow MPP tracking, and therefore higher dynamic power losses.Moreover, the ΔV value must be high enough to produce power perturbations larger than the switching ripple, otherwise the P&O will not be able to identify the correct perturbation direction that leads to power optimization.Similarly, excessively long T a values produce a slow tracking of the MPP, hence short T a values are desirable.However, in (Femia et al., 2005) it was demonstrated that T a values must be larger than the PV voltage settling-time T s , otherwise the P&O will become unstable and the system will produce almost no energy.Therefore, in order to ensure the stability of the system, T s < T a , but T a must be as short as possible to reduce the dynamic power losses.Those contradictory objectives are illustrated in Figure 3, where a PV system based on a BP585 PV panel (formed by two series-connected modules) and with T s = 0.6 ms is simulated for 3 different T a values: T a = 0.1 ms, T a = 1 ms and T a = 2 ms (Ortiz-Valencia, Trejos-Grisales, & Ramos-Paja, 2015).The simulation confirms the previous analysis: T a = 1 ms enables to reach the MPP faster than T a = 2 ms, consequently producing more energy, but T a = 0.1 ms makes the system unstable, consequently wasting a large amount of energy.Moreover, in (Femia et al., 2005) it was also demonstrated that T s depends on the irradiance and dc-link voltage conditions; therefore, in order to ensure stability, such a work proposes to define T a larger than the worst T s condition, i.e. the largest T s value.Adopting such a solution ensures that, almost all the time, the system will operate with a non-optimal (too large) T a value.The aim of this work is to dynamically change the period T a of the P&O algorithm in agreement with the irradiance conditions in order to ensure fast tracking of the MPP and stability.Hence, the model parameters describing the irradiance condition must be identified so that the voltage controller (PI) parameters can be adapted online.Then, the settling-time of the PV voltage is predicted to adjust T a accordingly, i.e. ensuring T a > T s .Accordingly, this paper is organized as follows: the subsequent section introduces a sliding-mode controller designed to guarantee the stability of the system fast dynamics, and then the adaptive law aimed at improving T a is explained and validated using detailed simulations.Finally, the conclusions close the paper.

Sliding-mode current controller to ensure fast dynamics stability
The  di The SMCC is based on the switching function Ψi L and surface Φi L given in Equation ( 2), which guarantee the inductor current control (Carlos A. Ramos-Paja, Saavedra-Montes, & Vitelli, 2013).
The existence of the sliding mode requires three conditions (Sira-Ramirez, 1987): transversality, reachability and equivalent control.The transversality condition is fulfilled when the control variable u is present in the surface derivate, which guarantees that the system dynamics can be modified.When the sliding mode exists, the following conditions are fulfilled: Moreover, since the steady state condition of the system is imposed by the current reference i Lref , then the derivative of the surface with respect to the time is: Then, the transversality condition is verified from Equations (1), ( 2) and (4) as follows: Since the control variable u is present in the surface derivative, i.e. , the transversality condition is guarantee for any operation condition, i.e. d du dδ dt the system is controllable.
Another important analysis concerns the reachability of the surface and the switching law: according to Equation (2), if Ψi L < 0 then i L < i L ref and i L must be increased by setting ON the Mosfet, i.e. u = 1.On the other hand, if Ψi L > 0 then i L > i L ref and i L must be decreased by setting OFF the Mosfet, i.e. u = 0.The resulting switching law that guarantees the reachability of the sliding surface is given in Equation ( 6).
Taking into account the switching ripple present in the inductor current, which peak to peak amplitude is represented by H, the switching law must include the current ripple limits as in Equation ( 7).
To prove the reachability condition, the following inequalities must hold in any operating point (Bianconi, Calvente, Giral, Mamarelis, Petrone, Ramos-Paja, et al., 2013), (Bianconi, Calvente, Giral, Mamarelis, Petrone, Ramos-paja, et al., 2013): Replacing Equation (1) into Equation ( 8) leads to Equation ( 9), which, due to the physical constraints v pv > 0 and v b > v pv of the boost converter, proves the fulfillment of Equation ( 8) in any operating point.Thereby, the system is able to reach the sliding surface from any arbitrary operating condition. lim Finally, the equivalent control condition is related to the local stability, which can be verified using the inequality given in Equation ( 10) (Bianconi, Calvente, Giral, Mamarelis, Petrone, Ramos-Paja, et al., 2013).In such an expression u eq represents the average value of the control variable, which must be trapper within the control limits (0 and 1 for the MOSFET).
Replacing u with u eq in Equation ( 1) and Equation ( 10) leads to Equation ( 11) and subsequently to Equation ( 12).This expression defines the dynamic limits imposed to the reference variable to fulfill the equivalent control condition.
The dynamic behavior of the PV voltage with respect to reference of the SMCC is given in ( 13), which depends on the dynamic impendence of the PV as R pv = v pv /i pv .
G vi = v pv s ( ) Then, from Equation ( 13) it is noted that the SMCC regulates the fast system dynamics by imposing the required u signal to achieve a stable inductor current, despite changes on R pv and v b occur.However, the change of R pv depending on the climatic conditions, as shown in Figure 5, makes it impossible to design a classical PI controller that ensures, simultaneously, a fast tracking of the MPP and the P&O stability.Therefore, this paper proposes to design an adaptive law that auto-tunes the control parameters of the PI, depending on R pv , in order to achieve a T s as small as possible, adjusting also T a in the P&O to ensure stability.Considering a PI controller Equation ( 14) acting on Equation ( 13), the closed loop transfer function is given in Equation ( 15), where it is necessary to identify R pv = v pv /i pv online.

Design of the adaptive law
i ref s ( ) Since the PI controller reference is given by a P&O, the reference changes are defined by step changes of magnitude.Therefore, the continuous reference signal i ref of the SMCC, provided by the PI controller is given in Equation ( 16).The derivative of i ref is given in Equation ( 17).In order to ensure stability, the equivalent control condition of the SMCC given in Equation ( 12) must be fulfilled.Then, replacing Equation ( 17) into Equation ( 12) leads to Equation ( 18), which defines the limits of k i to guarantee the system stability.
From between the denominator of Equation ( 15) and a classical second order system (s 2 + 2 * ξ * w n s + w n 2), the natural frequency w n is given by Equation ( 19).Consequently, since in second order systems the settling time is inversely proportional to the natural frequency, high w n values are required to speed-up the system response; hence, high k i values are desirable.
However, k i must be limited as in ( 18) in order to guarantee the SMCC stability.Therefore, to ensure both stability and fast system response, k i is selected as 80 % of the most restrictive limit in Equation ( 20): In order to achieve a behvior as quickly as possible without any voltage overshoot that leads to unnecessary power losses, the system damping ratio is selected as ξ = 1.Then, the method proposed in (Carlos Andrés Ramos-Paja, González, & Saavedra-Montes, 2013) shows that the dynamic response of a second order system with unitary damping ratio is: In such an expression K ts = − (lambertw(− 1, ∈ * e −1 ) + 1), which is a constant that depends on the tolerance.Figure 8 shows the value K ts for different tolerances, which can be approximated as the polynomial function given in Equation ( 23) for 1 % < ∈ < 10 %.This work adopts the classical value ∈ = 2 %, i.e.K ts = 5.8339.Therefore, the perturbation period of the P&O is continuously adapted to T a = 5.8339/w n .Finally, from the coefficient correspondence between the denominator of Equation ( 15) and a classical second order system, k p is calculated as: In this way, the adaptive law modifies the PI parameters k p and k i to ensure SMCC stability and a short settling time (t s ).Moreover, the adaptive law also changes the perturbation time (T a ) according to t s in order to guarantee stability.

Simulation results
The proposed solution was tested using simulations performed in a standard power electronics simulator (PSIM).The adopted PV module is a BP585 with average parameters i R = 0.894 μF, α = 0.703 V −1 .The parameters of the DC/DC converter are: L = 100 μH, C = 50 μF, v b = 60 V and i sc = 3A.The P&O is parameterized with a perturbation size ΔV = 0.2 V to overcome the ripple effect, automatically adjusting T a with the adaptive law.
Figure 9 illustrates the adaptability of the system to different perturbation sizes.Therefore, it is no longer necessary to predefine T a , which simplifies the design of the P&O.Additionally , due to the controller auto-tuning, no off-line design is required, and therefore the solution is robust to changes in the parameters (aging, repair, etc.). Figure 10 shows the simulation at different climatic conditions, including, as well, oscillations generated by the inverter in v b .Such results evidence the satisfactory tracking of the reference provided by the adaptive PI controller.Moreover, Figure 11 shows the auto-tuning of the controller parameters, k p and k i , and the resulting change in the settling time of the PV voltage and in the disturbance period of the P&O algorithm; all of which improves the system performance for each condition.With the aim of illustrating the performance improvement provided by the proposed solution, Figure 12 shows the comparison between the dynamic responses of the P&O solution based on a traditional PI controller (Bianconi, Calvente, Giral, Mamarelis, Petrone, Ramos-paja, et al., 2013) an adaptive MRAC-SMCC controller (Ortiz-Valencia et al., 2015), and the proposed adaptive PI-SMCC solution.
The traditional PI controller was selected due to its wide acceptance in scientific literature; however, in order to avoid an unfair comparison with only a non-adaptive controller, the adaptive MRAC solution was also considered.The simulation shows that the SMCC guarantees global stability for the three solutions.The traditional PI does not ensure a predictable settling time; hence, it must be designed at the worst case.Instead, the MRAC ensures a constant settling time for any operation condition, which makes impossible to speed-up the tracking of the MPP.
WIn contrast, the auto-tuning of the adaptive PI reduces the settling time to 80 % of the maximum speed in which the system is stable, and therefore speed-ups the MPP tracking when possible.Consequently, as shown in the simulation, the proposed solution extracts more energy from the PV panel.Furthermore, the proposed control requires a less complex design in comparison to the MRAC.

Conclusions
The design of a sliding-mode controller in cascade with an adaptive PI controller was used to improve the power generated by PV systems.Such a solution guarantees a fast P&O response and global stability despite environmental and load perturbations.The behavior of the system under the supervision of the adaptive law exhibits a dynamic settling time that reduces the time required to reach the MPP, which in turn enables more energy extraction from the PV source.The simulation results validate the advantages of the proposed solution under both environmental and load perturbations.

Figure 1 .
Figure 1.PV profile for different levels of irradiation at T = 25 °C.

Figure 2 .
Figure 2. Typical architecture PVM double connection stage connected to the network.

Figure 2
Figure 2 also illustrates the gird-connection side of the PV system, which is formed by a dc-link (capacitor C b ) and a DC/AC converter (inverter).The inverter is controlled to follow a required power factor, provide synchronization and protect against islanding, among others(Romero-cadaval, Spagnuolo, & Franquelo, 2013).Moreover, the inverter must regulate the dc-link voltage at the bulk capacitor C b , where two cases are possible: first, the inverter regulates the DC component of C b voltage, but due to the sinusoidal power injection into the grid, C b voltage experiments a sinusoidal perturbation at twice the grid frequency and with a magnitude inversely proportional to the capacitance(Femia, Petrone, Spagnuolo, & Vitelli, 2009).In the second case, the DC component of C b voltage is not properly regulated, which produces multiple harmonic components with amplitude inversely proportional to the load capacitance(Femia et al., 2009).In both cases the DC/DC converter output terminals are exposed to voltage perturbations that could be transferred to the PVM terminals, thus degrading the MPP tracking process.Hence, the DC/DC converter must be regulated to mitigate such voltage oscillations as in loop (b) of Figure2.

Figure 3 .
Figure 3. System performance at different times of disturbance.Such a condition was addressed in (Ortiz-valencia, Trejos-Grisales, & Ramos-Paja, 2013) with a Fuzzy-PID controller, which modifies the control parameters to ensure a constant settling-time for any irradiance condition.However, due to the experience-based design of the Fuzzy component, the desired operation is ensured around the tested conditions only.A similar approach was introduced in (Ortiz-Valencia et al., 2015), which is based in the cascade operation of a sliding mode current controller (SMCC) and a model reference adaptive controller (MRAC):The SMCC is designed to guarantee the global stability, while the MRAC is designed to provide a pre-established dynamic response to ensure a constant settling time to the PV voltage.Despite(Ortiz-Valencia et al., 2015) and(Ortiz-valencia et al., 2013) ensure constant settling times, such a time must be a static and pre-defined value, and therefore the P&O operation cannot be optimized depending on the operation conditions; in fact, the settling-time value is limited by the dynamic response of the converter in the worst case.
solution proposed in this paper is based on the work presented in(Bianconi, Calvente, Giral, Mamarelis, Petrone,  Ramos-Paja, et al., 2013), which uses a sliding-mode technique to regulate the PV current and to mitigate the low frequency voltage oscillations caused at the bulk capacitor C b by the inverter operation.In such a structure, presented in Figure4, the sliding-mode current controller (SMCC) is the MOSFET modulator, and an additional linear controller Gcc is used to regulate the PV voltage in agreement with the P&O commands.However, in(Bianconi, Calvente,  Giral, Mamarelis, Petrone, Ramos-Paja, et al., 2013)  the period T a is set fixed at the worst case.

Figure 4 .
Figure 4. System scheme based on input inductor current control.The differential equations describing the dynamic behavior of the circuit in Figure 4 are given in Equation (1), where the inductor current i L and the capacitor voltage ν Ci are the state variables, while the control variable is the activation signal u of the Mosfet.The output voltage v b (dc-link voltage) and the PV current i PV are the perturbation variables of the system.

Figure 5 .
Figure 5. Response of Rpv for different climatic conditions.

Figure 6
Figure 6 presents the proposed control architecture and Figure 7 describes the block diagram of the system.The adaptive law modifies the proportional gain (k p ) and integral gain (k i ) of the PI controller in order to reduce the

Figure 7 .
Figure 7. Proposed block diagram of the system.

Figure 8 .
Figure 8. K ts value depending on tolerance.

Figure 10 .
Figure 10.Response of the system for load perturbation.