Super-twisting Sliding Mode Control for a Multifunctional Double Stage Grid-connected Photovoltaic System

This paper proposes a super-twisting sliding mode control for a multifunctional system that includes a Photovoltaic (PV) system connected to the grid through the Active Power Filter (APF). The latter is implemented to improve the power quality in the grid side, and injecting the provided photovoltaic power into the grid. Sliding mode control is known as a powerful control with good performance in transient and steady-state conditions. In this work, a Super-Twisting Sliding Mode Control (ST-SMC) is applied to extract the maximum power from the PV source, corresponding to the irradiation level, as well as to the threephase inverter-based-APF power control. For the system to inject the generated power from the PV source into the grid with respect to the international standards, fulfilling the active power filtering, synchronous reference frame theory is used to generate the appropriate reference signals for harmonic and reactive power compensation. To test the multi-functionality of the system (PV-APF), this one is connected to a grid supplying nonlinear loads that absorb non-sinusoidal currents. Through the simulation results, it has successfully achieved the multi-functionality of the proposed system under steady-state and dynamic conditions. The results also show the effectiveness and moderation of the proposed super-twisting sliding mode control. Furthermore, a comparative study has been established over the conventional PI controller, showing the clear superiority of the proposed control in every aspect.


Introduction
Due to energy demand increasing in the world, and environmental constraints, renewable energies nowadays are substantial in electricity generation in many countries. The massive integration of renewable energies into the network can have unexpected complications that sometimes require reviewing the management and protection plans [1]. However, this integration offers a promising solution to satisfy the demand [2].
Any renewable energy conversion system needs power electronic converters to convert, adapt and inject power into the grid [3]. In case of photovoltaic conversion system, usually, two configurations are reencountered; single-stage topology using just a DC-AC converter [4], or double-stage one, using a DC-DC con-verter to boost the DC voltage above the peak voltage of the grid, and a DC-AC converter to convert the DC power and inject it in the grid [5] and [6]. However, power electronic converters are known as harmonics current sources that can affect the power quality level. Moreover, the proliferation nonlinear loads using power electronics converters come as an additional concern for power quality. Thus, renewable energy conversion systems must reduce the non-sinusoidal component in the output currents as much as possible; This can be achieved by adopting an adequate control technique allowing less harmonics content in this current, by using multilevel converters and finally by inserting shunt power filters.
Recently, renewable energy conversion system associated with an active power filter can be found in many contributions [7] and [8]. However, in most of these works the active filter is shunt inserted between the conversion chain and the grid. Other contributions propose to control DC-AC converter in the chain to act as an active filter in addition to its main role that consists of power conversion [7]. This solution is more efficient and attracts more interest in recent contributions.
The control strategy is as important as the structure of the conversion chain; indeed, the control technique and strategy can reduce the harmonic content in the output currents [5] and [6], nevertheless, it is first and foremost the simplicity, and especially the performances, which are considered when choosing a control technique. When operating as an active filter, the grid side inverter is a current controlled source; therefore, identifying the reference currents is the first step in the control process. The techniques devoted for this identification like pq-theory based method, or synchronous reference frame are sufficiently commonplace nowadays [4] and [9]. The other step consists of forcing the voltage inverter to inject these currents into the grid, with a DC-bus voltage kept regulated at a predefined value. Usually, for this regulation, an external loop is necessary, but sometimes this one can be integrated in the current loop [10]. When it is associated with a photovoltaic source, the maximum power point tracking, as well as the adaptation of the PV output voltage according to the irradiance conditions, sometimes require other control loop with often an MPPT algorithm like Perturb and Observe (P&O), [11], incremental Inductance (IC), or other techniques using artificial intelligence, or nonlinear controls as found in [2], [3] and [4].Regarding current control, conventional techniques using proportional and integral actions are widely used in the literature [15] and [16]; Despite its simplicity, these techniques are not adapted for non-linear systems such as power electronics converters, especially when controlling harmonic currents. Nonlinear controls like slid-ing mode, hysteresis, and artificial intelligence-based techniques are more adapted for such a converter, and allows better tracking of harmonics current when controlling active filters [8] and [17], and generally for converter output current control [18]. Among nonlinear techniques, the sliding mode control combines simplicity, robustness, dynamic and static performances. The simplest example of this technique remains the hysteresis regulator renowned for its performance for current regulation, despite the problems related to the switching frequency and the chattering phenomenon.
The present article proposes a second order sliding mode control, known as Super-Twisting Sliding Mode Control (ST-SMC) for a double-stage PV conversion system, in which the DC-AC converter act as PV power converter and active power filter simultaneously. In addition to the robustness and fast-tracking ability, the ST-SMC generates continuous reference signals that can be modulated by a PWM technique, allowing a constant switching frequency. This type of sliding mode control has been proposed in some references for active power filter control with more than satisfactory results, especially for the harmonic currents tracking [17]. Moreover, the ST-SMC has been proposed in [14] and [19] to track the maximum power point in a double stage grid-tied PV system instead of conventional MPPT algorithms. However, in most of cited references dealing with double-stage grid-tied PV system, the two stages are controlled using different control techniques. Moreover, in most of consulted contributions, the power quality task was not taken into consideration.
The originality of the work proposed in this article lies in the PV system's association to an active power filter to enhance power quality even when nonlinear loads are connected to the grid. Regarding the control, the two stages of the system, i.e., DC-DC boost converter and DC-AC converter are both controlled using the proposed ST-SMC. Thus, the maximum power point tracking is achieved via through the DC-DC boost converter using an ST-SMC, allowing a better tracking of the point of maximum power whatever the irradiance conditions. While in the second stage, the control of the voltage inverter is entirely carried out by ST-SMC to regulate both the DC bus voltage and the currents injected into the grid, which convey both the power generated by the PV and harmonics to be eliminated when non-linear loads are connected to the grid. In case of no PV generation, the proposed control will make the inverter an ordinary active power filter. On the other hand, if no nonlinear load is connected to the grid, this inverter converts and injects the generated PV power into the grid under sinusoidal form currents. Dynamic and steady state performances of the proposed control have been given atten-tion in this work to highlight the superiority of our proposed control over the conventional PI control. The remaining of this paper is presented as follows: after the introduction, the description of the PV-SAPF system is given in Sec. 2. , as well as the modelling of its different parts. A brief description of the control strategy is also given at the end. In Sec. 3. , a background study of the super-twisting sliding mode control theory is explained, while its application to the PV-SAPF is developed in Sec. 4. The Obtained simulations results are given, commented, and analysed in Sec. 5. , and finally the main conclusions of the article are reported in Sec. 6.

