Adaptive Virtual Synchronous Generator Modulation Strategy Based on Moment of Inertia, Damping Coefficient and Virtual Impedance

: The technology of virtual synchronous generator improves the limitations of inverter control strategy and enhances the acceptance of new energy generation in traditional power system, and yet it greatly affects the frequency dynamic regulation ability of the power grid. Meanwhile, in order to solve the problem of power coupling in medium and low voltage microgrid, many methods have been proposed to change the equivalent output impedance of the system by introducing virtual impedance to improve the stability of microgrid system. For this purpose of optimizing the frequency regulation ability of the system, this paper designs an adaptive control strategy of the moment of inertia and damping coefficient to improve the frequency response characteristics of virtual synchronous generator under the conditions of given active power change and grid frequency fluctuation. In addition, in order to solve the contradiction between the moment of inertia, damping coefficient and the frequency response speed, the voltage vector relationship of virtual synchronous generator under interference is analyzed from the perspective of virtual impedance, and an adaptive virtual impedance control strategy is proposed to accelerate the frequency modulation process of the system. Consequently, one cooperative adaptive control strategy of the moment of inertia, damping coefficient and virtual impedance is proposed. On the basis of ensuring the virtual synchronous generator to give full play to its own operation advantages, this method achieves the purpose of enhancing inertia and accelerating the frequency response speed from various perspectives. The simulation results prove the feasibility of the proposed control strategy.


INTRODUCTION
With the increasing crisis of traditional fossil energy, as the main way of new energy power generation, distributed generation technology has developed rapidly [1,2].As most of them are incorporated into the power grid through new power electronic devices, the installed proportion of traditional synchronous generators (SGs) with damping and inertia decreases, which continuously reduces the equivalent inertia of the power grid, and the safe operation of the power grid cannot be guaranteed [3][4][5].
By simulating the external characteristics of SG, the virtual synchronous generator (VSG) not only has the function of frequency modulation and voltage regulation, but also gives full play to the flexible and adjustable characteristics of power electronic parameters, and provides inertial support for the system through virtual inertia and damping, which greatly improves the adverse impact of power electronic power system on the power grid and improves the stability of system operation [6,7].
However, the resistance inductance of the equivalent impedance in the actual medium and low voltage transmission lines is relatively high, which is easy to cause coupling problems and affect the control performance [8].The virtual impedance technology can change the equivalent output impedance characteristics of the system with no need to consider the design cost caused by the transformation of the hardware, and can flexibly configure parameters to enable the VSG to effectively solve power coupling problems [9,10].
Existing researches on VSG technology have achieved fruitful results in low voltage ride through [11], islanding detection [12], secondary frequency modulation [13] and so on.In order to improve the stability of the VSG under interference, it is necessary to deeply study the primary frequency modulation capability.In reference [14], the moment of inertia was adjusted, and directly set to the maximum or minimum value, but the specific selection principle of parameters was missing.In literature [15], the parameter selection range was given according to the steady-state and dynamic characteristics by designing the VSG control strategy with lead lag link in the active power loop.However, the mainstream idea of frequency modulation is to optimize the system parameters rather than directly change the control link.In literature [16], the influence of frequency change rate was considered as an influence factor into the adaptive control strategy, while the effect of damping coefficient on VSG frequency modulation was not analyzed.In literature [17], the principle of adaptive change of inertia was set by dividing the interval during transient power angle recovery, which opened up ideas for VSG parameter adaptive frequency modulation control strategy.In literature [18], the inertia was intensively controlled by the power variation and the power change rate, while the final frequency deviation was large.In literature [19], the inertia adaptive control strategy was proposed based on VSG small signal model and power angle change, but the influence of damping coefficient on the system was not considered in literatures [20][21][22], a cooperative adaptive control strategy of moment of inertia and damping coefficient was designed, which can effectively reduce the output frequency and power deviation.However, the contradiction between moment of inertia, damping coefficient and frequency response speed was ignored.In literature [23], an adaptive strategy of VSG parameters is given, considering the change of grid frequency.Unfortunately, the idea of directly changing the given frequency value cannot meet the control requirements under other working conditions, and has certain limitations.These strategies have put forward methods to assist the VSG to complete primary frequency modulation from various aspects, but none of them has solved the contradiction between adjusting moment of inertia, damping coefficient and system dynamic performance, that is, increasing the moment of inertia and damping coefficient can reduce the angular frequency deviation, at the cost of longer system response time, and reducing the moment of inertia and damping coefficient can reduce the system response time, but increase the angular frequency deviation.
To solve the above contradiction, by studying the change of VSG output frequency under two working conditions, namely the given power change and grid frequency fluctuation, this paper proposes a control strategy with adaptive change of moment of inertia and damping coefficient.Under the interference of two working conditions, the vector relationship between the output voltage of the VSG system with virtual impedance is analyzed, and the role of virtual impedance in accelerating frequency modulation during transient is fully explored.Combined with the primary frequency modulation characteristics of VSG, an adaptive virtual impedance control strategy is proposed.By adjusting the coefficient to buffer the influence of frequency change rate, the VSG is assisted to complete primary frequency modulation and enhance its inertia ability.Hence, integrating the two control strategies, a cooperative adaptive control strategy of moment of inertia, damping coefficient and virtual impedance are proposed to reduce the frequency deviation and speed up the frequency response.Based on traditional adaptive strategy of moment of inertia and damping coefficient, this method explores the characteristics of accelerating frequency response speed from the perspective of virtual impedance.Detailed simulation results prove the feasibility and effectiveness of the proposed strategy.

