# A Virtual Synchronous Generator Control Strategy for Microgrid Based on Harmonic Current Bypass Control

Authors: Wenbo Jiang; Bo Zhou
Journal: International Transactions on Electrical Energy Systems
 (2022)

---

## Abstract

To improve the voltage and frequency stability and suppress the voltage harmonics of a microgrid, a virtual synchronous generator (VSG) control strategy based on the harmonic current bypass control is proposed in this paper. First, a robust voltage control link is added to the virtual excitation component of the traditional VSG control strategy to reduce the amplitude error of the inverter’s driving voltage caused by the reactive power-voltage droop coefficient. A harmonic current bypass control link is then used to adjust the inverter’s voltage signal to reduce the total harmonic distortion of the microgrid. Finally, a simulation model of the microgrid is established using the MATLAB/Simulink software, and its stability is analyzed. In addition, the proposed control strategy is also compared with the traditional droop control and traditional VSG control strategies, focusing on the frequency instability and harmonic suppression performance of the microgrid. The numerical simulation results verified the effectiveness and superiority of the improved VSG control strategy proposed in this paper.


---

## Body

## 1. Introduction

In recent years, the power load has increased rapidly year by year with the continuous development of the economy and society. However, the power generation centers are generally far from the user centers, and the disadvantages of traditional centralized large-scale power transmission are becoming increasingly evident. Such disadvantages include power losses in the transmission process and instability of the frequency and voltage of the power supply in remote areas [1, 2]. To resolve these problems, distributed power generation, represented by renewable energy power generation, has developed rapidly and shows advantages over traditional centralized power supply methods, such as better renewability and recyclability, lower power transmission and distribution losses, and lower development costs [3]. The proportion of renewable energy power generation in the total power generation is increasing day by day, and renewable energy power generation will become the main power generation mode in the near future. However, the direct integration of distributed generation into the power grid will have a significant impact on the traditional power grid, so this distributed generation often operates in the form of microgrids. As a key component of a microgrid, the inverter has an important impact on the microgrid stability and security. Because the inverter in a microgrid has low damping and low inertia, it is difficult to automatically adjust the frequency and voltage when the microgrid is operating in islanded mode [4, 5]. Meanwhile, high-order harmonics will be generated by the inverter, which will affect the power quality of the microgrid [6]. Therefore, the choice of the inverter control strategy has an important influence on the stability of the microgrid and power grid.To improve the stability of the voltage and frequency in a microgrid, many control strategies have been proposed, such as P-Q control, V-F control, droop control [7–9], and sliding-mode control [10, 11]. In the droop control strategy, the primary frequency modulation and primary voltage regulation of a synchronous generator are simulated so that the distributed generation can automatically adjust its active power and reactive power according to the changes of the frequency and voltage of the microgrid, resulting in a reliable voltage and frequency [7–9]. Due to the lack of rotational inertia and the damping characteristics of synchronous generators, droop control still cannot suppress the rapid frequency fluctuations and prevent the frequency drop when there is an imbalance between the supply and demand of active power in a microgrid. Various researchers [12–14] have proposed several improved droop control strategies based on virtual impedance and achieved good performances. However, the equivalent impedance of a microgrid changes with the increase in the virtual impedance, which causes a larger voltage drop and is harmful to the power quality of the microgrid. The droop control strategy has limitations on the frequency modulation and voltage regulation of a microgrid. Therefore, by combining the frequency-active power and reactive power-voltage droop characteristics of droop control and incorporating the rotational inertia and damping characteristics, the inverter can achieve external characteristics similar to those of a synchronous generator, which will improve the stability of the voltage and frequency in the microgrid. This kind of control strategy is called the virtual synchronous generator (VSG) control strategy [15–17]. Various researchers [18–20] have proposed several VSG models based on the electromagnetic transient equation and rotor equation of motion for synchronous generators. Reference [21] established an inverter-interfaced microgrid model that supplied different types of loads using a VSG and proposed a generalized small-signal stability analysis framework for an islanded microgrid. The proposed optimization platform enhanced the microgrid stability, and it minimized voltage drops on the buses, reactive power mismatches, and the frequency, simultaneously. Reference [22] investigated the impact of the VSG based on renewable energy sources (RESs) in power systems. The role of the power system stabilizers in the all-VSG grid was comprehensively evaluated. Reference [23] proposed a simple power system modeling method to analyze the grid integration effect of the VSG. Potential errors due to the topology simplification and the measures to avoid them were also discussed. However, these models are overly complex and are significantly affected by the transient process of the microgrid, which is not beneficial for the actual microgrid operation. Reference [2] proposed a VSG control strategy based on the impedance harmonic current distortion suppression to suppress the voltage harmonics of a microgrid. Reference [24] proposed an adaptive virtual impendence control strategy to accelerate the active power adjustment process of a virtual synchronous generator system, which helped complete the first frequency modulation and improve the inertia adjustment ability. Reference [25] proposed an adaptive virtual impedance-based VSG control approach for grid-connected and islanded microgrids to alleviate the impedance difference at the inverter output and improve the proportional reactive power-sharing between DGs. However, the impedance characteristics of the microgrid are significantly influenced in this control strategy, which is likely to cause a larger voltage drop. Reference [26] conducted small-signal modeling of multiple VSGs in parallel, and a multiple-VSG cooperative control strategy based on adjacent information was also proposed. The stability of the proposed control strategy was studied by Lyapunov stability theory, and the effectiveness of the proposed control strategy was verified by simulations. Reference [27] developed an adaptive fuzzy-neural-network-imitating sliding-mode control (AFNNISMC) for a parallel-inverter system in an islanded microgrid via a master-slave current sharing strategy. Numerical simulations and experimental results were given to demonstrate the feasibility and effectiveness of the proposed AFNNISMC scheme.In summary, previous studies had shortcomings in terms of improving the stability of the voltage and frequency and suppressing the voltage harmonics. To overcome these shortcomings, this paper proposes a novel VSG control strategy based on harmonic current bypass control.The contributions of this work are summarized as follows:(1)
We propose a novel VSG control strategy based on improved virtual excitation control and harmonic current bypass control to improve the stability of the voltage and frequency and suppress the harmonics of the microgrid.(2)
A three-phase inverter was considered as an example, and a simulation model of a microgrid was established using the MATLAB/Simulink software. The stability of the microgrid was analyzed using this novel control strategy.(3)
We compared the proposed control strategy with the traditional droop control strategy, traditional VSG control strategy, and virtual impedance VSG control strategy, focusing on frequency fluctuations and the harmonic suppression performance of the microgrid.(4)
The research results verified the effectiveness and superiority of the novel VSG control strategy proposed in this paper, which will provide a theoretical basis for the practical application of microgrid integration technology.The rest of the paper is organized as follows. Section2 describes the mathematical model. In Section 3, a control system of the VSG is designed. Section 4 demonstrates the simulation results of this novel VSG control strategy. In Section 5, important discussions are presented. Lastly, the conclusions and the future work of the research are presented in Section 6 [28–30].


