Grey Wolf Optimized Sliding Mode Control for Grid-Tied Inverter with Combined Reaching Law

In the realm of renewable energy integration, the grid tied inverter serves as a critical interface for photovoltaic (PV) systems, converting DC power from solar panels into AC power synchronized with the grid. The performance of the grid tied inverter directly impacts power quality, stability, and overall system efficiency. Traditional control methods, such as proportional-integral (PI) control, often struggle to balance rapid dynamic response and steady-state accuracy under varying environmental conditions, such as changes in solar irradiance and temperature. To address these limitations, this paper proposes an optimal control strategy based on a combined reaching law sliding mode control (SMC) with parameters optimized using the grey wolf optimizer (GWO) algorithm. The grid tied inverter is the focal point of this study, and we aim to enhance its robustness and precision through advanced nonlinear control techniques.

The proposed method leverages the inherent advantages of SMC, including strong robustness against disturbances and parameter variations, while mitigating chattering issues via a novel combined reaching law. By integrating an integral sliding surface with a hybrid approach that combines exponential and variable-speed reaching laws, the control system achieves faster convergence and reduced steady-state error. Furthermore, the GWO algorithm is employed to globally optimize key sliding mode parameters, ensuring optimal performance without manual tuning. This approach not only improves the tracking capability of the grid tied inverter but also enhances its anti-interference ability, making it suitable for real-world PV applications where operational conditions are unpredictable.

In this paper, we first establish the mathematical model of a three-phase grid tied inverter in the dq synchronous rotating frame. This model forms the basis for designing the dual-loop control structure, where the outer voltage loop regulates the DC-link voltage, and the inner current loop tracks the grid current references for active and reactive power control. The grid tied inverter topology considered here is a two-stage system with a Boost converter for maximum power point tracking (MPPT) and an LCL-filtered inverter for grid connection. The following sections detail the control design, optimization process, and simulation results, demonstrating the superiority of the proposed method over conventional PI control. Throughout the discussion, the term grid tied inverter is emphasized to underscore its central role in PV systems.

Mathematical Modeling of the Grid-Tied Inverter System

The grid tied inverter system comprises a PV array, a DC-DC Boost converter, and a three-phase voltage source inverter (VSI) with an LCL filter. The inverter’s primary function is to inject sinusoidal currents into the grid with low total harmonic distortion (THD). To facilitate control design, the system dynamics are transformed into the dq coordinate system using Park’s transformation, which simplifies the three-phase AC quantities into DC components. The state equations for the grid currents are derived as follows:

$$ \frac{di_{2d}}{dt} = -\frac{R_2}{L_2} i_{2d} + \omega i_{2q} + \frac{u_{cd}}{L_2} – \frac{u_{gd}}{L_2} $$

$$ \frac{di_{2q}}{dt} = -\frac{R_2}{L_2} i_{2q} – \omega i_{2d} + \frac{u_{cq}}{L_2} – \frac{u_{gq}}{L_2} $$

where \( i_{2d} \) and \( i_{2q} \) are the d-axis and q-axis grid currents, respectively; \( u_{cd} \) and \( u_{cq} \) are the capacitor voltages; \( u_{gd} \) and \( u_{gq} \) are the grid voltages; \( R_2 \) and \( L_2 \) represent the grid-side resistance and inductance; and \( \omega \) is the grid angular frequency. The DC-link dynamics, crucial for maintaining voltage stability, are expressed as:

$$ \frac{du_{dc}}{dt} = \frac{I_{pv}}{C_2} – \frac{1.5 u_{gd} i_{gd}}{C_2 u_{dc}} $$

Here, \( u_{dc} \) is the DC-link voltage, \( I_{pv} \) is the PV output current, \( C_2 \) is the DC-side capacitance, and \( i_{gd} \) is the d-axis current reference derived from power balance. The active and reactive powers are given by:

$$ P_g = 1.5 u_{gd} i_{gd} $$

$$ Q_g = -1.5 u_{gd} i_{gq} $$

