Backstepping based real twisting sliding mode control for photovoltaic system

Renewable energy sources tied to a utility grid require non-linear control algorithms to provide an efficient and stable output under different operating conditions. The maximum power point tracking (MPPT) approach is necessary for power generation due to non-linear behavior of photovoltaic (PV) power plants. In changing environmental and partial shading conditions, the standard MPPT methods may lead to abnormal results. In this paper, a backstepping based real twisting sliding mode MPPT control is proposed for the PV-battery system where maximum available power is extracted by tracking PV voltage. Moreover, a direct sliding mode control is proposed for battery-integrated buck boost converter for voltage regulation. Reference sliding surface is generated through linear interpolation based on the predicted maximum power point PV voltage. The proposed MPPT strategy is tested against variations of irradiance, temperature, and load. Simulation results highlight superior tracking performance, reduced chattering, and oscillations of this technique over existing models.

1 Introduction panels and improves system efficiency. This is achieved through maximum power point tracking (MPPT) algorithm that ensures maximum output PV power under varying conditions (Millah et al., 2021).
With an increased rate of utilization of PV, researchers have focused on developing new MPPT techniques to extract maximum power from the PV system. Different MPPT methodologies have been introduced which can be broadly categorized as metaheuristic optimization, control law based MPPT, and machine learning based MPPT techniques. Machine learning based radial basis function neural network (RBNN) has been proposed in (Khan et al., 2021), which has a fast convergence but cannot accommodate continuous chattering as neural network needs continuous training. Genetic algorithm (GA) based MPPT with an artificial neural network (ANN) has also been proposed for MPPT which demonstrated reasonable tracking speed and DC power output (Ali et al., 2018). However, this technique is difficult to implement due to complexity arising from increased system dynamics. ANN based MPPT approach for PV electric vehicle is studied in (Bhatia et al., 2020) where open circuit voltage and temperature of solar cell were used as input variables while MPP voltage was the output variable. In addition to ANN and GA, fuzzy logic controller is also used for PV systems which is relatively easy to design since knowledge of an accurate MPPT model is not required (Dehghani et al., 2021). However, continuous training and higherror susceptibility are major issues. Conventional perturb and observe (P&O) strategy is also used for MPPT control due to its fast convergence and simplicity (Ahmed and Salam, 2018). In general, machine learning MPPT techniques achieve high efficiency, fast convergence and reduced oscillations but are costly and computationally extensive. Moreover, the systems cannot capture partial shading condition (PSC) under global MPP.
To deal with the issue of PSC, bio-inspired metaheuristic optimization based techniques are employed. Shuffled frog algorithm has been proposed in (Aldosary et al., 2021) to address this anomaly and improve MPPT controller for battery integrated PV system but the technique is inefficient under rapidly changing atmospheric conditions. Hybrid whale optimization algorithm has been discussed in some literature which has a high efficiency but it requires accurate data set and works for finite time limits (Tao et al., 2021). Although the metaheuristic techniques have various advantages, none of these optimizers address optimization problem with different constraints (Shams et al., 2021). In fact, existing research has examined the optimizers for a single or few patterns of irradiance without comprehensive statistical analysis. For instance, the gray wolf optimizer in (Jegha et al., 2020) has shown tracking accuracy under a certain set of irradiance while the impact of temperature is neglected. Dragonfly and adaptive cuckoo search optimization are presented in (Mirza et al., 2019) where variations are proposed to reference voltage for rapid global convergence among multiple PV systems. The performance of all metaheuristic optimization-based MPPT strategies is dependent on population size, number of iterations, convergence speed and effectiveness of the information sharing method.
Closed-loop MPPT control strategies aim to overcome the shortcoming of computational complexity offered by metaheuristic optimization techniques. Non-linear closedloop schemes have been widely used in PV systems. A robust non-linear backstepping controller (BSC) for MPPT tracking is analyzed in (Ali et al., 2020), which relies on reference power generation through neuro-fuzzy approach. This system is designed for a single irradiance value and requires retraining as irradiance changes. A similar technique is discussed in (Awais et al., 2020) where the non-linear controller is linearized for a certain field data. However, this scheme is infeasible for practical PV systems which experience constantly changing environmental conditions. Sliding mode control (SMC) is one of the widely employed non-linear closed-loop method which offers various advantages such as disturbance rejection, parameter variation insensitivity and decoupled design (Aguilar et al., 2019). SMC can overcome the issue of uncertainty limits to an extent. In the presence of large uncertainties, controller gain has to be increased which enhances chattering effect (Skik and Abbou, 2016). Backstepping terminal sliding mode (BTSM) controller is discussed in (Behih and Attoui, 2021) to extract maximum power of PV system. However, it can only track MPPT curve and fails to provide controlled compensation to variations in irradiance and temperature. Non-linear control law based double integral sliding mode controller is studied in (Pradhan and Subudhi, 2016) which reduces the steady state error of MPPT through an integral component. This error reduction is at the expense of distorted transient response with increased chattering. Second order sliding mode MPPT controller has also been studied in some literature but it generates inaccurate reference current and hence, an inaccurate optimal power extraction (Peng et al., 2019). A comparison of these control techniques is highlighted in Table 1.
This paper presents a robust non-linear backstepping based real twisting sliding mode control for MPP tracking in PV battery systems. In the proposed scheme, the regression plane is generated by the predicted maximum power point voltage using linear interpolation which gives high accuracy. Contrary to other autonomous schemes which deploy droop control for DC bus voltage regulation, in this paper, a direct sliding mode control is proposed which helps regulate voltage under varying irradiance, temperature and loads. The system topology consisting of PV, battery, boost, and buck-boost converter is simulated and analyzed in MATLAB where it is observed that the proposed scheme has a good tracking with reduced overshoot, chattering and settling time. The optimal performance of the  proposed control is also highlighted in comparison with other well-established control strategies. The rest of the paper is organized as follows: Section 2 discusses the system topology and converter control. Section 3 presents back stepping based real twisting sliding mode control while the power management and parameter design are analyzed in Section 4. Simulation results and discussion are given in Section 5, followed by conclusion in Section 6.

