Harmonic Compensation in Solar Inverters: A Composite Control Strategy Integrating State Feedback and Repetitive Control

The proliferation of grid-connected solar inverters has placed stringent demands on the quality of the injected current. Grid codes and industry standards rigorously limit total harmonic distortion (THD) to prevent pollution of the utility grid. While LCL filters offer superior attenuation of high-frequency switching harmonics compared to simple L filters, their control model exhibits a pronounced resonant peak. This peak can lead to instability and current waveform distortion if not properly damped. Traditional control approaches often involve trade-offs between dynamic response and steady-state accuracy. PI controllers, while simple, inherently exhibit steady-state error when tracking sinusoidal references or rejecting periodic disturbances. This paper analyzes the harmonic challenges in single-phase solar inverter systems and proposes a composite control strategy. This strategy synergistically combines state feedback pole placement for active damping, embedded repetitive control for periodic disturbance rejection, and targeted feedforward schemes to decouple source perturbations. The goal is to achieve fast dynamic response, zero steady-state tracking error for the fundamental component, and significant suppression of low-order harmonics stemming from DC-link voltage ripple, grid voltage distortion, and switching dead-time effects.

System Modeling and Harmonic Characteristics

The typical topology of a single-phase full-bridge grid-connected solar inverter with an LCL filter is considered. The system is a dual-input, single-output plant from the control perspective. The primary control objective for the current loop is to force the grid current \(i_g\) to accurately track its reference \(i_{ref}\), which is generated by a maximum power point tracking (MPPT) algorithm or a power dispatch command. The current error is processed by a current controller, \(G_c(s)\), to produce the modulation reference signal. Using unipolar sinusoidal pulse-width modulation (SPWM) with double-frequency effect, the equivalent gain of the inverter bridge can be represented as \(K_{PWM} = V_{dc}/V_{tri}\), where \(V_{dc}\) is the DC-link voltage and \(V_{tri}\) is the peak amplitude of the triangular carrier wave. The output voltage of the bridge, \(v_{inv}\), passes through the LCL filter. The grid voltage \(v_g\) acts as a disturbance to the current control loop.

The LCL filter’s state-space model is foundational for control design. Selecting the inverter-side inductor current \(i_1\), the capacitor voltage \(v_c\), and the grid-side inductor current \(i_g\) as state variables, the system equations are:

$$
\begin{aligned}
\dot{\mathbf{x}} &= \mathbf{A}\mathbf{x} + \mathbf{B}_1 u + \mathbf{B}_2 d \\
y &= \mathbf{C}\mathbf{x}
\end{aligned}
$$

where \(\mathbf{x} = [i_1, v_c, i_g]^T\), \(u = v_{inv}\) is the control input, \(d = v_g\) is the disturbance input, \(y = i_g\) is the output, and the matrices are defined as:

$$
\mathbf{A} = \begin{bmatrix}
-\frac{R_1}{L_1} & -\frac{1}{L_1} & 0 \\
\frac{1}{C_f} & 0 & -\frac{1}{C_f} \\
0 & \frac{1}{L_g} & -\frac{R_g}{L_g}
\end{bmatrix}, \quad
\mathbf{B}_1 = \begin{bmatrix} \frac{1}{L_1} \\ 0 \\ 0 \end{bmatrix}, \quad
\mathbf{B}_2 = \begin{bmatrix} 0 \\ 0 \\ -\frac{1}{L_g} \end{bmatrix}, \quad
\mathbf{C} = [0, 0, 1].
$$