assuming the grid voltage vector is aligned with the d-axis (i.e., \( u_{gq} = 0 \)). These equations form the foundation for designing the sliding mode controllers for the grid tied inverter.

Design of Combined Reaching Law Sliding Mode Control for the Grid-Tied Inverter

The control strategy employs a dual-loop structure: an outer voltage loop for DC-link regulation and an inner current loop for grid current tracking. Both loops utilize integral sliding mode control with a combined reaching law to minimize chattering and improve dynamic response. The grid tied inverter benefits from this approach by achieving precise current injection even under disturbances.

Voltage Outer Loop Control Design

The voltage outer loop aims to maintain the DC-link voltage at a constant reference value \( u_{dc\_ref} \). An integral sliding surface is defined to incorporate error dynamics:

$$ S_v = \beta_1 e_1 + e_2 $$

where \( e_1 = u_{dc} – u_{dc\_ref} \) and \( e_2 = \int (u_{dc} – u_{dc\_ref}) dt \). The parameter \( \beta_1 > 0 \) is a sliding coefficient to be optimized. To reduce chattering, a combined reaching law is introduced, blending exponential and variable-speed reaching laws:

$$ \dot{S}_v = \begin{cases}
-\varepsilon_1 |e_1| \text{sgn}(S_v), & |e_1| \leq k_0 \\
-\varepsilon_1 \text{sgn}(S_v) – k_1 S_v, & |e_1| > k_0
\end{cases} $$

Here, \( \varepsilon_1 > 0 \), \( k_1 > 0 \), and \( k_0 > 0 \) are tuning parameters. The variable-speed term \( -\varepsilon_1 |e_1| \text{sgn}(S_v) \) dominates when the error is small, reducing steady-state chattering, while the exponential term \( -\varepsilon_1 \text{sgn}(S_v) – k_1 S_v \) accelerates convergence during large errors. Differentiating \( S_v \) and substituting the DC-link dynamics yields the control law for the d-axis current reference \( i_{d\_ref} \):

$$ i_{d\_ref} = \frac{C_2 u_{dc}}{1.5 \beta_1 u_{gd}} \left( \frac{\beta_1 I_{pv}}{C_2} + (u_{dc} – u_{dc\_ref}) + \delta_v \right) $$

with \( \delta_v \) defined as:

$$ \delta_v = \begin{cases}
\varepsilon_1 |e_1| \text{sgn}(S_v), & |e_1| \leq k_0 \\
\varepsilon_1 \text{sgn}(S_v) + k_1 S_v, & |e_1| > k_0
\end{cases} $$

This ensures robust voltage regulation for the grid tied inverter.

Current Inner Loop Control Design

The current inner loop tracks the d-axis and q-axis current references to control active and reactive power. Separate sliding surfaces are defined for each axis:

$$ S_d = \beta_2 e_3 + e_4 $$

$$ S_q = \beta_3 e_5 + e_6 $$

where \( e_3 = i_{2d\_ref} – i_{2d} \), \( e_4 = \int (i_{2d\_ref} – i_{2d}) dt \), \( e_5 = i_{2q\_ref} – i_{2q} \), \( e_6 = \int (i_{2q\_ref} – i_{2q}) dt \), and \( \beta_2, \beta_3 > 0 \) are sliding coefficients. The combined reaching law is similarly applied:

$$ \dot{S}_d = \begin{cases}
-\varepsilon_1 |e_3| \text{sgn}(S_d), & |e_3| \leq k_0 \\
-\varepsilon_1 \text{sgn}(S_d) – k_1 S_d, & |e_3| > k_0
\end{cases} $$

$$ \dot{S}_q = \begin{cases}
-\varepsilon_1 |e_5| \text{sgn}(S_q), & |e_5| \leq k_0 \\
-\varepsilon_1 \text{sgn}(S_q) – k_1 S_q, & |e_5| > k_0
\end{cases} $$

From the grid current dynamics, the control laws for the inverter output voltages \( u_d \) and \( u_q \) are derived:

$$ u_d = \frac{L_2}{\beta_2} (i_{2d\_ref} – i_{2d}) + \frac{L_2}{\beta_2} \delta_d + R_2 i_{2d} – \omega L_2 i_{2q} + u_{gd} $$