System topology and converter control
The system topology consists of PV module and battery linked to DC bus via buck-boost converters. This is shown in Figure 1. The battery buck-boost converter is bidirectional and can operate in either buck or boost mode depending on the current drawn from the source. It consists of two loops: an outer Frontiers in Energy Research 03 frontiersin.org voltage control loop with PI controller and an inner current control using SMC. This helps regulate the DC bus voltage. Linear interpolation-based regression plane is employed to generate the reference voltage signal for PV. The modeling of PV and buckboost converters along with the control schemes are discussed as follows.

PV module modeling
The PV module consists of solar cells connected in series and parallel. Series connection gives the required voltage output while parallel connection increases output current. Different models of solar cells are used in PV system such as single diode, double diode and three diode model. Single diode model is commonly used due to its simplicity while double and three diode models are treated as industrial models and are used for specific applications. In this paper, single diode model is considered which is shown in Figure 2.
The current produced in the solar cell is directly proportional to light intensity and the output current of PV can be expressed as (Ibrahim and Anani, 2017): The output voltage V of the module is the product of voltage of single cell and the number of cells. Thus, the short circuit current is given as: where a positive value of K i indicates an increase in short circuit current with temperature. The open circuit voltage of PV is expressed as: where a negative value of K v indicates that as the temperature rises, the open circuit voltage decreases. The maximum current and voltage of solar cell array is represented as (Ibrahim and Anani, 2017): The PV panel characteristic for different values of temperature and irradiance is shown in Figures 3, 4, respectively.

Buck boost converter modeling
From inductor volt second balance and capacitor charge balance, we have: The input and output resistance of converter R in and R L follow the relation: Averaging across a switching period yields state space equations for control design as:ẋ 3 Proposed backstepping based real twisting sliding mode control The first step in controller design involves calculations of error between actual and desired PV output voltage. Thus, ɛ 1 defined as the difference between actual and expected output voltage of a solar PV system: where α 1ref is the reference PV voltage. Combining (11) and (14), we have:ε To reduce error signal to zero, we need to treat α 2 as a virtual control input which should satisfy Lyapunov stability theory. Thus, the time derivative of Lyapunov term V 1 = 1/2ε 2 1 along with (15) leads to: The constant K 1 in (17) must be a positive constant for any specific x 2 . Hence, (16) can be rewritten as: The stabilization function acts as a reference for x 2 as: The second state needs a new reference for further tracking. In this regard, α 2re f ′ is chosen as the new reference and the tracking error can be defined as: Solving (16) and (19) leads to: Substituting (19) in (21), we have: Differentiating (20) with respect to time leads to: Therefore, the time derivative of α 2re f ′ can also be calculated as: where X = I pv − C i α . 1re f + K 1 C i ε 1 . By multiplying and dividing by μ, (24) can be expressed as: To ensure convergence of errors ɛ 1 and ɛ 2 to zero, a composite Lyapunov function V c is defined as: Frontiers in Energy Research 05 frontiersin.org

