Virtual Synchronous Generator Based on Hybrid Energy Storage System for PV Power Fluctuation Mitigation

: The application of renewable energy is stimulating since the environmental pollution and the increase in demand for global energy consumption have become the main concerns of humanity. However, the intermittent nature of renewable sources could seriously affect the frequency stability of the system which needs to be solved. In this paper, the Virtual Synchronous Generator (VSG) based on battery/supercapacitor Hybrid Energy Storage System (HESS) is proposed to handle the stochastic power output of Photovoltaic (PV). First, the power allocation methods for HESS and its comparison are illustrated. Second, the comparison of the frequency deviation suppression strategies is presented. Moreover, as the adjustable parameters of VSG ( J , D ) is a key superior to the conventional synchronous generator; hence, a part of this paper will be introduced a new evolutionary algorithm called Backtracking Search Optimize Algorithm (BSA) to tune the parameters of the VSG in real time. To investigate the control performance, the standalone microgrid is modeled in the MATLAB/Simulink environment. Several case studies are conducted, and the results prove the improvement of the system frequency by attenuating the maximum overshoot of frequency deviation from 50.18 Hz to 50.03 Hz.


Introduction
Electrical energy plays a major role in our life, and it is a key driver in the industrial society. The significant increase of global power consumption, the extinction of conventional energy resources such as coal, oil and gas, and the environmental pollution which is caused by the energy production, are the main challenge for the electric utility. To handle these issues, the application of renewable energy in form of microgrid can be considered as the best alternative energy resource. However, the application of distributed generators based on renewable sources can cause as many problems as it may be solved. The inherently intermittent and power fluctuation of the renewable sources such as Photovoltaic (PV) and wind turbines, and the variation of power demand are the significant factors of system stability degradation, especially when the microgrid is operated in islanded mode. Hence, a sophistication microgrid control is a must.
In a standalone microgrid, the entire consumption is fully supplied by the microgrid sources. The high penetration of renewable energy systems with its intermittent power output results in power supply-demand unbalancing and high-frequency variation. Therefore, to address these issues, the standalone microgrid highly relies on the Energy Storage System (ESS) which could function as energy buffer or backup to balance the system mismatch and to maintain the system frequency in a stipulate operation range [1]. The battery which is the most mature and the cheapest energy storage has been found in many applications such as frequency regulation by mitigating the impact of the PV and wind power fluctuation [2,3], power losses reduction in distribution grids [4], and peak shaving applications [5]. The lead-acid battery storage based on the traditional moving average algorithm was used to smooth the PV fluctuation in [6]. In [7], the author used the absorb/release ability of the Battery Energy Storage System (BESS) to compensate the high power fluctuation of PV. A low-pass filter was used in this paper to generate the power reference for BESS. The method was reported to have the capability of limiting PV power fluctuations. However, the usage of battery in the above application could seriously shorten the battery lifespan. To improve the lifespan of the battery by reducing the battery stress, the Hybrid Energy Storage System (HESS) was introduced [8,9]. Based on the characteristics of each energy storage system in Table 1 [10], the battery and supercapacitor are two different energy storages which have complemented characteristics. The combination of these energy storages are expected to relieve the battery charging/discharging stress, to improve the lifespan of the battery storage and to enhance the system efficiency.
In conventional power system, the synchronous generator plays a major rule as the electricity source. It could damp the effect of dynamic load transition and disturbance with the inherent droop control and inertia control. Hence, the system stability is maintained. Inspired by the synchronous generator dynamic behavior, an idea to add inertia artificially to the inverter-based generator has been emerged. The artificial inertia can be obtained by using energy storage-release/absorb characteristic together with the power electronic inverter/converter and the proper control mechanism in a system, so-called, Virtual Synchronous Generator (VSG). Since the VSG is expected to solve the major issues (low-inertia) in the microgrid, this relatively new scheme gains great attention and attracts many researchers from both universities and industries, and numerous scientific outcomes have been published recently [11][12][13][14]. Novel control for VSG based on algebraic with a minimal number of the parameter was introduced in [15] to suppress the fluctuation of frequency and voltage. As the designed parameters of the VSG is a challenging task, the authors [16][17][18] presented the method for tuning the parameters (J and D) of the VSG to improve the dynamic response of the system and to attenuate the frequency fluctuation. However, in those paper, the value of J and D are adapted based on the predefined criteria. The optimized method that could determine the optimum value of J and D is not investigated. In [19,20], the authors aim to improve the performance of the VSG that is simply implemented by the ideal DC voltage source connected to the inverter. All the control parts in the VSG such as inertia and speed governor, are realized by controlling the ideal DC voltage source which is obviously different from the VSG definition. In the real case, ESS is an inevitable part for the VSG to imitate the mechanical rotational energy of the synchronous generator. The VSG control strategy based on a HESS was presented in [21], but it does not take into account the continuously rapid changes in power demand or load transition. Therefore, it is difficult to evaluate the performance of the proposed VSG.
Although numerous VSG researches have been conducted to solve the challenging issue in the microgrid recently, the majority focuses on the improvement of the system stability. Hence, what remains unclear is how the VSG benefit when it deploys to mitigate the intermittent nature of PV and wind turbine. To tackle the frequency deviation which mainly results from the strong variation of PV output power as well as to bridge the gap in the literature, in this paper, the VSG based on battery/supercapacitor hybrid energy storage system is proposed. The supercapacitor is responsible for the high-frequency power variation while the battery corresponds to the low-frequency power variation. The novelty of this study introduces the new power allocation method for HESS and its combination with the adaptive VSG algorithm based on BSA to improve the frequency deviation suppression capability. The remaining part of the article organizes as follows. In Section 2, the method for power allocation of HESS is presented. The VSG control and the parameter tuning based on BSA are described in Section 3. The results and discussion are demonstrated in Section 4. The paper is concluded in Section 5.