Systems Description and Modelling
The system presented in this paper is represented in Fig. 1. The PV system is represented with a PV generator and a DC-DC boost converter; the primary function of this one is to make an impedance matching to ensure maximum PV power extraction. To the grid, a nonlinear load is also connected, to test the active filtering functionality of the system. This nonlinear load is represented with three-phase diode rectifier. Finally, yet importantly, the three-phase inverter that links the PV system to the grid through the inductor filter L f , has two main roles: firstly, to inject the PV system active power into the grid, and secondly to compensate the reactive power and eliminate the undesirable current harmonics, all simultaneously.

PV System Description and Modeling
A PV cell is usually represented by an equivalent circuit with a current source, a single diode that represents the P-N junction and series-parallel resistances R s , R sh , considering the power losses. In case of PV source array with N s series and N p parallel modules, the model is deduced with higher photo and diode current reflecting the equivalent series and parallel PV panels, from which the current-voltage relationship is established as follows [14]: (1) where: I P V , V P V are PV current and voltage respectively, i ph , i o are the light-generated current and the reverse saturation current of diode, γ is ideality factor, q = 1.602 · 10 −19 C, k = 1.38 · 10 −23 J·K −1 are the electron charge, and the Boltzmann's constant.
The DC/DC converter is utilized in the first stage to extract the maximum power from the PV array and boost the DC voltage to match minimum operating point of the active power filter DC voltage while the equations governing the model can be found in [20] as follows: (2)

Active Filter Description and Modelling
The Shunt Active Power Filter (SAPF) is based on standard three phase two-level inverter. The latter is linked to the DC-DC boost converter by a capacitor C dc whose voltage is noted V dc . While on the AC side, it is linked to the grid via a first order inductive filter L f , R f and injects currents i abc in the Point of Common Coupling (PCC). The differential equations describing the dynamic model of three-phase shunt active power filter are defined in dq-axes, are given as:

Control Strategy
The control strategy represented in Fig. 1 has two main roles; the first is to extract the maximum power from the PV source, while the second is to improve the power quality in the point of common coupling by eliminating harmonics in case of nonlinear loads are connected to the grid. The PV system in Fig. 1 (PV source and boost converter) uses a Perturb and Observe (P&O)-based ST-SMC MPPT to track the maximum power point. The DC bus voltage v dc is also controlled using ST-SMC that generates the reference current i * dc corresponding to the maximum power. Note that in case of total shadow, the reference current should be absorbed from the grid as an active power to compensate the inverter losses. The inverter is controlled to convert and inject power into the grid, and to play the role of an active filter against harmonics of nonlinear loads. The principle of harmonics filtering is well known that is to identify the harmonics component in the load currents, and then to force the inverter to inject compensating current in the PCC, which in turn, cancels all the undesirable harmonics. In this paper the synchronous reference frame method is used for the latter task; with this technique, the measured load three phase current are transformed into stationary component using Park transform, hence, the resulting components in direct and in quadrature axis, i d and i q contains continuous parts (i d ,i q ) related to fundamental components and alternating parts (ĩ d ,ĩ q ) related to harmonics. Therefore, to ensure sinusoidal grid current, the reference harmonics current is then deduced with these alternating parts, in addition to the component i dc corresponding to the PV maximum power current reference.
The synchronous reference frame algorithm is represented in Fig. 2. Note that the Phase Locked Loop (PLL) is used here to identify the synchronous rotating from the mains voltage. To force, the inverter to inject these current components in the PCC with the high accuracy during transient and steady state conditions, a ST-SMC also used in the current loop. Throughout this work, the dynamic and static performances have taken a particular attention; the second order supertwisting sliding mode control is therefore an obvious choice to control the whole system, and is discussed at length in the next section.

Super-Twisting Control Strategy
Commonly, separated PI controllers receive currents i f d and i f q errors and generate the reference voltage components v * f d , v * f q in a synchronous reference frame [20]. In this work, the PI controllers will be replaced by Super-Twisting Sliding Mode Controllers (ST-SMC) to achieve a decoupled robust control. Super-twisting algorithm is a non-linear control technique and is one of the most powerful continuous, second-order SMC, which ensures all fundamental properties of its traditional first order with chattering reduction capability. Super-twisting SMC uses only information about σ and does not need evaluating the sign ofσ as shown in Fig. 3. The ST-SMC control law u(t) has two parts as follows: where σ the sliding is surface, λ and W is positive gains, and ρ is a fractional coefficient which is defined by: 0 < ρ ≤ 0.5.
The stability analysis as Barth proposed in [8], can be demonstrated by an adequate candidate Lyapunov function V given by: In practice, the control system is affected by different uncertainties such as parameter variations, disturbances, and measurement noises, thus, the dynamic control plant with disturbance can be written: where x is the state vector, u is the input and K is the disturbance, considering that the system disturbance is bounded, and given as follows: The Lyapunov function time derivative can be written as: By choosing, λ ≥ k max this gradient is negative definite, meaning so that the system is asymptotically stable.

4.
Application of ST-SMC to the PV-SAPF System

Inverter Current Control
As mentioned above, the voltage reference (v * f d , v * f q ) of the inverter power switches via Space Vector Pulse Width Modulation (SVPWM) block generated from currents i f d and i f q control loop. Synthesis of the Super twisting sliding mode can be performed analytically using a model of the SAPF given in Eq. (3) in the dq reference. Thus: The control of i f d and i f q currents can be synthesized by summarizing u f d and u f q voltages through two ST-SMC controllers. Considering σ d and σ q are the sliding surfaces of the currents i f d and i f q expressed as: According the (6), the current controllers in direct and quadrature axis are given as: where λ dq and W dq are the ST-SMC are control gains. The sufficient conditions for finite-time convergence to the sliding mode manifold imposed by Levant in [19] as follows:

DC-bus Voltage Control
The DC-bus voltage controller using ST-SMC is represented in Fig. 4. Using the same method, the super twisting DC-bus voltage controller can be designed by choosing the following sliding surface.
The ST-SMC control law for DC voltage controller is given as: The DC-bus voltage controller has as an output the reference current i * dc . This one represents an active current component corresponding to the power losses in the inverter. In case of no PV generation, this current component will be absorbed from the grid.

DC-DC Boost Converter Control
The ST-SMC controller-based control strategy is applied to the DC-DC boost converter to extract the maximum power from the photovoltaic generator. As shown in Fig. 1 Super Twisting sliding mode control law requires the formation of an equivalent control along with switching control. For this purpose, an appropriate sliding surface must be designed. Among various surface designing methods, error-based designing method is chosen. Based on the (PV) array characteristic, when this last is operating at Maximum Power Point (MPPT), mathematically as follows [20]: The definition of the sliding surface is an essential step for controlling the sliding mode; moreover, the sliding surface of the photovoltaic cells is defined as: The ST-SMC control can be given as: where λ P V and W P V are the ST-SMC are control gains.