FIGURE 5
Flow chart of proposed BRTA algorithm.
The time derivative of V c is given as: For V c to be negative, let:ε which can be expanded as: Thus, the backstepping based equivalent control law becomes: This control law modifies (27) to an alternate form as: where 0 < μ < 1 and α 2ref ≠ 0.
From (31), it can be observed that the derivative of Lyapunov function is negative definite. Therefore, the design of proposed controller is globally asymptotically stable.
The Real twisting sliding mode-based discontinuous control Law is designed as (Bjaoui et al., 2019): The modified control law is used for mitigating chattering effect in higher order non-linear system. The proposed backstepping based real twisting sliding mode control law, is given as: The proposed algorithm in this paper uses a continuous control function that drives the sliding variable and its derivative to zero in finite time. By twisting the state trajectories around the origin, convergence independent of constrained perturbations is achieved that retains good performance despite variations and uncertainties. The flow chart of algorithm is shown in Figure 5.

Power flow management
Bidirectional buck-boost converters can operate in buck mode or boost mode depending on the power flow direction. Two control modes need to be deployed to operate the converter in desired mode of operation and based on the battery current direction, required mode should be triggered. It is worth mentioning that the objective of both modes is to regulate DC bus voltage.
In the battery control, outer voltage loop produces the current reference for inner current control. Assuming negligible losses in the system, the dc current can be expressed as: Battery current I BESS is used to regulate I dc to its reference I dc,ref .
Hence, (34) can be written as: The sliding surface for the inner current loop of battery controller is chosen as: The battery current and DC bus voltages reach their reference values in a finite time. Correspondingly, SMC controls PWM signal which is used in buck and boost modes.

Buck mode operation
The duty cycle in the buck mode can be expressed as: The battery current is given as: Considering (36) and (37) with μ Buck = 0, δ > 0, we have: When δ < 0 and μ Buck = 1, we have: Thus, the sliding surface δ = 0 is finite time attractive.

Boost mode operation
The duty cycle in the boost mode is given as: while the battery current is: Considering (36) and (41) with μ Boost = 0, δ < 0, we have: When δ > 0 and μ Boost = 1, we have: For sliding mode to exist in (36), the sliding condition δδ < 0 must be satisfied for both buck and boost modes.

Parameter design of unidirectional buck-boost converter
The duty cycle of buck-boost converter is dependent on input and output voltage as: The value of inductor L can be derived from switching time period T, voltage drop across diode V d1 and output current I out as: The value of capacitance C is obtained as:

Parameter design of bidirectional buck-boost converter
For non-inverting buck-boost converters, the model is designed to work in continuous conduction mode (CCM). Since the converter has two modes of operation, the design is identical to buck and boost converters.
The minimum value of inductance to ensure CCM operation, for both buck and boost modes, is calculated as: In (48), a value of 33 is used for μ which corresponds to maximum value solution and maintains CCM. The dc bus capacitor filters the ripples in voltage and its value is selected as: The size of battery capacitor can be determined as:

Simulation results and discussion
To analyze the proposed control scheme, the system in Figure 1 is built in Simulink. The DC bus voltage is 200 V while the PV system has maximum power rating of 25 kW with solar irradiance 1000 W/m 2 and operating temperature of 298K/25°C. The system parameters are obtained from (45-50) and are highlighted in Table 2 where (K 1 , K 2 , K 3 , K 4 , K 5 ) are gains of BRTA while (K 6 , K 7 ) are gains of SMC, respectively.
The PV panel regression plane is shown in Figure 6. It provides a reference voltage for the non-linear controller to achieve MPP under fluctuating temperature and irradiance conditions. The PV module characteristic curve is used to build the V mpp matrix for various temperature and irradiance levels. The regression plane is obtained via linear interpolation, which gives the reference voltage, α 1ref , to the controller. To achieve MPP, the backstepping based real twisting controller follows reference voltage α 1ref as: At initial steady state, PV panel is producing 25 kW and load power consumption is 10 kW. The battery is in charging mode with 15 kW. The control law in (33) determines the desired PV voltage while BRTA extracts maximum power point by tracking the desired PV voltage obtained by linear regression method. System performance is studied through the following changes.
1) The irradiance of PV panel varies from 1000 W/m 2 to 850 W/m 2 at t = 1 s. 2) The PV temperature is increased from 25°C to 45°C at t = 2 s. 3) Simultaneous change of temperature and irradiance is observed at t = 3 s. In this regard, temperature is raised from 45°C to 65°C and irradiance drops from 850 W/m 2 to 650 W/m 2 . 4) The PV system load is increased by 8 kW at t = 4 s.

Change in irradiance
The suggested MPPT controller's performance is first validated using an irradiance variation. At t = 1 s, the irradiance of PV panel is reduced from 1000 W/m 2 to 850 W/m 2 . Following this change, the PV power falls from 25 kW to 23 kW which can also be confirmed from product of (4) and (5). This is shown in Figure 7. Since the load is constant, the active power used to charge battery changes from 15 kW to 13 kW. It should be noted that the negative power in Figure 7 signifies charging operation of battery.
Based on the measured values of temperature and irradiance, the reference PV voltage waveform is shown in Figure 8. It can be seen from Figure 9 that the proposed controller successfully tracks the reference voltage during irradiance variation. In this regard, the settling time is 005 s and rise time is 003 s. The system has a good dc bus voltage regulation at 200 V which is highlighted in Figure 10.

