In the global pursuit of carbon neutrality, the integration of distributed generation resources, primarily photovoltaic (PV) and wind power, into the electrical grid has accelerated. These resources are predominantly interfaced through power electronic converters, specifically on grid inverters. While offering advantages such as rapid response and operational flexibility, the high penetration of these inverter-interfaced generators introduces significant challenges to grid stability due to their inherent lack of inertia and the intermittent nature of their power output. This leads to reduced system inertia and damping, making the grid more susceptible to frequency and power oscillations during disturbances. To address this critical issue, the Virtual Synchronous Generator (VSG) technology has emerged as a promising solution to equip on grid inverters with grid-supporting functionalities.
The core principle of VSG control is to emulate the electromechanical characteristics of a traditional synchronous generator by implementing its swing equation within the control algorithm of the on grid inverter. This is achieved through virtual parameters: the moment of inertia (J) and the damping coefficient (D). By strategically adjusting J and D, the VSG-controlled on grid inverter can suppress frequency deviations and power fluctuations caused by load changes or grid faults, thereby enhancing overall system stability. Consequently, the selection of appropriate values for these virtual parameters is paramount for effective operation.

This article presents a comprehensive study on an optimized control strategy for a three-level on grid inverter within a PV-battery energy storage system (PV-BESS). The primary objective is to mitigate the low-inertia, under-damped behavior of conventional inverters and provide robust frequency support. The proposed method integrates a fuzzy logic-based adaptive controller with the VSG algorithm to achieve real-time, coordinated adjustment of the virtual inertia and damping parameters. Furthermore, the power circuit employs a Neutral-Point-Clamped (NPC) three-level topology for the on grid inverter, which significantly improves output power quality by reducing voltage and current harmonic distortion.
System Configuration and VSG Modeling
Topology of the Three-Level PV-BESS-VSG System
The overall structure of the proposed system is centered around a three-level NPC on grid inverter. Each phase leg of this inverter comprises four IGBTs and two clamping diodes, generating three distinct voltage levels at the output (+Vdc/2, 0, -Vdc/2). Compared to standard two-level inverters, the NPC topology offers superior output waveform quality with lower harmonic content and reduced switching losses, albeit with the added complexity of maintaining neutral-point voltage balance. This makes it highly suitable for medium-power renewable energy applications where power quality is critical.
The DC side of the on grid inverter is fed by a hybrid source: a PV array and a battery energy storage system (BESS). The PV array operates under Maximum Power Point Tracking (MPPT) control, typically using the Perturb and Observe (P&O) method for its simplicity and effectiveness. The BESS is integrated via a bidirectional DC-DC converter (Buck/Boost), which manages the power flow to and from the battery. The BESS controller typically employs a dual-loop structure: an outer voltage loop to regulate the DC-link voltage and an inner current loop to control the battery charge/discharge current. The combined action of the PV and BESS ensures that the DC-link voltage at the input of the on grid inverter remains constant, providing a stable power supply for the VSG control to generate stable AC output voltage and power.
Virtual Synchronous Generator Control Algorithm
The foundational element of the control strategy is the emulation of the synchronous generator’s rotor dynamics. The active power-frequency control is derived from the swing equation:
$$ J \frac{d\omega}{dt} = T_m – T_e – D(\omega – \omega_0) = \frac{P_m}{\omega_0} – \frac{P_e}{\omega_0} – D(\omega – \omega_0) $$
$$ \frac{d\delta}{dt} = \omega $$
where \( J \) is the virtual moment of inertia, \( D \) is the damping coefficient, \( P_m \) is the virtual mechanical power (reference power), \( P_e \) is the measured output electrical power, \( \omega_0 \) is the rated grid angular frequency, \( \omega \) is the VSG’s virtual angular frequency, and \( \delta \) is the power angle. The block diagram for this active power control loop is implemented within the on grid inverter‘s controller.
The reactive power-voltage control mimics the excitation system of a synchronous machine. It adjusts the amplitude of the inverter’s output voltage reference (E) based on the reactive power error:
$$ E = E_N – K_q Q + \left( Q_{ref} – Q \right) \left( k_{p1} + \frac{k_{i1}}{s} \right) \frac{1}{1+T_a s} $$
where \( Q_{ref} \) is the reference reactive power, \( K_q \) is the reactive power droop coefficient, \( k_{p1} \) and \( k_{i1} \) are PI controller gains, \( E_N \) is the nominal voltage amplitude, and \( T_a \) is a time constant representing a small delay.
Stability Analysis and Parameter Constraints
<small-signal of="" small="" stability="" the="" vsg
Analyzing the small-signal model of the VSG is crucial for understanding the impact of J and D on system stability. Considering the active power loop, a second-order transfer function can be derived relating the output power \( P \) to the reference power \( P_{ref} \):
$$ \Phi(s) = \frac{P(s)}{P_{ref}(s)} = \frac{ \frac{M_t}{J\omega_0} }{ s^2 + \frac{D\omega_0 + K_w}{J\omega_0}s + \frac{M_t}{J\omega_0} } $$
where \( M_t \) is a constant related to the power-angle slope and \( K_w \) is a frequency feedback gain. From this model, the natural frequency \( \omega_n \) and damping ratio \( \xi \) can be expressed as:
$$ \omega_n = \sqrt{ \frac{M_t}{J\omega_0} }, \quad \xi = \frac{1}{2} \left( \frac{D}{\sqrt{\frac{J M_t}{\omega_0}} } + \frac{K_w}{\sqrt{J M_t \omega_0} } \right) $$
The root locus analysis provides clear insights. Holding D constant, an increase in J moves the system poles closer to the imaginary axis, increasing the overshoot and potentially degrading stability. Conversely, with a fixed J, increasing D drives the poles towards the real axis, resulting in an overdamped response with longer settling times and sluggish dynamics. This illustrates the fundamental trade-off in parameter selection for a VSG-controlled on grid inverter.
Operational Constraints for Parameter Adaptation
For a practical PV-BESS system, the adaptive adjustment of J and D must be bounded by both stability limits and the physical constraints of the energy storage unit. These constraints ensure the safe and reliable operation of the on grid inverter.
1. Lower Bound for Virtual Inertia (Jmin): This is dictated by the maximum allowable Rate of Change of Frequency (RoCoF) that the system can tolerate during a large power imbalance (\( \Delta P_{max} \)).
$$ J > \left| \frac{\Delta P_{max}}{2\pi \omega_0 \cdot RoCoF_{max}} \right| = J_{min} $$
2. Upper Bound for Virtual Inertia (Jmax): This is imposed by the characteristics of the Battery Energy Storage System (BESS). The virtual inertial power is supplied by the BESS. Therefore, the maximum power fluctuation must not exceed the BESS’s maximum allowable charge/discharge power (\( P_{max\_ch/dis} \)). Furthermore, the State of Charge (SOC) and energy capacity of the battery inherently limit the duration and magnitude of power support, implicitly defining a maximum viable inertia constant \( J_{max} \).
$$ J \leq J_{max} $$
These constraints, \( J_{min} < J < J_{max} \), form a critical boundary condition that must be incorporated into the design of any adaptive control law for the on grid inverter.
Design of the Constrained Fuzzy Adaptive VSG Controller
Principles of Conventional Adaptive VSG Control
A conventional adaptive approach adjusts J and D based on the sign of the frequency error (\( \Delta \omega = \omega – \omega_0 \)) and its derivative (\( d\omega/dt \)). The goal is to suppress both the frequency deviation and its rate of change. The adjustment principles during different phases of a frequency oscillation cycle are summarized in the table below.
| Oscillation Phase | Δω | dω/dt | J Adjustment | D Adjustment |
|---|---|---|---|---|
| Acceleration (ω > ω₀) | > 0 | > 0 | Increase | Increase |
| Deceleration (ω > ω₀) | > 0 | < 0 | Decrease | Increase |
| Acceleration (ω < ω₀) | < 0 | < 0 | Increase | Increase |
| Deceleration (ω < ω₀) | < 0 | > 0 | Decrease | Increase |
Based on this, a simple piecewise adaptive law can be formulated:
$$
J = \begin{cases}
J_0, & \Delta \omega \cdot \frac{d\omega}{dt} \leq 0 \quad \cup \quad \left| \frac{d\omega}{dt} \right| \leq T_j \\
J_0 + K_j \left| \frac{d\omega}{dt} \right|, & \Delta \omega \cdot \frac{d\omega}{dt} > 0 \quad \cap \quad \left| \frac{d\omega}{dt} \right| > T_j
\end{cases}
$$
$$
D = \begin{cases}
D_0, & \left| \Delta \omega \right| \leq T_d \\
D_0 + K_d \left| \Delta \omega \right|, & \left| \Delta \omega \right| > T_d
\end{cases}
$$
where \( J_0, D_0 \) are nominal values, \( K_j, K_d \) are adjustment coefficients, and \( T_j, T_d \) are thresholds.
Fuzzy Logic Controller Architecture
To achieve smoother, more robust, and coordinated parameter adaptation that respects the aforementioned constraints, a fuzzy logic controller (FLC) is designed. The FLC takes the frequency error (E) and the rate of change of frequency (Ec) as inputs, and outputs incremental adjustments for the virtual inertia (ΔJ) and damping (ΔD). The final parameters are:
$$ J = J_0 + \Delta J, \quad \text{subject to} \quad J_{min} < J < J_{max} $$
$$ D = D_0 + \Delta D $$
The input variables E and Ec are fuzzified using five linguistic variables: Negative Large (NL), Negative Small (NS), Zero (ZO), Positive Small (PS), Positive Large (PL). The output variables ΔJ and ΔD use the same fuzzy set. The membership functions for inputs are a combination of triangular and S-shaped functions, while outputs use triangular functions. The core of the FLC is the rule base, which encapsulates the expert knowledge derived from the conventional adaptive principles and refined for optimal performance.
The fuzzy rule bases for ΔJ and ΔD are designed to provide coordinated control. For example, when both E and Ec are positive large (PL, PL), indicating a large and rapidly increasing frequency overshoot, the rule dictates a large positive change in both J and D (PL for both outputs) to aggressively counteract the disturbance. The complete rule tables are as follows:
| ΔJ / Ec | NL | NS | ZO | PS | PL |
|---|---|---|---|---|---|
| NL | PL | PL | NS | NS | NS |
| NS | PL | PS | PS | NL | ZO |
| ZO | PS | ZO | ZO | ZO | PS |
| PS | PS | ZO | NL | PS | PS |
| PL | PL | NS | NS | NS | PL |
| ΔD / Ec | NL | NS | ZO | PS | PL |
|---|---|---|---|---|---|
| NL | PL | PS | PS | PS | PS |
| NS | PS | PL | PL | ZO | ZO |
| ZO | ZO | ZO | ZO | ZO | ZO |
| PS | ZO | ZO | PL | PL | PS |
| PL | PS | PS | PS | PS | PL |
The output of the fuzzy inference system is defuzzified using the centroid method to obtain crisp values for ΔJ and ΔD. The scaling factors (\(k_e\), \(k_{ec}\) for inputs and \(k_J\), \(k_D\) for outputs) are tuned to map the physical ranges of signals to the normalized fuzzy domain effectively, ensuring that the final J value always respects its operational constraints. This integrated fuzzy-VSG controller enables the on grid inverter to dynamically and intelligently support grid stability.
Simulation Verification and Performance Analysis
A detailed simulation model of the three-level PV-BESS-VSG system was developed to validate the proposed control strategy. The performance of the fuzzy adaptive VSG (FA-VSG) controller is compared against a fixed-parameter VSG (FP-VSG) and a conventional adaptive VSG (CA-VSG) controller applied to the same on grid inverter. The system parameters are listed below.
| Parameter | Value |
|---|---|
| DC-link Voltage | 750 V |
| Grid Voltage (L-N, RMS) | 220 V / 50 Hz |
| Filter Inductor (Lf) | 3.2 mH |
| Filter Capacitor (Cf) | 20 µF |
| Nominal VSG Inertia (J0) | 0.4 kg·m² |
| Nominal VSG Damping (D0) | 15 N·m·s/rad |
| Battery Voltage | 400 V |
| Initial Battery SOC | 50% |
The test scenario involves a step change in the active power reference. Initially, the on grid inverter delivers 20 kW. At t=0.5s, the reference steps down to 10 kW, and at t=1.0s, it steps back up to 20 kW.
Frequency Response: The FP-VSG control shows the poorest performance with severe frequency oscillations and a maximum frequency deviation exceeding 0.21 Hz. The CA-VSG control improves the response, reducing the maximum deviation to about 0.14 Hz. The proposed FA-VSG control demonstrates the best performance, effectively damping the oscillations and limiting the maximum frequency deviation to less than 0.12 Hz. The recovery to steady-state is also fastest with the FA-VSG.
Active Power Response: Similarly, the active power output of the on grid inverter exhibits significant overshoot and settling time with FP-VSG. The CA-VSG reduces the overshoot. The FA-VSG controller virtually eliminates the power overshoot and achieves the smoothest, fastest tracking of the power reference change, minimizing stress on the system components.
DC-side and Power Quality Performance: Throughout the simulation, the DC-link voltage is maintained at a stable 750 V with minimal fluctuation (less than 2.7%), validating the effectiveness of the coordinated PV-BESS control. A key advantage of the three-level NPC on grid inverter topology is confirmed through Fast Fourier Transform (FFT) analysis performed during steady-state operation. The output voltage and current total harmonic distortion (THD) are remarkably low, measured at 0.02% and 0.01% respectively. This exceptional power quality underscores the suitability of this on grid inverter configuration for stringent grid interconnection standards.
Conclusion
This article has presented a sophisticated and effective control strategy for enhancing the stability and grid-supporting capabilities of a grid-connected inverter in renewable energy applications. By integrating a fuzzy logic-based adaptive controller with Virtual Synchronous Generator (VSG) technology, the proposed method enables dynamic, coordinated, and intelligent adjustment of the key virtual parameters—inertia and damping. The design explicitly incorporates practical constraints arising from energy storage system limitations and grid stability requirements, ensuring feasible and reliable operation.
The implementation on a three-level Neutral-Point-Clamped (NPC) inverter topology further enhances the solution by delivering superior output power quality with extremely low harmonic distortion. Comprehensive simulation studies validate the superiority of the proposed fuzzy adaptive VSG (FA-VSG) control over both fixed-parameter and conventional adaptive VSG methods. The FA-VSG-controlled on grid inverter demonstrates significantly improved dynamic performance: it minimizes frequency and power overshoots, reduces settling time, and provides robust support during power transients. This research contributes a viable and high-performance control framework for the next generation of intelligent, grid-forming on grid inverters essential for the stable integration of high-penetration renewable energy sources.