VSG CONTROL PRINCIPLE
The overall control block diagram of voltage source VSG is shown in Fig. 1, where U dc is the DC side voltage, which is generally considered to be the steady-state value; Q 1 ~ Q 6 are insulated gate bipolar transistor (IGBT) devices; e a , e b , and e c are the internal potential of VSG; L 1 , L 2 and C are filter inductance and capacitance respectively; u gabc and i gabc are output voltage and current respectively; and SVPWM is space vector pulse width modulation.By collecting the voltage and current of the output terminal, the output modulation wave E m is obtained through the power calculation and VSG algorithm module.The modulation wave E of the input voltage and current double closed-loop module are obtained through the action of virtual impedance.In this way, precise control of the system is achieved through SVPWM.Referring to the control principle of governor and excitation controller of SG, the mathematical algorithm of VSG can be obtained as: where P ref and P e are the given active power and output active power respectively, ω N and ω are the rated angular frequency and output angular frequency respectively, J is the moment of inertia and D is the damping coefficient, Q ref and Q e are the given reactive power and output reactive power of VSG respectively, U N and U 0 are the rated voltage amplitude and output voltage amplitude, E m is the virtual electromotive force of VSG, D q and K are droop coefficient and inertia coefficient respectively.
VSG has certain dynamic response ability by simulating the primary frequency regulation and primary voltage regulation characteristics of SG.However, when the given power changes and the grid frequency fluctuate, it is very easy to cause the VSG output frequency to deviate from the given frequency.How to reduce the frequency deviation and speed up the frequency response needs to be further studied.

ADAPTIVE CONTROL STRATEGY OF MOMENT OF INERTIA AND DAMPING COEFFICIENT 3.1 Fundamental Principle
When the grid frequency fluctuation cannot be ignored, the closed-loop control block diagram of VSG active frequency loop is shown in Fig. 2, where M = E m U o /Z, and Z is the equivalent output impedance.According to Fig. 2, the closed-loop transfer function of VSG output power and given power is as follows: As a typical second-order system, its corresponding natural oscillation angular frequency ω n and damping ratio ξ can be further obtained as follows: When 0 < ξ < 1 and the maximum overshoot is 5%, the overshoot σ% and the adjustment time t s of this system are It can be seen from Eq. ( 4) that the moment of inertia J and the damping coefficient D jointly affect the dynamic response performance of the system.Furthermore, when J remains constant, with the increase of D, the damping ratio increases, while the overshoot and adjustment time become smaller and smaller.When d remains constant, with the increase of J, the damping ratio decreases, and the overshoot and adjustment time become larger and larger.The difference between the two values will determine the response performance of the system, so the parameters should be reasonably selected on the premise that conditions permit, so as to obtain the best control effect.
It can be seen from Fig. 2 that when the given power changes, the closed-loop transfer function between the VSG output frequency and the given power is: When the grid frequency fluctuates, the closed-loop transfer function between the VSG output frequency and the grid frequency is When considering the sudden decrease or increase of the given active power, the response curve of G 2 (s) is obtained, as shown in Fig. 3.
When considering the decline or rise of the grid frequency, the response curve of G 3 (s) is obtained, as shown in Fig. 4. In Fig. 3 and Fig. 4, the shaded part is the power angle variation.During the above working conditions, the power angle changes, reflecting that the active power fed into the power grid by VSG is also increasing or decreasing accordingly, and the output frequency of VSG is bound to be affected.By definition, Δω is the difference between ω N and ω, as shown in Eq. (7).

