Impedance Reshaping Strategy for On-Grid Inverters Based on Dual Harmonic Injection

In the context of global energy transition, the integration of renewable energy sources into power systems has become a pivotal focus. As a critical interface between distributed generation and the grid, the on-grid inverter plays a vital role in ensuring efficient and stable power conversion. However, with the increasing penetration of renewables and the emergence of new types of loads, grid conditions are becoming more complex, often characterized by weak grid scenarios where grid impedance exhibits random variations. This poses significant challenges to the stability and power quality of on-grid inverter systems. Traditional impedance reshaping strategies, designed for fixed grid conditions, often fail to maintain performance under such dynamic environments, leading to reduced phase margins, harmonic oscillations, and even system instability. To address this issue, this paper proposes an adaptive impedance reshaping strategy for on-grid inverters based on real-time grid impedance identification via dual harmonic injection. By accurately identifying grid impedance variations and dynamically adjusting the control parameters, the proposed strategy ensures robust stability and enhanced adaptability of on-grid inverters in weak grids. The methodology encompasses impedance modeling, stability analysis, identification techniques, and reshaping design, supported by comprehensive simulations. Throughout this work, the term “on-grid inverter” is emphasized to underscore its central role in modern power systems.

The stability of on-grid inverters in weak grids is a well-studied yet persistent problem. When connected to a grid with non-negligible impedance, the interaction between the inverter’s output impedance and the grid impedance can degrade the phase margin, excite resonant frequencies, and cause harmonic distortion. Conventional approaches, such as grid voltage feedforward control, aim to mitigate background harmonics but often compromise stability margins, especially when grid impedance varies widely. Existing impedance reshaping methods typically rely on fixed parameters, assuming constant grid conditions. However, in practical scenarios, grid impedance fluctuates due to factors like varying renewable generation, load switching, and long transmission lines. This necessitates adaptive strategies that can respond to real-time grid changes. Previous studies have explored grid impedance identification techniques, such as single harmonic injection or pulse signal injection, but these methods face limitations in accuracy, phase measurement complexity, or impact on power quality. This paper introduces a dual harmonic injection method that overcomes these drawbacks by eliminating phase angle measurements and improving identification accuracy. Subsequently, an impedance reshaping strategy is designed to adjust the inverter’s output impedance based on the identified grid parameters, ensuring sufficient phase margin across a wide range of grid conditions. The contribution lies in integrating accurate impedance identification with adaptive control, thereby enhancing the resilience of on-grid inverters in evolving grid environments.

To establish a foundation for the proposed strategy, we first derive the equivalent impedance model of an LCL-type on-grid inverter. The system comprises a three-phase inverter with an LCL filter, current control loops, and a phase-locked loop (PLL). The control block diagram can be represented mathematically, leading to the expression for the inverter’s equivalent output impedance. Consider the following transfer functions and parameters:

The inverter-side inductance, grid-side inductance, and filter capacitance are denoted as $L_1$, $L_2$, and $C$, respectively. The current controller is $G_i(s)$, the delay and PWM gain are $G_d(s)$ and $K_{pwm}$, and feedback coefficients are $H_{i1}$ and $H_{i2}$. The grid voltage feedforward controller is $G_f(s)$. From the control框图, the open-loop gain $T(s)$ is given by:

$$T(s) = \frac{H_{i2} G_i(s) K_{pwm} G_d(s)}{s^3 L_1 L_2 C + s^2 H_{i1} L_2 C K_{pwm} G_d(s) + s(L_1 + L_2)}$$

The equivalent output impedance $Z_o(s)$ of the on-grid inverter without feedforward is:

$$Z_o(s) = \frac{L_1 L_2 C s^3 + K_{pwm} G_d(s) H_{i1} L_2 C s^2 + (L_1 + L_2)s + H_{i2} K_{pwm} G_d(s) G_i(s)}{s^2 L_1 C + s C H_{i1} K_{pwm} G_d(s) + 1}$$

When grid voltage feedforward is applied, it introduces a virtual impedance $Z_p(s)$ in parallel with $Z_o(s)$, where:

$$Z_p(s) = -\frac{L_1 L_2 C s^3 + K_{pwm} G_d(s) H_{i1} L_2 C s^2 + (L_1 + L_2)s + K_{pwm} G_d(s) G_i(s)}{G_f K_{pwm} G_d(s)}$$

Thus, the overall equivalent output impedance $Z_{oeq}(s)$ becomes:

$$Z_{oeq}(s) = \frac{Z_o(s) Z_p(s)}{Z_o(s) + Z_p(s)} = \frac{s^3 L_1 L_2 C + s^2 H_{i1} L_2 C K_{pwm} G_d(s) + s(L_1 + L_2) + H_{i2} G_i(s) K_{pwm} G_d(s)}{s^2 L_1 C + s C H_{i1} K_{pwm} G_d(s) + 1 – K_{pwm} G_d(s) G_f(s)}$$