Change in temperature
The PV system observes a temperature variation from 25°C to 45°C at t = 2 s. As shown in Figure 3, for the same voltage, the Frontiers in Energy Research 08 frontiersin.org

FIGURE 8
Maximum peak power reference voltage.

FIGURE 9
PV voltage tracking.

FIGURE 10
DC bus voltage variation.
power produced by PV decreases with increase in temperature. This is highlighted in Figure 7 where the PV power reduces by 3 kW. Correspondingly, the battery overcomes the power shortage to the load by discharging 3 kW and maintaining constant load power. During this change, the proposed controller is constantly tracking the reference PV voltage with reduced chattering and fast convergence as highlighted in Figure 9. It can also be observed from Figure 10 that the voltage variations of DC bus are minimal, signifying good performance of the scheme.

Simultaneous change in temperature and irradiance
The PV system can also experience simultaneous variations in temperature and irradiance and this scenario is simulated at t = 3 s. At this instant, temperature increases from 45°C to 65°C while irradiance decreases from 850 W/m 2 to 650 W/m 2 . These variations have a combined effect of reducing the PV power from 20 kW to 14 kW as apparent from preceding discussion and shown in Figure 7. Since the load is constant, the battery discharges to ensure same power supply to load. The reference PV voltage variation is shown in Figure 8 where it can be observed that the temperature and irradiance variations force the reference voltage to change from 387 V to 372 V. The controller maintains its voltage tracking capability with minimum overshoot. Moreover, the DC bus voltage is still maintained at reference value. This is given in Figures 9, 10.

Change in load
At t = 4 s, the load of the PV system is increased by 8 kW. During this change, the irradiance and temperature are kept constant and hence, the PV output power is maintained at 14 kW. To satisfy the new load, battery discharging power rises by 8 kW. This is evident from Figure 7. As shown in Figure 8, the reference generated PV voltage by controller remains same as there is no change in temperature and irradiance. The controller is successfully tracking the PV voltage highlighted in Figure 9. The reference dc bus voltage profile observes a sharp dip of around 1 V which is well-within the voltage regulation limit. This is shown in Figure 10. All the simulated scenarios highlight the optimal performance of the control scheme under different conditions of temperature, irradiance and load.

Comparison of proposed scheme with other schemes
In this section, the proposed PV controller is compared with prevalent MPPT tracking algorithms such as P&O, BSC and BTSM. Different environmental conditions are used with variations in temperature and irradiance. The voltage comparison of the techniques is shown in Figure 11. It can be observed that the proposed BRTA controller achieves steady state in 005 s compared to BTSM which achieves the steady state in 01 s. The BRTA controller has fast rise time, superior tracking performance and achieves MPP rapidly with no overshoot compared to P&O. No chattering is observed in proposed technique compared to BSC and BTSM controllers. On the other hand, BSC control strategy shows steady state error in MPP tracking and minimal tracking performance during fluctuations in atmospheric condition. Detailed voltage profile comparison is shown in Table 3.
For each control strategy, comparison of PV array output power is shown in Figure 12. The BRTA tracking performance is better during temperature and irradiance fluctuations in terms of fast convergence, rise time and reduced chattering. The results show that the proposed controller is reliable, more robust and has a faster response during atmospheric fluctuations. Moreover, it ensures a seamless, stable operation with battery connected system which makes it ideal for future power systems.

FIGURE 12
Maximum power comparison.

Conclusion and future work
This paper presents a robust non-linear backstepping based real twisting sliding mode control for MPP tracking in PV battery systems. In the proposed scheme, the regression plane is generated by the predicted maximum power point voltage using linear interpolation which gives high accuracy. Contrary to other autonomous schemes which deploy droop control for DC bus voltage regulation, in this paper, a direct sliding mode control is proposed which helps regulate voltage under varying irradiance, temperature and loads. The system topology consisting of PV, battery, boost, and buck-boost converter is simulated and analyzed in MATLAB where it is observed that the proposed scheme has a good tracking with reduced overshoot, chattering and settling time. The optimal performance of the proposed control is also highlighted in comparison with other well-established control strategies, making it an ideal candidate for future PV-battery systems.
For future work, the proposed scheme can be integrated with machine learning techniques to further improve the system performance. The system can be expanded to include AC and DC sources to analyze dynamics. Moreover, the hardware prototype should be developed to ensure coherence between simulated and measured values.

Data availability statement
The datasets presented in this article are not readily available because they are under the authority of corresponding author's university. Requests to access the datasets should be directed to sarmadmalik90@gmail.com.