Control Strategy and Parameter Setting
It can be seen from Eq. ( 1) that there is an inertia link in the active power loop.When the given power and grid frequency are disturbed, the adaptive change of J and D can improve the anti-interference ability of the VSG output frequency.Therefore, the adaptive control strategy of J and D is designed.
In Eq. ( 8) and Eq. ( 9), J 0 and D 0 are respectively the values of J and D, during steady-state operation, a and b are the adjustment coefficients, and A 1 and A 2 are the threshold values of angular frequency variation.
Setting the threshold value of the fluctuation of angular frequency can effectively reduce the number of invalid changes of J during the normal operation of VSG and improve the stability of the system.In addition, when interference occurs, the value of dω/dt increases instantaneously, so the change rate of dω/dt can be buffered by adjusting the coefficients a and b, which makes J and D increase or decrease appropriately.
Since the selection of J is related to the system capacity, its variation range can be determined by the maximum value of the VSG output power: The specific constraint equations of J and D can be obtained through the literature [24], thus J max and D max can be determined.Further, the value ranges of a and b can be obtained by Eq. ( 11): Through the proposed adaptive control strategies of J and D, the deviation of the VSG output frequency during transient conditions can be reduced, and the value range of regulation coefficient can be specified, which can significantly improve the stability of the VSG operation.However, how to improve the frequency response speed of the VSG in transient process is a difficult problem that should be solved in practical engineering.Part 4 will continue to optimize the adaptive control strategy of the VSG from the perspective of virtual impedance.

ADAPTIVE VIRTUAL IMPEDANCE CONTROL STRATEGY 4.1 Traditional Virtual Impedance Technology
When studying the transmission line between the VSG output voltage and the grid voltage, it is usually assumed that its equivalent impedance is pure inductance.While in actual line, due to the existence of a large number of grid-connected resistors the coupling between the active and reactive power of the VSG output will be caused, which will affect the normal operation of the VSG.During the research of power decoupling control, virtual impedance has attracted extensive attention because it can change the resistanceinductance ratio of the VSG output impedance and make the output impedance exhibit inductive impedance characteristics.
The control strategy of the traditional virtual impedance technology is to use the output current in the VSG control loop, introduce it into a feedback loop including the virtual impedance, and take the output voltage of the VSG control algorithm minus the voltage drop on the virtual impedance as the voltage reference value, as shown in Eq. (9).
where E is the voltage reference value, Em is the output voltage of the VSG control algorithm, Ev is the voltage of virtual impedance, R v and L v are the introduced virtual resistance and inductance, and I is the VSG output current.
For the convenience of analysis, assuming that the response speed of the VSG voltage current loop is fast enough and the VSG output voltage can quickly track the voltage command value, the VSG system with virtual impedance is shown in Fig. 5, where U g is the grid voltage, the power angle δ is the phase angle difference between the output voltage and the grid voltage, R eq and L eq are the equivalent resistance and inductance of the transmission line.According to Fig. 5, it can be easily found that the added virtual impedance and transmission line impedance are connected in series to form the total system impedance.Due to ωL v >> R v , the voltage vector on the virtual impedance is perpendicular to the VSG output current vector.When analyzing the two working conditions of the given signal change and grid frequency fluctuation, the relationship diagram of each voltage phasor in the VSG system with virtual impedance can be obtained according to Eq. ( 9).

