The ever-increasing penetration of renewable energy sources like photovoltaics and wind power presents a critical challenge for modern power systems: maintaining stability at the point of interconnection. The on-grid inverter serves as the essential interface, converting DC power from these distributed sources into grid-synchronized AC power. However, these inverters are often deployed in remote areas with long transmission lines, leading to non-negligible grid-side impedance—a condition termed a “weak grid.” The impedance interaction between an on-grid inverter and a weak grid is a well-documented source of small-signal oscillatory instability, threatening the reliable operation of the entire system. This paper addresses this fundamental stability issue.
Existing research frequently employs impedance-based analysis to study this interaction. The stability of the interconnected system—the grid represented by its Thevenin impedance \(Z_g(s)\) and the on-grid inverter by its output impedance \(Z_o(s)\)—is determined by the Generalized Nyquist Criterion applied to the impedance ratio \(Z_g(s)/Z_o(s)\). For grid-following on-grid inverters, the Phase-Locked Loop (PLL) is a primary destabilizing factor, introducing negative resistance characteristics in the low-frequency range. While various mitigation strategies exist, from adjusting PLL bandwidth to redesigning its structure or adding passive damping, they often adopt a one-size-fits-all approach. Strategies designed for the worst-case weak-grid scenario typically enforce excessive stability margins across all operating points, unnecessarily compromising the dynamic performance of the on-grid inverter under normal or stronger grid conditions. This highlights a significant limitation: fixed-parameter stabilization methods lack adaptability to the varying operational landscapes defined by changing output power and grid impedance.
This paper first analyzes the limitations of conventional fixed-parameter voltage feedforward impedance reshaping strategies. It then proposes a novel adaptive voltage feedforward impedance reshaping strategy. The core idea is to enable the on-grid inverter to self-adjust its stability enhancement parameters based on real-time operating conditions. The strategy utilizes a Simulated Annealing-Particle Swarm Optimization (SA-PSO) hybrid algorithm to perform offline optimization of the feedforward path parameters for a set of discrete sample points spanning the expected range of output power and grid impedance. A polynomial fitting process then generates continuous functions mapping the operating point to the optimal parameters. By deploying these functions into the digital controller, the on-grid inverter can adaptively regulate the feedforward in real-time. This approach ensures consistently adequate stability margins across a wide operational range while minimizing the impact on system dynamics. The proposed method is validated through impedance analysis, simulation, and experimental tests on an OPAL-RT hardware-in-the-loop platform.
1. Port Impedance Modeling of the On-Grid Inverter
A typical three-phase L-filter-based voltage-source on-grid inverter and its control scheme in the synchronous reference frame (dq-frame) are considered. The system comprises the DC-link, the inverter bridge, an output filter inductor \(L_f\) with its parasitic resistance \(R_L\), and the grid impedance \(L_g\). The controller includes a PLL for grid synchronization, a current regulator (typically PI), decoupling terms, and a feedforward path. A detailed small-signal model, considering the dynamics of the PLL and the digital control delay, is essential for accurate stability assessment.
By injecting small-signal perturbations and performing linearization, the dq-domain small-signal model of the on-grid inverter system is derived. The control delay, modeled using a first-order Pade approximation, and the coordinate transformation effects due to the PLL are included. The output impedance matrix \(Z_o(s)\) of the on-grid inverter, viewed from the Point of Common Coupling (PCC), can be derived from this model. The expression for the impedance matrix is given by:
$$ \mathbf{Z_o}(s) = \frac{\hat{\mathbf{v}}^s}{\hat{\mathbf{i}}^s} = – \left[ \mathbf{I} – \mathbf{G_{PLL}} \mathbf{G_{dc}} \right]^{-1} \left[ \mathbf{G_i} \mathbf{K_{pwm}} \mathbf{G_{del}} (\mathbf{G_{dec}} – \mathbf{Z_L}) – \mathbf{Z_L} \right] $$
where \(\hat{\mathbf{v}}^s\) and \(\hat{\mathbf{i}}^s\) are the small-signal PCC voltage and output current vectors in the system dq-frame, \(\mathbf{I}\) is the identity matrix, \(\mathbf{G_{PLL}}\) is the PLL transfer matrix, \(\mathbf{G_{dc}}\) is the DC gain matrix, \(\mathbf{G_i}\) is the current regulator matrix, \(\mathbf{K_{pwm}}\) is the PWM gain, \(\mathbf{G_{del}}\) is the delay transfer matrix, \(\mathbf{G_{dec}}\) is the decoupling matrix, and \(\mathbf{Z_L}\) is the filter inductor impedance matrix. For a system with a standard PI current controller and a PI-type PLL, the matrices are defined as follows:
$$
\mathbf{G_i}(s) = \begin{bmatrix}
H_i(s) & 0 \\
0 & H_i(s)
\end{bmatrix}, \quad H_i(s) = K_{ip} + \frac{K_{ii}}{s}
$$
$$
\mathbf{G_{dec}} = \begin{bmatrix}
0 & -\omega_0 L_f \\
\omega_0 L_f & 0
\end{bmatrix}, \quad \mathbf{Z_L}(s) = \begin{bmatrix}
sL_f + R_L & -\omega_0 L_f \\
\omega_0 L_f & sL_f + R_L
\end{bmatrix}
$$
$$
\mathbf{G_{del}}(s) \approx \begin{bmatrix}
\frac{1 – 0.5 T_s s}{1 + 0.5 T_s s} & 0 \\
0 & \frac{1 – 0.5 T_s s}{1 + 0.5 T_s s}
\end{bmatrix}
$$
Due to the use of decoupled dq-current control and the dominant role of the q-q channel impedance in weak-grid instability, the subsequent stability analysis focuses primarily on the \(Z_{o,qq}(s)\) term. The parameters of a representative on-grid inverter system used for analysis are listed in Table 1.
| Parameter | Symbol | Value |
|---|---|---|
| DC-Link Voltage | \(V_{dc}\) | 800 V |
| Grid Voltage (Phase, RMS) | \(V_g\) | 311 V |
| Fundamental Frequency | \(f_0\) | 50 Hz |
| Switching Frequency | \(f_s\) | 5 kHz |
| Switching Period | \(T_s\) | 0.2 ms |
| Filter Inductance | \(L_f\) | 5 mH |
| Inductor Parasitic Resistance | \(R_L\) | 1 mΩ |
| Current Controller: Proportional Gain | \(K_{ip}\) | 7 |
| Current Controller: Integral Gain | \(K_{ii}\) | 1000 |
| PLL: Proportional Gain | \(K_{pp}\) | 1.4 |
| PLL: Integral Gain | \(K_{pi}\) | 317 |
| PWM Gain | \(K_{pwm}\) | 1/800 |
The Bode plot of the output impedance \(Z_{o,qq}(s)\) reveals the negative resistance phase characteristic in the low-frequency range induced by the PLL, which is the root cause of potential instability when interacting with an inductive grid impedance.