## 2. Mathematical Model

### 2.1. Working Principle of the Synchronous Generator

Under ideal conditions, three-phase stator windings can be assumed to be symmetrically distributed. The magnetic field of the air gap is assumed to have a uniform distribution, and phenomena such as eddy current loss and magnetic saturation are not considered.Under the above assumptions, the rotor equation of motion of the synchronous generator can be expressed as follows:(1)J′dω′dt=Tm′−Te′−Td′=Pm′ω′−Pe′ω′−D′ω′−ω0′,where J′ and D′ represent the moment of inertia and damping coefficient of the synchronous generator (unit: kg·m2), respectively; ω′ is the mechanical angular velocity, which is equal to the electrical angular velocity when the number of pole pairs of the synchronous generator is 1 (unit: rad/s); ω0′ is the synchronous angular velocity of the power grid (unit: rad/s); Tm′, Te′, and Td′ represent the mechanical torque, electromagnetic torque, and damping torque, respectively (unit: N·m); and Pm′ and Pe′ represent the mechanical power and electromagnetic power of the synchronous generator, respectively (unit: W).Equation (1) shows that the rotor equation of motion of a synchronous generator contains the variables J′ and D′, so it incorporates frequency modulation and voltage regulation. The rotor equation of motion is the core equation of a synchronous generator, which is also the key factor to design the control system of a VSG.


### 2.2. Working Principle of the Virtual Synchronous Generator (VSG)

According to the rotor equation of motion of a synchronous generator, the moment of inertia and damping coefficient are established for the inverter of the microgrid. This allowed the inverter to have similar frequency modulation and voltage regulation characteristics as those of the synchronous generator.As shown in Figure1, the direct current (DC) power supply was converted into a three-phase alternating current (AC) voltage after the three-phase inverter and is then filtered by an LC (inductor-capacitor) filter to obtain a stable, three-phase, sinusoidal AC voltage.Figure 1
Schematic diagram of the three-phase grid-connected system.The detailed process is as follows:Step 1. Measure the output voltage (U) and current (I) of a microgrid and obtain the active power (P) and reactive power (Q) by power calculationsStep 2. Input (U) and (I) into a three-phase phase-locked loop (PLL) and obtain the actual frequency value (f)Step 3. Input the reactive power (Q) and voltage reference value (Uref) into the excitation control link and obtain the voltage amplitude (E)Step 4. Input the active power (P), the frequency reference value (fref), the active power reference value (Pref), and the actual frequency value (f) into the speed control link and obtain the mechanical power (Pm) of VSGStep 5. Input the voltage amplitude (E) and mechanical power (Pm) into the VSG control link and obtain the driving voltage signal (Uabc)Step 6. Control the parameters of the inverter using the driving voltage signal (Uabc)Through a comparison with the working principle of the synchronous generator presented in Section2.1, the rotor equation of motion of the VSG can be expressed as follows:(2)Jdωdt=Pmω0−Peω0−Dω−ω0,dθdt=ω,where J and D represent the moment of inertia and damping coefficient of the VSG, respectively (no units); ω0 and ω represent the rated angular frequency and actual angular frequency of the microgrid, respectively (unit: rad/s); Pm and Pe represent the mechanical power and electromagnetic power of the VSG, respectively (unit: W); and θ is the power angle (unit: °).The equations above describe the mathematical model and working principle of the VSG.


## 2.1. Working Principle of the Synchronous Generator

Under ideal conditions, three-phase stator windings can be assumed to be symmetrically distributed. The magnetic field of the air gap is assumed to have a uniform distribution, and phenomena such as eddy current loss and magnetic saturation are not considered.Under the above assumptions, the rotor equation of motion of the synchronous generator can be expressed as follows:(1)J′dω′dt=Tm′−Te′−Td′=Pm′ω′−Pe′ω′−D′ω′−ω0′,where J′ and D′ represent the moment of inertia and damping coefficient of the synchronous generator (unit: kg·m2), respectively; ω′ is the mechanical angular velocity, which is equal to the electrical angular velocity when the number of pole pairs of the synchronous generator is 1 (unit: rad/s); ω0′ is the synchronous angular velocity of the power grid (unit: rad/s); Tm′, Te′, and Td′ represent the mechanical torque, electromagnetic torque, and damping torque, respectively (unit: N·m); and Pm′ and Pe′ represent the mechanical power and electromagnetic power of the synchronous generator, respectively (unit: W).Equation (1) shows that the rotor equation of motion of a synchronous generator contains the variables J′ and D′, so it incorporates frequency modulation and voltage regulation. The rotor equation of motion is the core equation of a synchronous generator, which is also the key factor to design the control system of a VSG.


## 2.2. Working Principle of the Virtual Synchronous Generator (VSG)