Virtual Impedance Frequency Modulation Analysis
The relationship between VSG voltage and current, between the grid voltage and voltage drop phasor on virtual impedance before and after the sudden reduction of the given power P ref is shown in Fig. 6, where E 1 , Ev1 and Em1 are the reference voltage phasor, virtual impedance voltage phasor and voltage phasor output by the VSG algorithm when P ref is suddenly reduced.When VSG operates stably again, E2, Ev2 and Em2 are the reference voltage phasor, the virtual impedance voltage phasor and the voltage phasor output by the VSG control algorithm respectively.When P ref decreases suddenly, Pe will also decrease, retrace the new given power P ref '.Before Pe is completely equal to the new given power, according to Eq. ( 1), the output frequency of the VSG will fluctuate continuously during this process to compensate for the difference between P ref and P ref '.Consequently, the voltage of the VSG during steady-state operation will change to E1 in the transient process, and the voltage on the virtual impedance will also change from Ev to Ev1.As P e gradually approaches P ref ', E1 and Ev1 will change to E2 and Ev2 respectively.If the value of virtual impedance is appropriately increased to speed up the transition process, the fluctuation of the VSG output frequency will also be reduced.Similarly, when P ref increases abruptly, appropriately reducing the value of virtual impedance will also accelerate the transition of the VSG output voltage and reduce the fluctuation of the VSG output frequency.
When the grid frequency decreases, the phasor relationship between the VSG voltage and current, grid voltage and virtual impedance voltage are shown in Fig. 7, where E3, Ev3 and Em3 are the reference voltage phasor, virtual impedance voltage phasor and voltage phasor output through the VSG algorithm input to the voltage loop during the reduction of grid frequency.Ug1 is the grid voltage phasor after the grid frequency decreases, and E4, Ev4 and Em4 are the reference voltage phasor input by the VSG to the voltage loop, the virtual impedance voltage phasor and the voltage phasor output by the VSG control algorithm.When the grid frequency decreases, the output frequency of the VSG will follow the new grid frequency, resulting in deviation from the rated frequency.The VSG operating voltage will become E3 in the transient process, and the voltage on the virtual impedance will also become Ev3.After the grid frequency drops, E3 and Ev3 will turn into E4 and Ev4 respectively.During this transient process, by appropriately increasing the value of virtual impedance, the transition of the VSG output voltage will be accelerated and the fluctuation of the VSG output frequency will be reduced accordingly.Similarly, when the grid frequency increases, appropriately reducing the value of virtual impedance will also accelerate the transition of the VSG output voltage and reduce the fluctuation of the VSG output frequency.

Adaptive Virtual Impedance Frequency Modulation Method
Through the analysis in part B, it can be found that the virtual impedance can accelerate the process of VSG completing primary frequency modulation.Therefore, an adaptive virtual impedance frequency modulation method is proposed.Since ωL v >> R v in the virtual impedance, only the frequency modulation strategy is designed by changing L v , whose expression is shown in Eq. ( 13).
where L v0 is the virtual inductance value during the initial operation of the VSG, α is the adjustment coefficient, and A 3 is the angular frequency change threshold.The characteristics of the adaptive virtual impedance frequency modulation method proposed in this paper are as follows: (1) When the microgrid operates stably, there is no disturbance in the system, and the initial virtual impedance value is adopted to ensure the stable operation of VSG.
(2) When the disturbance of given power change and grid frequency fluctuation occurs in the system, the system frequency deviates from the set value.In order to reduce the problems caused by the system frequency, a new adaptive virtual impedance method is adopted.
(3) By introducing the adjustment coefficient, the adaptive virtual impedance method can well buffer the rapid frequency change and solve the problem of excessive virtual impedance compensation value.(4) After the new adaptive virtual impedance adjustment method is started for a certain time, the system tends to be stable and the frequency begins to return to the stable value, and the change rate of frequency may change in the opposite direction.In view of this case, restoring the traditional virtual impedance method can effectively and quickly recover the frequency to the rated value.The block diagram of the adaptive virtual impedance control strategy is constructed in Fig. 8, where Signal is the result of the combination of the VSG grid connected signal and the signal whose angular frequency change exceeds the threshold A 3 , ΔL v is the variation of virtual inductance, as shown in Eq. (14).

