An improved VSG control strategy based on transient electromagnetic power compensation

Virtual synchronous generator (VSG) not only increases the inertia of grid-connected system, but also brings the problem of active power oscillation under grid disturbance. Therefore, VSG control strategy and system model order reduction method with transient electromagnetic power compensation are proposed. The closed-loop active power small signal model of the system is established, and the influence of transient electromagnetic power compensation on the power stability of VSG is analyzed based on root locus method. By removing the items which have little influence on the stability of the system in the small signal model, the order is reduced to obtain the equivalent second-order model of the system. According to the second-order model, the quantitative design criteria of the system parameters are given. The proposed transient electromagnetic power compensation strategy not only increases the transient equivalent damping of the system, but also does not affect the primary frequency modulation characteristics and will not cause large overshoot of the output active power. The experimental results are consistent with the theoretical analysis, which testify the effectiveness and correctness of the system control strategy and the model reduction method.

stability of the system.In 14 , in order to avoid the problems caused by the PLL and simplify the system structure, the actual grid frequency is replaced by the rated frequency.The damping coefficient has the same effect as the sag coefficient in the above two methods, and the introduction of damping coefficient will lead to the steady-state deviation of VSG output power.For this reason, in 15 and 16 , the state feedback damping method is proposed, which can configure poles arbitrarily through state feedback, so as to optimize the damping and oscillation frequency of the system, but there are too many parameters to be adjusted, which makes it complicated to realize.In 17 , the mechanism of VSG synchronization loss is analyzed in detail, and a transient damping is proposed, which can effectively avoid the conflict between transient stability and frequency stability.In 18 , a transient damping lifting method based on high pass filter (HPF) is proposed, which achieved good frequency fluctuation suppression effect, but the control effect of this method was greatly affected by the filter time constant.In 19 , the method of use the first-order lag link to construct transient damping is proposed, which reduced the order of active power system by one order.In 20 , this method is applied to suppress active power oscillation of VSG parallel micro-grid, but there is a large overshoot in VSG output active power under the transient damping strategy based on the first-order lag link 21 .In 22 , a strategy of grid-connected control of VSG with virtual impedance is proposed, by introducing a virtual impedance link in the VSG electrical part, the VSG output impedance is inductive, which is helpful for the decoupling of the reactive power and the active power of the system.However, the design method of the virtual impedance value is not given.In 23 , a novel two-stage frequency-regulating control is designed for modern power systems considering high renewable energy sources (RESs) penetration and electric vehicles (EVs), and a new optimization algorithm (artificial hummingbird algorithm) is proposed to fine-tune the parameters of frequency controllers as well as VSG parameters in a low-inertia smart power system.Compared with the conventional control, the control effect is better, but the control flow is complicated.
The VSG power stabilization control methods proposed in above literatures can generally achieve good control results in some aspects such as suppressing active power oscillation or reducing active power overshoot, but the in-depth analysis of multi-objective cooperative VSG power stabilization control is still insufficient.In view of the above problems, an improved VSG control strategy with transient electromagnetic power compensation and a system order reduction method are proposed in this paper.The system can be equivalent to a second-order model for parameter design, which can not only increase transient equivalent damping to suppress power oscillation without affecting primary frequency modulation characteristics, but also alleviate output active power overshoot.Firstly, the contradiction between the dynamic and steady-state characteristics of VSG output power is analyzed.Then the transient electromagnetic power compensation is introduced to improve VSG control, and the closed loop active small signal model of the system is established.The root locus method is used to analyze the influence of transient electromagnetic power compensation on VSG power stability.Finally, according to the conclusion of root locus analysis, the items which have little influence on the stability of the system in the small signal model are removed, and the equivalent second-order model of the system is obtained by reducing the order.According to the second-order model, the quantitative design criteria of system parameters are given.