According to the rotor equation of motion of a synchronous generator, the moment of inertia and damping coefficient are established for the inverter of the microgrid. This allowed the inverter to have similar frequency modulation and voltage regulation characteristics as those of the synchronous generator.As shown in Figure1, the direct current (DC) power supply was converted into a three-phase alternating current (AC) voltage after the three-phase inverter and is then filtered by an LC (inductor-capacitor) filter to obtain a stable, three-phase, sinusoidal AC voltage.Figure 1
Schematic diagram of the three-phase grid-connected system.The detailed process is as follows:Step 1. Measure the output voltage (U) and current (I) of a microgrid and obtain the active power (P) and reactive power (Q) by power calculationsStep 2. Input (U) and (I) into a three-phase phase-locked loop (PLL) and obtain the actual frequency value (f)Step 3. Input the reactive power (Q) and voltage reference value (Uref) into the excitation control link and obtain the voltage amplitude (E)Step 4. Input the active power (P), the frequency reference value (fref), the active power reference value (Pref), and the actual frequency value (f) into the speed control link and obtain the mechanical power (Pm) of VSGStep 5. Input the voltage amplitude (E) and mechanical power (Pm) into the VSG control link and obtain the driving voltage signal (Uabc)Step 6. Control the parameters of the inverter using the driving voltage signal (Uabc)Through a comparison with the working principle of the synchronous generator presented in Section2.1, the rotor equation of motion of the VSG can be expressed as follows:(2)Jdωdt=Pmω0−Peω0−Dω−ω0,dθdt=ω,where J and D represent the moment of inertia and damping coefficient of the VSG, respectively (no units); ω0 and ω represent the rated angular frequency and actual angular frequency of the microgrid, respectively (unit: rad/s); Pm and Pe represent the mechanical power and electromagnetic power of the VSG, respectively (unit: W); and θ is the power angle (unit: °).The equations above describe the mathematical model and working principle of the VSG.


## 3. Control System Design of VSG

The control system design of the VSG mainly includes virtual speed control, virtual excitation control, and harmonic current bypass control. In this paper, we improve the traditional virtual excitation control link and first apply harmonic current bypass control to the VSG control system.


### 3.1. Design of Virtual Speed Control

The active power-frequency characteristic is the theoretical foundation for the synchronous generator to respond to the frequency changes of a microgrid in real time and make corresponding adjustments, which can be expressed as follows:(3)Pm−Pn=Kffref−f,where Kf is the frequency adjustment coefficient; fref and f represent the rated frequency and the output frequency of the power grid, respectively (unit: Hz); and Pn and Pm represent the reference value of the given active power and mechanical power, respectively (unit: W). Based on the speed regulation principle of the synchronous generator and equation (3), the virtual speed control link of the VSG is designed, as shown in Figure 2.Figure 2
Schematic diagram of virtual speed control.The specific implementation process is as follows:Step 1: measure the output frequency (f) of the microgrid and then calculate the frequency difference with the reference frequency (fref)Step 2: after passing through the active power-frequency droop gain link (DP), sum the obtained frequency difference with the reference value for a given active power (Pn)Step 3: obtain the input mechanical power (Pm) of the VSGIn this process,Dp is the active power-frequency droop coefficient, which is defined as the ratio of the frequency change to the active power change, which can be expressed as follows:(4)Dp=ΔωΔP.The value ofDp will affect the active power of the VSG caused by the frequency fluctuations. According to China’s national standard (GB/T15945-2008), the frequency deviation should be less than ±0.2 Hz, and the active power change of the VSG should be ±100% of the rated reference value. The relevant parameters are determined in Section 4.1.


### 3.2. Design of Virtual Excitation Control

The active power-frequency characteristic is the theoretical foundation for synchronous generators to respond to voltage changes of a microgrid in real time and to control the output reactive power, which can be expressed as follows:(5)U−U0=KqQset−Q,where Kq is the reactive power adjustment coefficient; U and U0 are the output voltage and rated voltage, respectively (unit: V); and Qset and Q are the given reactive power and output reactive power, respectively (unit: Var).Based on the excitation principle of synchronous generators and equation (5), a robust droop control link is added to the traditional control link (red dashed box in Figure 3), and the virtual excitation control link of the VSG is designed, as shown in Figure 3.Figure 3
Schematic diagram of virtual excitation control.The specific implementation process is as follows:Step 1: calculate the difference between the measured reactive power (Q) and the reference value of the reactive power (Qset) and obtain the reactive power difference (Q1)Step 2: after passing through the reactive power-voltage droop gain link (Dq), the obtained reactive power difference is summed with the rated voltage (U0), and the reference voltage (Uref) is obtainedStep 3: calculate the root mean square of the output voltage (Un) of the microgridStep 4: calculate the difference between the root mean square of the output voltage and the reference voltage (Uref) and then obtain the voltage amplitude (E0)Step 5: obtain the voltage amplitude (E) of the VSG modulation signal after the voltage amplitude (E0) is amplified by a proportional-integral (PI) controllerIn this process,Dq is the reactive power-voltage droop coefficient, which is defined as the ratio of the reactive power’s change to the voltage change and can be expressed as follows:(6)Dq=ΔQΔU.Unlike the traditional excitation control link, the reference voltage (Uref) is controlled by the feedback and PI control in the excitation control in this paper. Therefore, it can reduce the influence of calculation errors and other disturbances and is robust to parameter drift and disturbances.The value ofDq can affect the reference voltage of the VSG caused by reactive power fluctuations. According to China’s national standard (GB/T12325-2008), the voltage deviation should be less than ±7% of the nominal voltage. The output reactive power change of the VSG was ±100% of the rated reference value, and the relevant parameters are determined in Section 4.1. The virtual synchronous generator (VSG) ontology control is designed, as shown in Figure 4.Figure 4
Schematic diagram of virtual synchronous generator (VSG) ontology control.The specific implementation process is as follows:Step 1: calculate the difference between the mechanical power (Pm) obtained in Section 3.1 and the measured value of actual active power (P).Step 2: divide the above difference by the reference angular velocity (ωref).Step 3: perform feedback adjustment using the damping coefficient (D) and integrate the moment of inertia (J).Step 4: sum the integrated values and the reference angular velocity (ωref) and then obtain the angular velocity (ω).Step 5: integrate the angular velocity (ω) and obtain the phase angle of the modulation voltage.Step 6: based on the modulation voltage amplitude and the phase angle, calculate the initial modulation signal of the VSG by vector superposition. This can be expressed as follows:(7)eabc=eaebec=Esinϕ,Esinϕ−2π3,Esinϕ+2π3.In the design of VSG ontology control,J and D have an important influence on the stability of the microgrid. The initial value of D is generally selected as follows:(8)D=ΔPmaxωset⋅Δωmax=ΔPmax2⋅π⋅fset⋅Δωmax,where ΔPmax and Δωmax represent the maximum change of the power and angular velocity, respectively, and fset is the set value of the frequency.However, the set values of the active power and frequency are different in the actual design. Therefore, different values ofD should be selected to analyze its influence on the stability of the microgrid and verify the effectiveness of this control strategy. In this paper, the reference value of D was 25.33, and the values used for comparison were 30 and 40.At the same time, the value ofJ must be greater than zero to provide the microgrid with inertial characteristics. However, the time for the microgrid to return to a stable status after being disturbed will increase if the value is J is too large. In addition, the value of J is also affected by the first-order inertial time constant. In actual design, the influence of J on the microgrid is typically analyzed with J = 0.5, 1, and 2.


