Harmonic Suppression in Solar Inverters via Advanced PI and Repetitive Control

As we delve into the modern power grid landscape, the proliferation of renewable energy sources, particularly photovoltaic (PV) systems, has become a cornerstone of sustainable development. Solar inverters, which convert DC power from PV panels to AC power for grid integration, are pivotal components. However, the extensive deployment of power electronic devices, including solar inverters, introduces harmonic distortions into the grid. Coupled with the widespread use of nonlinear loads, these harmonics exacerbate power quality issues in distribution networks, potentially leading to resonance scenarios that compromise user safety and equipment integrity. Traditionally, passive filters have been an economical solution for harmonic mitigation, but they are limited to filtering specific frequencies. A more effective approach involves active power filters (APFs) that dynamically track and compensate harmonics, albeit at a higher cost. Interestingly, solar inverters share structural, functional, and control similarities with APFs, prompting research into multifunctional solar inverters capable of both power generation and harmonic suppression. Given that solar inverters often remain idle during non-sunlight hours—with annual operational times under 2,000 hours—leveraging them for harmonic compensation during inactive periods presents a promising avenue without affecting PV generation. This paper, from my perspective as a researcher in power electronics, explores an improved control strategy that enhances the harmonic suppression capabilities of solar inverters, ensuring both steady-state precision and dynamic responsiveness.

The core challenge in harmonic suppression lies in accurately tracking the phase and amplitude of harmonic components with minimal computational overhead and fast dynamic response. Existing methods include PI control in the dq-coordinate system, which struggles with zero-error tracking at harmonic frequencies due to bandwidth limitations, and multiple synchronous rotating coordinate systems for selective harmonic control, which increase computational complexity. Repetitive control, known for its ability to eliminate periodic errors, offers a solution but suffers from a one-cycle delay, slowing dynamic response. To address these issues, we propose an enhanced control scheme combining PI and repetitive control with harmonic feedforward, specifically tailored for LCL-type solar inverters. This approach allows the solar inverter to output fundamental active power via PI control while providing high-precision harmonic current compensation through repetitive control, with feedforward acceleration to mitigate delay-related sluggishness. Our focus is on optimizing the solar inverter’s dual functionality, ensuring it operates efficiently as both a power generator and a harmonic compensator, thereby enhancing grid stability and power quality.

In this comprehensive analysis, we will first model the LCL-type solar inverter and design a repetitive controller with appropriate compensators. Then, we will detail the improved PI+repetitive control structure, incorporating zero-phase error feedforward compensation. Simulation results will validate the method’s effectiveness, comparing it with traditional approaches. Throughout, we emphasize the role of solar inverters in modern grids, highlighting how advanced control strategies can unlock their potential beyond mere power conversion. The solar inverter, as a versatile device, can significantly contribute to harmonic mitigation when equipped with intelligent control algorithms.

Modeling and Design of Repetitive Control for LCL-Type Solar Inverters

The LCL filter is commonly used in solar inverters due to its superior high-frequency attenuation compared to simple L filters. The main circuit model of an LCL-type grid-connected solar inverter includes an inverter-side inductor \(L_1\), a filter capacitor \(C\), and a grid-side inductor \(L_2\), with parasitic resistances \(R_1\), \(R_C\), and \(R_2\) respectively. The transfer function from the inverter bridge voltage \(U_a\) to the grid-side output current \(i_2\) can be derived by neglecting small parasitic resistances for simplification:

$$G(s) = \frac{R_C C s + 1}{L_1 L_2 C s^3 + (L_1 + L_2) R_C C s^2 + (L_1 + L_2) s}$$

This transfer function reveals a resonant peak at frequency \(\omega_0 = \sqrt{(L_1 + L_2)/(L_1 L_2 C)}\), which can cause instability if not properly damped. For harmonic suppression, repetitive control is employed due to its ability to track periodic signals. The internal model of a repetitive controller in discrete domain is:

$$G_R(z) = \frac{1}{1 – Q(z) z^{-N}}$$

where \(Q(z)\) is typically set to 0.95 to weaken the integral effect for robustness, and \(N\) is the number of samples per fundamental period (e.g., \(N = f_s / f_0\) with sampling frequency \(f_s\) and grid frequency \(f_0 = 50\,\text{Hz}\)). The internal model provides high gain at harmonic frequencies, enabling zero steady-state error for periodic disturbances. However, the LCL filter’s resonance can destabilize the system, necessitating a compensator \(S(z)\) to correct the plant’s magnitude and phase. The compensator comprises several components: a differential term \(D(s)\) to unify low-frequency gain, a notch filter \(F_n(s)\) to suppress resonance, and a second-order low-pass filter \(F_2(s)\) to attenuate high-frequency noise. In continuous domain:

$$D(s) = \frac{L_1 s}{\tau s + 1}, \quad \text{with } \tau = 1/\omega_0$$
$$F_n(s) = \frac{s^2 + \omega_0^2}{s^2 + 2\xi \omega_0 s + \omega_0^2}, \quad \xi = 0.707$$
$$F_2(s) = \frac{\omega_0^2}{s^2 + 2\xi \omega_0 s + \omega_0^2}$$

After discretization using methods like Tustin transformation, the combined compensator is \(S(z) = D(z) F_n(z) F_2(z) z^k\), where \(z^k\) is a \(k\)-step advance to compensate phase lags. The value of \(k\) is chosen based on the total phase lag of the system. For the solar inverter, this design ensures that the corrected open-loop transfer function \(S(z)G(z)\) has near-zero dB gain and zero phase shift below 1 kHz, facilitating precise harmonic control. The repetitive control system structure is shown in the block diagram below, which integrates the internal model and compensator to achieve high steady-state accuracy for low-order harmonics.

Component Function Mathematical Expression
Internal Model Provides high gain at harmonic frequencies $$G_R(z) = \frac{1}{1 – 0.95z^{-N}}$$
Differential Term Unifies low-frequency gain $$D(s) = \frac{L_1 s}{\tau s + 1}$$
Notch Filter Suppresses LCL resonance peak $$F_n(s) = \frac{s^2 + \omega_0^2}{s^2 + 2\xi \omega_0 s + \omega_0^2}$$
Low-Pass Filter Attenuates high-frequency noise $$F_2(s) = \frac{\omega_0^2}{s^2 + 2\xi \omega_0 s + \omega_0^2}$$
Phase Advance Compensates phase lag $$z^k$$

The design parameters for a typical solar inverter are: \(L_1 = 0.74\,\text{mH}\), \(C = 6.6\,\mu\text{F}\), \(L_2 = 55\,\mu\text{H}\), \(R_C = 0.5\,\Omega\), yielding \(\omega_0 \approx 5.44 \times 10^4\,\text{rad/s}\). With \(f_s = 20\,\text{kHz}\) and \(f_0 = 50\,\text{Hz}\), we have \(N = 400\). The compensator ensures stability and performance, making the solar inverter effective for harmonic suppression up to the 19th harmonic. This modeling underscores the adaptability of solar inverters when equipped with advanced control schemes.

Enhanced Control Structure: PI with Repetitive Control and Harmonic Feedforward

While repetitive control excels in steady-state accuracy, its one-cycle delay impairs dynamic response. PI control, on the other hand, offers fast tracking but limited harmonic rejection. Combining both in a composite system leverages the strengths of each: PI control for fundamental current tracking in the dq-coordinate system, and repetitive control for harmonic compensation. The transfer function of the PI+repetitive controller is:

$$C(s) = k_p + \frac{k_i}{s} + \frac{1}{1 – 0.95e^{-Ts}}$$

where \(T\) is the fundamental period. In discrete domain, this becomes \(C(z) = k_p + k_i \frac{T_s}{1 – z^{-1}} + \frac{1}{1 – 0.95z^{-N}}\), with \(T_s\) as sampling time. For a solar inverter, the PI controller regulates the active power output from PV panels by tracking the d-axis current reference, while the repetitive controller handles harmonic currents extracted from the load. However, during transients, the repetitive controller’s delay limits the compensation speed, causing temporary harmonic distortion.

To overcome this, we introduce an improved structure incorporating harmonic feedforward based on zero-phase error tracking. The idea is to feed forward the harmonic reference signal through a phase-compensated path, accelerating the response. The harmonic currents are detected using instantaneous reactive power theory, which separates fundamental and harmonic components in the abc-coordinates. These harmonic references are then transformed to dq-coordinates using the grid phase angle \(\theta\) from a phase-locked loop (PLL). To compensate for phase lags in the feedforward path, we add an advance angle \(\theta_k\) to \(\theta\) before the abc-to-dq transformation, effectively implementing a \(z^k\) advance in discrete domain. The advance angle is calculated as:

$$\theta_k = \frac{2\pi k f_0}{f_s}$$

where \(k\) matches the advance steps in the compensator. This zero-phase error compensation ensures that the feedforward signal aligns temporally with the actual harmonic disturbance, enhancing dynamic performance. The overall control structure for the solar inverter’s current inner loop is depicted below, integrating PI, repetitive, and feedforward branches.

The improved controller can be summarized as follows: the solar inverter uses PI control to output fundamental active power, repetitive control for high-precision harmonic compensation, and feedforward for rapid response to harmonic changes. This tripartite approach ensures that the solar inverter maintains grid-tie functionality while actively suppressing harmonics, even during sudden load variations. The computational burden remains manageable, as repetitive control handles multiple harmonics without requiring individual coordinate transformations for each harmonic order.

Control Component Role in Solar Inverter Advantage
PI Controller Tracks fundamental current for PV power output Fast dynamic response for base frequency
Repetitive Controller Compensates periodic harmonic currents High steady-state accuracy for multiple harmonics
Harmonic Feedforward Accelerates response to harmonic changes Reduces delay from one-cycle lag

In practice, the feedforward path is inserted between the \(z^{-N+k}\) advance and the compensator \(S'(z) = D(z)F_n(z)F_2(z)\), ensuring proper phase alignment. The harmonic reference signal \(i_{h,abc}\) is processed as: transform to dq using \(\theta + \theta_k\) to get \(i_{h,dq}^k\), then feed into the control loop. This method significantly improves the solar inverter’s ability to mitigate harmonics quickly, making it suitable for environments with fluctuating nonlinear loads.

Simulation Analysis and Performance Evaluation

To validate the proposed control strategy, we conducted simulations in MATLAB/Simulink for a grid-connected solar inverter system. The system parameters are: grid voltage 220 V RMS, frequency 50 Hz, DC side from a PV array rated at 8 kW, switching frequency 20 kHz, and LCL filter parameters as earlier. The grid side includes a balanced linear load of 5 Ω and a nonlinear load comprising a three-phase uncontrolled rectifier with 30 Ω and 2 mH. Three control schemes are compared: Type I (PI only), Type II (PI+repetitive), and Type III (improved PI+repetitive with feedforward). The simulation timeline involves MPPT operation (omitted for brevity), nonlinear load connection at 0.2 s, and harmonic compensation activation at 0.3 s.

The output current waveforms for phase A are analyzed. Initially, with only linear load, the current is sinusoidal. Upon nonlinear load connection, harmonics distort the waveform. At 0.3 s, when harmonic compensation starts, Type III shows immediate improvement within the first cycle (0.3–0.32 s), while Types I and II exhibit slower response due to the repetitive controller’s delay. After three cycles, Types II and III converge to similar steady-state waveforms with reduced distortion, but Type I remains affected by harmonics. The total harmonic distortion (THD) is calculated for each case: before compensation, THD is 10.8%; after stabilization, Type I reduces THD to 3.61%, Type II to 1.61%, and Type III to 1.71%. Although Type III has slightly higher steady-state THD than Type II, its dynamic response is superior, making it more suitable for real-time applications.

Control Type Steady-State THD (%) Dynamic Response Speed Key Harmonic Reduction
Type I: PI Only 3.61 Slow, limited harmonic tracking Moderate reduction up to 13th harmonic
Type II: PI+Repetitive 1.61 Moderate, one-cycle delay Significant reduction up to 19th harmonic
Type III: Improved PI+Repetitive 1.71 Fast, with feedforward acceleration Similar to Type II, but faster transient

The d-axis and q-axis current errors are also examined. The d-axis error, primarily influenced by PV power reference, shows minimal differences among types after transients. However, the q-axis error, representing reactive and harmonic components, reveals that Type III confines errors to a smaller range \([-0.42\,\text{A}, 1.186\,\text{A}]\) compared to Type II \([-0.642\,\text{A}, 1.27\,\text{A}]\) and Type I \([-0.706\,\text{A}, 4.167\,\text{A}]\) during steady state. During the first cycle after compensation, Type III’s q-axis error peaks at 4.525 A and quickly decays, whereas Type II peaks at 5.915 A with slower decay. This demonstrates the efficacy of harmonic feedforward in enhancing the solar inverter’s tracking capability.

Harmonic spectra for the first, second, and tenth cycles after compensation are computed using FFT. Results indicate that Type III rapidly suppresses 5th, 7th, 11th, 13th, 17th, and 19th harmonics within the first cycle, while Type II takes multiple cycles to achieve similar levels. Type I shows limited suppression across all harmonics. The solar inverter’s performance as a harmonic compensator is thus significantly boosted by the improved control strategy, without compromising its primary function of PV power generation.

To quantify the harmonic suppression, we can express the output current as:

$$i_2(t) = I_1 \sin(\omega_0 t + \phi_1) + \sum_{h=2}^{\infty} I_h \sin(h\omega_0 t + \phi_h)$$

where \(I_1\) is the fundamental amplitude from PV output, and \(I_h\) are harmonic amplitudes. The controller aims to minimize \(\sum I_h^2\). With repetitive control, the error \(e(t) = i_{ref}(t) – i_2(t)\) is driven to zero over time, governed by the internal model. The addition of feedforward modifies the control law to:

$$u(t) = k_p e(t) + k_i \int e(t) dt + \sum_{n=0}^{\infty} e(t – nT) + K_f i_{h,ff}(t)$$

where \(i_{h,ff}(t)\) is the feedforward harmonic signal. The stability of the overall system can be analyzed using the Nyquist criterion for the loop gain \(L(z) = C(z) G(z)\). With compensator \(S(z)\), the phase margin is maintained above 45°, ensuring robustness for the solar inverter under varying grid conditions.

Discussion on Solar Inverter Applications and Future Directions

The integration of harmonic suppression functionality into solar inverters represents a significant step toward smarter grids. Solar inverters, being ubiquitous in distributed generation, can serve as distributed active filters when not at full power capacity. This dual-use capability optimizes infrastructure investment and enhances grid power quality. Our proposed control method balances computational efficiency and performance: repetitive control handles multiple harmonics with a single internal model, avoiding the complexity of multiple coordinate transformations, while feedforward addresses dynamic limitations. This makes the solar inverter a cost-effective solution for harmonic mitigation, especially in residential and commercial settings where nonlinear loads are common.

However, challenges remain. The design assumes accurate harmonic detection; in practice, grid voltage distortions and frequency variations can affect detection algorithms. Adaptive techniques, such as using Kalman filters or neural networks, could be incorporated to improve robustness. Additionally, the LCL filter’s resonance is sensitive to parameter variations; online identification methods could adjust compensator parameters in real-time. Future work may explore the integration of energy storage with solar inverters, enabling peak shaving and harmonic compensation simultaneously. The solar inverter could thus evolve into a multifunctional energy management unit, contributing to grid stability and renewable integration.

From an implementation perspective, digital signal processors (DSPs) or microcontrollers in modern solar inverters can readily implement the improved PI+repetitive control algorithm. The computational load is manageable: for \(N=400\), the repetitive controller requires memory for one cycle of error data, and the feedforward involves simple coordinate transformations. Field tests on commercial solar inverters would validate practical feasibility. Moreover, standardization of communication protocols could allow solar inverters to coordinate harmonic compensation across a network, forming a virtual active filter system.

In conclusion, the solar inverter is not just a power converter but a potential grid asset. By adopting advanced control strategies like the improved PI+repetitive control with harmonic feedforward, solar inverters can effectively suppress harmonics while maintaining efficient PV power generation. This approach offers steady-state precision and fast dynamic response, addressing the limitations of traditional methods. As renewable penetration grows, such innovations will be crucial for ensuring power quality and grid reliability. We envision a future where every solar inverter contributes to a cleaner and more stable electrical ecosystem.

Mathematical Appendix: Key Formulas and Derivations

For completeness, we summarize the essential mathematical expressions used in the solar inverter control design. The LCL filter transfer function, including parasitic resistances, is:

$$G_{\text{full}}(s) = \frac{R_C C s + 1}{L_1 L_2 C s^3 + [(L_1 + L_2) R_C C + L_1 R_1 C + L_2 R_2 C] s^2 + [L_1 + L_2 + R_C C (R_1 + R_2)] s + (R_1 + R_2)}$$

Simplified for analysis, it reduces to \(G(s)\) as earlier. The repetitive controller’s stability condition requires that \(Q(z)\) satisfy \(|Q(z) – z^{-N} G(z) S(z)| < 1\) for all frequencies. With \(Q(z)=0.95\), this holds given proper compensation. The phase advance \(k\) is chosen based on the total phase lag \(\phi_{\text{lag}}\) of \(S'(z)G(z)\) at the crossover frequency:

$$k = \left\lceil \frac{\phi_{\text{lag}} N}{360} \right\rceil$$

The harmonic detection using instantaneous reactive power theory computes the reference harmonic currents as:

$$i_{h,abc} = i_{l,abc} – i_{f,abc}$$

where \(i_{l,abc}\) are load currents, and \(i_{f,abc}\) are fundamental components extracted via low-pass filters in dq-coordinates. The feedforward signal is then:

$$i_{h,ff,dq} = T_{abc/dq}(\theta + \theta_k) \cdot i_{h,abc}$$

with \(T_{abc/dq}\) being the transformation matrix. This mathematical framework underpins the solar inverter’s enhanced functionality, blending control theory with practical power electronics.

Overall, this comprehensive treatment underscores the transformative potential of solar inverters in modern power systems. Through intelligent control, they can address harmonic pollution dynamically, paving the way for more resilient and efficient grids. The journey from a simple inverter to a multifunctional device exemplifies innovation in renewable energy integration, and we are excited to contribute to this evolving landscape.

Scroll to Top