Abstract
The high-level penetration of intermittent renewable power generation may limit power system inertia, resulting in system frequency instability in increasing power converter-based energy sources. To resolve this problem, virtual inertia control using distributed gray wolf optimization (DGWO) method in a synchronous generator is simulated under a distinct output fluctuation condition. First, the DGWO algorithm was established to achieve a local and global balance solution, and standard test functions were employed to verify the model convergence. Second, the key parameters that determine the effect of the virtual inertia controller in the power grid were analyzed. A DGWO-based optimization strategy to stabilize inertia was also developed. Finally, simulation results using step and random loads under a high permeability level are provided to verify the effectiveness of the proposed model. In the step load disturbance, the system can recover from the disturbance point to the stable point after 3 s under the regulation of the proposed control strategy, which is reduced by 18 s compared with the traditional control method. In the random load test, it takes only 12 s, 63 s less than the traditional one. Accordingly, the power system frequency can be stabilized more quickly from a disturbance state to a stable stage.
Keywords
Introduction
Currently, various renewable energies with generation uncertainty and availability are being widely incorporated into modern power systems. Additionally, converter utilization in power systems has increased rapidly in recent years. (Kung et al., 2021; Lak et al., 2020; Nair and Kumar, 2021). However, this may result in a significant reduction in inertia in the interconnected power system (Fang et al., 2018; Fernández-Guillamón et al., 2019; Rezkalla et al., 2018). As a result, the stability of the power system frequency and voltage is seriously threatened, and the security of the entire power system is affected (Ali et al., 2019; Kabir et al., 2018; Liu et al., 2021; Saidi, 2020). To address the problem of system instability, some research has focused on mathematically simulating the behavior of synchronous motors using virtual inertia-based inverters, including synchronizers, virtual synchronous machines (VSMs), and virtual synchronous generators (VSGs) (Feldmann and de Oliveira, 2021; Yap et al., 2019, 2020). Among them, VSG provides a control scheme for the inverter of a distributed generator by imitating the behavior of a synchronous motor(Fathi et al., 2018; Li et al., 2020; Shi et al., 2018; Terazono et al., 2021). Yang et al. (2019), Shi et al. (2018), and Li et al. (2019) proposed different control strategies for virtual generators; however, their control parameters were not optimized. Alternatively, Alipoor et al. (2018) adopted particle swarm optimization to optimize the VSG parameters. Therefore, transient stability under significant system disturbance can be enhanced.
In this study, a new VSG control method using inverter optimization was developed to effectively increase the power system inertia in a renewable energy power generation system. The remainder of this paper is organized as follows: the next section reviews the VGS-related works in the literature. Then, the principle of the VGS mathematical model is described. The VGS control optimization strategy based on the DGWO algorithm is presented in ‘Virtual controller parameters optimization based on DGWO algorithm’ section. The simulation results are provided and discussed in the penultimate section, and the conclusions are presented in the final section.
Literature review
Huang et al. (2018) unveiled the influence of VSG on low-frequency oscillation of power system by analyzing the equivalent damped torque of VSG. The results showed that it can provide a forward damped torque to effectively suppress the low frequency oscillation in the power grid. Magdy et al. (2019) combined the virtual inertial control with VSG to stabilize the power frequency and dynamic security in the power system. Chen and O'Donnell (2019a) proposed a converter-based VSG method to control the virtual inertia in power electronic connections. Roldan-Perez et al. (2019) established a simplified third-order small signal VSG model based on the traditional synchronous generator model. In this study, the influence of induction and weak resistance power grid was worked out. Wang et al. (2020) proposed a VSG function using the Unified Power Flow Controller (UPFC) to compensate the voltage change in public coupling points. The remote RE system connected with a constant voltage benchmark was also developed here. Chen and O'Donnell (2019b) provided a comprehensive VGS control analysis based on a transfer function, which could be used for transient and steady-state VSG design. Nian and Jiao (2020) proposed an improved VSG control strategy for symmetrical voltage failure in doubly-fed asynchronous generator (DFIG). Air gap flux feedback was designed to accelerate the attenuation of transient components and limit rotor current to improve the stability of the system. Shi et al. (2020) proposed an optimal control strategy to reduce power oscillation and frequency fluctuation. The parallel VSG system was established to analyze the rotor inertia and damping coefficient influence on active power output. El Tawil et al. (2019) designed a VSG control strategy applicable to renewable energy power generation systems in an independent microgrid environment. Moulichon et al. (2021) proposed an observer-based VGS current controller that is composed of a linear quadratic regulator for synchronous generators. Chen et al. (2020) reported the VGS control to meet the required power and maintain the stability of the power grid. Karanveer and Mukesh (2018) proposed a VSG control algorithm using an EV charging station, which can provide the inertia and stabilize system frequency.
Tebib and Boudour (2021) proposed a high voltage direct current (HVDC) control adjustment method based on the virtual synchronous power (VSP). An improved gray wolf algorithm was employed to optimize the VSP-based control parameters. Rakhshani et al. (2017) applied the VSP to simulate the dynamic impact of virtual inertia in HVDC link. The automatic generation control model was used to improve the dynamic performance of the system. Based on the VSP control strategy of HVDC interconnected system, Rakhshani et al. (2016) developed a new modeling for the effect of virtual inertia on frequency stability in multi area interconnected system. The sensitivity analysis of VSP-based HVDC in frequency control was also studied. Abdollahi et al. (2020) proposed a dynamic tuning analysis method for renewable static synchronous generator set controlled by synchronous power controller (SPC). It could improve the stability of high penetration power generation region and support the synchronization between interconnected regions in a two-region Kundur system. For the grid connected converter with SPC, Zhang et al. (2019) presented three different active power control schemes. It revealed that SPC has a good performance in inertial response and droop characteristics.
Shuai et al. (2019) used an enhanced control strategy to improve the transient angular stability by adjusting the reference power. When the vibration mode was close to the mechanical vibration mode on the complex plane, the VSG could introduce a strong dynamic interaction to stabilize the small signal angle drift in the power system. Du et al. (2019) presented a VSG method to avoid modal proximity and the adverse effect on small signal angle stability of power system. Al-Tameemi et al. (2020) applied VSG control strategy to achieve synchronization and frequency stability in each terminal, thereby providing multi-terminal formation capabilities. Wu and Wang (2020) analyzed the large-signal synchronization stability and developed a mode adaptive VSG power angle control method to improve transient stability. Li et al. (2020) proposed a power decoupling method based on virtual steady-state synchronous impedance (VSSI) and current dynamic decoupling compensation (CDDC). It indicated that the power coupling could be performed more effectively. Besides, the dynamic and steady-state responses from active and reactive power can be more efficient. Santhoshkumar and Senthilkumar (2020) combined the whale algorithm and the Ant Lion algorithm to reduce the calculation complexity. However, a large error may arise in the frequency response under dynamic conditions.
Model of virtual synchronous generator
With the increasing use of renewable energy power, the penetration rate of these energy sources has significantly impacted the power system inertia and significantly affected grid frequency fluctuation (Alayi and Jahanbin, 2020; Bevrani et al., 2014; Li et al., 2020). The most vulnerable factors are the inertia and damping characteristics of synchronous generators; they can be determined by a virtual rotor, inverter, and primary and secondary frequency controls. Consequently, the VSG was developed to simulate the synchronous generator to avoid the inertia reduction caused by renewable energy access (Shintai et al., 2014). The VSG is shown in Figure 1.