VSG control and active power oscillation problem
Typical topology and control of VSG.The main circuit and control system structure of VSG are shown in Fig. 1.U dc is the DC side voltage, L is the filter inductor, C is the filter capacitor, u abc is the filtered three phase voltage, and i abc is the filtered three phase current.Grid-connected line impedance includes resistance R 1 and inductance L 1 .
VSG simulates the inertia and damping characteristics of synchronous generator by introducing the rotor motion equation of traditional synchronous generator into the control system.The expression of rotor motion equation is indicated as (1).
where P m is the input power, corresponding to the mechanical power of synchronous generator.P e is the output active power, corresponding to the electromagnetic power of synchronous generator.ω is the actual angular frequency, ω 0 is the rated angular frequency, J is the moment of inertia, and D is the damping coefficient.
At the same time, VSG simulates the droop characteristics of excitation regulator and governor of synchronous generator, which makes the inverter have the functions of primary frequency regulation and primary voltage regulation in grid-connected mode.Active power-frequency and reactive power-voltage sag equations are represented as (2) and (3).
where P ref is the active power scheduling command value, Q ref is the reactive power scheduling command value, Q e is the actual reactive power output by VSG, E is the output voltage amplitude, E 0 is the reference voltage amplitude, K p is active power-frequency sag coefficient, and K q is reactive power-voltage sag coefficient.
When the impedance of the line is inductive, active power and reactive power can be fully decoupled.For the convenience of analysis, the following contents of this paper are carried out under the condition of inductive line.In addition, because this paper focuses on active power oscillation and considers active and reactive power decoupling, the reactive power is no longer discussed in the follow up content. (1) Vol.:(0123456789) www.nature.com/scientificreports/Active oscillation of VSG.The simplified structure of VSG grid-connected circuit is shown in Fig. 2. E is the amplitude of the output voltage of the inverter, δ is the phase angle of the output voltage, U S is the amplitude of power grid voltage, and X is the equivalent output reactance of VSG.
As shown in Fig. 2, the output electromagnetic power of the VSG can be represented as follows.
Generally, δ is very small, (4) can be described as follows.
where K is the synchronous voltage coefficient and ω s is the angular frequency of grid voltage.
Because the response speed of voltage and current double inner loop control is much faster than that of power outer loop, the influence of double inner loop dynamic process on outer loop can be ignored.According to (1), ( 2) and ( 4), the grid-connected VSG active power closed loop control block diagram is shown as Fig. 3.
As shown in Fig. 3, the damping coefficient and primary frequency modulation coefficient of VSG are parameters of one effect, and there is a coupling problem between them.In addition, P e is affected by grid frequency and active power command value, and the closed loop transfer function of P e is represented as follows.
Based on (6), the VSG steady state output active power P e0 is described as follows.
(4) P e = EU S X sin δ  www.nature.com/scientificreports/Based on ( 7), the steady-state deviation of VSG output active power is (Dω 0 + K p ) (ω 0 − ω S ).For large grid with good power quality, generally ω S = ω 0 , the steady-state deviation of VSG output power is 0. For large grid ends or micro-grids with low power quality, ω S may not be equal to ω 0 , and there is a power deviation (Dω 0 + K p ) (ω 0 − ω S ) in steady-state.In addition, the grid frequency at the end of large grid or micro-grid generally fluctuates slowly, and can be regarded as a fixed value relative to the power loop regulation speed.Therefore, the active power transient process of grid-connected VSG is mainly affected by the step disturbance of active power command value, and the grid frequency mainly affects the steady-state accuracy of VSG.
According to ( 6), the output active power small signal model of VSG when adjusting active power command value in response to grid disturbance is described as follows.This is a typical second-order system.When the damping ratio of the system is less than 1, the oscillation problem will occur.Figure 4 shows the pole distribution of the system when the inertia J is 1, 3 and 5, respectively, and the damping D varies from 0 to 50.The parameters used in the drawing are shown in Table 1.E is the amplitude of the output voltage of the inverter, U S is the amplitude of power grid voltage, K p is active power-frequency sag coefficient, ΔP ref is the increment of grid-connected active power instruction value, J is the moment of inertia, D is the damping coefficient, X is the equivalent output reactance of VSG, ω 0 is the rated angular frequency.The parameters used in other theoretical analysis parts of this paper are shown in Table 1 unless otherwise specified.
According to Fig. 4, the larger the introduced inertia J, the closer the pole is to the imaginary axis, and the more unstable the output active power response of VSG is when the active power command value suddenly ( 7)   www.nature.com/scientificreports/changes in response to grid disturbance.With the increase of D, the conjugate poles s 1 and s 2 of the system gradually move away from the imaginary axis and approach the real axis, and finally become two different negative real poles, the system changes from underdamping to overdamping, and the stability of the system becomes better.It shows that damping D can improve the stability of the system and restrain the oscillation.
To sum up, for the typical grid-connected VSG system shown in Fig. 1, the existence of inertia J makes its output active response behave as a second-order oscillation system, and the larger J, the more intense the oscillation.Damping D can effectively suppress this oscillation, but D is coupled with the primary frequency modulation parameter.According to (7), D will increase the output active steady-state deviation.The above analysis results show that there is a certain contradiction between the dynamic and static performance of VSG, it is difficult to suppress active power oscillation by designing VSG control parameters directly.

