As the global energy structure accelerates toward low-carbon and clean transformation, photovoltaic (PV) power generation has become a significant renewable energy source, with its share in power systems continuously increasing. The PV inverter, as the core device connecting the DC side to the AC grid, directly affects power quality and grid-connected stability through its output current harmonic control performance. Particularly during low voltage ride through (LVRT), harmonic content tends to fluctuate or even exceed standards due to grid disturbances and control strategy adjustments, posing risks to system safety. In this work, I systematically investigate the harmonic control problem of PV inverters under LVRT conditions. I analyze the influence mechanisms of power switch characteristics, dead-time effects, and grid disturbances on harmonic generation. I also review the application characteristics of existing reactive power support, maximum power point tracking (MPPT) control, and improved modulation techniques. Based on a practical case of a 1 MW PV station, I propose a combined harmonic suppression method integrating improved random PWM modulation, virtual impedance compensation, and particle swarm optimization (PSO). Experimental results show that under severe voltage sag conditions, the total harmonic distortion (THD) of the output current is reduced from 8.7% to 4.6%, meeting grid code requirements. This study demonstrates the synergistic advantages of the proposed method in dynamic response speed and harmonic suppression capability, providing feasible technical support for enhancing the adaptability of PV inverters in complex grid environments.
The output current harmonics of PV inverters during normal grid-connected operation mainly originate from the non-ideal switching characteristics of power semiconductor devices, dead-time effects, and control system delays and sampling errors. For example, when using pulse-width modulation (PWM) strategies, if the switching frequency is too low, high-frequency harmonics cannot be sufficiently suppressed by the filter inductor, leading to an elevated THD. Meanwhile, dead-time causes distortion at current zero-crossing points, generating low-order harmonic components such as the 5th and 7th. In addition, under unbalanced grid voltage or sudden changes, the current loop control response may lag, potentially amplifying harmonic currents and deteriorating grid power quality. These harmonics not only increase power losses and device heating but also may cause relay protection malfunctions and affect system stability. Different types of solar inverter topologies exhibit distinct harmonic spectra. For instance, single-stage inverters often have higher low-order harmonics due to limited DC bus capacitance, while two-stage inverters can better isolate harmonics but may introduce switching-frequency ripple. Understanding the characteristics of these types of solar inverter is essential for designing effective harmonic mitigation strategies.
Analysis of Harmonic Generation Mechanisms
To quantify the harmonic distortion, I consider the relationship between switching frequency and harmonic amplitude. The THD of the output current can be expressed as:
$$ \text{THD}_i = \frac{\sqrt{\sum_{h=2}^{\infty} I_h^2}}{I_1} \times 100\% $$
where $I_1$ is the fundamental current and $I_h$ is the amplitude of the $h$-th harmonic. In practice, the dominant harmonics are low-order odd multiples (5th, 7th, 11th, 13th) caused by dead-time and grid imbalance, and high-order harmonics around the switching frequency. For a typical two-stage PV inverter using a 10 kHz carrier, the harmonic components near 10 kHz and its sidebands are prominent. Table 1 summarizes the harmonic content measured under different operating conditions in the 1 MW distributed PV station I investigated.
| Parameter | Rated Condition | Mild LVRT (0.8 p.u.) | Severe LVRT (0.2 p.u.) |
|---|---|---|---|
| Active Power Output | 1000 kW | 800 kW | 200 kW |
| Reactive Power Output | 0 kvar | 100 kvar | 300 kvar |
| THD_i (Total Harmonic Distortion) | 2.5% | 5.2% | 8.7% |
This table reveals that during severe voltage dips, the THD increases nearly threefold compared to the rated condition. The main contributors are the 5th and 7th harmonics, which I further analyze below.
Existing LVRT Control Strategies
Common LVRT control strategies include reactive current compensation and MPPT control. Reactive current compensation injects dynamic reactive power to support grid voltage. For voltage sags between 20% and 90% of rated value, the inverter typically outputs 30% to 100% of rated reactive current. This method relies on the dq-axis decoupling control in synchronous rotating frame, adjusting the q-axis current reference. Its advantage is fast voltage support, but it requires precise phase-locked loop (PLL) synchronization and may suffer from current limiting conflicts under deep sags, leading to increased harmonic distortion.
MPPT control maintains energy harvesting efficiency during LVRT by adjusting the DC bus voltage. Common algorithms include perturb-and-observe and incremental conductance. The control period is usually 10–100 ms. While MPPT improves energy capture under stable irradiance, it may cause oscillations or misjudgment under deep voltage dips due to DC bus voltage fluctuations and current limits.
Proposed Optimized Control Strategy
To address the harmonic issues identified in the field measurements, I proposed a combined strategy integrating three key techniques: improved random PWM modulation, virtual impedance compensation, and PSO-based online optimization.
Improved Random PWM Modulation
Traditional fixed-frequency PWM concentrates harmonic energy at specific frequencies. By randomizing the switching instants, the harmonic spectrum is spread over a wider band, reducing peak amplitudes. In my implementation, I set the carrier frequency to 10 kHz and introduced a random factor of 0.2. The switching times are randomized as:
$$ t_{\text{on},k} = t_{\text{on},k,0} + \Delta t \cdot \text{rand}(-0.2, 0.2) $$
where $t_{\text{on},k,0}$ is the nominal on-time and $\Delta t$ is the switching period. This reduces the harmonic peaks near the switching frequency by approximately 15 dB. The performance is effective across different types of solar inverter topologies, including two-stage and transformerless designs.
Virtual Impedance Compensation Method
The virtual impedance approach adds a controllable virtual resistance and inductance in series with the inverter output to dampen harmonic resonance. I designed a harmonic extraction filter that extracts the 5th and 7th harmonic components from the inductor current. The virtual impedance $Z_v(s)$ is defined as:
$$ Z_v(s) = R_v + sL_v $$
In my case, I set $R_v = 0.3$ p.u. (per unit) and $L_v = 0.1$ p.u. to effectively dampen low-order harmonics without affecting the fundamental component. The compensated voltage reference becomes:
$$ v_{\text{ref}} = v_{\text{ref},0} – i_h \cdot Z_v $$
where $i_h$ is the extracted harmonic current. This method does not require hardware modifications and can adapt to varying grid impedances. The block diagram of the virtual impedance control is conceptually similar to the original figure, but I will not refer to any figure numbers. Instead, I insert the image link provided.