VSG model.
As revealed in Figure 1, it consists of four blocks, including virtual primary control, virtual secondary control, virtual rotor and inverter, where K1 is the virtual main control coefficient, and K2 is the virtual auxiliary control coefficient. The “virtual rotor” connected with the inverter is introduced to represent the damping and inertia characteristics of the power generator. In the model, K1 and K2 are the key factors in the frequency regulation and the control stability of the system. The relationship between the mechanical power change and load power change in the swing equation of a synchronous generator is as follows (Alipoor et al., 2015):
The power reference value (Pr) of the inverter is obtained through the swing equation of the synchronous generator, as follows:
The first-order transfer function is used to model the inverter, expressed as follows:
The primary frequency control and secondary frequency control in the synchronous generator were simulated using a PI controller as follows:
Virtual controller parameters optimization based on DGWO algorithm
Fundamental of GWO
GWO algorithm was proposed by Mirjalili et al. (2014). It simulates the behaviors of wolves in searching and hunting for food in nature environment. The wolves are divided into α wolf, β wolf, δ wolf and ω wolf according to the searching food capability. Wolves can cooperate with each other to complete the search process. α wolf is the leading wolf with an absolute dominant position, which is mainly responsible for food searching and hunting. β wolf is working under the leadership of α wolf and leads δ wolf and ω wolf. δ and ω wolves work at the lowest level, where they are subject to the leadership of α and β wolves.
The process of GWO algorithm is shown as follows (Mirjalili et al., 2016; Sulaiman et al., 2015):
First, the fitness value of the population is calculated, and the wolf pack is divided from the fitness values. Three wolves with the best fitness values are in order labeled as α wolf, β wolf and δ wolf, respectively. The remaining wolves are regarded as ω wolves. The wolves begin to surround the prey after finding it. At this time, the gray wolf location is obtained as:
where iter represents the current iteration number; PL(iter) is the prey position; G(G = 2 v1) indicates the swing coefficient; v1 denotes the random number in the [0, 1] interval; A is the convergence coefficient and calculated as follows:
(3) The wolves hunt the prey when α wolf finds it. At this time, the swing coefficients of α, β and δ wolves are updated as:
The positions of α, β and δ wolves are updated as follows:
The location of ω wolf is calculated as:
The positions of α, β, δ and ω wolves are depicted in Figure 2.

