An MPC-Sliding Mode Cascaded Control Architecture for PV Grid-Feeding Inverters

: The primary regulation of photovoltaic (PV) systems is a current matter of research in the scientiﬁc community. In Grid-Feeding operating mode, the regulation aims to track the maximum power point in order to fully exploit the renewable energy sources and produce the amount of reactive power ordered by a hierarchically superior control level or by the local Distribution System Operator (DSO). Actually, this task is performed by Proportional–Integral–Derivative (PID)-based regulators, which are, however, a ﬀ ected by major drawbacks. This paper proposes a novel control architecture involving advanced control theories, like Model Predictive Control (MPC) and Sliding Mode (SM), in order to improve the overall system performance. A comparison with the conventional PID-based approach is presented and the control theories that display a better performance are highlighted.

MGs are one of the main challenges of power engineering nowadays thanks to their capabilities to improve the system flexibility and to effectively integrate renewable energy sources into the electricity system [3][4][5], while providing ancillary services that, in the past, required specific devices (see, e.g., [6,7]). Among these renewable energy sources, photovoltaic (PV) units are one of the most important and promising sources from a sustainability point of view thanks to their capability to provide clean energy, especially if coupled with electrical storage units [8].
A PV inverter is usually controlled in Grid-Feeding operating mode [9]: the PV inverter is controlled as a current source, where the active power set-point is strictly related to a Maximum Power Point Tracking (MPPT) algorithm, while the reactive power set point is either (i) zero, in order to use all the inverter capability for the power coming from the sun, or (ii) comes from a secondary level control in order to provide voltage support to the grid [10]. In the conventional approach, the MPPT algorithm provides the DC voltage reference to the DC voltage regulator, which, in turn, generates the d-axis current reference to the inverter's inner current regulator. The q-axis current reference is related to the reactive power. All the controllers in this architecture are normally Proportional-Integral-Derivative (PID) regulators, suffering from all the major drawbacks of linear controllers [11], which are: • The control structure is complicated due to multiple feedback loops and feedforward actions; • The tuning procedure of PID regulators parameters is time consuming and normally performed with trial-and-error methods; • Linear control can be ineffective because the fluctuating output from renewable energy sources can cause a fluctuating output in DC bus voltage and, consequently, a deterioration in the power quality on the AC-side.
In order to overcome the actual limitations mentioned above, innovative control theories have to be investigated. The Model Predictive Control (MPC) is an attractive solution thanks to its flexibility and optimal performance, especially for higher control levels; for instance, in [12], the authors proposed an MPC regulator that was able to optimize energy and power flows between MGs; in [13], an energy management optimization based on a distributed MPC was proposed; then, in [14], a centralized MPC regulator for dynamic optimal power flow among energy storage systems was developed and, in [15], the authors designed a secondary level MPC controller to effectively coordinate the action of the dispatchable units, while allowing for efficient energy management. However, only a few works focusing on MPC applications for primary regulation can be found in the literature: [16] uses MPC to minimize the voltage unbalance caused by its negative sequence and to prevent power overload [17]; proposes an MPC primary regulator for islanded MG in order to control the output voltage of each inverter, while [18,19] present a primary controller for a PV-storage system.
The Sliding Mode technique is also widely employed thanks to its robustness both for conventional energy sources, like in [20,21], exploiting the theory of [22][23][24], and for MG voltage regulation in [25,26]. The Sliding Mode technique has also been applied to a single phase inverter in [27], where experimental results show the proper control of the inverter output voltage, but the typology of the DC power source is not specified. Applications of the more recent Higher Order Sliding Mode (HOSM) theory can be found for MG in [28][29][30][31], showing improved performance; however, they do not consider, in the system model, the nature of the energy sources (even though they are modeled like ideal DC power supplies); therefore, the physical considerations cannot be explored on the basis of those models.
Considering all these aspects, the aim of this paper is to design an innovative control system able to successfully manage, on the one hand, the features of the DC source as a PV system and, on the other, to realize the performant control of the unit inverter in Grid-Feeding mode. In order to achieve this purpose, advanced control theories are applied. In particular, the control action is divided into two separated controllers: the DC-side of the unit is entrusted to an MPC controller, while the HOSM-based controller is in charge of the AC-side regulation of the unit. The peculiarities of these advanced control techniques give the possibility to overcome all the drawbacks of conventional control approaches presented before and, more precisely, the proposed MPC-HOSM control system has the following advantages: • A simpler control structure, avoiding multiple feedback loops and feedforward actions; • An easier tuning procedure due to the intrinsic operation of MPC and HOSM regulators; • Improvements in the dynamics of the systems in terms of settling time, oscillations, overshoots and decoupling between control channels.
The paper is organized as follows: Sections 2-4 are devoted respectively to the modelling of the PV units, and some remarks are made on the conventional control approach and the design of the proposed control system. Section 5 presents the results of the numerical simulations and the comparative analysis with respect to conventional PID-based architectures, highlighting the improved performances of the proposed approach. Finally, conclusions are drawn in Section 6.

