Skip to main content
  • Original research
  • Open access
  • Published:

“Adaptive virtual synchronous generator control using optimized bang-bang for Islanded microgrid stability improvement”


In this paper, a virtual synchronous generator (VSG) controller is applied to a hybrid energy storage system (HESS) containing a battery energy storage system and supercapacitor storage system for maintaining the frequency stability of an isolated microgrid. The microgrid contains a photovoltaic generation system and a diesel generator in addition to the HESS and two constant impedance loads that are fed through a medium voltage radial feeding system. The adaptive virtual inertia constant (H) with constant virtual damping coefficient (D) based on ‘ bang-bang’ control for the microgrid’s frequency stability enhancement is investigated and compared with the constant parameter VSG. In addition, the bang-bang control is modified to adapt the D beside the adaptive H, and the system response is investigated and compared with the conventional adaptive H technique. The VSG parameters are evaluated based on two different methods. The first is a computational method based on the simplified small signal stability analysis, while the other is based on an optimization method using two different objective functions and the particle swarm optimization technique. This paper also investigates the superiority of the proposed technique compared to other techniques in enhancing frequency stability, accelerating steady-state frequency restoration, and reducing the energy requirement of the HESS. The required power from the HESS is shared between the two energy storages using the low pass filter technique so as to reduce battery peak current.

1 Introduction

Because of the growing demand for energy and corresponding greenhouse gas emissions, which accelerate global warming, expanding the applications of renewable energy sources (RES) in electricity generation has become more attractive. The International Energy Agency 2021 report states that the carbon dioxide produced during the burning of fossil fuels has increased by 217.4% during the period from 1973 to 2019 [1]. Microgrids can merge the different RES with different energy storage technologies and the conventional generation units to be treated as a single cluster, supplying different local loads either in conjunction with the power grid (grid-connected mode) or independently from the power grid (islanded mode). In addition to increased supply reliability, the local integration of load and generation decreases transmission losses and installations. In addition, microgrids promote investment in small and medium-scale RES. All these merits make microgrids more attractive for increasing RES. However, increased RES in the microgrid raises stability issues [2,3,4,5], which are caused by the sporadic nature of the RES and its zero inertial response, especially when supplying its maximum power. Moreover, microgrid sensitivity to generation outages increases [6].

The virtual synchronous generator (VSG) technique for controlling energy storage systems (ESS) has been used in recent studies to support the frequency stability of low-inertial networks [7]. The VSG can provide synchronous generator capabilities, including dispatchable active and reactive power through droop control loops, rotor inertial response, and terminal voltage regulation. A single ESS controlled by a VSG controller is introduced in [6, 8], whereas [8] proposes superconducting magnetic energy storage (SMES) controlled by a VSG to enhance the frequency response of the low-inertia power grid. The VSG is integrated with the conventional PI to control an SMES, enhancing the low-inertia isolated microgrid in [9], while in [10], a supercapacitor (SC) is integrated into the DC link of a PV system to provide virtual inertia control and support the microgrid frequency. However, SMES and SC are classified as high-power density ESS that cannot meet the high energy requirement of the droop control in the VSG control strategy. Since it is difficult for a single energy storage technology to accommodate the high power requirement of the inertial response of a VSG and the high energy requirements of the VSG droop control at the same time, the hybridization of two different ESS technologies into a hybrid energy storage system (HESS) has been introduced in several studies. Looking at different combinations of the ESS technologies employed for HESS, HESS containing a battery energy storage system (BESS) with the supercapacitor storage system (SCSS) has been addressed in many studies [11,12,13,14]. In [11], the power fluctuations of a grid-connected solar system are accommodated using a BESS/SCSS HESS controlled via a VSG, and the performance of the system is evaluated using various values of the VSG inertia constant. In [14], a VSG is used on the BESS and SCSS to improve the frequency stability of a PV/diesel-isolated microgrid against the intermittent nature of the PV output power. However, in [14], the VSG parameters are set from previous experience with a conventional synchronous generator based on simplified small-signal stability. In [15], the particle swarm optimization (PSO) technique with a multi-objective function is proposed to set the inertia constant and virtual damping of the VSG control. In [14, 15], the low-pass filter approach is used to share the required power of a HESS, while another sharing method is proposed in [16] using a PSO-optimized fuzzy controller. As the VSG control parameters consisting of the virtual inertia constant (H) and virtual damping coefficient (D) have a great effect on frequency stability, [14, 17] investigate the VSG parameter variation effect on the frequency response.

Conventional synchronous generators cannot adjust their parameters, whereas the VSG control does have that flexibility. The adapted VSG has been studied using different approaches [18,19,20,21,22,23,24,25,26]. In [18], a self-tuned VSG (ST-VSG) controls an ESS to improve the frequency stability of a wind/diesel microgrid. In a ST-VSG, through an online optimization technique with a weighted sum multi-objective function that includes quadratic terms, the VSG parameters are continuously tuned. However, the ESS nature and dynamics are not considered. Online optimization is addressed in [19], in which a VSG-controlled HESS consisting of a BESS and SCSS is employed to mitigate the fluctuation in PV power in an isolated PV/diesel microgrid while stabilizing the microgrid frequency. Using a backtracking search optimization algorithm to optimize the VSG parameters by minimizing the integral square error, online optimization is implemented to update the VSG parameters. It also examines the superiority of this adapting approach over the constant parameter approach on the frequency response. However, the online optimization approach requires a high computational burden. One of the VSG parameter-adapting approaches is the self-adaptive inertia and damping combination control (SAIDC) that has been used to adjust the virtual inertia and damping of the VSG control through specific criteria [20]. The adjusting function changes the virtual inertia value H depending on the instantaneous value of the frequency deviation and the virtual damping coefficient D depending on the rate of change of frequency (ROCOF). In [20], the SAIDC control is implemented on a single VSG connected to a single load, and the performance is compared with the CP-VSG approach. On the other side, fuzzy logic is used for virtual inertia adaptation [21, 22]. In [21], the fuzzy logic adjusts the virtual inertia parameter of the VSG depending on the frequency deviation and ROCOF, while in [22], the fuzzy rule uses the frequency deviation beside the power change of the RES to vary the virtual inertia, neglecting the ROCOF parameter. [21, 22] show how the fuzzy technique outperforms the CP-VSG with improved frequency response. However, there is no technique for determining the numerical value of inertia. A switched parameter technique based on bang-bang control is used in [23], in which the bang-bang approach is used for adapting the virtual inertia H while the virtual damping D is kept at a constant value. In the bang-bang approach, the adapted parameter is switched between two different values. In addition, the adapted inertia-based VSG is used to control an ESS to improve the transient stability of a grid-connected PV generation system [25]. As well as the adapted virtual inertia, the damping coefficient is also adapted and the parameters' effect on the frequency of the grid-connected VSG is analyzed [24]. However, no mechanism for determining the virtual inertia's maximum and minimum values is provided in [23,24,25]. In [26], an improved bang-bang is introduced, and an arithmetic setting mechanism based on a simplified small signal stability analysis (SSSA) of the VSG control loop is mentioned for determining the virtual inertia limits, where the bang-bang-adapted virtual inertia of the VSG (BB-AH-based VSG) is implemented on an ESS to improve the stability of an isolated microgrid. However, the ESS is represented as a constant DC source, neglecting the dynamics of the ESS. In addition, the simplified SSSA neglects the dynamics of the interfacing converter, line impedance, and the interaction with other elements of the microgrid, while assuming the active and reactive power are decoupled.