Gray wolf location.
Selection of convergence factor in GWO algorithm
The wolves search and surround the prey by adjusting the convergence coefficient A in the GWO algorithm. The value of A is determined by the convergence factor a, where a decreases linearly from 2 to 0; the interval of A is [−2a, 2a]. In practice, the linear convergence factor a cannot balance local and global search abilities concurrently. Therefore, the dynamic convergence factor ad is introduced to reach the target balance between the local and global searches.
The convergence coefficient A based on the dynamic convergence factor is obtained as follows:
The curves of the linear and dynamic convergence factors over the number of iterations are shown in Figure 3.

Convergence factor over iterations in GWO. (a) Linear convergence factor, (b) Dynamic convergence factor.
During 500 iterations, a converges to 0 linearly, as shown in Figure 3(a). Figure 3(b) shows that ad decreases linearly before 250 iterations; after 250 iterations, ad decreases nonlinearly. The linear and nonlinear variations in ad were used to enhance the convergence performance of the GWO. Indeed, before 250 iterations, ad leads to a global search to find the prey location; after 250 iterations, the ad convergence speed is accelerated; at this time, it is focused on a local search.
On the other hand, the population diversity may decrease in the later stage of GWO iteration, especially for individuals with poor fitness, which can easily fall into a local optimum. The random walk characteristic of the Levy flight makes GWO have a stronger global search ability. Therefore, this study uses the Levy mutation to prevent the ω wolf from prematurely falling into extreme values.
Levy flight has strong randomness and variability in long-distance jumping situations. The random walk characteristics of the flight path are presented in Figure 4.

Levy flight path.
Levy's random walk feature was applied to improve the population diversity in the later stages of the GWO algorithm. Its flight path is expressed as follows (Edwards et al., 2007):
During the iteration process, the DGWO algorithm easily falls into a local optimal value and is unlikely to reach the global optimization solution. By making use of the random walk characteristics of Levy flight, the DGWO algorithm can maintain a strong global search performance in the later iteration period, thus achieving better convergence results.
After Levy flight is introduced into the ω wolf, the gray wolf location can be found, expressed as follows:
Validation of the proposed DGWO algorithm
The nonlinear convergence factor and Levy mutation are integrated to ensure the balance of search ability and population diversity in the DGWO algorithm. Unimodal and multimodal functions are used to evaluate the algorithm performance efficiency. Unimodal test functions have one global optimal point without extremum points. Multimodal functions have multiple extremum points in addition to a global optimum. Accordingly, unimodal functions are used to test the global optimization ability, and the multimodal function are used to test the ability of escaping from local extremes. Two unimodal functions (F1 and F2) and three multimodal functions (F3, F4 and F5) are employed to analyze the convergence effect, as shown in Table 1.
Unimodal and multimodal test functions (Li et al., 2020, 2021).
The testing dimensions of the five standard test functions are unified to 50, and the global optimal values are all set as 0. Whale Optimization Algorithm (WOA), Particle Swarm Optimization Algorithm (PSO) (Van den Bergh and Engelbrecht, 2004), GWO algorithm and the DGWO algorithm were tested for comparison. The parameter settings of these algorithms are listed in Table 2.
Parameters setting in optimization process.
The maximum number of iterations and population size in four algorithms are set under the same values, where the maximum number of iterations is 500 and the population size is 30. For PSO algorithm, wmax and wmin represent the maximum and minimum weights, respectively; c1 and c2 denote the self-learning and social learning abilities, respectively. For the WOA algorithm, the spiral coefficient b is set as 1. As above, GWO and DGWO have less adjustable parameters number compared with PSO and WOA algorithms.
The convergence performance is evaluated using worst convergence value, optimal convergence value, mean convergence value, and standard deviation (std) under 30 repeated runs. The convergence test results are concluded in Table 3.
Convergence test results.
It is clear that DGWO algorithm provides most satisfactory results from F1 to F5, particularly convergence value equal to 0 in F1, F3 and F5. Although the convergence values of GWO and WOA algorithms can reach 0 in F3 and F5 in some convergence values, they do not achieve 0 in all values. On the contrary, PSO algorithm has worse convergence value in general, e.g. up to 23.06 in F2, due to the lack of dynamic speed adjustment.
The convergence curves using GWO and DGWO algorithms from F1 to F5 tests are shown in Figure 5.