Photovoltaic Unit Modelling
In this section, the PV unit model this paper refers to is presented. In particular, the aim here is to provide a system model suitable for the design of a local controller. From this perspective, the PV unit involves the PV panel, the DC filter, the inverter and the AC filter, hence no information about the rest of the MG is available except the MG currents, which are seen as measurable disturbances. The overall system scheme is depicted in Figure 1.

DC-Side Dynamic Equations
Considering the system depicted in Figure 1 it is possible to write the DC-side differential equations as: where the first equation is the power balance at the DC capacitance connection and the second is the Kirchhoff's voltage law. V DC is the voltage at the capacitance connection, P AC is the active power at the output of the inverter, V PV is the voltage at the output of the PV panel. I PV is instead the current production of the PV panel and it can be expressed as follows (see [32] for the definition of the parameters appearing in Equation (2)): where and T are the solar irradiance and the cell temperature respectively. R DC , L DC and C DC are the resistance, the inductance and the capacitance of the DC filter, respectively. Equation (1) can be rewritten using a state transformation in order to have the voltage V PV , as a state-variable of the system. This means that the following differential equation can be carried out: Equation (3) can be simplified by neglecting the time variation of solar irradiance and cell temperature, and the derivative of V PV with respect to I PV can be calculated using the inverse function theorem. Now, using the second differential equation of Equation (1), the DC-side differential system can be written as:

DC-Side Dynamic Equations
Considering the system depicted in Figure 1 it is possible to write the DC-side differential equations as: where the first equation is the power balance at the DC capacitance connection and the second is the Kirchhoff's voltage law. V DC is the voltage at the capacitance connection, P AC is the active power at the output of the inverter, V PV is the voltage at the output of the PV panel. I PV is instead the current production of the PV panel and it can be expressed as follows (see [32] for the definition of the parameters appearing in Equation (2)): where α and T are the solar irradiance and the cell temperature respectively. R DC , L DC and C DC are the resistance, the inductance and the capacitance of the DC filter, respectively. Equation (1) can be rewritten using a state transformation in order to have the voltage V PV , as a state-variable of the system. This means that the following differential equation can be carried out: Equation (3) can be simplified by neglecting the time variation of solar irradiance and cell temperature, and the derivative of V PV with respect to I PV can be calculated using the inverse function theorem. Now, using the second differential equation of Equation (1), the DC-side differential system can be written as:

AC-Side Dynamic Equations
Looking at the system scheme, the AC-side differential equations can be written as: where e abc are the local measurements of the voltages and currents of the MG, while R f , L f and C f are diagonal matrices involving the resistance, inductance and capacitance values of the AC filter. The power invariant Park transform is now applied to Equation (5), leading to: dq0 are the transformed version of the quantities defined in Equation (5), while ω p and S are defined as: in which θ p is the angle at which the Park transform is oriented. Such an angle is acquired by a PLL oriented on the grid voltage. This way, the q-axis component of the grid voltage e (g) q is zero. Considering a three-phase balanced system, the zero phase-sequence is null, hence the following differential equations describing the AC-side dynamic behaviour of the unit can be written as:

Conventional Grid-Feeding PV Inverter Control Scheme
The basic idea proposed in this paper is to design a new primary controller for a PV unit without any PID regulators. The conventional control of PV inverters in grid-feeding mode is reported in Figure 2 and has a nested structure. The outer loop (DC PID Regulator in Figure 2) receives, from the MPPT algorithm, the PV voltage reference and produces the reference signal for the d-axis current injected into the grid. The reference enters the inner current control (AC PID Regulators in Figure 2), together with the q-axis current reference generated by the Current Reference Generator. The current control, in turn, determines the modulating signals for the inverter. All the regulators in this architecture are PID-based controls.

Control System Design
In the proposed approach, instead, an MPC controller is chosen in order to track the PV voltage reference coming from the MPPT algorithm by using the converter active power reference as control action, i.e., the active power reference is the output of the MPC controller. Active and reactive power references are used as inputs for the inner current regulators based on HOSM controllers. In the following section, the control system design is proposed in detail and, in particular, the MPC controller based on DC-side equations is presented in Section 4.1, while, in Section 4.2, the design of the HOSM controllers related to the AC-side of the unit is described.

MPC Controller Design
The MPC controller refers to DC-side differential Equation (4) which can be rewritten as follows: where = V PV ;V DC T is the state vector, w = P AC is the scalar input, while m = [ ;T] T is the measurements vector. The mathematical model for the prediction [33] in the MPC controller can be obtained using linearizing Equation (10) around the actual value of the state at every sampling time step T s and by discretizing using a zero-order hold discretization method. Thus, it is possible to reduce Equation (10) in the form: ( ) where A * , B * , C * and D * are the system matrices at the considered sampling time step T s and the subscript k denotes the system variables discretized at the sampling time kT s . Then, since w k = P AC,k is used as control action and it is not possible to know a priori its final value, P AC,k is transformed into a state variable and its derivative J k is considered a control variable for the system as follows [34]: Finally, the measurements m k are considered as state variables, assuming that they remain constant during the prediction horizon, i.e., m k+1 = m k . Under these hypotheses, the resulting timeinvariant discrete time model for the prediction computed by the controller is: Conventional control system scheme referring to a single line diagram.

Control System Design
In the proposed approach, instead, an MPC controller is chosen in order to track the PV voltage reference coming from the MPPT algorithm by using the converter active power reference as control action, i.e., the active power reference is the output of the MPC controller. Active and reactive power references are used as inputs for the inner current regulators based on HOSM controllers. In the following section, the control system design is proposed in detail and, in particular, the MPC controller based on DC-side equations is presented in Section 4.1, while, in Section 4.2, the design of the HOSM controllers related to the AC-side of the unit is described.

MPC Controller Design
The MPC controller refers to DC-side differential Equation (4) which can be rewritten as follows: where χ = [V PV ; V DC ] T is the state vector, w = P AC is the scalar input, while m = [α; T] T is the measurements vector. The mathematical model for the prediction [33] in the MPC controller can be obtained using linearizing Equation (10) around the actual value of the state at every sampling time step T s and by discretizing using a zero-order hold discretization method. Thus, it is possible to reduce Equation (10) in the form: where A * , B * , C * and D * are the system matrices at the considered sampling time step T s and the subscript k denotes the system variables discretized at the sampling time kT s . Then, since w k = P AC,k is used as control action and it is not possible to know a priori its final value, P AC,k is transformed into a state variable and its derivative J k is considered a control variable for the system as follows [34]: P AC,k+1 = P AC,k + T s J k Finally, the measurements m k are considered as state variables, assuming that they remain constant during the prediction horizon, i.e., m k+1 = m k . Under these hypotheses, the resulting time-invariant discrete time model for the prediction computed by the controller is: where the meanings of the symbols are defined in Equations (14)- (16).
Using prediction Equation (13), the MPC controller is able to generate the optimal problem solution in order to track the reference voltage V PV,re f from the MPPT algorithm. The optimization problem is described by the quadratic programming problem below: where e k = χ  (17) is solved by the controller at each time step by predicting the time evolution of the state variables and, finally, calculating the optimal input for the system within the control horizon. Then, only the first step w k is applied to the system, while the rest of the solution W is just discarded. The control actions calculation process is then repeated at each time step kT s .