The stability of the on-grid inverter system depends on the interaction between $Z_{oeq}(s)$ and the grid impedance $Z_g(s)$. According to the impedance-based stability criterion, the system remains stable if the ratio $Z_g(s)/Z_{oeq}(s)$ satisfies the Nyquist criterion, and the phase margin at the crossover frequency $f_c$ is positive. The phase margin $P_{PM}$ is defined as:

$$P_{PM} = 180^\circ – \left( \arg Z_g(j2\pi f_c) – \arg Z_{oeq}(j2\pi f_c) \right) > 0$$

In weak grids, $Z_g(s)$ increases, leading to a lower $P_{PM}$ and potential instability. Traditional feedforward control, while suppressing low-frequency harmonics, often reduces $P_{PM}$, as illustrated in stability analysis. To quantify this, we analyze typical parameters for an on-grid inverter system, summarized in Table 1.

Parameter Symbol Value
DC-link voltage $U_{dc}$ 800 V
Grid voltage (RMS) $U_g$ 380 V
Switching frequency $f_s$ 10 kHz
Fundamental frequency $f_0$ 50 Hz
Inverter-side inductance $L_1$ 0.75 mH
Grid-side inductance $L_2$ 0.35 mH
Filter capacitance $C$ 4.80 μF
Capacitor current feedback coefficient $H_{i1}$ 0.03
Grid current feedback coefficient $H_{i2}$ 1
PI controller proportional gain $K_p$ 0.02
PI controller integral gain $K_i$ 30

Using these parameters, Bode plots of $Z_{oeq}(s)$ for different grid impedances (represented by short-circuit ratios $R_{SCR} = 1, 2, 4.8$) show that the phase margin decreases significantly with increasing grid inductance, even becoming negative in extreme cases. This highlights the limitation of fixed-parameter strategies and underscores the need for adaptive impedance reshaping in on-grid inverters.

The core of the proposed adaptive strategy is the real-time identification of grid impedance via dual harmonic injection. Unlike single harmonic injection methods that require phase angle measurements, this approach injects two high-frequency harmonic currents into the current reference of the on-grid inverter and measures only the voltage and current magnitudes at the point of common coupling (PCC). The principle is as follows: let the injected harmonic frequencies be $h_1$ and $h_2$ (in Hz), with corresponding angular frequencies $\omega_1 = 2\pi h_1$ and $\omega_2 = 2\pi h_2$. After injection, the PCC voltage and current responses are extracted using Fourier analysis (e.g., DFT or FFT). The impedance magnitudes at these frequencies are:

$$|Z(h_1)| = \frac{U_{PCC}(h_1)}{I_{PCC}(h_1)}, \quad |Z(h_2)| = \frac{U_{PCC}(h_2)}{I_{PCC}(h_2)}$$

Assuming the grid impedance is primarily inductive with a resistive component, i.e., $Z_g(s) = R_g + sL_g$, the magnitudes relate to $R_g$ and $L_g$ as:

$$|Z(h_1)|^2 = R_g^2 + \omega_1^2 L_g^2, \quad |Z(h_2)|^2 = R_g^2 + \omega_2^2 L_g^2$$

Solving these equations yields the grid resistance and inductance:

$$L_g = \sqrt{\frac{|Z(h_1)|^2 – |Z(h_2)|^2}{\omega_1^2 – \omega_2^2}}, \quad R_g = \sqrt{\frac{\omega_1^2 |Z(h_2)|^2 – \omega_2^2 |Z(h_1)|^2}{\omega_1^2 – \omega_2^2}}$$

This method avoids phase detection, simplifying implementation and improving accuracy. The injection signals are designed to minimize impact on power quality: frequencies are chosen as 400 Hz and 600 Hz (even harmonics to avoid interference with common odd harmonic backgrounds), amplitudes are set to 10% of the rated grid current, and injection is performed intermittently (e.g., for 2 grid cycles every 13 cycles) to reduce continuous disturbance. This identification process enables the on-grid inverter to continuously monitor grid conditions.

Based on the identified grid impedance, the impedance reshaping strategy dynamically adjusts the on-grid inverter’s control parameters. The proposed reshaping involves adding a phase lead compensator $G_p(s)$ in series with the current controller $G_i(s)$. The modified control structure enhances the phase margin by reshaping $Z_{oeq}(s)$ at the crossover frequency. The compensator is defined as:

$$G_p(s) = K_a \cdot \frac{s + k_1}{s + k_2}$$

where $K_a$ is the gain, and $k_1$ and $k_2$ are parameters that determine the maximum phase lead $\phi_m$ and the frequency $\omega_m$ at which it occurs. The relationships are:

$$\omega_m = \sqrt{k_1 k_2}, \quad \phi_m = \arctan\left(\frac{\sqrt{k_1 k_2}(k_2 – k_1)}{2k_1 k_2}\right)$$

To maintain unity gain at $\omega_m$, $K_a$ is set as:

$$K_a = \sqrt{\frac{k_2^2 + \omega_m^2}{(k_1 k_2 + \omega_m^2)^2 + (k_2 – k_1)^2 \omega_m^2}}$$

The design procedure involves: (1) determining the crossover frequency $f_c$ from the identified grid impedance and setting $\omega_m = 2\pi f_c$; (2) calculating the required phase compensation $\phi_m$ based on the desired phase margin (e.g., 30°) and the current margin; (3) solving for $k_1$ and $k_2$ using the above equations; and (4) computing $K_a$. This adaptive adjustment ensures that the on-grid inverter maintains a sufficient phase margin regardless of grid impedance variations. The reshaped equivalent output impedance $Z’_{oeq}(s)$ becomes:

$$Z’_{oeq}(s) = \frac{s^3 L_1 L_2 C + s^2 H_{i1} L_2 C K_{pwm} G_d(s) + s(L_1 + L_2) + H_{i2} G_i(s) G_p(s) K_{pwm} G_d(s)}{s^2 L_1 C + s C H_{i1} K_{pwm} G_d(s) + 1 – K_{pwm} G_d(s) G_f(s)}$$

By continuously updating $G_p(s)$ parameters based on real-time grid impedance identification, the on-grid inverter achieves robust stability in weak grids.

To validate the proposed strategy, simulations were conducted in MATLAB/Simulink for an LCL-type on-grid inverter system with parameters from Table 1. The grid impedance identification accuracy was first tested by setting a known grid inductance $L_g = 8$ mH. The dual harmonic injection method yielded $L_g = 8.151$ mH, with an error of 1.89%, whereas a single harmonic injection method (at 600 Hz) resulted in an error of 11.3% due to phase measurement issues. This confirms the superiority of the dual harmonic approach for on-grid inverter applications.

Next, the performance of the adaptive impedance reshaping strategy was evaluated under varying grid conditions. Three scenarios were considered: weak grid with $L_g = 3.6$ mH, very weak grid with $L_g = 7.2$ mH, and dynamic changes in $L_g$ from 0.1 mH to 3.6 mH and then to 7.2 mH. The results are summarized in Table 2, comparing traditional feedforward control and the proposed adaptive strategy in terms of total harmonic distortion (THD) of grid current and stability.

Grid Condition Traditional Feedforward Proposed Adaptive Strategy Remarks
$L_g = 3.6$ mH THD = 7.7%, unstable oscillations THD = 2.78%, stable Improved stability
$L_g = 7.2$ mH System unstable THD = 3.15%, stable Robust in very weak grid
Dynamic $L_g$ change Current distortion, instability Smooth transition, stable Adaptability validated

The simulations demonstrate that the proposed strategy effectively maintains grid current quality and stability across diverse grid impedances. The on-grid inverter adapts quickly to changes, with the phase margin consistently kept around 30° due to real-time parameter adjustments. This highlights the practical benefits of integrating impedance identification with reshaping for on-grid inverters in modern power systems.

Further analysis involves the frequency-domain response of the reshaped impedance. Bode plots of $Z’_{oeq}(s)$ for different compensator settings (designed for specific grid impedances) show that the phase margin is restored to desired levels. For instance, with $L_g = 3.6$ mH, the compensator $G_{p2}(s)$ is designed as:

$$G_{p2}(s) = 2.3 \cdot \frac{s + 256.54}{s + 1356.91}$$

This yields a phase margin of approximately 30° at the crossover frequency. Similar compensators are derived for other grid conditions, ensuring universal stability. The adaptive nature of this on-grid inverter control strategy makes it suitable for real-world applications where grid impedance is unpredictable.

In conclusion, this paper presents an adaptive impedance reshaping strategy for on-grid inverters based on dual harmonic injection for grid impedance identification. The method addresses the limitations of traditional fixed-parameter approaches by enabling real-time detection of grid impedance variations and dynamic adjustment of control parameters. The dual harmonic injection technique simplifies identification by eliminating phase angle measurements, enhancing accuracy and reducing computational burden. The proposed phase lead compensator effectively reshapes the output impedance of the on-grid inverter, ensuring sufficient phase margin and stability in weak grids. Simulation results validate the strategy’s effectiveness in improving grid current quality and maintaining stability under varying grid conditions. Future work may focus on hardware implementation, consideration of unbalanced grids, and integration with other advanced control techniques for on-grid inverters. This research contributes to the development of resilient on-grid inverter systems capable of supporting high penetration of renewable energy in evolving power networks.

The importance of on-grid inverters in modern energy systems cannot be overstated. As the interface between distributed generation and the grid, their performance directly impacts system stability and power quality. The proposed strategy enhances the adaptability of on-grid inverters to weak grid conditions, a critical requirement for future smart grids. By combining accurate impedance identification with adaptive control, this approach offers a practical solution to the challenges posed by random grid impedance variations. Continued innovation in on-grid inverter technologies will be essential for achieving a sustainable and reliable energy future.

Scroll to Top