Convergence curves in GWO and DGWO algorithms.
As can be seen, the DGWO algorithm has larger convergence slope from F1 to F5 test, and it indicates a faster convergence rate compared with GWO algorithm. For example, the convergence value of DGWO algorithm in F5 test reaches 0 within around 100 iterations, but the GWO algorithm requires around 280 iterations.
Parameters optimization process in virtual controller
The VSG can simulate the inertial response of the synchronous generator through the signal sent by virtual controller. The virtual control is realized through the proportional gain K1 and the integral gain K2 in the VSG model. The system inertia and the system frequency can be stabilized by adjusting K1 and K2. The transfer function of the virtual controller is expressed as follows:
The DGWO algorithm is introduced to select appropriate K1 and K2 based on the parameters optimization process. The square of the frequency deviation is defined as the fitness function to evaluate the system frequency deviation, shown as below:
Performance simulation and analysis
High permeability renewable energy grid modeling
A high permeability renewable energy grid system is considered in the proposed VSG control strategy. It includes photovoltaic power generation system, wind power generation system, traditional thermal power generation system and electric load. Among them, the generation and governor dead zone constraints are used to simulate the nonlinear constraints of the generator set. The renewable energy grid system with virtual synchronous machine control is depicted in Figure 6, and the major parameters of renewable energy grid system are listed in Table 4.

Renewable energy grid system with virtual synchronous machine control.
Parameters of high permeability energy grid system (Magdy et al., 2019).
As shown in Figure 6, the renewable energy grid system is built using the MATLAB/Simulink simulation platform. It includes 5 MW solar power generation, 10 MW wind power generation, 15 MW power load and 20 MW thermal power generation. Simultaneously, the inherent nonlinear requirements in the system are considered and expressed by the saturation limit model.
Wind power generation model
The wind power is generated by random wind speed on the basis of the rated wind speed and the white noise signal in the Matlab simulation module. The specific wind power model is depicted in Figure 7.

Wind power model.
As revealed in Figure 7, when the random wind speed is obtained, the wind power is calculated as follows:
The wind turbine parameters are listed in Table 5.
Wind turbine parameters.
The wind power generation distribution depicted in Figure 8 is produced from equation (23) based on the wind power model in Figure 7. It indicates that the wind power has strong nonlinearity and volatility characteristics.

Wind power generation distribution.
Photovoltaic power generation model
The rated power of photovoltaic power generation is equivalent to the sum of the rated power values of each photovoltaic unit. In an actual situation, the photovoltaic power generation has randomness depending on a weather condition. For this reason, it is simulated through the white noise signal and the standard deviation using the Matlab simulation module. The photovoltaic power generation model is shown in Figure 9.

Photovoltaic power model.
The PV power deviation is expressed as follows:
Based on the PV photovoltaic power model in Figure 9, the PV power generation distribution is shown in Figure 10. Similarly, the power curve reveals strong randomness and volatility.

PV power generation distribution.
Power load model
In reality, there are various non-linear loads utilized in the power line. For this reason, the white noise signal multiplying the initial load deviation is used to simulate the electric power load in the Matlab simulation module, as shown in Figure 11.