HOSM Controller Design
The HOSM controller refers to the AC-side equations Equation (9) written in the form: .
q /C f T is the disturbance vector. As pointed out in the previous section, the HOSM controller objectives are the active power and reactive power as outputs of the PV unit. In the Park domain, these quantities are expressed as: In order to decouple the two control channels, let us choose θ p as the capacitor voltage vector phase angle. In this way the q-axis component e (g) q disappears; therefore, expressions Equations (19) and (20) become: As stated before, the control goal is to properly manage the active and reactive power flow at the output of the LC filter of the inverter. Due to this fact and considering that Equations (21) and (22) and where the active power P g has to be expressed in terms of the reference coming from the MPC regulator and of the active power losses of the inverter filter, i.e., P g = P AC − R f i and Q g can be set to zero or to another value provided by the higher control level.
On balance, the output vector is chosen as ; therefore, the two sliding variables can then be defined as: Looking at Equation (9), one can see that σ 1 and σ 2 have relative degrees of one with respect to e (i) d and e (i) q respectively. This means that a second-order sliding mode algorithm is suitable to perform a correct tracking and provide a chattering alleviation at the same time. In particular, the suboptimal algorithm [35] is exploited here, and hence the command laws are computed as: where U 1,2 are constant gains, while σ 1,2,max are local maxima. All the details for the tuning procedure can be found in [35]. The overall control system scheme is depicted in Figure 3.

Simulation Results
In order to validate the proposed control strategy, simulation tests are developed in the MATLAB and Simulink environment. In particular, from an electric point of view, the PV unit is simulated in detail using the Simscape add-on [36]. In Figure 4, the simulation setup in the Simscape environment is reported. As one can see, there is the possibility to choose the control methodology with a switch named 'controller selection': the top controller cascade is the conventional one based on PID regulators, while the bottom one is the proposed architecture based on MPC and HOSM controls. The system data can be found in Table 1; MPC and HOSM parameters can be found in Table  2, while the PID regulator parameters are reported in Table 3.

Simulation Results
In order to validate the proposed control strategy, simulation tests are developed in the MATLAB and Simulink environment. In particular, from an electric point of view, the PV unit is simulated in detail using the Simscape add-on [36]. In Figure 4, the simulation setup in the Simscape environment is reported. As one can see, there is the possibility to choose the control methodology with a switch named 'controller selection': the top controller cascade is the conventional one based on PID regulators, while the bottom one is the proposed architecture based on MPC and HOSM controls. The system data can be found in Table 1; MPC and HOSM parameters can be found in Table 2, while the PID regulator parameters are reported in Table 3.

Simulation Results
In order to validate the proposed control strategy, simulation tests are developed in the MATLAB and Simulink environment. In particular, from an electric point of view, the PV unit is simulated in detail using the Simscape add-on [36]. In Figure 4, the simulation setup in the Simscape environment is reported. As one can see, there is the possibility to choose the control methodology with a switch named 'controller selection': the top controller cascade is the conventional one based on PID regulators, while the bottom one is the proposed architecture based on MPC and HOSM controls. The system data can be found in Table 1; MPC and HOSM parameters can be found in Table  2, while the PID regulator parameters are reported in Table 3.

Proportional Gain 1 A/V 3.5 V/A Integral Gain 100 A/(Vs) 270 V/(As)
The first test considers an irradiance variation from 1000 W/m 2 to 700 W/m 2 , starting at t = 0.2 s and then returning to its original value via a ramp starting at t = 0.7 s. From Figure 5, the correct actions of the MPC controller can be observed; indeed, it is possible to track the PV voltage reference coming from the MMPT algorithm and to provide the active power reference to the HOSM controller, whose performance can be appreciated from Figure 6.