The harmonic spectrum injected into the system originates from multiple sources inherent to solar inverter operation:

  1. Modulation Process: Even with unipolar SPWM, sideband harmonics around even multiples of the switching frequency are present. While the LCL filter effectively attenuates these high-frequency components, non-ideal modulation and dead-time effects introduce low-order odd harmonics (3rd, 5th, 7th, etc.) directly into the baseband.
  2. DC-Link Voltage Ripple: In single-phase solar inverters, the instantaneous power flow has a pulsating component at twice the grid frequency (2ω). This causes a corresponding ripple in the DC-link voltage, \(V_{dc}\). The modulation process effectively multiplies this ripple with the fundamental modulation signal, producing sideband harmonics in the inverter output voltage \(v_{inv}\) at frequencies of \(ω \pm 2ω\), \(3ω \pm 2ω\), etc. This manifests as low-order odd harmonics (3rd, 5th, etc.) in the grid current.
  3. Grid Voltage Distortion: The utility grid itself often contains background voltage harmonics, predominantly odd harmonics like the 3rd, 5th, and 7th. This voltage disturbance \(v_g\) directly drives harmonic currents through the output impedance of the solar inverter.

Therefore, a robust control strategy for modern solar inverters must address not only the stability issue posed by the LCL resonance but also actively compensate for these persistent low-order harmonic disturbances.

Composite Control Strategy Design

The proposed composite control strategy for harmonic mitigation in solar inverters integrates three key techniques: state feedback for resonance damping, feedforward for disturbance decoupling, and repetitive control for periodic error correction. The complete block diagram is conceptually structured as follows, where each component addresses a specific challenge.

Components of the Composite Control Strategy for Solar Inverters
Component Primary Function Key Design Parameter
State Feedback (Pole Placement) Actively damp the LCL filter resonant peak; stabilize the plant and improve dynamic response. State feedback gain vector \(\mathbf{K}\) to place closed-loop poles.
DC-Link Voltage Feedforward Decouple the system gain from \(V_{dc}\) variations; prevent ripple-induced harmonics. Normalization factor \(1/V_{dc}\).
Grid Voltage Feedforward Compensate for grid voltage disturbance \(v_g\); reduce output impedance. Feedforward path gain \(G_{ff}(s)\).
Embedded Repetitive Controller Provide high gain at fundamental and harmonic frequencies; eliminate periodic tracking errors and disturbances. Internal model \(1/(1 – z^{-N})\), compensator \(C_r(z)\).

State Feedback and Pole Placement

The inherent poles of the LCL filter are lightly damped, with a complex conjugate pair near the imaginary axis causing the resonant peak. This leads to poor stability margins and potential oscillation. State feedback is a direct method to modify the system dynamics. By feeding back all state variables through a gain matrix \(\mathbf{K} = [k_1, k_2, k_3]\), a new control law is formed: \(u = -\mathbf{K}\mathbf{x} + G_c(s) \cdot e\). The closed-loop system matrix becomes \(\mathbf{A}_{cl} = \mathbf{A} – \mathbf{B}_1\mathbf{K}\).

The gain matrix \(\mathbf{K}\) is designed via pole placement. The desired closed-loop poles are selected to achieve a well-damped, fast response. Typically, a pair of dominant complex poles is chosen with a desired damping ratio \(\zeta\) (e.g., 0.707) and natural frequency \(\omega_n\) slightly less than the original LCL resonance frequency to ensure sufficient damping. A third pole is placed far left on the real axis to have negligible effect on the dominant dynamics. Solving the equation \(\det(s\mathbf{I} – \mathbf{A}_{cl}) = (s^2 + 2\zeta\omega_n s + \omega_n^2)(s + p_3)\) yields the required gain vector \(\mathbf{K}\). This process actively reshapes the system’s frequency response, eliminating the resonant peak and providing a stable, well-behaved plant for the outer current controllers. The closed-loop transfer function from reference to output becomes:

$$
G_{cl}(s) = \mathbf{C}(s\mathbf{I} – \mathbf{A}_{cl})^{-1} \mathbf{B}_1 G_c(s).
$$

Feedforward Design for Disturbance Rejection

Feedforward paths provide proactive compensation for measurable disturbances, improving solar inverter performance without relying solely on feedback error.