Power Allocation and Control for HESS
In this research, the complementarity of the two types of ESS (battery & supercapacitor) is to utilize the distinct advantages of multiple heterogeneous energy storage technologies and to hide their drawbacks instead of relying on a single type of energy storage technology. The applications of the battery with high energy capacity are in long-term and large-volume energy storage that requires high energy density, and sustained charge/discharge. The applications of the supercapacitor which has high power capacity are in periodic high-power output and frequently charge/discharge that require high power density, short response time, and long lifespan. Two methods, to allocate the power between battery and supercapacitor, are discussed in this section. The first method, called Method#1, was introduced by Hazra et al. [22] and the second method, also known as Method#2, is proposed by the author. In Method#1, two low-pass filters are used to separate the power for battery and supercapacitor as shown in Figure 1. Figure 2 is the smoothed power waveform based on Methode#1.  The power reference for supercapacitor (P sc_re f ) and battery (P bat_re f ) are obtained through Equation (1).
where, τ 1 and τ 2 are the time constant of low-pass filter #1 and low-pass filter #2, respectively. P pv is the measured power output of the PV. However, in [22], the method to design cut-off frequency for the low-pass filter is not provided. In [23], the same method to allocate the power for HESS is applied, the cut-off frequency is selected based on the response time of each energy storage system. Therefore, according to [23], the cut-off frequency f c1 = 0.5 Hz and f c2 = 1 mHz are chosen for LPF#1 and LPF#2, respectively.
The Method#2 is inspired by [24]. Instead of using ramp rate and step moving average, an ideal PV power profile is used. The ideal PV power is obtained by comparing the daily PV output power during one year, and selected the one which has smaller variation. The idea behind this method is to inject the smooth power to the system with supporting from ESS. Hence, the impact of intermittent PV output power is diminished. As shown in Figure 3, the ESS is used to compensate the power deviation of PV. When the PV output power is greater than the ideal power, the ESS will absorb; otherwise, the ESS will release the power to compensate. As a result, the power supply from the PV plus energy storage system are similarly to the ideal power as demonstrated in Figure 3 (red − graph). The block diagram of this method is shown in Figure 4. This method, a low-pass filter ( f c = 0.5 Hz) and an ideal power are used to allocate the power for HESS. The power reference for supercapacitor and battery are expressed by Equation (2).
where P PV is the measured power output of PV and τ is the time constant of low-pass filter. P ideal is the ideal output power of PV. K is the constant to determine amplitude of ideal PV output power which is in range [0,1]. In case, there is PV power prediction included, the constant K is obtained from dividing the average of prediction power by the average ideal power (K =P predic P ideal ). The PV power prediction and the method to determine the value of the constant K will be detailed in next research. In this paper, the constant K is pre-selected (K = 0.5).