DC PID Regulator AC PID Regulators
The first test considers an irradiance variation from 1000 W/m 2 to 700 W/m 2 , starting at t = 0.2 s and then returning to its original value via a ramp starting at t = 0.7 s. From Figure 5, the correct actions of the MPC controller can be observed; indeed, it is possible to track the PV voltage reference coming from the MMPT algorithm and to provide the active power reference to the HOSM controller, whose performance can be appreciated from Figure 6.   In this test, no reactive power regulation is considered; therefore, its reference remains at zero, as one can note in Figure 7. The HOSM controller outputs are finally depicted in Figures 8 and 9, where the chattering alleviation provided by the second-order algorithm can be observed.   In this test, no reactive power regulation is considered; therefore, its reference remains at zero, as one can note in Figure 7. The HOSM controller outputs are finally depicted in Figures 8 and 9, where the chattering alleviation provided by the second-order algorithm can be observed. In this test, no reactive power regulation is considered; therefore, its reference remains at zero, as one can note in Figure 7. The HOSM controller outputs are finally depicted in Figures 8 and 9, where the chattering alleviation provided by the second-order algorithm can be observed.   In this test, no reactive power regulation is considered; therefore, its reference remains at zero, as one can note in Figure 7. The HOSM controller outputs are finally depicted in Figures 8 and 9, where the chattering alleviation provided by the second-order algorithm can be observed.    Moreover, a comparison with the traditional control described in Section 3 is reported below. As one can see from Figure 10, the proposed MPC-HOSM strategy (blue line) allows for a better reference signal V PV,ref tracking than the conventional approach (red line) with reduced overshoots and a smoother dynamic.  Figures 11 and 12 show, instead, the comparisons of the active and reactive power time profiles. As one can see, the proposed control strategy is able to guarantee a faster response in terms of settling time and to avoid overshoots. Moreover, the proposed control strategy is able to guarantee a stronger decoupling between active and reactive powers than the conventional approach. This is due to the fact that PID regulators are not able to properly decouple the two regulation channels, while the HOSM controllers can decouple active and reactive powers dynamics with a proper increase in the control gains U 1,2 . Moreover, a comparison with the traditional control described in Section 3 is reported below. As one can see from Figure 10, the proposed MPC-HOSM strategy (blue line) allows for a better reference signal V PV,re f tracking than the conventional approach (red line) with reduced overshoots and a smoother dynamic. Moreover, a comparison with the traditional control described in Section 3 is reported below. As one can see from Figure 10, the proposed MPC-HOSM strategy (blue line) allows for a better reference signal V PV,ref tracking than the conventional approach (red line) with reduced overshoots and a smoother dynamic.  Figures 11 and 12 show, instead, the comparisons of the active and reactive power time profiles. As one can see, the proposed control strategy is able to guarantee a faster response in terms of settling time and to avoid overshoots. Moreover, the proposed control strategy is able to guarantee a stronger decoupling between active and reactive powers than the conventional approach. This is due to the fact that PID regulators are not able to properly decouple the two regulation channels, while the HOSM controllers can decouple active and reactive powers dynamics with a proper increase in the control gains U 1,2 .  Figures 11 and 12 show, instead, the comparisons of the active and reactive power time profiles. As one can see, the proposed control strategy is able to guarantee a faster response in terms of settling time and to avoid overshoots. Moreover, the proposed control strategy is able to guarantee a stronger decoupling between active and reactive powers than the conventional approach. This is due to the fact that PID regulators are not able to properly decouple the two regulation channels, while the HOSM controllers can decouple active and reactive powers dynamics with a proper increase in the control gains U 1,2 .  The second test involves a reactive power regulation, keeping the active one constant (i.e., no irradiance variation is supposed). A reference step variation is provided at t = 0.2 s from 0 kVAr to 10 kVAr, a second step occurs at t = 0.4 s from 10 kVAr to −10 kVAr, while a third step with a final reference value equal to zero is provided at t = 0.6 s.
From Figures 13 and 14, one can see that the control strategy can regulate active and reactive power as desired; indeed, the former is maintained over its reference value throughout the simulation, while the latter can track its reference profile with a good performance.  The second test involves a reactive power regulation, keeping the active one constant (i.e., no irradiance variation is supposed). A reference step variation is provided at t = 0.2 s from 0 kVAr to 10 kVAr, a second step occurs at t = 0.4 s from 10 kVAr to −10 kVAr, while a third step with a final reference value equal to zero is provided at t = 0.6 s.
From Figures 13 and 14, one can see that the control strategy can regulate active and reactive power as desired; indeed, the former is maintained over its reference value throughout the simulation, while the latter can track its reference profile with a good performance. The second test involves a reactive power regulation, keeping the active one constant (i.e., no irradiance variation is supposed). A reference step variation is provided at t = 0.2 s from 0 kVAr to 10 kVAr, a second step occurs at t = 0.4 s from 10 kVAr to −10 kVAr, while a third step with a final reference value equal to zero is provided at t = 0.6 s.
From Figures 13 and 14, one can see that the control strategy can regulate active and reactive power as desired; indeed, the former is maintained over its reference value throughout the simulation, while the latter can track its reference profile with a good performance. Energies 2020, 13, x FOR PEER REVIEW 13 of 17            In this second test case, it is possible to carry out some comparisons with the conventional control strategy. The proposed control strategy (blue lines) is able to guarantee a faster control response as depicted in Figure 17 and a stronger decoupling between the active and reactive powers in order to avoid overshoots as depicted in Figures 18 and 19.   In this second test case, it is possible to carry out some comparisons with the conventional control strategy. The proposed control strategy (blue lines) is able to guarantee a faster control response as depicted in Figure 17 and a stronger decoupling between the active and reactive powers in order to avoid overshoots as depicted in Figures 18 and 19. In this second test case, it is possible to carry out some comparisons with the conventional control strategy. The proposed control strategy (blue lines) is able to guarantee a faster control response as depicted in Figure 17 and a stronger decoupling between the active and reactive powers in order to avoid overshoots as depicted in Figures 18 and 19.   In this second test case, it is possible to carry out some comparisons with the conventional control strategy. The proposed control strategy (blue lines) is able to guarantee a faster control response as depicted in Figure 17 and a stronger decoupling between the active and reactive powers in order to avoid overshoots as depicted in Figures 18 and 19.