Improved VSG control with transient electromagnetic power compensation
In order to suppress the output active power oscillation in grid-connected VSG without affecting the steadystate output power, an improved VSG control strategy based on transient electromagnetic power compensation is proposed in this section.
Improved VSG control strategy.The proposed improved VSG control strategy introducing transient electromagnetic power compensation is shown in Fig. 5. Based on conventional VSG active power control, this strategy adds an electromagnetic power passing through the lag link, and makes a difference between it and the initial electromagnetic power to get the transient power difference.Multiply the obtained transient power difference by the compensation coefficient Kc and add it to the power control, so as to form transient electromagnetic power compensation in the process of power fluctuation and achieve the effect of suppressing oscillation.
The proposed improved VSG control strategy adds a transient power to the original VSG active power control.The rotor motion equation of improved VSG is shown in (9).
where P c is the introduced transient compensation power, its value is composed of the first-order hysteresis electromagnetic power and the original electromagnetic power.It is described by (10).
where T c is the time constant of the first-order lag link in compensating electromagnetic power.K c is the corresponding compensation coefficient.
Because this power difference or angular frequency difference only exists in transient process, it will not affect the steady-state performance.As can be seen from Fig. 5, the output active power small signal model of the improved VSG is expressed as (11).
where Comparing (11) with (8), it is found that the improved VSG active power system adds a pole and a zero and changes the original two poles due to the introduction of transient electromagnetic compensation power, which will change the response characteristics of the system and suppress the power oscillation through reasonable adjustment.
Analysis of the influence of improved strategy on VSG power stability and overshoot.(11) is arranged as follows.where α = Jω 0 s 2 + (Dω 0 + K p )s + K.
Comparing ( 12) with (8), it shows that if KT c K c is very small, ( 12) and ( 8) can be approximately equal, it indicates that the effect of the improved VSG compensation using transient electromagnetic power compensation is not obvious.The KT c K c value should not be too small for the proposed compensation strategy to have a significant impact on the power stability of VSG.According to (5), it can be seen that the value of the synchronization voltage coefficient K is generally large.Therefore, the T c K c value of the improved VSG need not be very large to affect the oscillation process.According to the lag characteristic, the lag time constant should be smaller in order to ensure the timeliness of transient compensation link response and rapid failure in steady-state.
Figure 6a shows the zero-pole distribution of the improved VSG system when the lag time constant T c = 0.006 and the compensation coefficient K c increases from 0 to 30. Figure 6b shows the zero-pole distribution of the improved VSG active power response when the lag time constant T c changes from 0 to 2, where K c = 1.
As shown in Fig. 6a, the improved VSG system has one more zero and one more pole than the conventional VSG system.When K c varies from 0 to 30, the increased negative real pole s 3 is close to the imaginary axis, but always far away from it.With the increase of K c , the dominant pole pair s 1 and s 2 quickly move away from the imaginary axis and approach the real axis from the original position.With the further increase of K c , they become two real poles.Real pole s 2 near the imaginary axis becomes the dominant pole.It indicates that the introduced K c improves the equivalent damping of the system and enhances the stability of the system.With the increase of K c , the system will change from under-damping to over-damping, but the value of K c should not be very large.If it is very large, the dominant pole will be infinitely close to the imaginary axis, which will slow down the response and lengthen the response time.The improved VSG pole change shown in Fig. 6a testify the effectiveness of the transient electromagnetic power compensation strategy proposed in this paper.
As shown in Fig. 6b, when the lag time constant T c increases from 0 to 2, the dominant poles s 1 and s 2 of the improved VSG system move away from the original position, but the distance from the imaginary axis is basically unchanged, which represents that the lag time constant has little influence on the power stability of the improved VSG system.At the same time, it should be noted that the improved VSG has a pole which is very close to the zero z when the lag time constant T c varies, and they form a pair of dipoles, which have little influence on the stability of the system.However, it can be found that when the delay time constant T c is large, the pair of zeros and poles is very close to the imaginary axis, which may seriously affect the stability of the system, it further shows that the delay time constant T c should be a small value.