Methods Comparison
The performance of power allocation methods are compared based on the ability to suppress the frequency deviation. In this section, the synchronous dq reference control is used, and its control block diagram is illustrated in Figure 5. The measured power output of PV is injected into power allocation block (Method#1 and Method#2) to generate the reference active power for battery and supercapacitor. To perform the dq decoupling control, measured inverter output voltage and current which is in natural frame (abc) needs to transform into synchronous reference frame (dq) first. The single-phase transformation from natural frame (abc) to stationary frame (αβ) is provided in Equation (3) that V α is in phase with V a , and V β is obtained by shifted V a in −90 • (lagging). Then, the stationary frame to the synchronous frame is expressed in Equation (4). The inner current control loop controls the current supplied by the converter to match its desired value by comparing the desired current value (I * = P V ) with the measured current I d . The modulating signals (m d and m q ) which use to control the switching time of IGBT can be obtained via the Equation (5).
In Formular (5), V d , V q , I d and I q are voltage and current in dq component. k P , k i are proportional and integrator gain of PI controller. L is line inductance and ω is rated angular frequency.
To assess the effectiveness of each power allocation methods; a strong PV power fluctuation profile is utilized as shown in Figure 6. Figure 7 is the frequency response based on each power allocation methods. There are three waveforms in this figure. The black − graph represents frequency of the system without energy storage system. The blue − graph is frequency response based on Method#1, and the red − graph is based on the proposed method (Method#2). By observing the Figure 7 during the time t = 63 s to t = 68 s, it is clear that the frequency deviation mitigation based on Method#1 has higher variation overshoot compare to its counterpart Method#2 with frequency deviation overshoot 50.4 Hz and 50.1 Hz, respectively. Therefore, the proposed method (Method#2) is selected to allocate the power for HESS in this research.

Frequency Deviation Suppression Based on VSG
Due to the extraordinary increase in global energy consumption and environmental pollution, the application of renewable energy based on inverter is dramatically increased. However, the inertia-less of these inverter-based generators could degrade the system stability and quality. To handle these issues, the idea is emerged by adding virtually inertia to the inverter-based distributed generator which so-called virtual synchronous generator. The following section will be discussed about the model and control of VSG.

VSG Model and Control
The VSG is formed by three important elements such as energy storage system, inverter, and a proper control algorithm. By taking the benefit of release/absorb characteristic of ESS, a proper designed control scheme could control the inverter to mimic the dynamic behavior of the synchronous generator. The VSG algorithm is implemented based on the swing equation of a synchronous generator and it is given in Equation (6).
where T m , T e is the generator's mechanic torque and electromagnetic torque, respectively. J is a moment of inertia, and ω m is generator's angular frequency. By multiplying the Equation (6) with angular frequency (ω m ), the swing equation in term of power (P = ω m .T) is obtained as express in Equation (7).
The P − ω and Q − v droop control are commonly used in the primary frequency and voltage regulation. The relation between P − ω and Q − v are given in Equation (8).
Moreover, in order to fully mimic the conventional synchronous generator, the damping term (D(ω m − ω pcc )) due to damper winding, mechanical friction and electrical losses are commonly added to swing equation. By substituting the damping term and frequency governor model (Equation (8)) into Equation (7), the swing equation for the VSG in this research is obtained as expressed in Equation (9).
In Formula (9), P out is the measured power output of VSG which is equivalent to P e . ω m is the VSG's angular frequency and ω pcc is the angular frequency at the point of common coupling. J and D are the virtual inertia and damping factor, respectively. Designing the VSG parameters such as J and D are the challenging task. For the sake of simplicity, the parameter J and D [25] could be calculated based on Equation (10) which follows the synchronous generator.
where H is the inertia constant, which is in range [2 s-10 s]. S n is the base power of generator, ω is the angular frequency which equals to 2π f and ∆ω (∆ω = ω m − ω pcc ) is the allowable deviation frequency which equals to 2π. To understand the effect of virtual inertia and damping factor on the system's frequency, the Equation (9) is derived as.
In Equation (11), assuming that ( ) is constant. If the value of J is increased, the dω m dt will be decreased. Similarly, in Equation (12), assuming that (P re f − If the parameter D gets bigger, ∆ω will become smaller. Hence, the large value of J and D result in a small frequency deviation; at the same time, they maximize the power, generated or absorbed by the energy storage system. However, there is a side-effect for larger value selection of parameter J and D such as causing overload the inverter, increasing the settling time, requiring the high accuracy of PLL. Therefore, the optimum value selection of J and D could significantly ensure the system stability. The overall control block diagram of VSG is provided in Figure 8. The reference power is obtained from the power allocation Method#2. The P, Q calculation block computes the power output of the VSG via the Formula (13).
where V d , V q , I d , I q are dq − axis output voltage and current, respectively. A low-pass filter with cut-off frequency, f c = 0.6366 Hz, is added to the measured power to diminish the noise from measurement device. From the VSG and Q − v droop control block, the virtual phase angle (θ m ) and the voltage amplitude (E) are obtained, respectively. The multiplication of voltage amplitude (E) with the phase angle sin(θ m ) generates the sinusoidal PW M to control the switching time of inverter.

Tuning VSG Parameter Based on BSA
Optimization is a powerful tool which is used by the researchers in various applications over the past few decades in purpose to extract maximum benefits from the system by finding the best values of system parameters through the maximization or minimization of the objective function. As discussed in Section 3.1, the VSG emulates the SG's dynamic characteristic by representing the SG fundamental swing equation to create the virtual inertia and damping factor. Unlike a real synchronous machine, the parameters of VSG can be tuned to improve the dynamic response of the system. In this research, a new evolutionary optimization called BSA is used for online tuning the parameters (J and D) of VSG.
The objective function: The design problem can be formulated by minimizing ISE (Equation (14)) in order to determine the optimum values of J and D. A brief discussion on BSA is provided below.
BSA [26] is a new population-based evolutionary algorithms. It tries to minimize the objective function by performing the iterative process. Five evolutionary mechanisms such as initialization, selection − I, mutation, crossover, and selection − I I employed in BSA. The complete process of BSA provides in Figure 9. -Initialization: The population P = (P i,j ) (N,M) and oldP i,j are initialized via a uniform stochastic selection of particles values within the solution space, as shown by Formula (15). The fitness function is first evaluated by using the initialized value of the population. P ij = P jmin + rnd(P jmax − P jmin ); (Initialization of population, P.) oldP i,j = P jmin + rnd(P jmax − P jmin );  -Selection − I: There are three things done in Selection − I such as update P best matrix, memorize the previous experience (oldP) and random order based on Equation (16), and generate binary integer-valued matrix (map).
-Mutation: The trial population Mutant is initialized in the Mutation step by following the Equation (17).
where F is the real number to control the step size of search path or direction.
-Crossover: Generates the final form of the trial population (o f f spring).
-Selection − I I checks whether fitness o f f springs gives better fitness value than that obtained so far using initial population or not. If fitness o f f springs gives better results, then update offsprings by fitness offsprings via P best matrix; otherwise, keep the previous one. Keep doing the same process until termination criterion is met. Figure 10 demonstrates the interface between the simulation model and the optimization algorithm (BSA). The BSA embeds in the simulink environment using the Level2 S-function. The parameter J and D are set as the tunable parameter. Figure 11 shown a testing case result to observe whether the parameter is properly online tuned. At the time of simulation start, the value of J and D are intentionally wrong initialized. As shown in Figure 11, at time t = 0.5 s, the large loads are connected and the system is unstable as the virtual inertia and damping constant are wrong initialized. Hence, the oscillation cannot be damped during that period. To update the VSG parameter which generates by BSA, it requires to enable update mode from Simulation menu (Simulation → U pdateDiagram). One the update diagram is clicked; the VSG parameters are kept updating based on BSA and the system becomes stable as seen in Figure 11 from t = 3s to the end of the simulation.

Simulation Results and Discussion
In this research, a standalone microgrid is implemented under MATLAB/Simulink platform as shown in Figure 12. The equipment such as power supply, battery, PV simulator, etc., are modeled based on the real equipment which is available in the laboratory for later experimental purpose. The important parameters are provided in Table 2. It is worth mentioning that the objective of this simulation is to demonstrate the ability of VSG to mitigate the frequency deviation which results from the strong variation of PV output power. Hence, the reactive power control will not be focused in this study. Several case studies are carried out and discussed below.

PV Power Variation
This scenario aims to investigate the performance of VSG control combining with the proposed power allocation Method#2 to suppress the frequency deviation which results from stochastic power output of PV. A worth case PV profile which is recorded on 24 January 2015 from laboratory Rooftop-PV (P ≈ 2.1 kW) is used as illustrated in Figure 13. Five minutes data in the real-time is scaled to 1 s in the simulation environment via Rate Transition Simulink Block. Figure 14 presents the frequency response of the VSG control and the current dq − decoupling control based on Method#2. This result is obtained when it takes into account the strong variation power output of PV. According to this waveform, it is obvious that the VSG (blue − graph) could suppress the oscillation frequency more effectively than the normal dq − decoupling control (red − graph) by using the same amount of power from HESS. The power and SoC of the HESS are provided in Figure 15. In Figure 15a, the blue − graph represents the power of supercapacitor and red − graph is the power of battery. Since the supercapacitor is responsible for high power variation, its power and SoC (Figure 15b) are strongly fluctuated. Meanwhile, the battery's power and SoC (Figure 15c) are smoothly changed. As a result, the battery lifespan is expected to be improved due to low stress.

Load Transient
In this case, the simulation time is reduced from 140 s to 20 s. To observe the performance of VSG during the load transition, a group of load with the power consumption, 1.5 kW (25%), is connected into the system at the time t = 3 s with the initial consumption 4.2 kW, and disconnected around 45% at the time t = 10 s as shown in Figure 16. The VSG here will be compared with the modified droop control [27]. In Figure 17, blue − graph is the frequency response of the VSG, and red − graph is the frequency response of the modified droop control. It is clearly seen that the VSG which emulates the synchronous generator dynamic characteristic could provide the inertia and damping support to the system, as a result, it has smaller frequency overshoot/undershoot compare to the modified droop control when there is a sudden increase in power demand.

Comparison between Constant and Tuning Parameters of VSG
As mentioned in Section 3.2, adapting the parameters (J,D) of VSG is the key superior to the conventional synchronous generator to enhance the system dynamical response. Therefore, an online adapting based on BSA is investigated in this section. It is worth to mention that the increase in number of population and epoch could provide the better result by reducing the overshoot and settling time; at the same time, it increases the computation burden and simulation time. The parameter of BSA such as population size and epoch are set to 25 and 5, respectively, by considering the trade-off between computation burden and performance. The virtual inertia (J) and damping factor (D) which are computed by BSA is shown in Figure 18. To investigate the perfomance of adapting VSG's parameters, two case studies as discussed in Sections 4.1 and 4.2 are conducted.

PV Power Variation
The PV power in Figure 13 is used to realize the high PV power variation. The result of the frequency response with the online updating parameter is compared to the VSG constant parameters. Figure 19 is the system frequency response of the adaptive parameter by BSA and the constant parameter. It shows that with the tuning parameter, the system has smaller frequency overshoot compared to the constant parameter. Although the improvement is small, it proves the promising performance of the adaptive parameter.

Load Transient
In this case, the load transient is applied to the system supplementary with the high fluctuation PV power. The power demand waveform is shown in Figure 20. To create the load transient event, 45 percent of total power demand is connected and disconnected at time t = 5 s and t = 12 s, respectively. Three control schemes such as modified droop control, constant VSG parameter and adapted VSG parameter are compared. The frequency response of the system demonstrates in Figure 21. By observing at the time t = 5 s and t = 12 s, the system operates in unacceptable frequency range when the system is equipped with the modified droop control (cyan − graph). In case, the constant VSG parameter is applied, the system has a relative large deviation. But, it is still in acceptable frequency range ±0.5 Hz (blue − graph). While the adaptive parameter (red − graph) is adopted, the frequency deviation overshoot is efficiently suppressed which is in range ±0.2 Hz. This witness that the online tuning method could reduce the frequency deviation more effectively compared to other two control schemes.

Conclusions
In a standalone microgrid, the intermittent nature of renewable energy and the load transition are the main factors of the system stability degradation. In this paper, a new control theme called VSG has been introduced to suppress the amplitude of the frequency deviation which results from the fluctuation power output of the PV. The VSG is implemented based on supercapacitor/battery hybrid energy storage system. Considering, the tunable of VSG parameters, an optimization method, BSA, is utilized for online tuning the inertia and damping factor of VSG. To investigate the performance of the proposed control, the standalone microgrid is implemented in MATLAB/Simulink. Two scenarios such as strong variation power and the load increase are conducted, and the comparison studies on the control performance of the dq-decoupling control versus proposed VSG control, the VSG control versus modified droop control, and the constant VSG versus adapting VSG control was presented. The simulation results prove the effectiveness of the proposed method to suppress the overshoot of frequency deviation which results from the intermittent power of PV and the load transient from 50.18 Hz to 50.03 Hz and 51.2 Hz to 50.4 Hz, respectively.