$$ u_q = \frac{L_2}{\beta_3} (i_{2q\_ref} – i_{2q}) + \frac{L_2}{\beta_3} \delta_q + R_2 i_{2q} + \omega L_2 i_{2d} + u_{gq} $$

with \( \delta_d \) and \( \delta_q \) given by:

$$ \delta_d = \begin{cases}
\varepsilon_1 |e_3| \text{sgn}(S_d), & |e_3| \leq k_0 \\
\varepsilon_1 \text{sgn}(S_d) + k_1 S_d, & |e_3| > k_0
\end{cases} $$

$$ \delta_q = \begin{cases}
\varepsilon_1 |e_5| \text{sgn}(S_q), & |e_5| \leq k_0 \\
\varepsilon_1 \text{sgn}(S_q) + k_1 S_q, & |e_5| > k_0
\end{cases} $$

These control laws enable precise current tracking for the grid tied inverter, minimizing harmonic distortion and enhancing grid synchronization.

Parameter Optimization Using Grey Wolf Optimizer (GWO)

The performance of the sliding mode controller heavily depends on the choice of parameters \( \beta_1, \beta_2, \beta_3 \). Manual tuning can be tedious and suboptimal. Thus, the GWO algorithm, inspired by the social hierarchy and hunting behavior of grey wolves, is employed to globally optimize these parameters. The GWO algorithm iteratively updates the positions of search agents (wolves) to find the minimum of an objective function. For the grid tied inverter control, the integral of time-weighted absolute error (ITAE) is used as the fitness function:

$$ J_{\text{ITAE}} = \int_0^\infty t |e(t)| dt $$

where \( e(t) \) represents the tracking error. The optimization process involves the following steps:

  1. Initialization: Define the population size, number of iterations, and search bounds for \( \beta_1, \beta_2, \beta_3 \).
  2. Fitness Evaluation: For each wolf position (parameter set), simulate the grid tied inverter system and compute the ITAE value.
  3. Hierarchy Update: Identify the alpha, beta, and delta wolves (best solutions) based on fitness.
  4. Position Update: Update all wolves’ positions using equations modeling encircling and attacking prey:

$$ \vec{D} = |\vec{C} \cdot \vec{X}_p(t) – \vec{X}(t)| $$

$$ \vec{X}(t+1) = \vec{X}_p(t) – \vec{A} \cdot \vec{D} $$

where \( \vec{A} \) and \( \vec{C} \) are coefficient vectors, \( \vec{X}_p \) is the prey position, and \( \vec{X} \) is the wolf position. The hunting phase is guided by the top three solutions:

$$ \vec{D}_\alpha = |\vec{C}_1 \cdot \vec{X}_\alpha – \vec{X}| $$

$$ \vec{D}_\beta = |\vec{C}_2 \cdot \vec{X}_\beta – \vec{X}| $$

$$ \vec{D}_\delta = |\vec{C}_3 \cdot \vec{X}_\delta – \vec{X}| $$

$$ \vec{X}_1 = \vec{X}_\alpha – \vec{A}_1 \cdot \vec{D}_\alpha $$

$$ \vec{X}_2 = \vec{X}_\beta – \vec{A}_2 \cdot \vec{D}_\beta $$

$$ \vec{X}_3 = \vec{X}_\delta – \vec{A}_3 \cdot \vec{D}_\delta $$

$$ \vec{X}(t+1) = \frac{\vec{X}_1 + \vec{X}_2 + \vec{X}_3}{3} $$

After convergence, the GWO algorithm provides optimal values for \( \beta_1, \beta_2, \beta_3 \), which are then used in the sliding mode controller for the grid tied inverter. This automated optimization ensures enhanced control accuracy and robustness.

Table 1: Optimized Sliding Mode Parameters from GWO
Parameter Optimized Value Description
\( \beta_1 \) 6.5560 Voltage loop sliding coefficient
\( \beta_2 \) 2.9859 d-axis current loop sliding coefficient
\( \beta_3 \) 2.1042 q-axis current loop sliding coefficient