Model reduction and parameter design
According to the conclusion of root locus qualitative analysis in the previous section, this section reduces the order of small signal model, and obtains the equivalent second-order model of VSG with transient electromagnetic power compensation, so that the system parameters can be quantitatively designed according to the equivalent second-order model.
Small signal model order reduction.According to (11), the transient electromagnetic power compensation is introduced, which has an effect on the stability of the system and increases the order of the system.As can be seen from Fig. 6, T c has little influence on the location of the dominant pole pair, and the location change of the dominant pole of the system is mainly affected by K c .It indicates that the stability of the system is mainly affected by the change of compensation coefficient K c , the lag time constant T c has little influence.Based on this analysis, this paper presents a simplified method to reduce (11) to a second-order system.All the terms containing T c but not K c in the numerator and denominator of ( 11) are removed.The equivalent second-order system is shown in (13).
To demonstrate the effectiveness of the simplified method proposed in this paper, the comparison of the step response of ( 11) and ( 13) with different K c is shown in Fig. 7.
As can be seen from Fig. 7, the step responses of the second-order model and the third-order model under different K c are very consistent, there only slight deviation.It indicates that the simplified method is effective, the influence of compensation parameters on the power response before and after order reduction is very consistent.So, it is reasonable to design parameters according to the simplified second-order model.Figure 8 is the bode plots of the closed loop systems.

Parameter design.
According to the simplified small signal model, the parameters can be further tuned from the angle of damping ratio and phase margin of the second-order system.Based on (13), the natural oscillation frequency ω n and damping ratio ζ of the system are shown in (14) and (15).( 13) www.nature.com/scientificreports/According to the control theory, the phase margin γ and cut-off frequency ω c of ( 13) can be represented as follows.
In order to make the control system stable, the damping ratio should not be too small.Generally, 0.8 < ζ < 1, and the phase margin should not be less than 45°.As shown in Fig. 9, the Nyquist diagram of the system does not intersect the negative real axis, indicating that the amplitude margin of the system is infinite.