DC-Link Voltage Feedforward (Decoupling): The effective gain of the PWM inverter, \(K_{PWM}=V_{dc}\), varies with DC-link ripple. To maintain constant gain, the modulation index is normalized by the measured \(V_{dc}\). The modulation reference \(v_{mod}\) is calculated as \(v_{mod} = (v_{control} \cdot V_{tri}) / V_{dc}\), where \(v_{control}\) is the output of the current controller. This simple division decouples the control loop from \(V_{dc}\) variations, significantly reducing the injection of low-order harmonics caused by the 2ω ripple.

Grid Voltage Feedforward: The grid voltage \(v_g\) acts as a direct disturbance. A full feedforward of \(v_g / K_{PWM}\) would ideally cancel its effect. However, to avoid amplifying noise through derivative terms and to simplify implementation, a partial or filtered feedforward is often used. A common approach is to pass \(v_g\) through a high-pass filter or a simple proportional path to compensate for its fundamental and low-frequency harmonic components, reducing the burden on the feedback controller.

Repetitive Controller Design for Harmonic Compensation

The repetitive control (RC) principle is based on the internal model principle: incorporating a model of the periodic signal (or disturbance) within the controller leads to zero steady-state error for that periodicity. For solar inverters, the reference and the dominant disturbances (dead-time effects, grid background harmonics) are periodic with the fundamental grid period \(T_0\).

The core of a digital repetitive controller is a positive feedback loop containing a delay line of \(N\) samples, where \(N = T_0 / T_s\) (\(T_s\) is the sampling period). This structure, with a transfer function of \(1/(1 – z^{-N})\), provides theoretically infinite gain at all harmonic frequencies of the fundamental (\(ω_0, 2ω_0, 3ω_0, …\)). In practice, a low-pass filter \(Q(z)\) (often a constant slightly less than 1 or a zero-phase lag filter) is added inside the delay loop to enhance robustness against frequency variations and model uncertainties. A compensator \(C_r(z)\) is placed in series to shape the loop gain, typically consisting of a phase-lead element \(z^k\) to compensate for the plant’s phase lag at low frequencies and a filter to attenuate high-frequency gain.

A classic series RC structure introduces a one-fundamental-period delay in the command response, which is unacceptable for the dynamic performance of solar inverters. Therefore, an embedded or parallel structure is adopted. Here, the repetitive controller works on the error signal in parallel with a fast-acting proportional or proportional-resonant (PR) controller \(G_c(s)\). The fast path ensures quick dynamic response to changes in the reference or disturbances, while the RC path gradually eliminates periodic errors over a few cycles. The overall control law can be expressed as:

$$
u(z) = \underbrace{G_c(z) e(z)}_{\text{Fast Path}} + \underbrace{z^{-N} Q(z) [u(z) + C_r(z) e(z)]}_{\text{Repetitive Path}}.
$$

For stability, the overall loop gain must satisfy the condition \(\| Q(z) (1 – C_r(z) G_p(z)) \|_{\infty} < 1\), where \(G_p(z)\) is the discretized transfer function of the plant (including state feedback). When properly designed, the repetitive controller in solar inverters effectively suppresses harmonics caused by dead-time, non-ideal switching, and persistent grid voltage distortion.

Performance Analysis and Results

The effectiveness of the composite control strategy for solar inverters was validated through simulation and experimental prototype testing.

Frequency Response and Stability

The open-loop frequency response of the LCL-filtered solar inverter shows a large resonant peak causing instability under high-gain control. After applying state feedback pole placement, the resonant peak is eliminated, resulting in a stable, well-damped plant with a phase margin suitable for control. The subsequent addition of the embedded repetitive controller modifies the loop gain: it significantly boosts the magnitude at the fundamental frequency and its low-order harmonics (e.g., 3rd, 5th, 7th) while maintaining attenuation at high frequencies. This ensures near-zero steady-state error for sinusoidal tracking and high rejection of periodic disturbances, fulfilling the core requirement for high-quality current injection from solar inverters.

