In the context of expanding renewable energy integration, the grid tied inverter plays a pivotal role in converting direct current from sources like photovoltaic systems into alternating current suitable for grid connection. Traditional control methods, such as PI control, often exhibit limitations in precision, robustness, and disturbance rejection. This research addresses these challenges by proposing a dual-loop sliding mode control (SMC) strategy enhanced with a multi-objective particle swarm optimization (PSO) algorithm for parameter tuning. The aim is to develop a controller that offers high tracking accuracy, fast response, minimal overshoot, and superior anti-interference capabilities for grid tied inverter systems.
The grid tied inverter topology under study employs a three-phase full-bridge configuration with an L-filter. The mathematical model is derived from Kirchhoff’s laws, considering disturbances from both the grid and photovoltaic sides. In the three-phase stationary coordinate system (abc), the output voltage equation is:
$$ L_n \frac{di_n}{dt} + R_n i_n + u_{en} + d_1(t) = V_n $$
where \( n = a, b, c \), \( L_n \) and \( R_n \) are the filter inductance and parasitic resistance, \( u_{en} \) is the grid voltage, \( V_n \) is the inverter voltage, and \( d_1(t) \) represents grid-side disturbances. For control simplification, we assume symmetrical components: \( L_a = L_b = L_c = L \) and \( R_a = R_b = R_c = R \). The input side equation for the DC link is:
$$ C_{dc} \frac{du_{dc}}{dt} = i_{pv} – i_{dc} $$
with \( C_{dc} \) as the DC-link capacitor, \( i_{pv} \) the photovoltaic output current, and \( u_{dc} \) the DC voltage. Incorporating disturbances, this becomes:
$$ \frac{du_{dc}}{dt} = \frac{1}{C_{dc}} \left( i_{pv} – \frac{3u_{ed} i_d}{2u_{dc}} \right) + d_2(t) $$
where \( d_2(t) \) denotes photovoltaic-side disturbances. To facilitate control, the model is transformed into the synchronous rotating coordinate system (dq) using Park transformation:
$$ \begin{bmatrix} u_{ed} & i_d \\ u_{eq} & i_q \end{bmatrix} = \frac{2}{3} \begin{bmatrix} \cos\theta & \cos(\theta – \frac{2\pi}{3}) & \cos(\theta + \frac{2\pi}{3}) \\ -\sin\theta & -\sin(\theta – \frac{2\pi}{3}) & -\sin(\theta + \frac{2\pi}{3}) \end{bmatrix} \begin{bmatrix} u_{ea} & i_a \\ u_{eb} & i_b \\ u_{ec} & i_c \end{bmatrix} $$
This yields the decoupled equations:
$$ L \frac{di_d}{dt} = \omega L i_q + V_d – R i_d – u_{ed} – d_d $$
$$ L \frac{di_q}{dt} = -\omega L i_d + V_q – R i_q – u_{eq} – d_q $$
where \( \omega \) is the grid angular frequency. A feedforward decoupling method is applied to independently control the d and q axes, crucial for enhancing the performance of the grid tied inverter.

