In the realm of renewable energy systems, solar inverters play a pivotal role in converting direct current from photovoltaic panels into alternating current suitable for grid integration. However, the increasing adoption of multi-level inverter topologies, such as three-level inverters, has highlighted significant challenges related to harmonic distortion in grid-connected currents. These harmonics arise from various factors, including switching dead-time effects, control interactions, and background grid harmonics, ultimately compromising power quality and system stability. This article delves into a comprehensive analysis of harmonic generation mechanisms in solar inverters and proposes an advanced control strategy—Double Proportional Integral plus Repetitive Control (DPI+RC)—to effectively suppress these harmonics. Through detailed mathematical modeling, stability analysis, and validation via simulation and experimental studies, we demonstrate the efficacy of this approach in enhancing the performance of solar inverter systems.
The proliferation of solar energy conversion systems has driven the development of high-efficiency inverter topologies. Among these, three-level inverters have gained prominence due to their advantages in reduced switch stress, higher efficiency, and improved output waveform quality. Nonetheless, the higher switching frequencies employed in these solar inverters exacerbate harmonic issues, particularly those stemming from dead-time effects and grid-induced distortions. Traditional harmonic mitigation techniques, such as resonant controllers or dead-time compensation, often fall short in addressing multiple harmonic orders or introduce complexity into control designs. Consequently, there is a pressing need for robust control strategies that can ensure both dynamic performance and steady-state accuracy in solar inverter applications.
To address these challenges, this work begins by establishing a mathematical model for the grid-side output current of a three-level solar inverter. The model is derived from the main circuit structure, which typically includes an LCL filter to attenuate switching ripples. The transfer function relating the inverter bridge voltage to the grid current is expressed as:
$$G(s) = \frac{i_{grid}(s)}{U(s)} = \frac{1}{L_1 L_2 C s^3 + (L_1 + L_2) s}$$
where \(L_1\) and \(L_2\) represent the inverter-side and grid-side inductances, respectively, \(C\) is the filter capacitance, and \(U(s)\) denotes the bridge output voltage. This model reveals that harmonic currents in solar inverters are influenced not only by the inverter’s control output but also by grid voltage distortions, such as 5th and 7th harmonics commonly present in power systems. The inherent dynamics of the LCL filter further complicate harmonic suppression, necessitating a control approach that can account for periodic disturbances.
Building on this model, we analyze the mechanism of harmonic generation in solar inverters. Key factors include:
- Dead-Time Effects: The introduction of dead-time in PWM switching to prevent shoot-through currents leads to voltage distortions that manifest as low-order harmonics.
- Grid Background Harmonics: Non-ideal grid conditions inject harmonic voltages that couple into the inverter output current.
- Control System Limitations: Conventional PI controllers, while effective for tracking fundamental components, exhibit poor performance in rejecting periodic harmonics due to their limited bandwidth.
To quantify the harmonic spectrum, we consider the frequency response of the solar inverter system. The magnitude of harmonic currents at frequency \(f_h\) can be approximated by:
$$|I_{grid}(j\omega_h)| = \frac{|G(j\omega_h)| \cdot |U_{dist}(j\omega_h)|}{\sqrt{1 + |G(j\omega_h) H(j\omega_h)|^2}}$$
where \(\omega_h = 2\pi f_h\), \(U_{dist}\) represents disturbance voltages, and \(H(s)\) is the feedback transfer function. This equation underscores the need for a controller that provides high gain at harmonic frequencies to attenuate these components.
In pursuit of an effective harmonic suppression strategy, we first examine traditional PI+Repetitive Control (PI+RC) for solar inverters. Repetitive control, rooted in the internal model principle, employs a delay-based internal model to eliminate periodic errors. Its discrete-time transfer function is given by:
$$D(z) = \frac{z^{-N} K_r S(z)}{1 – Q(z) z^{-N}}$$
where \(N\) is the number of samples per fundamental period, \(K_r\) is the repetitive gain, \(S(z)\) is a compensator, and \(Q(z)\) is a low-pass filter or constant close to 1 to ensure stability. The repetitive controller offers high gain at harmonic frequencies, enabling zero steady-state error for periodic signals. However, it suffers from poor dynamic response due to the inherent delay. Conversely, PI control provides fast tracking of fundamental components but lacks harmonic rejection capabilities. Thus, a combined PI+RC structure is often adopted in solar inverters to leverage the strengths of both methods.
Despite its advantages, the traditional PI+RC scheme faces stability issues arising from the coupling between the PI and repetitive controllers. As illustrated in the block diagram below, the equivalent control object for the repetitive loop can become unstable, particularly at frequencies where the phase margin is inadequate. The open-loop transfer function of the equivalent repetitive control object \(G_D(z)\) is derived as:
$$G_D(z) = \frac{D(z) G(z)}{1 + PI(z) G(z) H(z)}$$
where \(G(z)\) is the discretized plant model, \(PI(z)\) is the PI controller, and \(H(z)\) is the feedback gain. For a typical solar inverter with LCL parameters \(L_1 = 170 \mu H\), \(L_2 = 20 \mu H\), and \(C = 140 \mu F\), discretized at a sampling period of \(100 \mu s\), the plant transfer function is:
$$G(z) = \frac{2.1z^3 + 6.3z^2 + 6.3z + 2.1}{15.98z^3 – 16.02z^2 + 16.02z – 15.98}$$
Analysis of \(G_D(z)\) reveals a negative gain margin and phase margin, indicating instability. This instability is exacerbated by the interaction between the PI controller’s integral action and the repetitive controller’s delay, leading to potential oscillations in solar inverter output currents.
To overcome these limitations, we propose a Double PI+Repetitive Control (DPI+RC) strategy for solar inverters. This approach introduces an additional PI compensator, denoted as \(PI_2(z)\), in series with the repetitive controller to reshape the frequency response and enhance stability. The modified control structure is depicted in the following schematic, where \(PI_1(z)\) handles fundamental tracking, and \(PI_2(z)\) compensates for the repetitive control loop. The overall controller transfer function becomes:
$$C(z) = PI_1(z) + \frac{PI_2(z) z^{-N} K_r S(z)}{1 – Q(z) z^{-N}}$$
The compensator \(PI_2(z)\) is designed to attenuate high-frequency gains while maintaining sufficient phase margin. For instance, a PI compensator with transfer function \(G_c(s) = 0.6 \frac{0.006s + 1}{0.006s}\), when discretized, yields:
$$PI_2(z) = \frac{0.605 – 0.595z^{-1}}{1 – z^{-1}}$$
This compensator effectively reduces the gain crossover frequency of the equivalent repetitive control object, thereby improving stability margins. The stability of the DPI+RC system is assessed through Bode plot analysis. The table below summarizes the stability margins before and after compensation for a solar inverter operating at a switching frequency of 4.8 kHz.
| Control Scheme | Gain Margin (dB) | Phase Margin (degrees) | Stability Status |
|---|---|---|---|
| Traditional PI+RC | -1.81 | -18.2 | Unstable |
| DPI+RC with PI2 Compensation | 12.1 | Infinite | Stable |
The Bode plots confirm that the compensated system exhibits a gain margin of 12.1 dB and ample phase margin, ensuring robust stability. Moreover, the repetitive control loop retains high gain at harmonic frequencies (e.g., 5th, 7th, 11th, 13th), enabling effective harmonic suppression in solar inverters.
To validate the DPI+RC strategy, we conducted extensive simulations in Matlab/Simulink for a three-level solar inverter with rated parameters: AC voltage of 540 V, switching frequency of 4.8 kHz, and current reference of 800 A. The grid current waveforms and Total Harmonic Distortion (THD) were analyzed under both traditional and proposed control schemes. The results demonstrate a significant reduction in harmonic content with DPI+RC. For instance, the THD decreased from 5.53% to 2.03%, with notable suppression of lower-order harmonics. The following table quantifies the harmonic attenuation achieved by the DPI+RC strategy in the solar inverter simulation.
| Harmonic Order | Traditional PI+RC (%) | DPI+RC (%) | Reduction (%) |
|---|---|---|---|
| 5th | 3.2 | 0.8 | 75.0 |
| 7th | 2.5 | 0.6 | 76.0 |
| 11th | 1.8 | 0.4 | 77.8 |
| 13th | 1.5 | 0.3 | 80.0 |
| Total THD | 5.53 | 2.03 | 63.3 |
The simulation outcomes underscore the efficacy of the DPI+RC approach in enhancing the power quality of solar inverter systems. The improved harmonic suppression directly translates to better compliance with grid codes and reduced stress on grid components.
Further validation was performed through experimental tests on a 1 MW three-level solar inverter platform. The inverter was configured with a DC input voltage of 850 V, AC output voltage of 540 V, and operated at 30% rated power under constant current mode. The grid current waveforms were captured using precision measurement equipment, and harmonic analysis was conducted. The experimental results align closely with simulations, showing a substantial decrease in THD from 5.82% to 3.37% after implementing DPI+RC. Specifically, the 5th harmonic content dropped from 4.068% to 1.98%, and the 7th harmonic from 3.890% to 1.697%. These findings confirm the practical viability of the DPI+RC strategy for harmonic suppression in real-world solar inverter applications.