### 3.3. Design of Harmonic Current Bypass Control

Since many other high-order harmonics will be generated after the inverter, it is necessary to take measures to suppress the harmonics to reduce the total harmonic distortion (THD) of the microgrid. In the existing design, the THD is partially suppressed by reducing the filter inductance of the main circuit. However, the filtering effect is not evident if the filter inductance is too small. To resolve this contradiction, a harmonic current bypass control is first adopted in the VSG control strategy in this paper. The basic principle of this novel control strategy is that the harmonic components of the load current are eliminated through the bypass circuit, without changing the value of the filter inductance. It not only achieves a good filtering effect but also improves the power quality.The transfer function can be obtained by analyzing the control process shown in Figure5:(9)CR=vr−Kii+KRsvr−vo.Figure 5
Schematic diagram of harmonic current bypass control.Thus, the relationship between the output and input can be obtained as follows:(10)vo=vr−Zos•i,where(11)Zos=sL+Ki1+KRs.When the real part ofKR is positive, the output impedance and inductive reactance of the inverter are reduced, which can improve the output voltage THD. The main factor affecting the voltage THD is the size of the output impedance, which has little to do with the type of output impedance. Therefore, the voltage THD can be reduced to a very low value only if the output impedance is calibrated properly. Thus, the selection of KR is crucial, and the harmonic compensator approach is chosen in this paper, where the transfer function of the harmonic compensator is as follows:(12)KRs=∑h=3,5,72ξhωss2+2ξhωs+hω2×Kh,where the gain at the frequency hω is Kh, the damping factor ξ was set to 0.001 to reflect the frequency fluctuation, and h represents the 3rd, 5th, and 7th harmonics, and its value was 314 rad/s.By increasing the voltage feedback, the voltage change of the microgrid can be well reflected and adjusted quickly. Moreover, the real part ofKR is selected as positive, and the resistive and inductive characteristics of the inverter’s output impedance are reduced. Thus, the THD of the output voltage is reduced. Moreover, the current (i) contains harmonic current components through pulse-width modulation (PWM). When the current (i) passes through the load, it will generate a corresponding harmonic voltage to offset THD partially, thus improving the harmonic characteristics.The specific implementation process is as follows:Step 1: take the initial modulation voltage (eabc) obtained in Section 3.3 as the modulation reference input voltage (Vr), compare it with the output voltage of the microgrid (V0), and then calculate the voltage difference (V1)Step 2: after passing through the voltage gain link (KR), sum the obtained voltage difference with the reference voltage (Vr) and then obtain the voltage (V2)Step 3: after passing through the current gain link (Ki), convert the current to a voltage and sum it with V2 and then obtain the modulation voltage signal (V) of the VSGStep 4: control the inverter through PWM based on the modulation voltage signal (V)


## 3.1. Design of Virtual Speed Control

The active power-frequency characteristic is the theoretical foundation for the synchronous generator to respond to the frequency changes of a microgrid in real time and make corresponding adjustments, which can be expressed as follows:(3)Pm−Pn=Kffref−f,where Kf is the frequency adjustment coefficient; fref and f represent the rated frequency and the output frequency of the power grid, respectively (unit: Hz); and Pn and Pm represent the reference value of the given active power and mechanical power, respectively (unit: W). Based on the speed regulation principle of the synchronous generator and equation (3), the virtual speed control link of the VSG is designed, as shown in Figure 2.Figure 2
Schematic diagram of virtual speed control.The specific implementation process is as follows:Step 1: measure the output frequency (f) of the microgrid and then calculate the frequency difference with the reference frequency (fref)Step 2: after passing through the active power-frequency droop gain link (DP), sum the obtained frequency difference with the reference value for a given active power (Pn)Step 3: obtain the input mechanical power (Pm) of the VSGIn this process,Dp is the active power-frequency droop coefficient, which is defined as the ratio of the frequency change to the active power change, which can be expressed as follows:(4)Dp=ΔωΔP.The value ofDp will affect the active power of the VSG caused by the frequency fluctuations. According to China’s national standard (GB/T15945-2008), the frequency deviation should be less than ±0.2 Hz, and the active power change of the VSG should be ±100% of the rated reference value. The relevant parameters are determined in Section 4.1.


## 3.2. Design of Virtual Excitation Control