2. Weak-Grid Stability Analysis and Limitations of Fixed Feedforward
The system stability is assessed using the impedance ratio \(T_m(s) = Z_{g,qq}(s) / Z_{o,qq}(s)\). Nyquist plots of \(T_m(s)\) for different grid strengths, characterized by the Short-Circuit Ratio (SCR) or equivalently the grid inductance \(L_g\), are evaluated. For a strong grid (low \(L_g\)), the Nyquist curve does not encircle the critical point (-1, j0). As the grid weakens (increasing \(L_g\)), the curve expands and eventually encircles (-1, j0), indicating instability. This confirms the deteriorating stability of a conventionally controlled on-grid inverter in weak grid conditions.
A common solution is to reshape the inverter’s output impedance by adding a q-axis PCC voltage feedforward path to the current reference. This can be a simple proportional feedforward or a more selective band-pass filter (BPF) feedforward. The transfer function of a second-order BPF used in this context is:
$$ G_{BPF}(s) = \frac{K_v \cdot (K \omega_c s)}{s^2 + K \omega_c s + \omega_c^2} $$
where \(K_v\) is the feedforward coefficient, \(\omega_c = 2\pi f_c\) is the center frequency, and \(K\) determines the bandwidth.
While effective at a specific operating point, fixed-parameter feedforward strategies exhibit critical limitations. A design optimized for a moderate power level (e.g., \(I_d = 20\) A) may stabilize the system at that point but can fail when the power increases (e.g., \(I_d = 30\) A), as the impedance intersection frequency shifts and the fixed reshaping becomes inadequate. Conversely, designing for the highest power/highest impedance worst-case scenario will provide excessive, unnecessary reshaping at lighter loads, degrading the dynamic performance of the on-grid inverter. This lack of adaptability to changing operational conditions (both \(P_{out}\) and \(L_g\)) is the key motivation for an adaptive strategy.
3. SA-PSO-Based Adaptive Impedance Reshaping Strategy
The proposed adaptive control strategy aims to maintain near-optimal stability margins across a wide, continuous range of operating points by dynamically adjusting the feedforward parameters \(f_c\), \(K\), and \(K_v\). The implementation framework is as follows:
1. Offline Sample Optimization: The expected operational range is discretized into a grid of sample points \((L_g^{(i)}, I_d^{(i)})\). For each sample, the initial BPF center frequency \(f_{c,init}\) is set near the predicted impedance crossover frequency from the linear model. An SA-PSO hybrid algorithm is then employed to optimize the triplet \((f_c, K, K_v)\) for that specific operating point. SA-PSO combines the global search capability of Simulated Annealing with the convergence speed of Particle Swarm Optimization, effectively avoiding local minima.
The algorithm’s fitness function is designed to balance stability margin and control performance:
$$ \text{fitness} = \alpha |G_{m,c} – 2| + \beta |P_{m,c} – 30| + \gamma K + \chi K_v $$
where \(G_{m,c}\) and \(P_{m,c}\) are the gain and phase margins (in dB and degrees) of the cascaded system, and \(\alpha, \beta, \gamma, \chi\) are weighting coefficients. This function penalizes deviations from target margins (e.g., 2 dB and 30°) and also penalizes large \(K\) and \(K_v\) values to minimize the impact on the original on-grid inverter dynamics.
2. Full-Range Coverage via Polynomial Fitting: The optimized parameters from all sample points form a dataset \(\{(L_g^{(i)}, I_d^{(i)}, f_c^{(i)}, K^{(i)}, K_v^{(i)})\}\). Multivariate polynomial functions are fitted to this data to create continuous mappings:
$$ f_c = F_f(L_g, I_d), \quad K = F_K(L_g, I_d), \quad K_v = F_{Kv}(L_g, I_d) $$
A representative fitting result for \(f_c\) using a 5th-order polynomial in \(L_g\) and a 3rd-order in \(I_d\) is:
$$
\begin{aligned}
f_c(L_g, I_d) &= p_{00} + p_{10}L_g + p_{01}I_d + p_{20}L_g^2 + p_{11}L_g I_d + p_{02}I_d^2 + p_{30}L_g^3 + p_{21}L_g^2 I_d \\
&+ p_{12}L_g I_d^2 + p_{03}I_d^3 + p_{40}L_g^4 + p_{31}L_g^3 I_d + p_{22}L_g^2 I_d^2 + p_{13}L_g I_d^3 + p_{50}L_g^5 \\
&+ p_{41}L_g^4 I_d + p_{32}L_g^3 I_d^2 + p_{23}L_g^2 I_d^3
\end{aligned}
$$
Similar polynomials are derived for \(K\) and \(K_v\). The accuracy of the fitting is validated by low Root Mean Square Error (RMSE) and correlation coefficients (\(R^2\)) close to 1, as shown in Table 2.
| Fitted Surface | RMSE (\(\delta_{RMSE}\)) | Correlation Coefficient (\(R^2\)) |
|---|---|---|
| \(f_c(L_g, I_d)\) | 0.4388 | 0.9983 |
| \(K(L_g, I_d)\) | 0.6530 | 0.9823 |
| \(K_v(L_g, I_d)\) | 0.0268 | 0.9905 |
3. Online Adaptation: The polynomial functions \(F_f, F_K, F_{Kv}\) are programmed into the digital controller (e.g., DSP) of the on-grid inverter. During operation, the real-time active current \(I_d\) is known from the controller’s reference. The grid impedance \(L_g\) can be estimated online using existing perturbation-based techniques. The controller then calculates the optimal feedforward parameters \((f_c, K, K_v)\) for the instantaneous operating point \((L_g, I_d)\) and updates the BPF block in the voltage feedforward path accordingly.
4. Stability Analysis for Typical Operating Conditions
The effectiveness of the adaptive strategy is evaluated by examining the impedance ratio Nyquist plots under various grid strengths and output power levels. The results consistently demonstrate that while the conventional control leads to shrinking or negative stability margins (encirclement of -1) as conditions become more adverse (higher \(L_g\), higher \(I_d\)), the adaptively controlled on-grid inverter maintains approximately 2 dB and 30° of gain and phase margin across all tested conditions. This confirms that the adaptive feedforward successfully reshapes the output impedance of the on-grid inverter in a precisely targeted manner, adapting to the specific instability risk posed by each unique operating point.
5. Experimental Verification
Experimental validation was conducted using an OPAL-RT real-time simulation platform. The power circuit was simulated in the OPAL-RT OP5607 (FPGA), while the proposed adaptive control algorithm was executed on the OPAL-RT OP5600 (CPU).
Scenario 1: Varying Grid Impedance at Rated Power. With \(I_d = 30\) A, the grid inductance \(L_g\) was varied. With conventional control, the system was marginally stable at \(L_g = 11\) mH and became oscillatory unstable at \(L_g = 13\) mH and \(15\) mH. Upon activating the proposed adaptive feedforward control, stability was restored and maintained in all cases, with the three-phase grid currents becoming smooth and stable.
Scenario 2: Power Step Change under Weak Grid. With a weak grid (\(L_g = 11\) mH), the active power command was stepped from 67% to 133% of the rated value. Under conventional control, the system became unstable after the step to high power. Under adaptive control, the system remained stable throughout the transient, demonstrating both stability and satisfactory dynamic response. For comparison, a conservative fixed control with a drastically reduced PLL bandwidth, while stable, exhibited significantly sluggish dynamics during the same step, highlighting the performance benefit of the adaptive approach for the on-grid inverter.
Scenario 3: Operation under Non-Ideal Grid Voltage. To test robustness, a grid voltage containing 3rd, 5th, and sub-synchronous (60 Hz) harmonics was applied at an unstable operating point (\(L_g=12\) mH, \(I_d=30\) A). The conventional control led to distorted, oscillatory currents. The adaptive control successfully stabilized the on-grid inverter operation, proving its effectiveness even in the presence of background harmonics.
6. Conclusion
This paper has presented a comprehensive adaptive voltage feedforward strategy to address the weak-grid stability challenge for grid-following on-grid inverters. The method moves beyond fixed-parameter solutions by leveraging offline SA-PSO optimization and online polynomial-based adaptation. The key outcome is that the on-grid inverter can now maintain consistently adequate stability margins across a wide and continuous range of grid impedances and output power levels, a significant improvement over conventional designs. Importantly, this is achieved without unnecessarily sacrificing the dynamic performance of the on-grid inverter under more favorable conditions, striking a superior balance between robustness and performance. The strategy is general and can be extended to other inverter filter types and broader operational ranges. Future work will focus on integrating more robust online grid impedance estimation techniques and exploring the coordination of this adaptive feedforward with other grid-supportive functions in the on-grid inverter controller.