The core of our approach lies in a dual-loop sliding mode control design. The voltage outer loop stabilizes the DC-link voltage, while the current inner loop ensures grid current quality and unity power factor. Both loops utilize integral sliding mode surfaces with exponential reaching laws to reduce chattering and improve robustness. For the voltage loop, the tracking error is defined as \( e = u_{dc}^* – u_{dc} \), with \( u_{dc}^* \) as the reference DC voltage. The sliding surface is:
$$ s_v = e + \lambda_v \int e(t) dt, \quad \lambda_v > 0 $$
and the exponential reaching law:
$$ \dot{s_v} = -\beta_v \text{sgn}(s_v) – q_v s_v – d_v, \quad \beta_v, q_v > 0 $$
where \( d_v \) encapsulates disturbances. The control law derived is:
$$ i_d^* = \frac{2u_{dc} C_{dc}}{3u_{ed}} \left[ -\beta_v \text{sgn}(s_v) – q_v s_v + \frac{i_{pv}}{C_{dc}} – \lambda_v e \right] $$
Lyapunov stability analysis confirms that with \( \beta_v > \gamma \) (disturbance bound) and \( q_v > 0 \), the system reaches the sliding manifold in finite time. Similarly, for the current loop, errors are \( e_d = i_d^* – i_d \) and \( e_q = i_q^* – i_q \) (with \( i_q^* = 0 \) for unity power factor). The sliding surfaces and reaching laws are:
$$ s_d = e_d + \lambda_i \int e_d(t) dt, \quad s_q = e_q + \lambda_i \int e_q(t) dt, \quad \lambda_i > 0 $$
$$ \dot{s_d} = -\beta_i \text{sgn}(s_d) – q_i s_d – d_i, \quad \dot{s_q} = -\beta_i \text{sgn}(s_q) – q_i s_q – d_i, \quad \beta_i, q_i > 0 $$
The control outputs are:
$$ V_d = L \left[ \lambda_i e_d + \beta_i \text{sgn}(s_d) – \omega i_q + q_i s_d \right] + R i_d + u_{ed} $$
$$ V_q = L \left[ \lambda_i e_q + \beta_i \text{sgn}(s_q) + \omega i_d + q_i s_q \right] + R i_q + u_{eq} $$
Stability is ensured when \( \beta_i > \sigma \) (disturbance bound) and \( q_i > 0 \). The parameters \( \lambda_v, \lambda_i, \beta_v, \beta_i, q_v, q_i \) require precise tuning to optimize the grid tied inverter performance, which we address via PSO.
Manual adjustment of these sliding mode controller parameters is inefficient and often suboptimal. We employ a multi-objective particle swarm optimization algorithm to automate this process. The PSO algorithm simulates social behavior, where particles (representing parameter sets) move through the search space based on individual and collective best positions. The velocity and position update equations for particle \( i \) in dimension \( j \) at iteration \( t \) are:
$$ V_{ij}(t+1) = \omega V_{ij}(t) + c_1 r_1(t) [P_{ij}(t) – X_{ij}(t)] + c_2 r_2(t) [G_{ij}(t) – X_{ij}(t)] $$
$$ X_{ij}(t+1) = X_{ij}(t) + V_{ij}(t+1) $$
where \( \omega \) is inertia weight, \( c_1 \) and \( c_2 \) are acceleration constants, \( r_1 \) and \( r_2 \) are random numbers in [0,1], \( P_{ij} \) is the personal best, and \( G_{ij} \) is the global best. For the grid tied inverter, we define three key objectives to form a composite fitness function \( J \):
- Grid current quality: \( J_1 = \frac{1}{n} \sum_{k=1}^{n} | i_{dq}(k) – i_{dq\_ref}(k) | \), minimizing tracking error.
- Response speed: \( J_2 = t_r \), the settling time of grid current.
- Overshoot: \( J_3 = \max | i_{dq} – i_{dq\_ref} | \), reducing peak deviation.
The total fitness function is:
$$ J = \omega_1 J_1 + \omega_2 J_2 + \omega_3 J_3 $$
with weights \( \omega_1, \omega_2, \omega_3 \) scaling the objectives. The PSO process iteratively evaluates parameter sets via Simulink simulations, updating particles until convergence. This approach ensures the grid tied inverter controller achieves balanced multi-objective optimization.
To validate the proposed strategy, we constructed a detailed simulation model in MATLAB/Simulink. The system parameters are summarized in the table below, reflecting a typical photovoltaic grid tied inverter setup.
| Parameter | Value |
|---|---|
| Photovoltaic array maximum power \( P_{max} \) | 213.15 W |
| Maximum power point voltage \( U_{max} \) | 29 V |
| Maximum power point current \( I_{max} \) | 7.35 A |
| DC-link capacitor \( C_{dc} \) | 1500 μF |
| DC voltage reference \( u_{dc}^* \) | 500 V |
| Grid voltage (line-to-line RMS) \( u_{en} \) | 380 V |
| Filter parasitic resistance \( R \) | 0.1 Ω |
| Filter inductance \( L \) | 5 mH |
| Grid frequency \( f_g \) | 50 Hz |
| Sampling frequency \( f_s \) | 1 MHz |
| Switching frequency \( f_{pwm} \) | 10 kHz |
The PSO algorithm was configured with a population size \( S = 30 \), dimension \( D = 6 \) (for parameters \( \lambda_v, \lambda_i, \beta_v, \beta_i, q_v, q_i \)), inertia weight \( \omega = 0.8 \), acceleration constants \( c_1 = c_2 = 2 \), maximum velocity \( V_{max} = 20 \), and maximum iterations \( T = 50 \). Weighting factors were set as \( \omega_1 = 4 \), \( \omega_2 = 10 \), \( \omega_3 = 0.005 \) to balance objectives. The search ranges for parameters were based on typical values, as shown in the optimization results table.
| Parameter | Search Range | Optimized Value |
|---|---|---|
| \( \lambda_v \) | 0–10 | 0.012 |
| \( \beta_v \) | 20–200 | 101.21 |
| \( q_v \) | 0–10 | 0.0089 |
| \( \lambda_i \) | 100–1000 | 188.84 |
| \( \beta_i \) | 200–2000 | 1187.27 |
| \( q_i \) | 100–1000 | 599.93 |
The optimization converged within approximately 32 iterations, indicating efficiency. Comparative simulations were conducted between the PSO-optimized SMC and a conventional SMC with manually tuned parameters from literature. Key performance metrics are summarized below.
| Metric | Conventional SMC | PSO-Optimized SMC |
|---|---|---|
| Current settling time \( t_r \) | > 0.05 s | < 0.05 s |
| Current THD | 3.06% | 1.47% |
| Maximum current overshoot | > 200 A | < 200 A |
| Power factor | ~1 (with phase error) | 1 (no phase error) |
| Robustness to disturbances | Moderate | High |
The results demonstrate that the PSO-optimized sliding mode control significantly enhances the grid tied inverter performance. The grid current achieves faster stabilization, lower harmonic distortion (well below the 5% IEEE standard), and reduced overshoot, which minimizes stress on switching devices. Moreover, the system exhibits excellent robustness under disturbances. For instance, when grid voltage abruptly dropped by 20% at 0.2 s and recovered at 0.3 s, the grid tied inverter maintained stable current output with only minor transients, settling within 0.03 s. Similarly, under photovoltaic-side perturbations—where irradiance changed from 1000 W/m² to 600 W/m² at 0.15 s and to 800 W/m² at 0.3 s—the controller quickly adapted, preserving grid synchronization and current quality. These experiments underscore the effectiveness of our integrated approach for real-world grid tied inverter applications.
In conclusion, this research presents a comprehensive framework for optimizing sliding mode control in grid tied inverters through multi-objective particle swarm optimization. The dual-loop SMC structure, combining voltage and current regulation with integral sliding surfaces and exponential reaching laws, inherently boosts robustness and disturbance rejection. The PSO algorithm automates parameter tuning, overcoming the inefficiencies of manual methods and yielding a controller that excels in tracking accuracy, response speed, and overshoot suppression. Simulation validations confirm the superiority of this strategy, highlighting its potential for improving the reliability and efficiency of grid tied inverter systems in renewable energy integration. The methodology is generalizable, applicable to other control paradigms like PI or PR control, offering practical value for engineering deployments. Future work could explore real-time adaptive PSO or hybrid algorithms for further enhancement of grid tied inverter performance under varying operational conditions.