The active power-frequency characteristic is the theoretical foundation for synchronous generators to respond to voltage changes of a microgrid in real time and to control the output reactive power, which can be expressed as follows:(5)U−U0=KqQset−Q,where Kq is the reactive power adjustment coefficient; U and U0 are the output voltage and rated voltage, respectively (unit: V); and Qset and Q are the given reactive power and output reactive power, respectively (unit: Var).Based on the excitation principle of synchronous generators and equation (5), a robust droop control link is added to the traditional control link (red dashed box in Figure 3), and the virtual excitation control link of the VSG is designed, as shown in Figure 3.Figure 3
Schematic diagram of virtual excitation control.The specific implementation process is as follows:Step 1: calculate the difference between the measured reactive power (Q) and the reference value of the reactive power (Qset) and obtain the reactive power difference (Q1)Step 2: after passing through the reactive power-voltage droop gain link (Dq), the obtained reactive power difference is summed with the rated voltage (U0), and the reference voltage (Uref) is obtainedStep 3: calculate the root mean square of the output voltage (Un) of the microgridStep 4: calculate the difference between the root mean square of the output voltage and the reference voltage (Uref) and then obtain the voltage amplitude (E0)Step 5: obtain the voltage amplitude (E) of the VSG modulation signal after the voltage amplitude (E0) is amplified by a proportional-integral (PI) controllerIn this process,Dq is the reactive power-voltage droop coefficient, which is defined as the ratio of the reactive power’s change to the voltage change and can be expressed as follows:(6)Dq=ΔQΔU.Unlike the traditional excitation control link, the reference voltage (Uref) is controlled by the feedback and PI control in the excitation control in this paper. Therefore, it can reduce the influence of calculation errors and other disturbances and is robust to parameter drift and disturbances.The value ofDq can affect the reference voltage of the VSG caused by reactive power fluctuations. According to China’s national standard (GB/T12325-2008), the voltage deviation should be less than ±7% of the nominal voltage. The output reactive power change of the VSG was ±100% of the rated reference value, and the relevant parameters are determined in Section 4.1. The virtual synchronous generator (VSG) ontology control is designed, as shown in Figure 4.Figure 4
Schematic diagram of virtual synchronous generator (VSG) ontology control.The specific implementation process is as follows:Step 1: calculate the difference between the mechanical power (Pm) obtained in Section 3.1 and the measured value of actual active power (P).Step 2: divide the above difference by the reference angular velocity (ωref).Step 3: perform feedback adjustment using the damping coefficient (D) and integrate the moment of inertia (J).Step 4: sum the integrated values and the reference angular velocity (ωref) and then obtain the angular velocity (ω).Step 5: integrate the angular velocity (ω) and obtain the phase angle of the modulation voltage.Step 6: based on the modulation voltage amplitude and the phase angle, calculate the initial modulation signal of the VSG by vector superposition. This can be expressed as follows:(7)eabc=eaebec=Esinϕ,Esinϕ−2π3,Esinϕ+2π3.In the design of VSG ontology control,J and D have an important influence on the stability of the microgrid. The initial value of D is generally selected as follows:(8)D=ΔPmaxωset⋅Δωmax=ΔPmax2⋅π⋅fset⋅Δωmax,where ΔPmax and Δωmax represent the maximum change of the power and angular velocity, respectively, and fset is the set value of the frequency.However, the set values of the active power and frequency are different in the actual design. Therefore, different values ofD should be selected to analyze its influence on the stability of the microgrid and verify the effectiveness of this control strategy. In this paper, the reference value of D was 25.33, and the values used for comparison were 30 and 40.At the same time, the value ofJ must be greater than zero to provide the microgrid with inertial characteristics. However, the time for the microgrid to return to a stable status after being disturbed will increase if the value is J is too large. In addition, the value of J is also affected by the first-order inertial time constant. In actual design, the influence of J on the microgrid is typically analyzed with J = 0.5, 1, and 2.


## 3.3. Design of Harmonic Current Bypass Control

Since many other high-order harmonics will be generated after the inverter, it is necessary to take measures to suppress the harmonics to reduce the total harmonic distortion (THD) of the microgrid. In the existing design, the THD is partially suppressed by reducing the filter inductance of the main circuit. However, the filtering effect is not evident if the filter inductance is too small. To resolve this contradiction, a harmonic current bypass control is first adopted in the VSG control strategy in this paper. The basic principle of this novel control strategy is that the harmonic components of the load current are eliminated through the bypass circuit, without changing the value of the filter inductance. It not only achieves a good filtering effect but also improves the power quality.The transfer function can be obtained by analyzing the control process shown in Figure5:(9)CR=vr−Kii+KRsvr−vo.Figure 5
Schematic diagram of harmonic current bypass control.Thus, the relationship between the output and input can be obtained as follows:(10)vo=vr−Zos•i,where(11)Zos=sL+Ki1+KRs.When the real part ofKR is positive, the output impedance and inductive reactance of the inverter are reduced, which can improve the output voltage THD. The main factor affecting the voltage THD is the size of the output impedance, which has little to do with the type of output impedance. Therefore, the voltage THD can be reduced to a very low value only if the output impedance is calibrated properly. Thus, the selection of KR is crucial, and the harmonic compensator approach is chosen in this paper, where the transfer function of the harmonic compensator is as follows:(12)KRs=∑h=3,5,72ξhωss2+2ξhωs+hω2×Kh,where the gain at the frequency hω is Kh, the damping factor ξ was set to 0.001 to reflect the frequency fluctuation, and h represents the 3rd, 5th, and 7th harmonics, and its value was 314 rad/s.By increasing the voltage feedback, the voltage change of the microgrid can be well reflected and adjusted quickly. Moreover, the real part ofKR is selected as positive, and the resistive and inductive characteristics of the inverter’s output impedance are reduced. Thus, the THD of the output voltage is reduced. Moreover, the current (i) contains harmonic current components through pulse-width modulation (PWM). When the current (i) passes through the load, it will generate a corresponding harmonic voltage to offset THD partially, thus improving the harmonic characteristics.The specific implementation process is as follows:Step 1: take the initial modulation voltage (eabc) obtained in Section 3.3 as the modulation reference input voltage (Vr), compare it with the output voltage of the microgrid (V0), and then calculate the voltage difference (V1)Step 2: after passing through the voltage gain link (KR), sum the obtained voltage difference with the reference voltage (Vr) and then obtain the voltage (V2)Step 3: after passing through the current gain link (Ki), convert the current to a voltage and sum it with V2 and then obtain the modulation voltage signal (V) of the VSGStep 4: control the inverter through PWM based on the modulation voltage signal (V)