Simulation and Experimental Verification

A 3 kW single-phase solar inverter prototype was built with the following parameters:

Solar Inverter System Parameters
Parameter Symbol Value
Rated Power \(P_{rated}\) 3 kW
Grid Voltage / Frequency \(V_g / f_g\) 220 Vrms / 50 Hz
DC-Link Voltage \(V_{dc}\) 400 V
Switching Frequency \(f_{sw}\) 16 kHz
Inverter-side Inductor \(L_1, R_1\) 1.8 mH, 0.1 Ω
Filter Capacitor \(C_f\) 10 μF
Grid-side Inductor \(L_g, R_g\) 0.9 mH, 0.05 Ω

Simulations were conducted to compare dynamic response. When the current reference steps from 100% to 50% of rated value, a controller using only a series repetitive control shows a sluggish response delayed by one grid period. In contrast, the proposed composite strategy with embedded RC demonstrates a rapid transient, settling within one cycle, followed by the repetitive controller fine-tuning the waveform to eliminate any residual periodic distortion over the next few cycles.

Experimental results confirm the superior harmonic suppression. Under steady-state operation with the composite controller, the grid current waveform is nearly sinusoidal. A Fast Fourier Transform (FFT) analysis shows that the THD is significantly reduced compared to using a conventional PI controller. More importantly, the amplitudes of specific low-order harmonics (3rd, 5th, 7th, 9th, 11th) are drastically lower, often meeting the strictest grid codes (e.g., IEEE 1547, VDE-AR-N 4105). The system also maintains stable operation under conditions of deliberately introduced DC-link voltage ripple and distorted grid voltage, proving the robustness of the combined state feedback, feedforward, and repetitive control approach.

Performance Comparison of Control Strategies for Solar Inverters (Simulation Results)
Control Strategy Current THD (%) Settling Time for 50% Step (ms) 3rd Harmonic Amplitude (% of Fund.) 5th Harmonic Amplitude (% of Fund.) Stability with Grid Distortion
PI Control 4.8 ~15 2.5 1.8 Poor
PI + State Feedback 3.1 ~10 2.0 1.5 Good
PI + State Feedback + RC 1.2 ~20 (first cycle fast, then fine-tuning) 0.3 0.2 Excellent

Conclusion

This paper has presented a comprehensive composite control strategy designed to address the multifaceted challenge of harmonic compensation in grid-connected solar inverters. The strategy successfully integrates several advanced techniques. State feedback via pole placement provides active damping of the LCL filter resonance, transforming the plant into a stable, well-behaved system with improved dynamic response—a critical foundation for all subsequent control actions in solar inverters. Feedforward control mechanisms effectively decouple the system from major disturbance sources: DC-link voltage feedforward stabilizes the inverter gain against ripple, and grid voltage feedforward reduces the output impedance seen by background grid harmonics. Finally, an embedded repetitive controller is incorporated. This element leverages the internal model principle to provide exceptionally high gain at the fundamental grid frequency and its integer harmonics, enabling asymptotic rejection of periodic disturbances caused by dead-time, switching non-idealities, and grid voltage distortion. The embedded structure preserves the fast dynamic response of the inner loop while allowing the repetitive controller to eliminate steady-state error over a few cycles.

The synergy of these components results in a solar inverter control system that excels in both transient and steady-state performance. It achieves fast tracking of current references, maintains ultra-low total harmonic distortion, and specifically suppresses problematic low-order harmonics. This leads to higher efficiency, improved compliance with stringent grid codes, and enhanced power quality, which are essential for the reliable and large-scale integration of photovoltaic energy into the modern power grid. The effectiveness of the proposed composite strategy has been validated through detailed simulation and experimental results on a practical solar inverter prototype.

Scroll to Top