Results and Discussions
To evaluate the performances of the proposed system and its control under static and dynamic conditions, a series of simulation tests were carried out using MAT-LAB software. The parameters of the system corresponding to Fig. 1 are detailed in Tab. 1. To clearly illustrate the performance of the system, a gradient solar irradiance profile was chosen as depicted in Fig. 6, which also includes the PV output voltage and power. One can mention that this voltage is kept constant just after connecting the PV system, while the output power follows naturally with respect to the irradiance intensity. In our case study, deferent scenarios have been considered along with the simulation. From t = 0 s until t = 1 s the PV-APF system is not yet connected to PCC, so all the power demand from the non-linear load is drawn only from the grid with current's THD equals to 27.71 %.
At t = 1 s the PV-APF system is connected to PCC, Fig. 7 illustrating respectively from top to bottom, the three-phase grid voltage, grid current, inverter (active filter) current, load current, and the scaled grid voltage with the grid current. As shown in the figure, until t = 0.3 s, there is no irradiance (total shadow) and the nonlinear load continues to absorb power from the grid, while the inverter takes the role of active power filter resulting in a sinusoidal grid current. From t = 0.3 s until t = 0.6 s, under 1000 W·m −2 irradiance, the PV generates about 12 kW as maximum power, which is entirely transmitted through the inverter to the nonlinear load reducing the burden on the grid. Meanwhile, it is noticed from the figure that the inverter takes simultaneously its role as a harmonic filter always ensuring a sinusoidal form of the grid current, respecting the international standards (THD i < 5 %) as illustrated in Fig. 10. Note also, that the amplitude of grid current has significantly reduced since a large part of the nonlinear load demand is covered by the PV generation. At t = 0.6 s, the irradiance reduced to 500 W·m −2 and remains so until t = 0.9 s; in this situation, the available PV power decreases, therefore, the nonlinear load absorbs more power from the grid, always keeping the grid current in a sinusoidal form. Note finally that on the grid side, voltage and current are perfectly in phase, ensuring therefore a unity power factor. To perform the comparison, another simulation test is reproduced using PI controllers instead of ST-SMC, and almost the same waveforms are represented in Fig. 8.
Regarding the power flow assessment, harmonics filtering and reactive power compensation, the objectives are ensured with both controls, i.e., ST-SMC and PI. Nevertheless, it seems that the ST-SMC allows less harmonics content in the grid side current than the PI control, as shown in Fig. 9, and Fig. 10. In Fig. 11, the DC-bus voltage response is represented with both control methods, according to the irradiance profile given in Fig. 6. The performance of the system with ST-SMC are more evident in this case; in fact, the ST-SMC offers a shorter reaching time with less over or undershoot. By the same, Fig. 12 represents the real and imaginary power on the grid side. One can note that the imaginary power is kept zero with both control methods confirming the observation made above on power factor; however, using ST-SMC offers less variation around zero. Regarding the real power, like the case of DC bus voltage, the dynamic response using ST-SMC is much better. The main comparisons between the proposed ST-SMC and PI control regarding the power quality and dynamic performances are summarized in Tab. 2.
The power flow assessment is further illustrated in Fig. 13, in which the load and irradiance are varying. One can observe that until t = 0.3 s (no irradiance), the grid delivers almost 17 kW; most of this power is consumed by the nonlinear load (16 kW), and the remaining compensates the active filter losses in order keep the DC-bus voltage constant. From t = 0.3 s to t = 0.6 s, the PV generates 12 kW that is transmitted naturally to the nonlinear load, with some losses (losses in converters). This load draws the rest of its demand (about 5.3 kW) from the grid. In this situation, there is less power transfer from the grid, and therefore less the voltage drop, hence, it seems that the load slightly absorbs more power. From t = 0.6 s to t = 0.8 s, the PV generation passes to 6 kW corresponding to the new irradiation profile (500 W·m −2 ), and therefore the grid must furnish the load by the remaining demand. From t = 0.8 s to t = 0.9 s, with the same PV generation (6 kW) the load demand is decreased to absorb about 9 kW, hence, the grid transfers to the load only 3 kW. Finally, at t = 0.9 s, and with the same load demand, the PV generation returns to 12 kW and remains constant, resulting in the surplus PV power is sent to the grid as the grid active power (P s ) is in negative as illustrated in Fig. 13. Moreover, in Fig. 14

Conclusion
This article was devoted to the study of a photovoltaic conversion chain connected to the electrical network associated with a parallel active filter. The objective of this system is on one hand, to extract the maximum power from the PV system and inject it to the grid, and in another hand, to improve the power quality  by eliminating harmonics and compensating the reactive energy. For the proposed system to achieve these functions with a good dynamic performance, a supertwisting sliding mode control is proposed to perform both power conversion's control (DC-DC boost) and (DC-AC Inverter). Finally, the simulation results reveal that the proposed system can execute all the functions simultaneously, including maximum power tracking, harmonic mitigation, unity power factor operation, and bidirectional power flow control from and into the grid, all within the international standards. Moreover, results also affirm the effectiveness and robustness of the proposed control technique ST-SMC in terms of THD and dynamic and steady state response, compared to the conventional PI control.