## 4. Results

To verify the effectiveness and superiority of the improved VSG control strategy proposed in this paper and to compare with the traditional droop control strategy and the traditional VSG control strategy, a microgrid simulation model was established using the MATLAB/Simulink software, as shown in Figure6.Figure 6
Microgrid simulation model.As shown in Figure6, this model contained distributed generation (DG), a three-phase inverter module, an LC filter module, a control system module, a PWM control module, and a resistance load. Of these, the control system module is the most important part of the simulation model. The control system module included various components, including a speed controller, excitation controller, VSG controller, and bypass harmonic controller. The detailed structures of these controllers are shown in Figures 2–5, respectively. Due to figure size limitations, the internal structures of the individual controllers are not shown in detail here, and only the overall diagram is presented.


### 4.1. Initial Parameters

In our simulation, the relevant parameters were set as follows. The voltage of the DG wasVdc = 800 V. The filtering parameters were Rf = 0.01 Ω, Lf = 1.8 mH, and Cf = 10 μF. The active power, reactive power, and frequency of the control module were Pset = 10 kW, Qset = 8 kVar, and fset = 50 Hz, respectively. The amplitude of the output voltage was Uo = 311 V; the switching frequency of the PWM was fPWM = 10 kHz; and the resistance load was 24 Ω.Using equations (4), (6), and (8), the active-frequency droop coefficient (Dp), the reactive-voltage droop coefficient (Dq), and the reference damping coefficient (D) were calculated to be Dp = 1.26 × 10−4, Dq = 3.89 × 10−4, and D = 25.33, respectively. In addition, according to the selection principle of J in Section 3.2, the reference value was taken as 0.5.


### 4.2. Simulation Results

#### 4.2.1. Stability Analysis of the Microgrid

In this simulation process, it was assumed that the microgrid operated in islanded mode. In the range of 0–0.7 s, the microgrid was operating stably, a resistance load (72 Ω) was connected to the microgrid at = 0.7 s, and a resistance load (36 Ω) was removed from the microgrid att = 1.2 s.As shown in Figure7, the frequency range of the microgrid was 49.87–50.02 Hz, and the maximum deviation was only 0.13 Hz.Figure 7
Output frequency of microgrid.In Figure8(a), the voltage waveform was stable over five cycles. As shown in Figure 8(b), the fluctuations of the output voltage were small when the load changed. The locations of the load changes are marked as (1) and (2), and the maximal abrupt voltage change was 55 V at point (3). To display the abrupt voltage change more clearly, we have amplified the 10-cycle waveform near the maximal abrupt voltage change, as shown in Figure 8(c).Figure 8
Output voltage of microgrid: (a)t = 0.5–0.6 s, (b) t = 0–2 s, and (c) near the maximal abrupt voltage change.
(a)(b)(c)The voltage deviation can be expressed as follows:(13)Ub%=Um−UsUs×100%,where Ub (%) is the voltage deviation, Um is the average value of the effective voltage value over 10 cycles, and Us is the nominal value of the voltage. By substituting the values of Um (316.5 V) and Us (311 V) into equation (13), the voltage deviation can be calculated as Ub (%) = 1.77%.


#### 4.2.2. Influence ofJ and D on Microgrid Frequency

As shown in Figure9, the transient process of the frequency was smoother when the value of J was larger, but the time to reach stability correspondingly increased. The effect of suppressing the frequency mutation was not evident when the value of J was smaller. Therefore, it is necessary to select the value of J based on the actual inertial capacity of the microgrid.Figure 9
Influence of J on frequency of microgrid.As shown in Figure10, the value of D mainly affected the static characteristics of the frequency but had no effect on the dynamic characteristics. The larger the value of D was, the smaller the value of the static frequency change became. With D = 25.33 as a reference value, the steady-state frequency change of the microgrid decreased by about 0.03 Hz when D = 30, and it decreased by about 0.06 Hz when D = 40. Therefore, it is necessary to select the value of D based on equation (8) and the actual requirements for the static frequency drop of the microgrid.Figure 10
Influence of D on frequency of microgrid.


#### 4.2.3. Comparison with Three Other Control Strategies

To verify the effectiveness and superiority of the improved VSG control strategy proposed in this paper, a comparative analysis with the traditional droop control, traditional VSG control, and virtual impedance VSG control strategies is presented in this section.In this simulation process, the parameter values of the improved VSG control strategy wereD = 25.33, J = 0.5, Dp = 1.26 × 10−4, and Dq = 3.89 × 10−4, while the droop coefficients in the droop control were Dp = 1.26 × 10−4 and Dq = 3.89 × 10−4.As shown in Figure11, the VSG control strategy had similar characteristics with those of the traditional droop control strategy in essence, but the transient process was more stable due to the addition of two adjusting parameters (J and D). Moreover, the frequency ranges of the microgrid using the traditional droop control strategy, traditional VSG control strategy, and virtual impedance VSG control strategy were 49.78–50.22, 49.86–50.04, and 49.87–50.03 Hz, respectively. The frequency range of the microgrid using the improved VSG control strategy was 49.87–50.02 Hz, which meant that the proposed improved VSG control strategy had almost the same ability to restrain the frequency drop as the traditional VSG control strategy and the VSG strategy of virtual impedance control, but the frequency was about 0.2 Hz less than that of the droop control strategy.Figure 11
Comparative analysis of microgrid’s frequencies.As shown in Table1, the improved VSG control strategy proposed in this paper had the best harmonic suppression performance, and the THD was only 1.72%.Table 1
Comparative analysis of microgrid’s harmonic suppression.
No.Strategy nameFundamental (50 Hz)THD (%)1Traditional droop control strategy307.810.52Traditional VSG control strategy314.73.13Virtual impedance VSG control strategy313.32.34Improved VSG control strategy313.41.72VSG: virtual synchronous generator.