Conclusions
An innovative decentralized control system architecture for the regulation of a photovoltaic unit is proposed in this paper for MG applications. In particular, an MPC controller is designed on the DC-side model of the unit in order to manage the DC source, while an HOSM-based controller is built to replace the inner inverter regulators in order to improve the overall unit performance. The method is validated through simulation tests in a MATLAB and Simulink environment, in which the electromagnetic model of the components is considered. The simulation results show the effectiveness of the proposed approach tested under normal operating conditions and several improvements compared to the conventional control system based on PID regulators.
Author Contributions: A.P. and A.R. designed the proposed controller and performed the simulations and wrote the paper. R.P. and A.B. provided supervision to the research activity, provided critical analysis to the results achieved by comparative simulation and revised the manuscript.

Conclusions
An innovative decentralized control system architecture for the regulation of a photovoltaic unit is proposed in this paper for MG applications. In particular, an MPC controller is designed on the DC-side model of the unit in order to manage the DC source, while an HOSM-based controller is built to replace the inner inverter regulators in order to improve the overall unit performance. The method is validated through simulation tests in a MATLAB and Simulink environment, in which the electromagnetic model of the components is considered. The simulation results show the effectiveness of the proposed approach tested under normal operating conditions and several improvements compared to the conventional control system based on PID regulators.
Author Contributions: A.P. and A.R. designed the proposed controller and performed the simulations and wrote the paper. R.P. and A.B. provided supervision to the research activity, provided critical analysis to the results achieved by comparative simulation and revised the manuscript. All authors have read and agreed to the published version of the manuscript.