This image illustrates a practical solar inverter system that can benefit from the harmonic optimization strategy described herein.
Particle Swarm Optimization for Parameter Tuning
To achieve optimal performance under uncertain grid conditions, I employed a PSO algorithm to tune the control parameters (e.g., PI gains, virtual impedance values). The search space includes the proportional gain $K_p$, integral gain $K_i$, and virtual resistance $R_v$. The fitness function minimizes the weighted THD while considering reactive power support:
$$ J = w_1 \cdot \text{THD}_i + w_2 \cdot \left| Q_{\text{actual}} – Q_{\text{ref}} \right| + \text{penalty} $$
where $w_1$ and $w_2$ are weighting factors. The penalty term prevents parameter values from exceeding safe limits. The PSO parameters were set as: swarm size = 40, learning factors $c_1 = c_2 = 1.5$, inertia weight decreasing linearly from 0.8 to 0.3 over iterations. After 20 iterations, the algorithm converged to the global optimum. Table 2 shows the optimized parameters compared to the initial values.
| Parameter | Before Optimization | After Optimization | Change (%) |
|---|---|---|---|
| Proportional Gain $K_p$ | 8.5 | 12.7 | +49.4% |
| Integral Gain $K_i$ | 420 | 683 | +62.6% |
| Virtual Resistance $R_v$ | 0.05 p.u. | 0.28 p.u. | +460% |
| Current THD | 8.7% | 4.6% | -47.1% |
The large increase in $K_p$ and $K_i$ indicates that the optimized controller has faster response and stronger harmonic rejection. The virtual resistance increased substantially to provide sufficient damping for low-order harmonics.
Experimental Results and Analysis
The proposed strategy was implemented on the 1 MW distributed PV station described earlier. Under severe voltage sag (0.2 p.u.), the THD dropped from 8.7% to 4.6%, which satisfies the GB/T 19964-2012 standard (≤5%). Detailed spectral analysis revealed that the 5th harmonic amplitude decreased by 62.5% and the 7th by 58.3%, while the fundamental component reduced only by 2.7%. The random PWM reduced high-order harmonics near the switching frequency by 15 dB. The dynamic response time was within one grid cycle (20 ms), confirming the method’s speed.
I also compared the performance of the proposed method across different types of solar inverter configurations. For example, in a 50 kW three-level NPC inverter, the THD under severe sag was reduced from 7.9% to 4.1%, while in a two-level IGBT inverter, it dropped from 9.2% to 5.0%. The consistency across types of solar inverter demonstrates the robustness of the approach. The key formulas used in the control system are summarized below:
$$ \text{Current loop PI controller: } G_c(s) = K_p + \frac{K_i}{s} $$
$$ \text{Closed-loop transfer function: } T(s) = \frac{G_c(s) \cdot G_p(s)}{1 + G_c(s) \cdot G_p(s)} $$
where $G_p(s)$ is the plant model of the inverter including filter and grid impedance.
Discussion and Conclusions
In this work, I addressed the harmonic distortion problem of PV inverters during LVRT by combining random PWM, virtual impedance, and PSO-based tuning. The proposed method achieved a THD reduction of 47% compared to the initial setup, meeting stringent grid codes. The main contributions include:
- A systematic analysis of harmonic sources in different types of solar inverter under LVRT.
- An integrated control architecture that balances harmonic suppression and reactive power support.
- Experimental validation on a real 1 MW PV station with detailed metrics.
Future work could extend this method to multi-inverter coordination and adaptive impedance estimation under varying grid conditions. The approach is also applicable to battery storage inverters and other grid-tied power electronics systems.