Power load model.
Load deviation to simulate the actual load variation is expressed as
The random load power is simulated based on the power load model from Figure 11, and its result is shown in Figure 12. In this model, the load power contains white noise signal so that it can represent possible real circumstance with strong randomness.

Random load power.
Validation of the proposed virtual inertial control strategy
Performance test under step load disturbance
The overall schematic process in optimizing virtual control parameters in the DGWO algorithm is illustrated in Figure 13.

Parameters optimization process of virtual controller.
Figure 13 depicts the virtual controller parameter optimization process on the basis of the DGWO algorithm, including the following aspects:
Initialize the DGWO algorithm parameters, such as population size and number of iterations; Initialize the population (K1 and K2) and calculate the fitness value (Fit); Start to optimize virtual controller parameters; Sort the wolves according to the fitness value; Update the positions of α, β and δ wolves; Determine whether to mutate ω wolf, if necessary. Use Levy mutation strategy to update the position of ω wolf. Otherwise, keep the original position; Calculate the fitness values of α, β, δ and ω wolves; Update the optimal position; Determine whether to terminate the iteration when the condition of iteration termination is met. Otherwise, return to the fourth step; Output the optimal parameters K1 and K2 of the virtual controller.
The Matlab/Simulink R2019a module is used to validate the proposed method. First, the simulation performance was carried out under a low inertia system (30% of its nominal value). The proposed method is tested under step load and random load. The amplitude of step load does not change with time, while the amplitude of random load varies with time. The step load is added to simulate the influence of sudden generator shutdown or random load increase in the power system. The performance period time is 1000 s, and 0.05pu step load is added at t = 600s. The comparison between traditional and proposed control strategies is revealed in Figure 14.

Test results under step load. (a) Conventional control, (b) Proposed control strategy.
In Figure 14(a), the power system frequency begins to drop at t = 600s. For traditional control, it is found that 21 s was demanded for the system to recover from the frequency disturbance point back to the frequency stability point. In contrast, it only requires 3 s for the system returning to normal by the proposed control strategy. It is obvious that the frequency fluctuation in Figure 14(a) is greater than that in Figure 14(b) when the step load is added. It shows that the proposed control strategy has better stability in system frequency. Moreover, the inverter in the virtual controller has an inertial effect so that the system frequency can drop more slowly than traditional one.
Performance test under random load disturbance
In the test using the random load (as depicted in Figure 12), the power system frequency begins to drop at t = 600s during 1000 s period time. The results from traditional and the proposed control methods are revealed in Figure 15.

Test results using random load. (a) Conventional control, (b) Proposed control strategy.
From the test results as above, the frequency fluctuations of both control methods are greater than the step load, and longer time is needed to return to a stable state. It indicates that 75 s is taken for the system frequency to recover from the fluctuation point to the stable point in the traditional control method. In the proposed virtual control strategy, only 12 s is required for the system frequency returning to normal. Besides, it is clear that the frequency changing slope from t = 600s is considerably lower than the conventional one.
Through the above analysis, it is found that the frequency regulation of the system is sensitive to parameters K1 and K2. In two load cases study, it is confirmed that the fluctuation of system frequency can be sufficiently stabilized in a shorter time. It implies that the sensitivity of system frequency regulation to parameters K1 and K2 can be reduced efficiently through parameter optimization process.
Conclusions
The high penetration level generated from renewable energy generation can reduce the power system inertia, affecting the system stability in a large-scale grid. Accordingly, the proposed virtual inertia control strategy can stabilize the system frequency in less time under a distinct power system fluctuation.
The main contributions in this study are concluded as follows:
The DGWO algorithm has been proven to present stronger local and global search balance ability than the GWO algorithm. The convergence effect from DGWO algorithm is verified using unimodal and multimodal functions. The crucial parameters such as K1 and K2 in the virtual synchronous VSM controller can be optimized based on the DGWO algorithm. A feasible solution for stabilizing the system frequency and increasing the renewable energy permeability can be realized using the proposed control strategy.
Moreover, this study reveals that the operation time required to restore the system frequency to a stable condition takes 18 s and 63 s for step load and random load, respectively, indicating significantly less time than the traditional control algorithms. Future studies should focus on the generalization ability of multiple microgrid systems under a variety of renewable power sources.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