Cooperative Adaptation of Moment of Inertia, Damping Coefficient and Virtual Impedance
Based on the above analysis, the block diagram of the cooperative adaptive control of moment of inertia, damping coefficient and virtual impedance is obtained, as shown in Fig. 9.

Figure 9 Collaborative adaptive control block diagram
This method can deal with the problem that the frequency change rate is too fast when P ref changes and the grid frequency fluctuates.While reducing the frequency deviation, the frequency response speed is accelerated, and the inertia regulation ability of the VSG system is further improved.In addition, the thresholds of frequency deviation, A 1 , A 2 and A 3 can be independently designed.A reasonable designed threshold can improve the accuracy and stability of the adaptive system.

SIMULATION ANALYSIS
The cooperative adaptive control strategy of moment of inertia, damping coefficient and virtual impedance is verified in MATLAB/Simulink.The specific simulation parameters are shown in Tab. 1.The angular frequency variation thresholds A 1 , A 2 and A 3 are set to 0.1 rad/s, 0.15 rad/s and 0.2 rad/s respectively.For the convenience of description, the fixed J and D, J and D adaptive, J、D and L v cooperative adaptive control strategies are recorded as strategy 1, strategy 2 and strategy 3 respectively.

Given Power Variation
After VSG operates for 1.42 s, two cases are simulated.The given power is suddenly reduced from the original 10000 W to 6000 W as shown in Fig. 10.The given power is abrubtly increased to 14000 W as shown in Fig. 11.
When the given active signal changes, there will be a difference with the original output power of the VSG.Therefore, the output frequency of the VSG deviates from 50 Hz and fluctuates to make up for the difference.When Pref is reduced, Fig. 10a and Fig. 10b show that the maximum frequency offset of strategy 1 is about 0.34 Hz, the minimum P e is 5000 W, and the overshoot is 16.7%.Strategy 2 can improve the frequency drop, the maximum frequency offset is about 0.3 Hz, the minimum P e is 5500 W, and the overshoot is 8.3%.However, between 1.42 s and 1.45 s, strategy 2 slows down the response speed of the VSG output frequency under the given signal change.Strategy 3 makes a timely judgment by comparing the angular frequency change threshold signal with the grid connected signal to change the virtual impedance value during the transient period.In addition to effectively reducing the frequency drop and significantly improving the frequency response speed, the maximum frequency offset is about 0.2 Hz, the minimum P e is 5900 W, and the overshoot is 1.7%.When the given signal increases suddenly, Fig. 11a shows that by comparison with strategy 1, strategy 2 significantly reduces the peak and valley value of the frequency, and the frequency offset of strategy 3 is the most obvious.Compared with strategy 1 and strategy 2, strategy 3 not only improves the frequency response speed, but also has no oscillation during the frequency recovery process, and is the fastest to enter steady-state.Fig. 11b shows the Pe of the VSG starts to track Pref at 1.43 s, and can catch up in about 1.48 s.The subsequent overshoot is caused by the inertia of the VSG, and the overshoot is large, to about 10.7%.Strategy 2 can suppress the active power overshoot, which is about 7.4%, and strategy 3 has the most prominent effect of suppressing overshoot, with the maximum active power of 14800 W and overshoot of 5.7%.Fig. 10c and 11c show the waveform of virtual inductance when strategy 3 is adopted.According to the adaptive signal change, it meets the system control requirements.To sum up, when P ref changes, the adoption of strategy 3 cannot only improve the VSG output offset and speed up the frequency response, but also improve the active power shortage and overshoot during the transient period and enhance the dynamic performance of the VSG.