The integration of advanced control strategies like DPI+RC is crucial for the next generation of solar inverters, especially as hybrid systems combining storage and grid-tie functionalities become prevalent. The depicted solar inverter system exemplifies how robust control can ensure efficient energy conversion while maintaining high power quality standards.
In addition to harmonic suppression, the DPI+RC strategy offers several ancillary benefits for solar inverters. These include:
- Enhanced Robustness: The dual-PI structure provides redundancy against parameter variations in the LCL filter, which is common in solar inverter deployments due to aging or temperature effects.
- Improved Dynamic Response: By decoupling the fundamental and harmonic control loops, the system achieves faster settling times during transients, such as sudden changes in solar irradiance.
- Scalability: The DPI+RC framework can be extended to multi-inverter systems or microgrids, where harmonic interactions between multiple solar inverters can be mitigated through coordinated control.
To further optimize the control parameters, we derived tuning guidelines based on frequency-domain analysis. For the repetitive controller, the gain \(K_r\) should be set below 1 to avoid instability, typically in the range of 0.5 to 0.9 for solar inverters. The compensator \(S(z)\) often includes a second-order low-pass filter \(H_c(z)\) to attenuate high-frequency noise. Its discrete-time form is:
$$H_c(z) = \frac{0.0445z^2 + 0.0891z + 0.0445}{z^2 – 1.3208z + 0.4990}$$
This filter ensures that the repetitive controller acts predominantly on lower harmonic orders, reducing sensitivity to switching noise in solar inverters. The PI controllers, \(PI_1(z)\) and \(PI_2(z)\), can be tuned using pole-placement or empirical methods. For instance, \(PI_1(z)\) focuses on the fundamental current tracking with proportional and integral gains selected to achieve a crossover frequency around one-tenth of the switching frequency. \(PI_2(z)\) is tuned to provide phase lead at critical harmonic frequencies, enhancing stability margins. The overall design process for a solar inverter control system can be summarized in the following steps:
- Model the solar inverter plant, including LCL filter dynamics and switching effects.
- Design \(PI_1(z)\) for fundamental current control using standard tuning techniques.
- Design the repetitive controller with appropriate \(N\), \(K_r\), and \(S(z)\) to target specific harmonics.
- Introduce \(PI_2(z)\) as a compensator to stabilize the equivalent repetitive control loop.
- Validate stability through Bode plots and time-domain simulations.
- Implement the controller on a digital signal processor and conduct experimental verification.
The mathematical underpinnings of the DPI+RC strategy can be extended to address other power quality issues in solar inverters, such as voltage sags or frequency deviations. By incorporating adaptive mechanisms, the controller can adjust its parameters in real-time to cope with varying grid conditions. For example, the repetitive controller’s delay line \(N\) can be made adaptive to track changes in grid frequency, ensuring consistent harmonic suppression even under off-nominal conditions. This adaptability is particularly relevant for solar inverters operating in weak grids or islanded modes.
In conclusion, this work presents a thorough investigation into harmonic suppression for solar inverters, culminating in the proposal of a Double PI+Repetitive Control strategy. Through detailed modeling, stability analysis, and extensive validation, we have demonstrated that the DPI+RC approach effectively mitigates harmonic distortions while maintaining system stability and dynamic performance. The strategy leverages the complementary strengths of PI and repetitive control, augmented by a novel PI compensator, to address the limitations of traditional methods. The results from both simulation and experimental studies confirm significant reductions in THD and harmonic components, underscoring the practical applicability of this control scheme in solar inverter systems. Future work may explore the integration of machine learning techniques for parameter optimization or the extension of DPI+RC to multi-level inverters with higher-order topologies. As the demand for clean energy grows, advancements in control methodologies for solar inverters will continue to play a critical role in ensuring efficient and reliable power conversion.
The implications of this research extend beyond solar inverters to broader power electronic systems, including wind turbine inverters, uninterruptible power supplies, and electric vehicle chargers. The principles of harmonic suppression and stability enhancement are universal, and the DPI+RC framework offers a versatile solution that can be tailored to various applications. By fostering improved power quality, this contribution supports the global transition towards sustainable energy infrastructure, where solar inverters serve as key enablers of grid stability and efficiency.
