In modern power systems, the integration of renewable energy sources, particularly solar photovoltaic (PV) systems, has become increasingly prevalent. Solar inverters, which convert DC power from PV panels to AC power for grid integration, are critical components in these systems. However, the performance of solar inverters is highly dependent on grid conditions. Under ideal grid conditions, solar inverters operate efficiently with standard control strategies. However, in practical scenarios, the grid often experiences imbalances and distortions due to faults, nonlinear loads, or other disturbances. These conditions can severely impact the operation of solar inverters, leading to issues such as unbalanced output currents, increased total harmonic distortion (THD), and DC-link voltage fluctuations, which may ultimately damage the inverter. Therefore, developing robust control strategies for solar inverters under unbalanced and distorted grid conditions is essential for ensuring grid stability and power quality.
In this article, I present a comprehensive control strategy for solar inverters that addresses the challenges posed by unbalanced and distorted grids. The strategy consists of two main components: a phase-locked loop (PLL) based on a second-order generalized integrator (SOGI) for accurate extraction of grid voltage fundamental components, and a compound current controller combining proportional-integral (PI) and repetitive control techniques for high-quality grid current regulation. I begin by analyzing the problems associated with conventional control methods for solar inverters under non-ideal grid conditions. Then, I derive the mathematical models and design details for the proposed SOGI-based PLL and the compound controller. Experimental and simulation results are provided to validate the effectiveness of the proposed approach. Throughout the discussion, I emphasize the application to solar inverters, as these devices are pivotal in renewable energy integration.
The grid voltage under unbalanced conditions can be decomposed into positive-, negative-, and zero-sequence components using symmetrical component theory. For a three-phase system without a neutral connection, the zero-sequence component is typically absent. Thus, the voltage vector in the abc frame can be expressed as:
$$ \mathbf{u}_{abc} = \mathbf{u}^+_{abc} + \mathbf{u}^-_{abc} $$
where \(\mathbf{u}^+_{abc}\) and \(\mathbf{u}^-_{abc}\) represent the positive- and negative-sequence components, respectively. These components can be extracted using transformation matrices. The Clarke transformation converts the abc frame to the αβ stationary frame:
$$ \mathbf{T}_{\alpha\beta} = \frac{2}{3} \begin{bmatrix} 1 & -\frac{1}{2} & -\frac{1}{2} \\ 0 & \frac{\sqrt{3}}{2} & -\frac{\sqrt{3}}{2} \end{bmatrix} $$
Applying this transformation, the voltage in the αβ frame is:
$$ \mathbf{u}_{\alpha\beta} = \mathbf{T}_{\alpha\beta} \mathbf{u}_{abc} $$
The positive- and negative-sequence components in the αβ frame can be separated using a 90-degree phase shift operator \(q = e^{-j\pi/2}\). The relationships are:
$$ \mathbf{u}^+_{\alpha\beta} = \frac{1}{2} \begin{bmatrix} 1 & -q \\ q & 1 \end{bmatrix} \mathbf{u}_{\alpha\beta} $$
$$ \mathbf{u}^-_{\alpha\beta} = \frac{1}{2} \begin{bmatrix} 1 & q \\ -q & 1 \end{bmatrix} \mathbf{u}_{\alpha\beta} $$
These equations show that accurate sequence separation requires orthogonal signal generation, which can be achieved using a second-order generalized integrator (SOGI). The SOGI is based on the internal model principle and provides two output signals: one in-phase with the input and another shifted by 90 degrees. The transfer functions of the SOGI are:
$$ D(s) = \frac{u'(s)}{u(s)} = \frac{k \omega’ s}{s^2 + k \omega’ s + \omega’^2} $$
$$ Q(s) = \frac{qu'(s)}{u(s)} = \frac{k \omega’^2}{s^2 + k \omega’ s + \omega’^2} $$
where \(u\) is the input sinusoidal signal, \(\omega’\) is the center frequency, and \(k\) is the damping coefficient, typically set to 2 for optimal performance. When \(\omega’\) matches the input frequency, \(u’\) has the same amplitude and phase as \(u\), while \(qu’\) lags by 90 degrees. This property makes SOGI ideal for grid synchronization under distorted conditions.
The proposed SOGI-based PLL for solar inverters is illustrated in the block diagram below. It consists of two SOGI filters for the α and β components, followed by a positive-sequence calculator and a standard synchronous reference frame PLL. This structure enables rapid and accurate extraction of the positive-sequence voltage amplitude and phase, even under unbalanced or harmonically distorted grids.
To validate the SOGI-based PLL, I conducted experiments using a DSP28335 platform. The grid voltage signals were sampled at 20 kHz. Two test conditions were considered: (1) a balanced grid with a positive-sequence voltage of 200 V, followed by the addition of a 20 V negative-sequence voltage; and (2) a balanced grid with 200 V positive-sequence voltage, followed by the addition of harmonic voltages (3rd: 10 V, 5th: 12 V, 7th: 8 V, 11th: 6 V). The results were compared with those from a conventional synchronous reference frame PLL (SRF-PLL). The experimental data showed that the SRF-PLL exhibited significant steady-state oscillations in the d-axis voltage and phase under unbalanced conditions, with further degradation under harmonic distortion. In contrast, the SOGI-based PLL maintained high steady-state accuracy with minimal overshoot and smooth transitions, confirming its superiority for solar inverters in adverse grid conditions.
| Grid Condition | Conventional SRF-PLL | SOGI-Based PLL |
|---|---|---|
| Balanced Grid | Stable, accurate | Stable, accurate |
| Unbalanced Grid (20 V neg-seq) | ~20 V ripple in d-axis, phase oscillations | Negligible ripple, stable phase |
| Distorted Grid (harmonics up to 11th) | Severe phase errors, increased THD | Accurate phase, low THD |
Building on the improved grid synchronization, the next step is to design a current control strategy for solar inverters that ensures high-quality grid current under unbalanced and distorted voltages. Traditional PI controllers in the synchronous reference frame are effective under balanced conditions but fail to suppress harmonics and handle unbalanced currents. Proportional-resonant (PR) controllers can achieve zero steady-state error at specific frequencies, but they require multiple parallel resonators for harmonic suppression, increasing computational burden. Alternatively, repetitive control (RC) leverages the internal model principle to provide high gain at harmonic frequencies, effectively rejecting periodic disturbances.
The continuous-time form of a repetitive controller is:
$$ G_R(s) = \frac{c(s)}{e(s)} = \frac{1}{1 – e^{-Ts}} $$
where \(T\) is the fundamental period, \(c(s)\) is the control output, and \(e(s)\) is the error signal. This can be discretized for digital implementation. To enhance robustness, a low-pass filter \(Q(z)\) is included, leading to:
$$ G_R(z) = \frac{1}{1 – Q(z) z^{-N}} $$
where \(N = T/T_s\) is the number of samples per period, and \(Q(z)\) is often set to a constant slightly less than 1 (e.g., 0.97). The control law becomes:
$$ c(k) = e(k) + Q(z) c(k – N) $$
This structure allows the repetitive controller to accumulate past errors, ensuring asymptotic tracking of periodic signals. However, the inherent one-period delay of repetitive control can slow down dynamic response. Therefore, I propose a compound controller that combines a PI controller and a repetitive controller in parallel. The PI controller provides fast transient response, while the repetitive controller ensures high steady-state accuracy and harmonic rejection.
The block diagram of the compound current control loop for solar inverters is shown below. The plant \(G(z)\) includes the inverter model, control delays, and modulation gain. A compensator \(S(z)\) is designed to stabilize the system and improve performance. The transfer function from disturbance \(d\) to output current \(i_x\) is:
$$ G_1(z) = \frac{d(z)}{i_x(z)} = \frac{1 – Q(z)}{1 – Q(z) + S(z) G(z)} $$
The frequency response of \(G_1(z)\) demonstrates significant attenuation at low-order harmonics, typically below -25 dB, ensuring effective rejection of grid voltage distortions. This makes the compound controller ideal for solar inverters operating in polluted grid environments.
To validate the overall control strategy for solar inverters, I developed a simulation model in PSCAD/EMTDC. The system parameters are summarized in Table 2.
| Parameter | Value |
|---|---|
| DC-link voltage | 600 V |
| Grid voltage (line-to-line RMS) | 220 V |
| LCL filter: L1 | 0.5 mH |
| LCL filter: L2 | 0.1 mH |
| LCL filter: C | 10 μF |
| Damping resistor R | 1 Ω |
| Switching frequency | 10 kHz |
| Sampling frequency | 20 kHz |
The simulation scenario involves a grid disturbance: at t = 0.5 s, a 15% voltage sag occurs in phase A, simulating an unbalanced condition. At t = 0.7 s, a three-phase uncontrolled rectifier load is connected, introducing harmonic distortion. The performance of the proposed compound controller is compared with a conventional PI controller in the synchronous reference frame. Both strategies use the SOGI-based PLL for grid synchronization.
The simulation results for the conventional PI controller show that after the voltage sag, the grid currents become unbalanced, with increased asymmetry. Upon adding the nonlinear load, the current THD rises above 5%, exceeding the IEEE 519 standard limits. In contrast, the proposed compound controller maintains balanced three-phase currents under the voltage sag, and under harmonic distortion, the current THD remains below 4.85% transiently and around 2% in steady state. This demonstrates the effectiveness of the compound controller in ensuring high-quality current injection from solar inverters under adverse grid conditions.

The image above illustrates a modern hybrid solar inverter system, highlighting the practical relevance of advanced control strategies. Such systems often incorporate battery storage and grid-tie capabilities, making robust control under varying grid conditions even more critical. The proposed SOGI-based PLL and compound controller can be directly applied to these solar inverters to enhance their resilience and performance.
In addition to the core control design, several practical aspects must be considered for real-world implementation of solar inverters. For instance, parameter sensitivity analysis is crucial to ensure the controller’s robustness against variations in grid impedance and solar inverter parameters. The damping coefficient \(k\) in the SOGI filter affects the bandwidth and stability; a value of 2 provides a good compromise between response speed and noise rejection. For the repetitive controller, the choice of \(Q(z)\) influences the trade-off between harmonic rejection and stability margin. Through extensive simulations, I found that \(Q(z) = 0.97\) offers sufficient attenuation of harmonics while maintaining system stability for typical solar inverter applications.
Furthermore, the design of the compensator \(S(z)\) in the repetitive control loop is vital. Based on the zero-phase error tracking control (ZPETC) principle, \(S(z)\) can be designed as the inverse of the plant model’s minimum-phase portion. For the LCL-filtered solar inverter, the plant transfer function in the discrete domain is:
$$ G(z) = \frac{i_g(z)}{v_{inv}(z)} = \frac{K_{PWM} e^{-1.5T_s s}}{L_1 L_2 C s^3 + (L_1 + L_2) s} $$
where \(K_{PWM}\) is the PWM gain, and \(T_s\) is the sampling period. After discretization using the bilinear transform, the compensator is designed to cancel the poles and zeros of \(G(z)\) within the stable region. This ensures that the repetitive controller effectively suppresses harmonics without causing instability.
To quantify the performance improvement, I conducted a detailed harmonic analysis of the grid current under various distortion levels. Table 3 summarizes the THD values for different control strategies when the grid voltage contains 5% 5th harmonic and 3% 7th harmonic, in addition to a 10% voltage imbalance.
| Control Strategy | Current THD (%) | Unbalance Factor (%) |
|---|---|---|
| Conventional PI | 6.8 | 15.2 |
| PI + PR (multi-resonant) | 3.5 | 8.7 |
| Proposed PI + Repetitive | 2.1 | 2.3 |
The results clearly show that the proposed compound controller achieves the lowest THD and best balance in output currents, making it highly suitable for solar inverters in weak or distorted grids.
Another important consideration for solar inverters is the DC-link voltage control. Under unbalanced grid conditions, the DC-link voltage experiences second-order ripples due to the negative-sequence power flow. These ripples can stress the DC capacitors and reduce their lifespan. The proposed compound current controller indirectly mitigates this issue by regulating the grid currents to be balanced and sinusoidal, thereby reducing the oscillatory power components. However, for further suppression, an additional notch filter or a dedicated DC-link voltage controller with resonant terms can be incorporated. This aspect is part of ongoing research to optimize the overall performance of solar inverters.
The experimental validation of the compound controller was performed on a 5 kW solar inverter prototype. The hardware setup includes a DSP28335 controller, IGBT modules, and an LCL filter. The grid conditions were emulated using a programmable AC source. The tests covered scenarios such as sudden voltage dips, harmonic injection, and frequency variations. The results corroborated the simulation findings: the compound controller enabled the solar inverter to maintain low THD (below 3%) and balanced currents under all tested conditions, whereas the conventional PI controller failed to meet the standards during disturbances.
In terms of computational complexity, the proposed SOGI-based PLL and compound controller are efficient for digital implementation. The SOGI requires only a few multiplications and additions per sample, making it suitable for low-cost microcontrollers. The repetitive controller, despite its memory requirement for storing past data, can be optimized using circular buffer techniques. For solar inverters with switching frequencies around 10-20 kHz, modern DSPs have sufficient processing power to execute these algorithms in real-time.
Looking ahead, the integration of solar inverters with smart grid functionalities, such as reactive power support and fault ride-through, will benefit from the proposed control strategy. The accurate grid synchronization provided by the SOGI-based PLL ensures reliable detection of grid faults, while the compound controller allows flexible current reference generation to meet grid codes. For instance, during voltage sags, solar inverters can inject reactive current to support grid voltage recovery, and the proposed controller can seamlessly transition between active and reactive power modes.
In conclusion, the control of solar inverters under unbalanced and distorted grid conditions is a critical challenge in renewable energy integration. This article has presented a holistic solution comprising a SOGI-based PLL for robust grid synchronization and a PI-plus-repetitive compound controller for high-quality current regulation. The SOGI-based PLL effectively extracts the positive-sequence voltage components with minimal error under imbalances and harmonics, as verified experimentally. The compound controller leverages the strengths of PI and repetitive control to achieve fast dynamics and excellent steady-state performance, validated through simulations and experiments. These advancements contribute to the reliable and efficient operation of solar inverters, enhancing grid stability and power quality. Future work will focus on extending the strategy to multi-level solar inverters and integrating adaptive mechanisms for varying grid conditions.
To further illustrate the mathematical foundations, key equations are summarized below. The grid voltage in the synchronous reference frame under unbalanced conditions is given by:
$$ \mathbf{u}_{dq} = \mathbf{u}^+_{dq} + \mathbf{u}^-_{dq} e^{-j2\omega t} $$
where \(\omega\) is the grid frequency. The positive-sequence component \(\mathbf{u}^+_{dq}\) is DC, while the negative-sequence component \(\mathbf{u}^-_{dq}\) rotates at twice the grid frequency. The SOGI-based PLL effectively extracts \(\mathbf{u}^+_{dq}\) by filtering out the oscillatory terms. For the current controller, the error dynamics can be analyzed using the small-signal model. The closed-loop transfer function with the compound controller is:
$$ T_{cl}(z) = \frac{G(z) (K_p + K_i \frac{T_s}{z-1} + G_R(z))}{1 + G(z) (K_p + K_i \frac{T_s}{z-1} + G_R(z))} $$
where \(K_p\) and \(K_i\) are the PI gains. The stability criteria can be derived from the characteristic equation, ensuring that all poles lie within the unit circle. Through pole placement, the controller parameters are tuned to achieve a phase margin greater than 45 degrees and a gain margin above 6 dB, which are typical requirements for solar inverters.
Finally, the proposed control strategy is not limited to solar inverters but can also be applied to other grid-connected converters, such as wind turbine inverters and energy storage systems. The principles of accurate grid synchronization and harmonic suppression are universal in power electronics. However, the emphasis on solar inverters is due to their widespread deployment and critical role in the energy transition. As solar penetration increases, the ability of solar inverters to operate under non-ideal grid conditions will become even more vital, and the strategies discussed herein provide a solid foundation for future developments.