Experiment verification
In order to verify the correctness and effectiveness of the proposed control strategy, a VSG grid-connected controller level hardware-in-loop test system is built as shown in Fig. 10.
It consists of upper computer, real time simulator (HBUREP-100), DSP controller (TMS320F28335), and oscilloscope.The conventional VSG control strategy and the improved VSG control strategy proposed in this ( 14) 8. Bode of VSG active power closed loop control system.2. U d is the rated voltage of the DC bus, E 0 is the reference voltage amplitude, P ref is the active power scheduling command value, K p is active power-frequency sag coefficient, ω 0 is the rated angular frequency, ΔP ref is the increment of grid-connected active power instruction value, J is the moment of inertia, D is the damping coefficient, T c is the time constant of the first-order lag link in compensating electromagnetic power, R is the internal resistance of the filter inductance, L is the filter inductor, C is the filter capacitor, grid-connected line impedance includes resistance R 1 and inductance L 1 .At t = 3s, the active power dispatching instruction of grid-connected VSG is increased by 4kW.
In order to reflect the steady-state deviation caused by the difference between VSG rated frequency and grid frequency, the actual frequency of grid is set to 49.97 Hz.The results show that when D = 0, the active power command value step at t = 3 s causes the VSG output active power oscillation lasting about 2 s, and the active power overshoot reaches 1.8 kW.After damping D is added, the active oscillation and overshoot are obviously suppressed.And the greater the damping D, the more remarkable the suppression effect is.On the other hand, due to the difference between VSG rated frequency and grid frequency, there is a steady-state deviation (Dω 0 + K p )(ω 0 − ω S ) in VSG output active power.When D is assigned as 0, 5, 15 and 25, the corresponding steady-state deviation is about 400, 714, 1342 and 1656W respectively.It can be seen that when the conventional VSG control strategy is adopt, the active oscillation can be effectively suppressed under the action of damping.With the increase of damping, the active overshoot is obviously reduced, but at the same time, the steady-state power deviation is also increased.
Transient electromagnetic power compensation strategy.The experimental results of VSG active oscillation suppression using the transient electromagnetic power compensation method proposed in this paper are shown in Fig. 12.
The results show that when the compensation coefficient Kc = 0, the active power command value step at t = 3 s causes the VSG output active power oscillation lasting about 2 s, and the active power overshoot reaches 1.8 kW.After compensating the electromagnetic power, the oscillation is obviously suppressed.With the increase  www.nature.com/scientificreports/ of compensation coefficient K c , the active oscillation and overshoot of VSG output become smaller and smaller.
When the system enters the over damping state, with the further increase of the compensation coefficient K c , the response time of the system will increase obviously.At the same time, because this power compensation only exists in transient process, it does not cause steady-state deviation.The simulation results are completely consistent with the theoretical analysis results in Fig. 6a.It indicates that when the proposed transient electromagnetic power compensation strategy is adopt, with the increase of compensation coefficient K c , the active power oscillation of grid-connected VSG can be better suppressed.The K C value can be adjusted to achieve the control purpose of neither overshoot nor steady-state deviation.

Conclusion
In view of the problem of active power oscillation of VSG under power grid disturbance, a VSG control strategy with transient electromagnetic power compensation is proposed in this paper.Through theoretical analysis and experimental verification, the following conclusions are obtained.
(1) The proposed transient electromagnetic power compensation strategy can effectively suppress the VSG power oscillation.The transient electromagnetic power compensation increases the transient equivalent damping of the system, and does not affect the primary frequency modulation characteristics.At the same time, the zero pole caused by transient electromagnetic power compensation is far away from the imaginary axis, so the output active power overshoot will not be caused.( 2) By removing the items that have little influence on the stability of the system in the small signal model, the order of the improved VSG active power system is reduced, the equivalent second-order model is obtained, and the quantitative design method of system parameters is given.
The research in this paper provides some theoretical and methodological supports for the large-scale friendly grid connection of new energy, especially for its active defense against grid disturbance.
All data generated or analysed during this study are included in this published article.

Figure 1 .
Figure 1.Typical circuit and control structure of VSG.

Figure 3 .
Figure 3. Active power closed loop control block diagram of VSG.

Figure 4 .
Figure 4. Pole distribution of active power closed loop small signal model of VSG with different J when D increases.

Figure 5 .
Figure 5. Active power control closed-loop block diagram of improved VSG.

Figure 6 .
Figure 6.Pole-zero distribution of active power closed loop small signal model of the improved VSG when the parameters of the compensation link vary.

Figure 7 .
Figure 7.Comparison of step response of transient electromagnetic power compensation VSG active closed loop small signal model before and after order reduction.

Figure 9 .
Figure 9. Bode diagram of VSG active power closed loop control system.

Figure 11 .
Figure 11.Simulation results of fixed damping strategy.

Figure 12 .
Figure 12.Simulation results of transient electromagnetic power compensation strategy.

Table 1 .
Main parameters of theoretical analysis.

Table 2 .
Main parameters of experiment.The experimental results using conventional VSG control strategy are shown in Fig. 11.