The adapted VSG-based HESS technique is used to improve the frequency stability of low-inertial-response microgrids with a high penetration of RES in this paper. Setting the adapted parameters is a delicate process that must protect the microgrid from the slow frequency restoration process and the consequences of a HESS's excessive energy requirement. The main contributions of this study are:

  • The bang-bang adapting virtual inertia (BB-AH) is implemented on a VSG, which controls an HESS consisting of a BESS and SCSS to improve the stability of the PV/diesel microgrid. A small-signal analysis-based mathematical approach (MA) evaluates the inertia limits of the bang-bang control [26], while the damping constant is maintained at a constant value that is optimized using PSO.

  • An optimized bang-bang control is proposed for simultaneously adapting the inertia and damping (OBB-AHD) of the VSG. In the approach, the optimization is used to evaluate the inertia and damping limits instead of a mathematical approach based on the simplified analysis for the VSG control loop. The proposed control is used to lower the integration time absolute frequency error (ITAE) and ROCOF, achieve a better frequency nadir, and reduce the frequency restoration time.

  • The microgrid frequency responses under different adaptive controllers (BB-AH and OBB-AHD) are compared with the constant parameter-based VSG (CP-VSG) that uses typical values of the conventional synchronous generator [14].

  • The system is exposed to different disturbances, such as load and solar variations. Also, the system is subjected to severe disturbances, such as generation unit outages, to ensure system stability under such kinds of disturbances.

  • The superiority of the proposed OBB-AHD-VSG control strategy to enhance the frequency stability response is demonstrated, especially regarding the nadir and ROCOF over the two CP-VSG as well as BB-AH-VSG.

  • The effectiveness of the proposed OBB-AHD-VSG control strategy in reducing the restoration time and related energy requirement of the HESS when compared to BB-AH is demonstrated.

The remainder of the paper is arranged as follows: Sect. 2 describes the PV-diesel-HESS microgrid and its modelling in detail, while Sect. 3 illustrates the two compared adapting approaches of the BB-AH and BB-AHD. The adapting limits evaluated through two different techniques are illustrated in Sect. 4. Section 5 deals with the time domain simulations using a MATLAB model and spotlights the important results and curves, while Sect. 6 provides a summary of all results. Conclusions are drawn in Sect. 7.

2 System description

The proposed system comprises a 1.5 MW PV generation unit (PVG), and a 2.4 kV, 3.125 MVA rated diesel generator unit (DG) to form an isolated microgrid. The DG and PVG supply two different loads (a total of 2.5 MW) via a radial medium voltage distribution system, as shown in Fig. 1. To enhance the microgrid stability, a lead-acid battery is combined with a supercapacitor in the form of a HESS. The proposed configuration is similar to a practical islanded microgrid installed at Fort Carson (2 MW PV, 3.25 MW Diesel, 2.1 MW Load, and an electric vehicle to enhance the microgrid operation) [27, 28]. The system data are given in Table 3 in the Appendix.

Fig. 1
figure 1

Proposed microgrid

2.1 PV system

As shown in Fig. 1, a 0.5-km feeder connects the PVG to the point of common coupling (PCC). The PVG is made up of several PV modules that are connected in series and parallel, and it feeds the microgrid via a voltage source inverter (VSI). The PVG's VSI is adjusted to supply its maximum power when solar irradiance fluctuates. An LCL filter is used to filter the VSI output [29], while a passively damped LCL filter is sized and employed in this work [15].

2.2 Diesel generator

A diesel engine and a synchronous generator (SG) comprise the diesel generation system. The diesel engine drives the SG with its governor, which is controlled to regulate the active power. The governor’s main goal is to control the diesel engine's output power by raising or lowering the SG's mechanical power to respond to the discrepancy between electrical and mechanical power. Equation (1) describes the per-unit swing equation, which explains the mechanical dynamics of the synchronous generator rotor [30]. A Woodward diesel engine that is isochronously controlled [31] is used in this study.

$${P}_{m}-{P}_{e}-D({\omega }_{m}-{\omega }_{e})=2H\frac{d{\omega }_{m}}{dt}$$

where \({\omega }_{m}\) and \({\omega }_{e}\) are the rotational and synchronous speeds, respectively, while \({P}_{m}\) and \({P}_{e}\) are the drive mechanical power and output electric power, respectively. \(H\) and \(D\) are the respective system inertia and damping factors.

The per-unit change in rotor speed (Δ⍵) is measured and transmitted to an electrical control box, which generates a valve/gate position actuation signal to the Woodward diesel engine control system to adjust the generator input mechanical power (Pm_D), as shown in Fig. 2. The terminal voltage of the armature winding of the SG is controlled through the current of the field winding using a dedicated excitation system. There are different types of excitation systems, while the AC1A excitation system is applied here, whose block diagram can be found in [32].

Fig. 2
figure 2

Woodward diesel engine control system

2.3 Hybrid energy storage system control

The proposed HESS comprises a battery and a supercapacitor. Each device is controlled by a dedicated DC/DC converter, and the two DC/DC converters are connected to a common DC bus. The HESS is connected to the system bus through a voltage source converter, which is controlled to imitate the performance of the actual synchronous generators through VSG control, as shown in Fig. 3.

Fig. 3
figure 3

Control strategy of HESS

Similar to conventional generators, the VSG is capable of providing voltage and frequency support. The frequency support is performed by imitating the swing equation of the conventional synchronous generator, as given in (1). The values of the inertia constant and damping factor \((H and D)\) are determined using three different strategies, as will be explained later. To make the HESS act similarly to conventional generators, a governor droop control is inserted as a primary frequency control stage. This controls the mechanical input power of the VSG as given by:

$${P}_{m}=-\frac{1}{R}\left({\omega }_{m}-{\omega }_{ref}\right)+{P}_{ref}$$

where \({P}_{m} and {P}_{ref}\) are the governor output mechanical power and the reference power at the reference speed \({\omega }_{ref}\), respectively. \({\omega }_{m}\) and \(R\) are the speed of the synchronous generator and the speed regulation of the governor.

The PCC voltage is regulated as illustrated by the voltage control loop in Fig. 3 and is given as:


where \({V}_{pcc} and {V}_{ref}\) are the PCC voltage and reference voltage of the VSG, respectively, while \({Q}_{e}, and {Q}_{ref}\) are the respective delivered and desired reactive power of the VSG. \({D}_{v} {and K}_{v}\) are the voltage droop factor and voltage constant of the proposed VSG.

The DC link voltage is regulated by controlling the charging and discharging of the battery and supercapacitor. The DC voltage control mechanism comprises the outer control loop (voltage control) and two inner control loops (current control). The outer loop has a PI controller, which is intended to eliminate the error in the DC link voltage and to provide the total reference current of the HESS. To make the supercapacitor respond to fast changes and the battery to slow changes, a low-pass filter (LPF) is used. The low-frequency current component is used as a reference for the battery current control loop, while the higher-frequency component is used as a reference for the supercapacitor current loop, as shown in Fig. 3.

3 Adapting control strategy

As shown in Fig. 4, when the microgrid is subjected to disturbances that cause an imbalance between the generated and consumed power, its frequency deviates from its steady-state value. When the value of the microgrid frequency deviates beyond the permissible steady-state frequency deviation \(\Delta {\omega }_{ss}\) and approaches its nadir value, this time interval is referred to as the acceleration period. Because of the interaction of the governor control, the frequency starts to restore its steady-state value after the disturbance, and this time interval is referred to as the deceleration period. The disturbance period is the combination of the acceleration and deceleration periods, whereas the steady-state period is the time interval during which the frequency deviation does not exceed the steady-state frequency deviation limit \(\Delta {\omega }_{ss}\).

Fig. 4
figure 4

Frequency response during the disturbance

