With the rapid integration of renewable energy sources into power grids, the deployment of solar inverters has expanded significantly. As a key component in photovoltaic systems, the solar inverter converts DC power from solar panels into AC power for grid connection. However, the widespread use of power electronic devices like solar inverters introduces harmonics into the grid, exacerbated by non-linear loads. This harmonic pollution can lead to resonance issues, compromising power quality and user safety. Traditionally, passive filters are employed for harmonic mitigation due to their cost-effectiveness, but they only target specific frequency harmonics. A more efficient approach involves active power filters for dynamic tracking and compensation, though this comes at a higher cost. Given the structural and functional similarities between solar inverters and active power filters, developing multifunctional solar inverters with harmonic suppression capabilities presents a promising solution. Notably, solar inverters often remain idle during non-sunlight hours, providing an opportunity to utilize their capacity for harmonic mitigation without affecting power generation. In this context, we propose an improved control strategy that combines PI and repetitive control to enhance harmonic suppression in solar inverters, ensuring both steady-state accuracy and dynamic response.
Harmonic signal extraction and controller design have been extensively studied. For instance, in the dq coordinate system, PI controllers are used to track harmonic signals, but their limited bandwidth prevents zero-error tracking at harmonic frequencies, resulting in suboptimal suppression. To address this, multi-synchronous reference frame methods have been introduced for selective harmonic control, yet they involve heavy computational loads, especially when targeting multiple harmonics. Alternatively, repetitive control techniques have been applied to mitigate periodic harmonics, offering reduced computation but suffering from a one-cycle delay in dynamic response. Building on these insights, our approach integrates an improved PI+repetitive control scheme with harmonic feedforward compensation to accelerate response times. This method enables the solar inverter to output fundamental active power via PI control while providing high-precision harmonic current compensation through repetitive control. The feedforward path, based on zero-phase error tracking, mitigates the delay inherent in repetitive controllers, enhancing overall performance.
The core of our strategy lies in the design of a repetitive controller for LCL-type solar inverters. The main circuit model of an LCL-filtered solar inverter includes inverter-side inductance \(L_1\), filter capacitance \(C\), grid-side inductance \(L_2\), and parasitic resistances \(R_1\), \(R_C\), and \(R_2\). Ignoring small parasitic resistances for simplicity, the transfer function from inverter voltage \(U_a\) to grid-side output current \(i_2\) is given by:
$$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 model highlights the resonant characteristics of the LCL filter, which can destabilize the system if not properly compensated. The repetitive controller in discrete domain employs an internal model:
$$G_R = \frac{1}{1 – Q(z) z^{-N}}$$
where \(Q(z)\) is typically set to 0.95 to weaken integration, and \(N\) is the number of samples per cycle. This internal model provides high gain at fundamental and harmonic frequencies, enabling precise tracking of periodic signals. However, the LCL filter’s infinite gain at resonance necessitates compensation for stability and accuracy. We design a compensator \(S(z)\) that includes a differential element \(D(s)\) for low-frequency gain uniformity, a notch filter \(F_n(s)\) for resonance suppression, and a second-order low-pass filter \(F_2(s)\) for high-frequency attenuation. These are expressed as:
$$D(s) = \frac{L_1 s}{\tau s + 1}, \quad \tau = \frac{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}$$
Here, \(\omega_0\) is the resonant frequency determined by LCL parameters. The compensator is discretized as \(S(z) = D(z) F_n(z) F_2(z) z^k\), where \(k\) is a lead step to phase compensation. The Bode plot of the corrected system \(S(z)G(z)\) shows near 0 dB gain and 0° phase up to 1 kHz, ensuring steady-state precision for low-order harmonics.
To improve dynamic response, we incorporate a harmonic feedforward path into the PI+repetitive control structure. The composite controller transfer function is:
$$C(s) = k_p + \frac{k_i}{s} + \frac{1}{1 – 0.95e^{-Ts}}$$
where the PI controller handles fundamental active power tracking, and the repetitive controller addresses harmonic compensation. However, the repetitive controller’s delay limits speed. Thus, we add a feedforward branch for harmonic current references, using zero-phase error tracking to compensate for phase lags. This involves transforming harmonic signals via dq/abc conversions with a compensated phase angle \(\theta_k\), calculated as:
$$\theta_k = \frac{2k\pi f_0}{f_s}$$
where \(f_0\) is the grid frequency (50 Hz) and \(f_s\) is the sampling frequency. This adjustment ensures that the feedforward signal aligns temporally with the harmonic disturbances, enabling rapid correction. The overall control structure enhances the solar inverter’s ability to suppress harmonics while maintaining efficient power output.

To validate our approach, we conducted simulations in Matlab/Simulink, comparing three control models: Type I (PI control only), Type II (PI+repetitive control), and Type III (improved PI+repetitive control with feedforward). The solar inverter was configured with an LCL filter having parameters \(L_1 = 0.74 \text{ mH}\), \(C = 6.6 \mu\text{F}\), \(L_2 = 55 \mu\text{H}\), and \(R_C = 0.5 \Omega\). The grid voltage was 220 V at 50 Hz, with a DC side representing an 8 kW photovoltaic array. The load included a balanced 5 Ω resistor and a non-linear load comprising a three-phase uncontrolled rectifier with 30 Ω and 2 mH. The sampling and switching frequencies were set to 20 kHz. Harmonic reference signals were extracted using instantaneous reactive power theory, and control was activated at 0.3 s after introducing non-linear loads at 0.2 s.
Simulation results demonstrated the effectiveness of our method. The output current waveforms for Phase A under each control type showed that Type III quickly restored sinusoidal current within the first cycle after harmonic compensation, whereas Types I and II exhibited slower tracking. Current errors in the dq-axis were analyzed; Type III reduced the d-axis error to near zero within 0.002 s and maintained smaller q-axis error fluctuations compared to other types. Harmonic content was evaluated via Fourier analysis over successive cycles. Table 1 summarizes the total harmonic distortion (THD) and key harmonic amplitudes for each control method after stabilization.
| Control Type | THD (%) | 5th Harmonic (%) | 7th Harmonic (%) | 11th Harmonic (%) | 13th Harmonic (%) |
|---|---|---|---|---|---|
| Type I (PI only) | 3.61 | 1.85 | 1.32 | 0.89 | 0.76 |
| Type II (PI+Repetitive) | 1.61 | 0.45 | 0.38 | 0.21 | 0.18 |
| Type III (Improved) | 1.71 | 0.48 | 0.40 | 0.22 | 0.19 |
The data indicates that Type II and Type III achieve similar harmonic suppression, both outperforming Type I. The slight increase in THD for Type III is attributed to feedforward dynamics, but its response speed is superior. To further quantify dynamic performance, we analyzed the settling time for harmonic reduction. Table 2 presents the time taken to reduce key harmonic amplitudes to within 10% of their initial values after compensation activation.
| Harmonic Order | Type I Settling Time (cycles) | Type II Settling Time (cycles) | Type III Settling Time (cycles) |
|---|---|---|---|
| 5th | >10 | 3 | 1 |
| 7th | >10 | 3 | 1 |
| 11th | >10 | 4 | 2 |
| 13th | >10 | 4 | 2 |
These results underscore the rapid response of Type III, leveraging feedforward compensation to cut settling times by over 50% compared to Type II. The solar inverter’s dual functionality—power generation and harmonic mitigation—is thus enhanced without compromising steady-state accuracy. Mathematical analysis of the error dynamics reinforces this. The current error \(e(t)\) in the repetitive control loop follows:
$$e(z) = \frac{1 – Q(z) z^{-N}}{1 + S(z)G(z) Q(z) z^{-N}} r(z)$$
where \(r(z)\) is the reference signal. With feedforward, the error is modified to:
$$e_{\text{ff}}(z) = e(z) – F_{\text{ff}}(z) h(z)$$
Here, \(F_{\text{ff}}(z)\) represents the feedforward transfer function, and \(h(z)\) is the harmonic reference. By designing \(F_{\text{ff}}(z)\) to approximate the inverse of the plant dynamics at harmonic frequencies, we achieve near-instantaneous error reduction. This principle is central to our improved control scheme for solar inverters.
In practical applications, the solar inverter must prioritize power generation during peak sunlight. Our control strategy allocates inverter capacity dynamically: when solar output is high, the PI controller dominates for maximum power point tracking (MPPT); during low or no generation, the repetitive controller engages fully for harmonic suppression. This adaptability is crucial for grid stability. The design of the compensator \(S(z)\) involves tuning parameters like \(k\) and \(\xi\) based on LCL characteristics. For instance, the resonant frequency \(\omega_0\) is computed as:
$$\omega_0 = \sqrt{\frac{L_1 + L_2}{L_1 L_2 C}}$$
Given our parameters, \(\omega_0 = 5.44 \times 10^4 \text{ rad/s}\), leading to \(\tau = 1.84 \times 10^{-5} \text{ s}\). The lead step \(k\) was set to 2, corresponding to \(\theta_k = 0.018 \text{ rad}\) for \(f_s = 20 \text{ kHz}\). These values ensure phase alignment in the feedforward path. The robustness of the controller was tested under grid voltage variations and load changes. Simulation scenarios included ±10% voltage fluctuations and sudden load additions, where Type III maintained THD below 2% and response times under 2 cycles, demonstrating reliability.
Comparative analysis with traditional methods highlights the advantages of our approach. Passive filters, while economical, lack adaptability and can resonate with grid impedances. Active power filters offer better performance but at higher cost and complexity. Multi-synchronous reference frame controls require multiple PI loops, increasing computational burden. In contrast, our improved PI+repetitive control for solar inverters achieves multi-harmonic suppression with minimal computation, as the repetitive controller inherently covers all periodic harmonics. The feedforward enhancement addresses the primary weakness of repetitive control—slow dynamics—making it suitable for real-time applications. Furthermore, the use of solar inverters for harmonic mitigation capitalizes on existing infrastructure, reducing need for additional devices.
Future work could explore integration with advanced grid functions like reactive power support and fault ride-through. The controller could be extended to three-phase four-wire systems or microgrid environments. Adaptive tuning of repetitive controller parameters based on real-time harmonic detection might further improve performance. Additionally, hardware-in-the-loop tests would validate practical feasibility. In conclusion, our proposed method significantly advances harmonic suppression capabilities in solar inverters. By merging PI control for fundamental power and enhanced repetitive control with feedforward for harmonics, we achieve a balance of accuracy and speed. This contributes to cleaner power grids and maximizes the utility of solar inverter investments. As renewable penetration grows, such multifunctional solar inverters will play a pivotal role in ensuring power quality and grid resilience.
To summarize key equations and parameters, we provide a comprehensive list below. These form the foundation for implementing our control strategy in solar inverter systems.
1. LCL Filter Transfer Function:
$$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}$$
2. Repetitive Controller Internal Model:
$$G_R(z) = \frac{1}{1 – 0.95 z^{-N}}$$
3. Compensator Components:
$$D(s) = \frac{L_1 s}{\tau s + 1}, \quad F_n(s) = \frac{s^2 + \omega_0^2}{s^2 + 2\xi \omega_0 s + \omega_0^2}, \quad F_2(s) = \frac{\omega_0^2}{s^2 + 2\xi \omega_0 s + \omega_0^2}$$
4. Feedforward Phase Compensation:
$$\theta_k = \frac{2k\pi f_0}{f_s}$$
5. Composite Controller:
$$C(s) = k_p + \frac{k_i}{s} + \frac{1}{1 – 0.95e^{-Ts}} + F_{\text{ff}}(s)$$
where \(F_{\text{ff}}(s)\) is designed for zero-phase error. Through these formulations, solar inverters can effectively mitigate harmonics while fulfilling their primary role in energy conversion. The integration of such controls into commercial solar inverter designs promises enhanced grid support and operational efficiency.