Simulation Results and Analysis

To validate the proposed control method, simulations are conducted in MATLAB/Simulink under various operating conditions. The grid tied inverter system parameters are listed in Table 2. The performance is compared with conventional PI control to highlight the advantages of the GWO-optimized combined reaching law SMC.

Table 2: System Parameters for Simulation
Component Parameter Value
PV Array Open-circuit voltage \( U_{oc} \) 51.5 V
PV Array Maximum power voltage \( U_m \) 43 V
PV Array Short-circuit current \( I_{sc} \) 9.4 A
DC-Link Capacitance \( C_2 \) 100 μF
Inverter Switching frequency 20 kHz
LCL Filter Inductance \( L_1 \) 5 mH
LCL Filter Inductance \( L_2 \) 1 mH
LCL Filter Capacitance \( C_3 \) 20 μF
Control Reaching law parameter \( \varepsilon_1 \) 100
Control Reaching law parameter \( k_1 \) 6000

Standard Test Conditions

Under standard test conditions (irradiance 1000 W/m², temperature 25°C), the grid tied inverter with the proposed control achieves rapid and accurate grid current tracking. The current waveforms synchronize with the grid voltage within one cycle, whereas PI control requires multiple cycles and exhibits higher steady-state error. The total harmonic distortion (THD) of the grid current is analyzed over five cycles, as summarized in Table 3. The grid tied inverter with GWO-optimized SMC yields a THD of 0.53%, significantly lower than the 2.1% for PI control, meeting the grid code requirement of THD < 5%. This underscores the superior power quality delivered by the proposed method.

Table 3: Performance Comparison Under Standard Conditions
Control Method Settling Time (cycles) Current THD (%) Steady-State Error
PI Control 2 2.10 Moderate
Proposed SMC with GWO 1 0.53 Negligible

Variable Environmental Conditions

The robustness of the grid tied inverter is tested under sudden changes in irradiance and temperature. When irradiance drops from 1000 W/m² to 800 W/m² at 0.1 s, the proposed controller maintains stable current tracking with minimal transient distortion, while PI control suffers from significant phase shift and increased harmonics. Similarly, a temperature change from 25°C to 50°C has negligible impact on the proposed control, demonstrating its insensitivity to parameter variations. These results validate the enhanced anti-interference capability of the grid tied inverter when employing the combined reaching law SMC with GWO optimization.

The dynamic response can be quantified using key metrics such as rise time, overshoot, and integral error criteria. For the grid tied inverter, the rise time for current tracking is reduced by approximately 60% compared to PI control, and the overshoot is eliminated due to the sliding mode’s inherent boundary layer behavior. The combined reaching law effectively suppresses chattering, as evidenced by smooth control signals in simulation plots. Overall, the grid tied inverter operates with improved stability and efficiency across a wide range of conditions.

Conclusion

In this paper, we have presented an optimal control strategy for grid tied inverters in PV systems, based on a combined reaching law sliding mode control with parameters optimized via the grey wolf optimizer. The proposed method addresses the limitations of traditional control approaches by integrating the robustness of SMC with a hybrid reaching law that reduces chattering and accelerates convergence. The GWO algorithm automates the tuning of critical sliding coefficients, ensuring global optimization and enhanced performance without manual intervention.

The simulation results confirm that the grid tied inverter with the proposed control achieves faster dynamic response, lower current THD, and superior disturbance rejection compared to conventional PI control. Under varying environmental conditions, the grid tied inverter maintains precise power injection and grid synchronization, highlighting its practicality for real-world applications. Future work may involve hardware implementation and testing under grid faults to further validate the method’s resilience. Ultimately, this research contributes to advancing control technologies for grid tied inverters, promoting the integration of renewable energy sources into the power grid.

The grid tied inverter remains a pivotal component in modern energy systems, and innovations in control strategies like the one proposed here are essential for achieving high efficiency and reliability. By leveraging intelligent optimization and advanced nonlinear control, we can unlock the full potential of photovoltaic generation, paving the way for a sustainable energy future.

Scroll to Top