Grid Frequency Fluctuation
When the VSG operates to 1.5 s, set the grid frequency to drop by 0.2 Hz and return to normal at 1.6 s; the grid frequency rises by 0.2 Hz and recovers at 1.6 s.The corresponding simulation results are shown in Fig. 12 and Fig. 13.13b are the VSG output power diagrams.Although strategy 2 reduces the overshoot of the active power, the oscillation range between 1.55 s and 1.65 s is too large.Strategy 3 not only improves the active power overshoot and shortage, but also greatly reduces the largescale oscillation during power recovery, helping the VSG speed up the recovery of steady state.Fig. 12c and Fig. 13c are the waveforms of the virtual inductance.The virtual inductance value is adjusted according to the adaptive signal to assist the smooth operation of the VSG.

CONCLUSIONS
The operation characteristics of the VSG determine that its output frequency is very vulnerable to external interference.How to design an adaptive control strategy according to the characteristic without affecting the operation advantages of VSG needs to be deeply studied.Therefore, considering the given power change and grid frequency, this paper designs an adaptive control strategy of moment of inertia and damping coefficient to improve the frequency response characteristics of the VSG and further enhance the inertia ability of the VSG.In addition, since the resistive components in medium and low voltage lines cannot be ignored, the virtual impedances for power decoupling are widely used.In this context, through the detailed analysis of the vector relationship between the VSG output voltages during the transient process, this paper finds the role of virtual impedance in accelerating the VSG recovery to steady state, and proposes an adaptive virtual impedance method, and integrates two control strategies to reduce the VSG output frequency deviation while accelerating the frequency response speed.The proposed coordinated adaptive control strategy of moment of inertia, damping coefficient and virtual impedance is verified under the given four working conditions of sudden increase and decrease of active power, decrease and rise of grid frequency.The simulation results show that compared with the fixed moment of inertia, damping coefficient and virtual impedance, this scheme has obvious effect in enhancing VSG inertia ability and accelerating the completion of frequency modulation, which proves the effectiveness of the proposed scheme.

Figure 1
Figure 1 Basic structural model of VSG

Figure 2
Figure 2 Closed loop control block diagram of active frequency loop a)Sudden reduction of given active power (b)Given active power surge Figure 3 Response curve of G2(s)

4
(a)Grid frequency drop (b)Grid frequency rise Figure Response curve of G3(s)

Figure 5
Figure 5 VSG system with virtual impedance

Figure 6
Voltage vector diagram before and after power change.(a) Before a given active power is suddenly reduced.(b) Given the sudden decrease of active power

Figure 7
Voltage phasor diagram before and after power grid frequency change.(a) Before the grid frequency drops.(b) After the grid frequency drops

Figure 8
Figure 8 Adaptive virtual impedance control block diagram (a) Output frequency waveform (b) Output active power waveform (c) Virtual inductance and adaptive signal waveform Figure 10 Output of VSG at a given power sudden drop (a) Output frequency waveform (b) Output active power waveform (c) Virtual inductance and adaptive signal waveform Figure 11 Output of VSG at a given power surge (a) Output frequency waveform (b) Output active power waveform.(c) Virtual inductance and adaptive signal waveform Figure 12 Output of VSG when grid frequency drops

Fig. 12a
Fig. 12a and Fig. 13a are VSG output frequency diagrams.When the grid frequency fluctuates, the VSG output frequency changes rapidly and follows the grid frequency.When the angular frequency variation exceeds the threshold value A 3 , strategy 3 can significantly reduce the peak and valley value of the output frequency and decrease the fluctuation range of the output frequency.Some (a) Output frequency waveform (b) Output active power waveform (c) Virtual inductance and adaptive signal waveform Figure 13 Output of VSG when grid frequency rises

Fig. 12b
Fig.12band Fig.13bare the VSG output power diagrams.Although strategy 2 reduces the overshoot of the active power, the oscillation range between 1.55 s and 1.65 s is too large.Strategy 3 not only improves the active power overshoot and shortage, but also greatly reduces the largescale oscillation during power recovery, helping the VSG speed up the recovery of steady state.Fig.12cand Fig.13care the waveforms of the virtual inductance.The virtual inductance value is adjusted according to the adaptive signal to assist the smooth operation of the VSG.

Table 1
Simulation Parameters