## 4.1. Initial Parameters

In our simulation, the relevant parameters were set as follows. The voltage of the DG wasVdc = 800 V. The filtering parameters were Rf = 0.01 Ω, Lf = 1.8 mH, and Cf = 10 μF. The active power, reactive power, and frequency of the control module were Pset = 10 kW, Qset = 8 kVar, and fset = 50 Hz, respectively. The amplitude of the output voltage was Uo = 311 V; the switching frequency of the PWM was fPWM = 10 kHz; and the resistance load was 24 Ω.Using equations (4), (6), and (8), the active-frequency droop coefficient (Dp), the reactive-voltage droop coefficient (Dq), and the reference damping coefficient (D) were calculated to be Dp = 1.26 × 10−4, Dq = 3.89 × 10−4, and D = 25.33, respectively. In addition, according to the selection principle of J in Section 3.2, the reference value was taken as 0.5.


## 4.2. Simulation Results

### 4.2.1. Stability Analysis of the Microgrid

In this simulation process, it was assumed that the microgrid operated in islanded mode. In the range of 0–0.7 s, the microgrid was operating stably, a resistance load (72 Ω) was connected to the microgrid at = 0.7 s, and a resistance load (36 Ω) was removed from the microgrid att = 1.2 s.As shown in Figure7, the frequency range of the microgrid was 49.87–50.02 Hz, and the maximum deviation was only 0.13 Hz.Figure 7
Output frequency of microgrid.In Figure8(a), the voltage waveform was stable over five cycles. As shown in Figure 8(b), the fluctuations of the output voltage were small when the load changed. The locations of the load changes are marked as (1) and (2), and the maximal abrupt voltage change was 55 V at point (3). To display the abrupt voltage change more clearly, we have amplified the 10-cycle waveform near the maximal abrupt voltage change, as shown in Figure 8(c).Figure 8
Output voltage of microgrid: (a)t = 0.5–0.6 s, (b) t = 0–2 s, and (c) near the maximal abrupt voltage change.
(a)(b)(c)The voltage deviation can be expressed as follows:(13)Ub%=Um−UsUs×100%,where Ub (%) is the voltage deviation, Um is the average value of the effective voltage value over 10 cycles, and Us is the nominal value of the voltage. By substituting the values of Um (316.5 V) and Us (311 V) into equation (13), the voltage deviation can be calculated as Ub (%) = 1.77%.


### 4.2.2. Influence ofJ and D on Microgrid Frequency

As shown in Figure9, the transient process of the frequency was smoother when the value of J was larger, but the time to reach stability correspondingly increased. The effect of suppressing the frequency mutation was not evident when the value of J was smaller. Therefore, it is necessary to select the value of J based on the actual inertial capacity of the microgrid.Figure 9
Influence of J on frequency of microgrid.As shown in Figure10, the value of D mainly affected the static characteristics of the frequency but had no effect on the dynamic characteristics. The larger the value of D was, the smaller the value of the static frequency change became. With D = 25.33 as a reference value, the steady-state frequency change of the microgrid decreased by about 0.03 Hz when D = 30, and it decreased by about 0.06 Hz when D = 40. Therefore, it is necessary to select the value of D based on equation (8) and the actual requirements for the static frequency drop of the microgrid.Figure 10
Influence of D on frequency of microgrid.


### 4.2.3. Comparison with Three Other Control Strategies

To verify the effectiveness and superiority of the improved VSG control strategy proposed in this paper, a comparative analysis with the traditional droop control, traditional VSG control, and virtual impedance VSG control strategies is presented in this section.In this simulation process, the parameter values of the improved VSG control strategy wereD = 25.33, J = 0.5, Dp = 1.26 × 10−4, and Dq = 3.89 × 10−4, while the droop coefficients in the droop control were Dp = 1.26 × 10−4 and Dq = 3.89 × 10−4.As shown in Figure11, the VSG control strategy had similar characteristics with those of the traditional droop control strategy in essence, but the transient process was more stable due to the addition of two adjusting parameters (J and D). Moreover, the frequency ranges of the microgrid using the traditional droop control strategy, traditional VSG control strategy, and virtual impedance VSG control strategy were 49.78–50.22, 49.86–50.04, and 49.87–50.03 Hz, respectively. The frequency range of the microgrid using the improved VSG control strategy was 49.87–50.02 Hz, which meant that the proposed improved VSG control strategy had almost the same ability to restrain the frequency drop as the traditional VSG control strategy and the VSG strategy of virtual impedance control, but the frequency was about 0.2 Hz less than that of the droop control strategy.Figure 11
Comparative analysis of microgrid’s frequencies.As shown in Table1, the improved VSG control strategy proposed in this paper had the best harmonic suppression performance, and the THD was only 1.72%.Table 1
Comparative analysis of microgrid’s harmonic suppression.
No.Strategy nameFundamental (50 Hz)THD (%)1Traditional droop control strategy307.810.52Traditional VSG control strategy314.73.13Virtual impedance VSG control strategy313.32.34Improved VSG control strategy313.41.72VSG: virtual synchronous generator.


## 4.2.1. Stability Analysis of the Microgrid

In this simulation process, it was assumed that the microgrid operated in islanded mode. In the range of 0–0.7 s, the microgrid was operating stably, a resistance load (72 Ω) was connected to the microgrid at = 0.7 s, and a resistance load (36 Ω) was removed from the microgrid att = 1.2 s.As shown in Figure7, the frequency range of the microgrid was 49.87–50.02 Hz, and the maximum deviation was only 0.13 Hz.Figure 7
Output frequency of microgrid.In Figure8(a), the voltage waveform was stable over five cycles. As shown in Figure 8(b), the fluctuations of the output voltage were small when the load changed. The locations of the load changes are marked as (1) and (2), and the maximal abrupt voltage change was 55 V at point (3). To display the abrupt voltage change more clearly, we have amplified the 10-cycle waveform near the maximal abrupt voltage change, as shown in Figure 8(c).Figure 8
Output voltage of microgrid: (a)t = 0.5–0.6 s, (b) t = 0–2 s, and (c) near the maximal abrupt voltage change.
(a)(b)(c)The voltage deviation can be expressed as follows:(13)Ub%=Um−UsUs×100%,where Ub (%) is the voltage deviation, Um is the average value of the effective voltage value over 10 cycles, and Us is the nominal value of the voltage. By substituting the values of Um (316.5 V) and Us (311 V) into equation (13), the voltage deviation can be calculated as Ub (%) = 1.77%.


## 4.2.2. Influence ofJ and D on Microgrid Frequency

As shown in Figure9, the transient process of the frequency was smoother when the value of J was larger, but the time to reach stability correspondingly increased. The effect of suppressing the frequency mutation was not evident when the value of J was smaller. Therefore, it is necessary to select the value of J based on the actual inertial capacity of the microgrid.Figure 9
Influence of J on frequency of microgrid.As shown in Figure10, the value of D mainly affected the static characteristics of the frequency but had no effect on the dynamic characteristics. The larger the value of D was, the smaller the value of the static frequency change became. With D = 25.33 as a reference value, the steady-state frequency change of the microgrid decreased by about 0.03 Hz when D = 30, and it decreased by about 0.06 Hz when D = 40. Therefore, it is necessary to select the value of D based on equation (8) and the actual requirements for the static frequency drop of the microgrid.Figure 10
Influence of D on frequency of microgrid.


## 4.2.3. Comparison with Three Other Control Strategies

To verify the effectiveness and superiority of the improved VSG control strategy proposed in this paper, a comparative analysis with the traditional droop control, traditional VSG control, and virtual impedance VSG control strategies is presented in this section.In this simulation process, the parameter values of the improved VSG control strategy wereD = 25.33, J = 0.5, Dp = 1.26 × 10−4, and Dq = 3.89 × 10−4, while the droop coefficients in the droop control were Dp = 1.26 × 10−4 and Dq = 3.89 × 10−4.As shown in Figure11, the VSG control strategy had similar characteristics with those of the traditional droop control strategy in essence, but the transient process was more stable due to the addition of two adjusting parameters (J and D). Moreover, the frequency ranges of the microgrid using the traditional droop control strategy, traditional VSG control strategy, and virtual impedance VSG control strategy were 49.78–50.22, 49.86–50.04, and 49.87–50.03 Hz, respectively. The frequency range of the microgrid using the improved VSG control strategy was 49.87–50.02 Hz, which meant that the proposed improved VSG control strategy had almost the same ability to restrain the frequency drop as the traditional VSG control strategy and the VSG strategy of virtual impedance control, but the frequency was about 0.2 Hz less than that of the droop control strategy.Figure 11
Comparative analysis of microgrid’s frequencies.As shown in Table1, the improved VSG control strategy proposed in this paper had the best harmonic suppression performance, and the THD was only 1.72%.Table 1
Comparative analysis of microgrid’s harmonic suppression.
No.Strategy nameFundamental (50 Hz)THD (%)1Traditional droop control strategy307.810.52Traditional VSG control strategy314.73.13Virtual impedance VSG control strategy313.32.34Improved VSG control strategy313.41.72VSG: virtual synchronous generator.


## 5. Discussion

In Section4, several numerical simulations were examined, and important results were presented. We now further analyze and discuss these results and compare the performances obtained using the improved VSG control strategy with the IEEE standard and China’s national standard:(1)
According to the IEEE standard (IEEE1549-2003), the voltage deviation of the microgrid should be less than ±10% of the nominal voltage. As shown in Figure8, the voltage deviation of the microgrid was only 1.77% when using the improved VSG control strategy proposed in this paper, which meets the corresponding national standard requirement.(2)
According to China’s national standard (GB/T 15945–2008), the frequency range of the microgrid should be located within 49.8–50.2 Hz. As shown in Figure11, the frequency range of the microgrid was located in the frequency range of 49.87–50.02 Hz when using the improved VSG control strategy. The maximum deviation was only 0.13 Hz, which was better than those of the traditional droop control strategy, the traditional VSG control strategy, and the virtual impedance VSG control strategy and met the national standard requirement.(3)
According to the IEEE standard (IEEE1549-2003), the THD of the microgrid’s output voltage should be less than 5%. As shown in Table1, the THD using the improved VSG control strategy was only 1.72%, which was better than that of the traditional droop control strategy and the traditional VSG control strategy, and it met the corresponding national standard requirement.


## 6. Conclusions

In this paper, a novel VSG control strategy based on harmonic current bypass control is proposed to improve the stability of the voltage and frequency and to suppress the harmonics of the microgrid. The numerical simulation results showed that the proposed control strategy could reduce the frequency range to 49.87–50.02 Hz, and the voltage deviation was reduced to 1.77% of the nominal voltage. Meanwhile, the THD of the output voltage was reduced to 1.72%. The research results verified the effectiveness and superiority of the novel VSG control strategy proposed in this paper and provide a theoretical basis for the practical application of microgrid integration technology. However, the distributed generation on the DC side is replaced by an ideal voltage source in the model, and only the island operation of a small microgrid was simulated in this study. Before this strategy is used in practical applications, there are still many problems worthy of study, such as further consideration of the impact of seamless switching between grid-connected and off-grid modes on this VSG control strategy, further consideration of the impact of intermittency and randomness of distributed generation on this VSG control strategy, and use of the VSG control strategy proposed in this paper to actual applications in small microgrids. These issues will be the focus of future research.



---

*Source: 2516777-2022-03-29.xml*