In this section, two adapting control strategies for the VSG parameters based on the bang-bang technique are described. The first technique is developed to adapt the parameter H between the minimum and maximum limits during the microgrid disturbance, with H maintained at a steady-state value during the steady-state period, whereas the parameter D is maintained constant all the time [26]. During the disturbance period, the value of H is set equal to its maximum limit during the acceleration interval to maintain the lowest frequency deviation, while it is set to its minimum limit during the deceleration period to ensure that the frequency is restored to its steady state in the shortest time possible.

3.1 Bang-bang adapting inertia control strategy

The grid frequency is exposed to a deviation “\(\left|\Delta\upomega \right|\)” from its rated value to a higher value in the case of decreasing the load or increasing the generation, or to a lower value because of load increase or generation decrease. During the first period, the rate of change of the frequency deviation “\(\mathrm{d}\left|\Delta\upomega \right|\)/\(\mathrm{dT}\)” is accelerated towards the nadir value. During the second period, the frequency deviation is decelerated towards its steady-state value. In the bang-bang control strategy, the virtual inertia is switched between two fixed limits. The lowest inertia limit is used during the deceleration period to reduce the steady-state frequency restoration time, while the maximum inertia limit is used during the acceleration period to minimize the frequency nadir and ROCOF. The adapted inertia based on the bang-bang control strategy is governed by [26]:

$$H=\left\{\begin{array}{c}{H}_{max}, \left|\Delta \omega \right|>\left|\Delta {\omega }_{ss}\right|\cap \frac{d\left|\Delta \omega \right|}{dT}>0 \;acceleration\\ {H}_{ss} , \left|\Delta \omega \right|\le \left|\Delta {\omega }_{ss}\right| steady-state\\ {H}_{min } , \left|\Delta \omega \right|>\left|\Delta {\omega }_{ss}\right|\cap \frac{d\left|\Delta \omega \right|}{dT}<0 \;deceleration\end{array}\right.$$

where \({\mathrm{H}}_{\mathrm{max}}\) and \({\mathrm{H}}_{\mathrm{min}}\) are the inertia limits, \(\left|\Delta {\upomega }_{\mathrm{ss}}\right|\) is the steady-state allowable frequency deviation, and \({\mathrm{H}}_{\mathrm{ss}}\) is the steady-state virtual inertia constant.

3.2 Bang-bang adapting inertia and damping control strategy

We developed the D & H bang-bang control strategy to adapt the virtual inertia and the virtual damping of the VSG to achieve the best nadir and ROCOF along with improved time response. The PSO technique is used to detect switched limits of the D and H. The virtual inertia and damping parameters are set at their maximum limits during the acceleration period, whereas during the deceleration period, the VSG parameters are switched to their minimum limits. The deceleration and acceleration periods are determined by the sign of the mechanical frequency deviation from the rated value. To avoid distortion due to the derivative of the mechanical frequency deviation signal, the mechanical frequency deviation signal is filtered using a low-pass filter. Equations (5) and (6) represent the switched virtual damping and inertia parameters of the VSG based on the sign of the filtered mechanical frequency deviation signal modulus that is represented in (7).

$$D=\left\{\begin{array}{c}{D}_{max}, \frac{d\left|{\Delta \omega }_{LPF}\right|}{dT}\ge 0 \;acceleration\\ \\ {D}_{min }, \frac{d\left|{\Delta \omega }_{LPF}\right|}{dT}<0 \;deceleration\end{array}\right.$$
$$H=\left\{\begin{array}{c}{H}_{max}, \frac{d\left|{\Delta \omega }_{LPF}\right|}{dT}\ge 0 \;acceleration\\ \\ {H}_{min } , \frac{d\left|{\Delta \omega }_{LPF}\right|}{dT}<0 \;deceleration\end{array}\right.$$
$${\Delta \omega }_{LPF}=\frac{1}{1+TS}\left|{\omega }_{m}-{\omega }_{r}\right|$$

where \({\Delta\upomega }_{\mathrm{LPF}}\) is the filtered VSG mechanical frequency deviation signal modulus, \({\upomega }_{\mathrm{r}}\) is the rated frequency, and T is the bang-bang control low pass filter time constant.

4 Adaptive VSG parameter evaluation technique

In this section, the adaptive VSG parameters are evaluated using two different techniques. The first technique is the mathematical approach (MA), introduced in [26], which uses the simplified SSSA of the active power loop of the VSG to find the range of the adaptive H in BB-AH. The optimization approach is the other mechanism that is proposed for evaluating the adapting range of the OBB-AHD control approach.

4.1 Mathematical approach

Small-signal stability analysis is used in [26] to develop a computational method to detect the inertia limits of the bang-bang control. The small-signal model of the VSG control loop shown in Fig. 5 is built from the equation of the output electrical power of the VSG (\({P}_{e}\)) and the swing equation. By using the vector diagram shown in Fig. 6, the received power between two points in the power system can be expressed using (8), while if the resistance of the feeder linking the buses is neglected, the output electrical active power of the VSG (\({P}_{e}\)) can be approximated using (9).

$$P=\frac{{V}_{1}{V}_{2} R\mathrm{cos}\delta +{V}_{1}{V}_{2}\mathrm{ X sin}\delta -{{V}_{2}}^{2}R}{{X}^{2}+{R}^{2}}$$
$${P}_{e}\approx \frac{{V}_{1}{V}_{2}\mathrm{sin}\delta }{{X}_{1}}$$

where \({V}_{1}\) is the sending voltage, \({V}_{2}\) is the receiving voltage, \(R\) is the line resistance, \(\mathrm{X}\) is the line reactance, \(P\) is the received power, and \(\delta\) is the phase shift between the bus voltage and the VSG converter output voltage.

Fig. 5
figure 5

Proposed OBB-AHD-based Bang-Bang controller blocking diagram

Fig. 6
figure 6

Phasor diagram of transferred power on the power system

By applying the small-signal derivative, stated in (10), to the VSG output electric power in (9), Eqs. (11) and (12) are obtained.

$${\Delta P}_{e}=\frac{{\partial P}_{e}}{\partial \delta }\Delta \delta$$
$${\Delta P}_{e}=\frac{EV\mathrm{cos}{\delta }_{o}}{{X}_{1}}\Delta \delta ={C}_{P}\Delta \delta$$
$${C}_{P}=\frac{EV\mathrm{cos}{\delta }_{o}}{{X}_{1}}$$

In the synchronous machine, the mechanical power angle is the angle between the rotor position and stator magnetic flux, which can be obtained as:

$${\omega }_{m}-{\omega }_{sm}=\frac{d{\delta }_{m}}{dt}$$

A small perturbation is expressed as:

$${\Delta \omega }_{m}-\Delta {\omega }_{sm}=\frac{d\Delta {\delta }_{m}}{dt}$$

For a per unit calculation, Eq. (14) is divided by the rated mechanical angular speed \({\omega }_{rm}\) as:

$$\frac{{\Delta \omega }_{m}}{{\omega }_{rm}}-\frac{\Delta {\omega }_{sm}}{{\omega }_{rm}}=\frac{1}{{\omega }_{rm}}\frac{d\Delta {\delta }_{m}}{dt}$$

The mechanical rotor angle and electrical power angle are related according to the number of poles as given in (16). The same equation is valid for electrical and mechanical speed as shown in (17), while (18) can be obtained from (16).

$$\Delta {\delta }_{m}=\frac{P}{2}\Delta \delta$$
$${\omega }_{sm}=\frac{2}{P}{\omega }_{s}$$
$$\frac{d\Delta {\delta }_{m}}{dt}=\frac{P}{2}\frac{d\Delta \delta }{dt}$$

Substituting (18) and (17) into (15) yields:

$$\frac{{\Delta \omega }_{m}}{{\omega }_{rm}}-\frac{\Delta {\omega }_{sm}}{{\omega }_{rm}}=\frac{1}{{\omega }_{sm}}\frac{d\Delta {\delta }_{m}}{dt}=\frac{1}{{\omega }_{sm}}\frac{P}{2}\frac{d\Delta \delta }{dt}=\frac{1}{{\omega }_{s}}\frac{d\Delta \delta }{dt}$$

The power angle related to per unit speed variation is obtained by integrating (19), as:

$$\Delta \delta ={\omega }_{s}\int \left(\frac{{\Delta \omega }_{m}}{{\omega }_{rm}}-\frac{\Delta {\omega }_{sm}}{{\omega }_{rm}}\right)dt$$

The block diagram of the virtual synchronous generator is given in Fig. 7. The closed-loop transfer function of the VSG active power control loop, the damping ratio, natural frequency, and settling time can be obtained as:

Fig. 7
figure 7

Active power control loop of VSG

$$\frac{\Delta {P}_{e}}{\Delta {P}_{m}}=\frac{{C}_{P}{\omega }_{r}}{2H{S}^{2}+DS+{C}_{P}{\omega }_{r}}$$
$$\zeta =D\sqrt{\frac{1}{8H{C}_{P}{\omega }_{r}}}$$
$${\omega }_{n}=\sqrt{\frac{{C}_{P}{\omega }_{r}}{2H}}$$
$${t}_{p}=\frac{4.4}{\zeta {\omega }_{n}}$$

While the virtual damping is maintained constant, the adapted virtual inertia limits are calculated in [26] using the small-signal stability analysis in conjunction with two governing criteria. The first criterion is that the system shall be underdamped [\(0<\upzeta <1\)] for faster frequency response. The second criterion is a settling time of under one second, i.e., \({\mathrm{t}}_{\mathrm{p}}<1\mathrm{ s}\).

For \(0<\upzeta <1\) and by using (22), we can obtain:

$$0<D\sqrt{\frac{1}{8H{C}_{P}{\omega }_{r}}}<1$$
$$H>\frac{{D}^{2}}{8 {C}_{P} . {\omega }_{r}}$$

The required control loop settling time of \({\mathrm{t}}_{\mathrm{p}}<{t}_{p}^{*}\), needs to be satisfied, i.e.:

$$\frac{4.4}{\zeta {\omega }_{n}}<{t}_{p}^{*}$$

By using (22) and (23) for \(\zeta\) and \({\omega }_{n}\) in (28), Eq. (29) is obtained. From the reduction of (29), as stated in (30) and (31), the inertia shall not exceed a calculated value using (32).

$$\frac{4.4}{D\sqrt{\frac{1}{8H{C}_{P}{\omega }_{r}}}\sqrt{\frac{{C}_{P}{\omega }_{r}}{2H}}}<{t}_{p}^{*}$$
$$\frac{4.4}{D\sqrt{\frac{1}{16}} \frac{1}{H}}<{t}_{p}^{*}$$

From (27) and (32), the maximum and minimum values of inertia constant are given by (33) and (34), respectively. The steady-state value of the inertia is selected midway between the minimum and maximum inertia and given by (35).

$${H}_{max}=\frac{{t}_{p}^{*} . D}{17.6}$$
$${H}_{min}=\frac{{D}^{2}}{8 {C}_{P} . {\omega }_{r}}$$

Reference [26] does not provide the tuning criteria for the damping ratio. For a stable system, the value of \(\mathrm{D}\) shall be greater than zero, as given by (26). However, Eqs. (33) and (34) show that if the damping is doubled, the minimum required inertia will increase four times while the maximum value will increase only two times. Therefore, increasing the required damping above a certain limit may cause the system to fail to satisfy the requirements when the minimum value of the inertia constant becomes greater than the permissible maximum inertia. Therefore, to avoid this condition, the value of the damping coefficient shall satisfy (36) and (37), while the bounded value of the damping coefficient is given by (38).

$$\frac{{D}^{2}}{8 {C}_{P} . {\omega }_{r}}<\frac{{t}_{p}^{*} . D}{17.6}$$
$$D<\frac{{{C}_{P} . {\omega }_{r}t}_{p}^{*} . }{2.2}$$

This methodology does not state a way to set a specific value for the damping coefficient. In addition, this computational method is based mainly on the simplified SSSA, which assumes decoupled active and reactive power control loops while neglecting the interaction with any other grid-forming elements on the grid and the line impedance dynamics. By applying the previous criteria to the studied system, the VSG can be obtained, as shown in Table 1.

Table 1 Different Bang-Bang techniques

4.2 Optimization evaluation technique

Considering the nonlinearity of the microgrid system, the coupling of active and reactive power control loops, the interaction with the other grid-forming elements, diesel AVR action, the line impedance dynamics, and system nonlinearities, a metaheuristic approach is used for effective VSG parameter detection. Several metaheuristic techniques can be used, such as PSO, GA, and NSGA-II. They have different operating mechanisms. These metaheuristic techniques can be used to optimize linear and nonlinear systems and do not require any additional information about the objective function other than its value. Furthermore, PSO provides several advantages, including simplicity and ease of implementation, robust technique, low computational process, low memory requirements, and not require high CPU speed [33].

While the frequency stability can be maintained after the disturbances through decreasing post-disturbance frequency nadir and ROCOF, faster steady-state frequency restoration is desired. The absolute values of the maximum experienced nadir and ROCOF of the PCC frequency after the disturbance can be expressed as:


where fpcc is the measured frequency at PCC and fr is the rated frequency of the microgrid. The ROCOF is calculated over a 500 ms sliding time interval.

This approach uses two objective functions to evaluate the \(D\) and \(H\) limits. The first one includes the ITAE calculated in (41) that can ensure fast restoration for a stable post-disturbance frequency, as stated in (42) [15]. The ITAE-based optimized VSG parameters are used at the minimum limits of bang-bang. Another multi-objective function, given in (43) [15], that combines minimum nadir, ROCOF, and ITAE is used to optimize the \(D\) and \(H\) that are used as the maximum limit of the bang-bang, achieving the best performance during the acceleration period. While (41) is used for the first objective function as expressed in (42), a combination of (3941) can be used as the second objective function as expressed in (41).

$${F}_{3}\left(H,D\right)=\int t . \left|{f}_{pcc}-{f}_{r}\right|dt$$

A detailed flowchart for the proposed OBB-AHD-based VSG is illustrated in Fig. 8. As shown, the evaluation technique uses offline optimization to evaluate the range of the adapted parameters of the VSG. After that, the optimal limits produced from the evaluation stage are implemented for the AHD-VSG to ensure the superiority of the proposed technique in improving the frequency stability of the isolated microgrid compared to CP and AH techniques.

Fig. 8
figure 8

Flowchart of the proposed control algorithm and parameter evaluation technique

5 Time-domain simulation cases

The studied microgrid is subjected to different disturbances to investigate the effect of three different VSG strategies on the frequency response of the microgrid. The constant parameter (CP) strategy uses typical VSG parameter values, as stated in [14]. AH-BB includes the VSG with bang-bang-based adaptive H with constant D, as stated in [26] and using (4). In this strategy, the inertia limits are determined using the simplified SSSA-based MA, as stated in Sect. 4.1 and using (3032) [26], while the value of \(D\) is optimized using (43). In the OBB-AHD, the bang-bang control is used for adapting both VSG parameters \(D\) and \(H\) simultaneously using (57), and their limits are determined using the OA, as illustrated in Sect. 4.2, and the two objective functions (42) and (43). The three compared controlling strategies are summarized in Table 1. The microgrid disturbances include load variation (either increment or decrement), solar variation, solar system disconnection, and connection. The performance of the microgrid frequency is evaluated through four parameters derived from the measured frequency at the PCC, including the frequency nadir, ROCOF, ITAE of the post-disturbance period, and the time of steady-state frequency restoration. In addition, the HESS energy requirement is noted under the three strategies. The studied microgrid is simulated using the blocks of a diesel generator, PV, battery, and supercapacitor from MATLAB’s library on the Simulink tool, which has proven its effectiveness for accurately simulating system behavior in the literature. The results are recorded and investigated in the following subsections.

5.1 Scenario-1 load increment disturbance

The load is varied at 10 s by adding additional load to the microgrid with different VSG strategies. The PCC frequency is measured and recorded with the three control strategies listed in Table 1. Because of load variation, a power imbalance in the microgrid arises. Because of the delayed action of the governor control, a power imbalance on the synchronous generator shaft arises that is compensated by the inertial response of the generator, causing the speed of the shaft to deviate from its steady-state value transiently. In the meantime, the VSG responds to the frequency deviation, supporting the frequency stability of the microgrid.

The load is increased by adding 500 kW to load-1. Figure 9 shows the measured frequency at the PCC in the three control strategies. As shown, the CP-based VSG has the worst nadir and ROCOF of the strategies, although its frequency restoration time is shorter. Under that controlling strategy, the observed nadir, ROCOF, ITAE, and restoration time are 49.868 Hz, 0.2599 Hz/s, 2.3933 Hz.s2, and 4.2 s, respectively. Usage of the AH-BB strategy improves the frequency nadir and ROCOF compared to the CP strategy while increasing the ITAE and the restoration time to 2.5339 Hz.s2 and 6.5 s. Whereas, the OBB-AHD strategy can reduce the nadir, ROCOF, ITAE, and restoration time significantly to 49.921 Hz, 0.1167 Hz/s, 2.4538 Hz.s2, and 4.43 s, respectively.

Fig. 9
figure 9

PCC frequency curves during load-increasing disturbance with different VSG strategies

Figure 10 shows the HESS power (PHESS) requirements in the different controller strategies used. Regarding the power and energy requirement of the HESS and compared to other strategies, the CP reduces the energy required from the HESS, while the OBB-AHD lowers the HESS energy to 0.69 MJ compared to 0.85 MJ for AH-BB, representing a reduction of 19%.

Fig. 10
figure 10

HESS power curves during load-increasing disturbance with different VSG strategies

Figure 11 displays the output power of each connected component to the microgrid in the case of the proposed control strategy. The load power (PL) is increased from 2 to 2.5 MW at 10 s, while the PV output power (PPV) remains constant. The HESS and the DG are responsible for restoring the power balance between the generated and demanded power. This power balance is restored by the inertial response of both the DG and HESS controlled by the OBB-AHD-based VSG controller. Consequently, the output power of the HESS (PHESS) and the diesel generator (PSG) are increased to accommodate the increased load power. Because of the droop controller interaction with the diesel governor that is isochronously controlled, the HESS interacts with the transient power only, while the generator is responsible for restoring the steady-state frequency at its rated value. Consequently, the diesel output power is increased to 1 MW to wholly supply the increased demand in a steady-state period, as shown in Fig. 11. Figure 12 shows the DC power outputs of the battery (PBat) and supercapacitor (PSC), and the SOCs of the battery (SOCBat) and supercapacitor (SOCSC) using the ADH-OB strategy. While the SCSS supplies fast-change power, the battery supplies more smooth power that can increase its life span.

Fig. 11
figure 11

Power curves of microgrid elements under ADH-OBB during the load-increasing disturbance

Fig. 12
figure 12

DC power curves of HESS elements and their SOCs under ADH-OBB during the load-increasing disturbance

5.2 Scenario-2 load decrement disturbance

In this scenario, a 0.5 MW load is disconnected, decreasing the microgrid demand and creating a power imbalance due to excessive generation compared to the connected demand. The frequency responses on the microgrid using the three control strategies are shown in Fig. 13. The results show that the CP controller records the highest nadir and ROCOF of 50.132 Hz and 0.2591 Hz/s of the three control strategies. However, its steady-state restoration process is faster than the others. Hence, the ITAE and the restoration time using the CP controller are less than those of the other strategies. Using the AH-BB control strategy, the frequency nadir and the ROCOF are improved when compared to the CP, but the ITAE and restoration time are increased to 2.5243 Hz.s2 and 6.8 s, respectively. Compared to the other techniques, usage of the proposed control technique leads to significant improvements in the frequency nadir, ROCOF, ITAE, and restoration time, with respective recorded values of 50.087 Hz, 0.1162 Hz/s, 2.4676 Hz.s2, and 4.47 s. In addition, the HESS power and energy requirements for the three control techniques can be seen in Fig. 14. The power and energy supplied from the HESS are the lowest in the CP strategy, whereas the proposed strategy reduces the energy requirement over the AH-BB strategy because of the smaller restoration time.

Fig. 13
figure 13

PCC frequency curves during the load-decreasing disturbance with different strategies

Fig. 14
figure 14

HESS power curves during the load-decreasing disturbance with different strategies

Figure 15 describes the demand, delivered PV, the delivered DG powers, and the injected/absorbed HESS power. The PV power remains constant at 1.5 MW while the load power decreases because of the disconnect of the 0.5 MW load. Hence, the total demand decreases from 2.5 to 2 MW at 10 s, compensated by diesel inertia, causing a frequency increment. The HESS controlled by the VSG responds to this frequency increment by absorbing the excess generated power and limiting the frequency increment. After that, the HESS power reduces to zero during the rated frequency restoration period. The isochronous diesel governor interacts with the frequency deviation, restoring the rated frequency. Figure 16 shows the DC output power of both storage elements and their SOCs in the case of the proposed strategy, showing the power-sharing between the two storages. Because of the low-pass filter technique, the battery absorbs smooth power with a reduced peak value.

Fig. 15
figure 15

Power curves of microgrid elements under ADH-OBB during the load-decreasing disturbance

Fig. 16
figure 16

DC power curves of HESS elements and their SOCs under ADH-OBB during the load-decreasing disturbance

5.3 Scenario-3 solar irradiance decreasing disturbance

The PVG is controlled by the MPPT approach to supply the maximum power proportional to the solar irradiance. Therefore, a sudden change in the solar irradiance intensity leads to a change in the generated power from the PVG, creating a power imbalance between the generated and demand power. This power imbalance is compensated instantaneously through the inertial response of the DG, the rapid response of the HESS controlled by the VSG, and finally, the delayed response of the DG governor.

This scenario includes the PVG power variation by decreasing the irradiance intensity by 20% at 10 s to 0.8 KW/m2 from its initial value of 1 KW/m2. The frequency response of the compared control approaches is illustrated in Fig. 17, while Fig. 18 compares the HESS power curve of each control approach to show the power/energy requirements of the HESS with the different control strategies. Compared to other strategies, the CP strategy records the worst nadir and highest ROCOF of 49.91 Hz and 0.1731 Hz/s, respectively. However, it has the lowest restoration time and lowest ITAE of 3.72 s and 1.5721 Hz.s2, respectively, in addition to the lowest power and energy requirements of the HESS. Compared to the CP strategy, the AH-BB control technique improves the frequency nadir and ROCOF to 49.927 Hz and 0.1033 Hz/s, respectively, though the speed of the steady-state frequency restoration becomes lower, with the restoration time and ITAE increased to 5.7 s and 1.6339 Hz.s2, respectively. Furthermore, the HESS energy requirement is increased because of the longer restoration time. The proposed OBB-AHD technique improves the frequency nadir to its best value of around 49.93 Hz and lowers the ROCOF over the AH strategy to 0.0773 Hz/s while decreasing the restoration time and related ITAE compared to the AH technique to 3.99 s and 1.587 Hz.s2, respectively. In addition, compared to the AH strategy, the proposed technique effectively decreases the energy requirement of the HESS during the disturbance to 0.438 MJ by a decrement ratio of 19.3%.

Fig. 17
figure 17

PCC frequency curves during solar irradiance reducing disturbance with different strategies

Fig. 18
figure 18

HESS power curves during solar irradiance reducing disturbance with different strategies

The generated and demand power of the microgrid in the presence of the OBB-AHD strategy are illustrated in Fig. 19 which shows a constant load power curve, while the PVG power curve is reduced at 10 s from 1.5 to 1.2 MW because of solar irradiance reduction. The sudden shortage of the generated power is compensated transiently through the response of the VSG by releasing the stored energy in the HESS and the inertial response of the DG from the stored energy in the rotating shaft, allowing a transient frequency deviation from its rated value until the delayed isochronous governor control interacts. As shown in Fig. 20, using the LPF technique for power-sharing between the HESS elements, the SCSS is used to support the highly oscillated part of the HESS power, reducing the peak power requirement of the BESS and its rate of change of power. As a result, the BESS stress is reduced and its life span is extended. Also, the SOC of each element of the HESS can be seen in Fig. 20.

Fig. 19
figure 19

Power curves of microgrid elements under ADH-OBB during solar irradiance reducing disturbance

Fig. 20
figure 20

DC power curves of HESS elements and their SOCs under ADH-OBB during solar irradiance reducing

5.4 Scenario-4 solar irradiance increasing disturbance

In this case study, the microgrid is exposed to a disturbance of solar irradiance increment from 0.8 kW/m2 to 1 kW/m2. This creates a sudden excessive generation that needs to be absorbed, whereas the microgrid load remains constant at 2 MW. The excessive power on the microgrid is handled through the inertia of the DG, and the VSG-controlled HESS. Figure 21 illustrates the measured frequency curves at the PCC with the different control approaches, while the HESS power curve of each of the control approaches is illustrated in Fig. 22. As seen, the CP-based VSG has the worst frequency nadir and ROCOF of 50.09 Hz and 0.1739 Hz/s, respectively, but the lowest restoration time and related ITAE of 3.71 s and 1.5744 Hz.s2. In addition, the power and energy requirements of the HESS are the lowest. Compared to the CP-VSG, the BB-AH controller improves the nadir to 50.072 Hz and the ROCOF to 0.1028 Hz/s, although its ITAE and the restoration time deteriorate to 1.6648 Hz.s2 and 5.8 s, respectively. On the other hand, compared to both CP and BB-AH, the proposed OBB-AHD control maintains the best nadir while further improving the ROCOF to 0.0773 Hz/s. In addition, the OBB-AHD control produces a faster response than the BB-AH and decreases the energy requirement of the HESS.

Fig. 21
figure 21

PCC frequency curves during solar irradiance increase disturbance with different strategies

Fig. 22
figure 22

HESS power curves during solar irradiance increase disturbance with different strategies

The power curves shown in Fig. 23 indicate the constant load power while the PVG power is increased in steps of 10 s. The HESS records a negative value referring to absorbed power from the microgrid, acting as an additional load, This is used to charge the storage elements of the HESS through the power-sharing technique. Also, the DG power curve shows an interaction with the suddenly increased generation by decreasing the generated power. Because of the LPF used for the power-sharing in the HESS, the SCSS supplies the pulsating power, decreasing the rate of rise of the battery power and smoothing the battery power curve as shown in Fig. 24. Also, the SOC of each element of the HESS is indicated in Fig. 24.

Fig. 23
figure 23

Power curves of microgrid elements under ADH-OBB during solar irradiance increase disturbance

Fig. 24
figure 24

DC power curves of HESS elements and their SOCs under ADH-OBB during solar irradiance increase disturbance

5.5 PVG disconnecting disturbance

During this disturbance, the PVG, which is producing 1.5 MW, is abruptly disconnected from the microgrid after 10 s, resulting in a severe generation shortage that needs to be handled quickly before excessive frequency deviation is reached. As the DG interacts, it releases kinetic energy through its inertial response, while the HESS releases its stored energy in its elements through the effect of the VSG controller. The frequency responses with the different control strategies are illustrated in Fig. 25. while the HESS power curves related to each control strategy are shown in Fig. 26. The fast response of the CP-VSG control strategy is noted from its ITAE and restoration time of 7.5091 Hz.s2 and 5.60 s, respectively, while the worst frequency nadir and ROCOF can also be noted. In addition, the lowest power and energy requirement of the HESS are noted with the CP strategy. Using the BB-AH strategy, the nadir and ROCOF are improved when compared to the CP, although the highest restoration time, ITAE, and energy requirement are observed. However, compared to the other strategies, the proposed OBB-AHD strategy results in the best values of the frequency nadir and ROCOF of 49.800 Hz and 0.3777 Hz/s, respectively, while its restoration speed and the associated ITAE and restoration time are improved over the BB-AH, lowering the energy requirement of the HESS, compared to the BB-AH, from 2.81 to 2.24 MJ.

Fig. 25
figure 25

PCC frequency curves during PVG disconnect disturbance with different strategies

Fig. 26
figure 26

HESS power curves during PVG disconnect disturbance with different strategies

In the case of the proposed OBB-AHD-based VSG, the AC injected and absorbed power curves to and from the microgrid are shown in Fig. 27. As illustrated, the microgrid load remains constant at 2 MW throughout the simulation, whereas the generated power from the PVG is reduced from 1.5 MW to zero at 10 s because of PVG disconnection. PHESS is increased to support the sudden generation shortage transiently until the isochronous governor interacts, while PSG gradually increases towards a steady-state condition in which the DG supports all generation shortages via the isochronous governor control action. As shown in Fig. 28, the BESS power increases until it reaches its maximum permissible limit of 800 kW, while the SCSS supports the shortage in the BESS capability to support the peak power required from the HESS. Also, Fig. 28 shows the SOCs of the BESS and SCSS during the disturbance.

Fig. 27
figure 27

Power curves of microgrid elements under ADH-OBB during PVG disconnect disturbance

Fig. 28
figure 28

DC power curves of HESS elements and their SOCs under ADH-OBB during PVG disconnect disturbance

5.6 PVG connecting disturbance

This disturbance includes the sudden connection of the PVG with its full generation of 1.5 MW while the load remains constant at 2 MW. Because of the PVG connection, the microgrid incurs a severe increase in generated power, creating a power imbalance in the microgrid, and disturbing the microgrid frequency. Figure 29 depicts the frequency response curves with different control approaches, whereas Fig. 30 depicts the HESS power curves with the different controllers. While using the CP-VSG causes the worst frequency response regarding its nadir and the ROCOF, fast restoration is noted, and the related time and the ITAE are reduced. In addition, the CP-VSG requires a low HESS energy of 1.311 MJ. If the BB-AH replaces the CP, the frequency nadir and ROCOF are improved to 50.243 Hz and 0.4608 Hz/s. However, a slow restoration is noted while the ITAE and the restoration time are increased to 7.2996 Hz.s2 and 9 s, respectively. In addition, the HESS is required to absorb more energy which reaches 2.7 MJ. Compared to other strategies, the OBB-AHD results in the best nadir and the lowest ROCOF, and a great reduction in the restoration time and energy requirement of the HESS compared to the BB-AH. As a result, the OBB-AHD offers the optimum compromise between improved frequency response and the quickest possible restoration time while requiring a modest amount of energy from the HESS. For the case of the OBB-AHD, the curves of the supplied power from PV, DG, and HESS beside the total demand power are shown in Fig. 31. In addition, the HESS power is shared between both energy storage systems using the LPF, while the power supplied from the battery and the SCSS, and the SOCs of both elements under the case of the OBB-AHD, are shown in Fig. 32.

Fig. 29
figure 29

PCC frequency curves during PVG connect disturbance with different strategies

Fig. 30
figure 30

HESS power curves during PVG connect disturbance with different strategies

Fig. 31
figure 31

Power curves of microgrid elements under ADH-OBB during PVG connect disturbance

Fig. 32
figure 32

DC power curves of HESS elements and their SOCs under ADH-OBB during PVG connect disturbance

6 Results and discussion

While the system performance has been evaluated using parameters such as the frequency nadir, ROCOF, ITAE, response time, and energy requirement, Table 2 summarizes the parameters in the different cases. Also, the output results are organized in the graphs, shown in Figs. 32, 33, 34, 35, 36 and 37. As shown in Figs. 33, and 34, and Table 2, the proposed control approach yields the lowest frequency nadir and ROCOF values for all disturbances. The proposed approach produces an intermediate value of the ITAE and HESS energy demand between the lowest CP-VSG values and the highest BB-AH-VSG values, as shown in Figs. 35 and 36, respectively. Figure 37 shows the superiority of the proposed controller in reducing the restoration time, especially compared to the AH-VSG technique. Hence, it can be inferred that the proposed OBB-AHD approach can improve the frequency response, providing the best nadir with the lowest ROCOF, and improve the response speed by greatly reducing the HESS energy needs compared to BB-AH. Consequently, the proposed strategy achieves an optimal trade-off between the fastest response and the lowest energy needs of the CP strategy from one side and the best frequency response concerning the lowest nadir and ROCOF from the other side.

Table 2 Summarized results
Fig. 33
figure 33

The summary of the frequency nadir results

Fig. 34
figure 34

The summary of the ROCOF results

Fig. 35
figure 35

The summary of the ITAE results

Fig. 36
figure 36

The summary of the restoration time results

Fig. 37
figure 37

The summary of the HESS output/absorbed energy results

7 Conclusion

The BB-AH-based VSG controller for an HESS is implemented on the proposed PV/diesel microgrid and its parameter limits are evaluated using the MA-based technique, as previously described, with an optimized constant D. The performance of the BB-AH-based VSG is evaluated and compared to the CP-VSG. Also, an OBB-AHD technique-based VSG is proposed, in which the adapting limits are evaluated using the PSO technique based on the proposed two objective functions. The performance of the proposed control technique is evaluated and compared to the other two techniques.

Because of the lower inertia and damping used in the CP technique of the CP-VSG, the CP technique has the worst frequency stability regarding its nadir and ROCOF during all disturbances. However, the steady-state frequency is quickly restored. The BB-AH technique significantly improves the frequency response during all disturbances but with a higher restoration time and sluggish response during the different disturbances. A further improvement in the frequency nadir and ROCOF is introduced by using the proposed OBB-AHD, while it reduces the restoration time below that of the BB-AH by 30% to 40%. Consequently, the proposed OBB-AHD-VSG has the best compromise between CP-VSG's lowest restoration time and the best frequency performance.

As the restoration time highly affects the energy requirement of the HESS, the CP-VSG has the lowest energy requirement of the strategies. As the frequency response is sluggish with the BB-AH-VSG controller, the restoration time and related energy requirement are increased. In the proposed strategy, as the time response is greatly decreased, the related energy requirement is significantly decreased compared to the BB-AH strategy, with reductions in the range of 18–22%. Through the action of the LPF, which is used for power-sharing in the HESS, SCSS supplies the oscillated power demand from the HESS so as to smooth the charge and discharge power of the BESS. In addition, during severe disturbances such as connecting and disconnecting the PVG, the power limitation of the battery is reached, creating a power shortage. The SCSS compensates for this shortage to maintain system stability while extending the battery system life.

Availability of data and materials

All data used or analyzed during this study are included in the manuscript.



Virtual synchronous generator


State of charge


State of charge of the battery


State of charge of the supercapacitor


Power of the battery


Power of the supercapacitor


Load power


Power of the hybrid energy storage system


Diesel generator power


PV system power


Hybrid energy storage system


Energy storage system


Battery energy storage system


Supercapacitor storage system


Photovoltaic generator


Diesel generator


Particle swarm optimization


Rate of change of frequency


Constant parameters virtual synchronous generator


Bang-bang adapted virtual inertia


Optimized bang-bang adapted virtual inertia and virtual damping


Renewable energy source


Small-signal stability analysis


Voltage source inverter


Mathematical approach

\({P}_{m}\) :

Mechanical power signal produced from the droop control loop (pu)

\({P}_{ref}\) :

Reference power of droop control (pu)

\({\omega }_{m}\) :

Frequency of the output voltage of the inverter

\({\omega }_{ref}\) :

Reference speed of the droop control

\({\omega }_{s}\) :

Synchronous speed

\({\omega }_{sm}\) :

Synchronous mechanical speed

\({\delta }_{m}\) :

Mechanical power angle

\(R\) :

Slope of the active power droop characteristic

\({P}_{m}\) :

Mechanical power signal produced from the droop control loop (pu)

\({\Delta \omega }_{LPF}\) :

Filtered VSG’s mechanical frequency deviation signal modulus

\({\omega }_{rm}\) :

Rated mechanical frequency (1 pu)

T :

Bang-bang control’s low pass filter time constant

\({t}_{p}\) :

Settling time

H :

Virtual inertia coefficient

H max , H min , H ss :

The max. limit, min. limit, and steady-state values of the adaptive inertia coefficient

D :

Virtual damping coefficient

D max , D min , D ss :

The max. limit, min. limit, and steady-state values of the adaptive damping coefficient


  1. IEA. Key world energy statistics. International energy agency; 2021. Available

  2. Kerdphol, T., Watanabe, M., Mitani, Y., & Phunpeng, V. (2019). Applying virtual inertia control topology to SMES system for frequency stability improvement of low-inertia microgrids driven by high renewables. Energies, 12(20), 3902.

    Article  Google Scholar 

  3. Ratnam, K. S., Palanisamy, K., & Yang, G. (2020). Future low-inertia power systems: Requirements, issues, and solutions-a review. Renewable and Sustainable Energy Reviews., 1(124), 109773.

    Article  Google Scholar 

  4. Magdy, G., Mohamed, E. A., Shabib, G., Elbaset, A. A., & Mitani, Y. (2018). Microgrid dynamic security considering high penetration of renewable energy. Protection and Control of Modern Power Systems., 3(1), 1–1.

    Article  Google Scholar 

  5. Elshenawy, M., Fahmy, A., Elsamahy, A., Kandil, S. A., & El Zoghby, H. M. (2022). Optimal power management of interconnected microgrids using virtual inertia control technique. Energies, 15(19), 7026.

    Article  Google Scholar 

  6. Hlaing, H. S., Liu, J., Miura, Y., Bevrani, H., & Ise, T. (2019). Enhanced performance of a stand-alone gas-engine generator using virtual synchronous generator and energy storage system. IEEE Access, 5(7), 176960–176970.

    Article  Google Scholar 

  7. Guo, L., Zhiye, Xu., Jin, N., Li, Y., & Wang, W. (2021). A weighted voltage model predictive control method for a virtual synchronous generator with enhanced parameter robustness. Protection and Control of Modern Power Systems, 6, 1–11.

    Article  Google Scholar 

  8. Magdy, G., Bakeer, A., Nour, M., & Petlenkov, E. (2020). A new virtual synchronous generator design based on the SMES system for frequency stability of low-inertia power grids. Energies, 13(21), 5641.

    Article  Google Scholar 

  9. Magdy, G., Bakeer, A., & Alhasheem, M. (2021). Superconducting energy storage technology-based synthetic inertia system control to enhance frequency dynamic performance in microgrids with high renewable penetration. Protection and Control of Modern Power Systems, 6, 1–13.

    Article  Google Scholar 

  10. Mosa, M. A., Yousef, M. Y., El Masry, S. M., Ghany, A. A., & Ali, A. A. (2022). Frequency support of AC microgrid with high penetration of photovoltaic using super-capacitor. Sustainable Energy Technologies and Assessments., 1(53), 102364.

    Article  Google Scholar 

  11. Anzalchi, A., Pour, M. M., & Sarwat, A. (2016, July). A combinatorial approach for addressing intermittency and providing inertial response in a grid-connected photovoltaic system. In 2016 IEEE power and energy society general meeting (PESGM) (pp. 1-5). IEEE

  12. Fang, J., Tang, Yi., Li, H., & Li, X. (2017). A battery/ultracapacitor hybrid energy storage system for implementing the power management of virtual synchronous generators. IEEE Transactions on Power Electronics, 33(4), 2820–2824.

    Article  Google Scholar 

  13. Wen, S., Wang, S., Liu, G., & Liu, R. (2018). Energy management and coordinated control strategy of PV/HESS AC microgrid during islanded operation. IEEE Access, 7, 4432–4441.

    Article  Google Scholar 

  14. Van Tan Nguyen, T. B., Vo, Q. S., & Dao, H. D. (2020). Stability analysis of an isolated microgrid with the presence of the hybrid energy storage system-based virtual synchronous generator. Tạp chí Khoa học và Công nghệ-Đại học Đà Nẵng., 30, 46–51.

    Google Scholar 

  15. Mohamed, M. M., El Zoghby, H. M., Sharaf, S. M., & Mosa, M. A. (2022). Optimal virtual synchronous generator control of battery/supercapacitor hybrid energy storage system for frequency response enhancement of photovoltaic/diesel microgrid. Journal of Energy Storage, 1(51), 104317.

    Article  Google Scholar 

  16. Chong, L. W., Wong, Y. W., Rajkumar, R. K., & Isa, D. (2016). An optimal control strategy for standalone PV system with battery-supercapacitor hybrid energy storage system. Journal of Power Sources, 1(331), 553–565.

    Article  Google Scholar 

  17. Liu, J., Miura, Y., & Ise, T. (2015). Comparison of dynamic characteristics between virtual synchronous generator and droop control in inverter-based distributed generators. IEEE Transactions on Power Electronics, 31(5), 3600–3611.

    Article  Google Scholar 

  18. Lopes, L. A. (2014). Self-tuning virtual synchronous machine: a control strategy for energy storage systems to support dynamic frequency control. IEEE Transactions on Energy Conversion, 29(4), 833–840.

    Article  Google Scholar 

  19. Leng, D., & Polmai, S. (2019). Virtual synchronous generator based on hybrid energy storage system for PV power fluctuation mitigation. Applied sciences, 9(23), 5099.

    Article  Google Scholar 

  20. Li, D., Zhu, Q., Lin, S., & Bian, X. Y. (2016). A self-adaptive inertia and damping combination control of VSG to support frequency stability. IEEE Transactions on Energy Conversion, 32(1), 397–398.

    Article  Google Scholar 

  21. Hu, Y., Wei, W., Peng, Y., & Lei, J. (2016, July). Fuzzy virtual inertia control for virtual synchronous generator. In 2016 35th Chinese Control Conference (CCC) (pp. 8523-8527). IEEE

  22. Kerdphol, T., Watanabe, M., Hongesombut, K., & Mitani, Y. (2019). Self-adaptive virtual inertia control-based fuzzy logic to improve frequency stability of microgrid with high renewable penetration. IEEE Access, 7, 76071–76083.

    Article  Google Scholar 

  23. Alipoor, J., Miura, Y., & Ise, T. (2014). Power system stabilization using virtual synchronous generator with alternating moment of inertia. IEEE Journal of Emerging and Selected Topics in Power Electronics, 3(2), 451–458.

    Article  Google Scholar 

  24. Wang, F., Zhang, L., Feng, X., & Guo, H. (2018). An adaptive control strategy for virtual synchronous generator. IEEE Transactions on Industry Applications, 54(5), 5124–5133.

    Article  Google Scholar 

  25. Liu, Ju., Yang, D., Yao, W., Fang, R., Zhao, H., & Wang, Bo. (2017). PV-based virtual synchronous generator with variable inertia to enhance power system transient stability utilizing the energy storage system. Protection and Control of Modern Power Systems, 2(1), 1–8.

    Article  Google Scholar 

  26. Li, J., Wen, B., & Wang, H. (2019). Adaptive virtual inertia control strategy of VSG for micro-grid based on improved bang-bang control strategy. IEEE Access, 7, 39509–39514.

    Article  Google Scholar 

  27. Feng, W., Ming Jin, Xu., Liu, Y. B., Marnay, C., Yao, C., & Jiancheng, Yu. (2018). A review of microgrid development in the United States–a decade of progress on policies, demonstrations, controls, and software tools. Applied energy, 228, 1656–1668.

    Article  Google Scholar 

  28. Johnson, M. (2013). Military microgrids and SPIDERS implementation.

  29. Mosa, M. A., Elsyed, A. A., Amin, A. M., & Ghany, A. A. (2016, December). Modified design of an LCL filter for grid-connected, pulse-width-modulated voltage source converter. In 2016 Eighteenth International Middle East Power Systems Conference (MEPCON) (pp. 89-94). IEEE

  30. Rostami, A., Jalilian, A., Zabihi, S., Olamaei, J., & Pouresmaeil, E. (2019). Islanding detection of distributed generation based on parallel inductive impedance switching. IEEE Systems Journal, 14(1), 813–823.

    Article  Google Scholar 

  31. “Powerworld simulator 18 block diagrams,” tech. rep., PowerWorld Corporation, 2001 S First Street Champaign, IL 61820, (2014).

  32. “IEEE recommended practice for excitation system models for power system stability studies.” IEEE Standard 421, no. 5 (2005).

  33. El-Shorbagy, M. A., & Hassanien, A. E. (2018). Particle swarm optimization from theory to applications. International Journal of Rough Sets and Data Analysis (IJRSDA), 5(2), 1–24.

    Article  Google Scholar 

Download references


Not applicable.


Not applicable.

Author information

Authors and Affiliations



M M. E: Conceptualization, Methodology, Software, Formal analysis, Resources, Data Curation, Writing—Original Draft, and Visualization. H M. El Z: Validation, Investigation, Writing—Review & Editing, Visualization, and Supervision. S M. S: Validation, Investigation, Writing—Review & Editing, Visualization, and Supervision. M A. M: Software, Formal analysis, Validation, Investigation, Writing—Review & Editing, Visualization, and Supervision.

Corresponding author

Correspondence to Mahmoud M. Elwakil.

Ethics declarations

Competing interests

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.



See Table

Table 3 System data


Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Elwakil, M.M., Zoghaby, H.M.E., Sharaf, S.M. et al. “Adaptive virtual synchronous generator control using optimized bang-bang for Islanded microgrid stability improvement”. Prot Control Mod Power Syst 8, 57 (2023).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: