A Virtual Synchronous Generator Secondary Frequency Modulation Control Method Based on Active Disturbance Rejection Controller

: In order to solve the frequency modulation (FM) problem caused by load in the virtual synchronous generator (VSG) system under an islanding state, this paper proposes a frequency modulation method based on active disturbance rejection control (ADRC). Firstly, design a nonlinear function using the design rules of nonlinear functions. Then, the extended state observer (ESO) and nonlinear feedback control law (NLSEF) of ADRC are designed based on the nonlinear function. By introducing ADRC into the power–frequency control loop of VSG, error-free frequency modulation of VSG is achieved. Finally, the superiority of the proposed method was veriﬁed through experimental comparison


Introduction
With the shortage of fossil energy and the increase in environmental pollution, distributed generation technologies such as photovoltaic power generation and wind power generation have received widespread attention [1].Distributed generation technology can utilize renewable energy and small generators to generate electricity near the load, which has the advantages of energy saving, emission reduction and reliability improvement.It is typically connected to the grid using a power electronic interface, which leads to a degradation of the inertial response and damping capability of the grid due to the lack of inertia and damping similar to that of a conventional synchronous generator (SG) [2,3].As the penetration of distributed generation increases, leading to a further decrease in the inertial response and damping capacity of the grid, the voltage and frequency of the grid can suffer from dramatic fluctuation problems [4][5][6][7].Therefore, exploring a control strategy to maintain grid stability has become an urgent problem.
As a new control technology, VSG simulates the traditional SG and introduces virtual inertia and virtual damping in the control strategy, realizing the frequency and inertia support to the grid and maintaining the stability of the grid [8].However, the traditional VSG control cannot effectively utilize the flexibility of inverter control or achieve optimal control.It is especially when the load changes or the system is disturbed that the control of the inverter with conventional VSG is not optimal.Several improved VSG control strategies have been proposed to directly or indirectly improve the power and frequency dynamic regulation performance of the system [9][10][11][12][13][14].In [9][10][11], the VSG adaptive frequency control strategy is proposed to improve the frequency regulation performance of the system by adaptively adjusting the value of virtual inertia and damping.In [12,13], feed-forward inertia and feed-forward damping control strategies are proposed to enhance the system's anti-interference and power fluctuation suppression capability.All the above methods are based on the traditional VSG for improvement and do not fundamentally solve the connection problem.In [14], a fractional-order novel VSG control strategy is proposed and its power and frequency oscillation suppression capability is verified in both islanding and grid-connected modes.
Although the above methods can suppress frequency oscillation to a certain extent and improve the inertia support capability of the VSG system, when the system is in an islanded state and experiences significant disturbances, the frequency can undergo drastic changes and deviate from the stable range.In such cases, relying solely on the frequency modulation capability of the VSG is not enough to achieve stable system operation.Therefore, secondary frequency modulation(SFM) control needs to be incorporated.In [15][16][17], a communicationbased secondary FM method was proposed.However, the complex interconnection of communication lines is required between distributed generators (DGs), which is less reliable, and the lower communication bandwidth also leads to the existence of delays in the system response; moreover, this strategy also fails to realize the plug-and-play of DGs, which is less scalable.In [18][19][20], the secondary control of frequency (SFC) is realized by introducing integral control in the droop control of power and frequency of the VSG active loop.However, when the system load changes, its control parameters need to be adjusted again, and the system response speed is slow.Adding a proportional integral(PI) control method to the frequency regulator can realize the error-free FM of VSG [21,22].However, when the load of the system changes, its control parameters need to be adjusted again and the system response is slow.A combination of the fuzzy control mechanism and traditional VSG strategy achieves the frequency error-free adjustment of the VSG [23].However, the selection of fuzzy rules and membership functions mostly relies on experience and lacks a corresponding theoretical basis.The advantages of an inertia filter and integration is combined to achieve steady frequency control by using control mode switching [24].However, in order to reduce the influence of local parameters, the delay time of the inertia filter is extended, greatly reducing the system's response speed.At the same time, excessive reliance on switching can lead to system deterioration or even oscillation in the event of any switch failure.
In order to solve the problems of rapidity and overshooting, a transition process is introduced during the controller design process [25][26][27][28].The tracking differentiator is utilized to integrate the transition process and the differentiator in a single module, which can enable the fast tracking of the input signal and provide an approximate differentiation of the input signal.ESO is used to actively resist disturbances through the state estimation of the constructed expanded system and observing the total system disturbance.Finally, the input and output data of the controlled object are estimated and compensated by using NLSEF.The treatment of disturbances and uncertainties is the most prominent feature of the self-resistant control, which does not require the measurement of disturbances, but defines all uncertainties acting on the controlled object as unknown disturbances.Compared with the proportional-integral differentiation (PID) control, it has a more advanced antiinterference capability [29].Therefore, this paper proposes a nonlinear ADRC-based secondary frequency control strategy for VSG from the perspective of grid system stability.The ADRC controller is introduced into the power-frequency control loop of the VSG and then realizes the error-free regulation of frequency.The proposed method is compared with the PI frequency tuning algorithm, which shows that the control strategy not only has a strong anti-interference ability, but can also improve the control accuracy and tracking effect and realize the fast frequency recovery.The main contributions of this paper are as follows: (1) A novel secondary frequency control method: A new ADRC secondary frequency control method based on a nonlinear function is designed to address the frequency control problem of the VSG in islanded state.This method can achieve SFC and maintain the frequency within a stable range when the system experiences sudden load changes.
(2) Rigorous stability proof: The stability of the designed nonlinear ESO is analyzed using Lyapunov stability theory.(3) ESO disturbance estimation analysis: The nonlinear system is linearized, and Laplace transform is applied to derive the disturbance estimation function and the transfer function of the disturbance estimation error of the ESO, analyzing the disturbance estimation capability of the ESO.

Power-Frequency Controller Structure
The power-frequency controller mainly simulates the rotor equations of motion of SG, and its mathematical modeling aims to make the distributed power supply have the basic characteristics of SG without introducing too many transient processes of SG, so the second-order model of SG is used [17].
where D is the damping coefficient, J is the virtual inertia, ω and ω n are the output angular velocity and rated angular velocity, respectively, P re f is the power command, P e is the power emitted by the VSG, and θ is the power angle of the VSG.
The schematic diagram of the power-frequency modulation of the VSG is shown in Figure 1.Equation (2) shows that there is a droop characteristic between the active power and frequency of the VSG (Figure 2).It is assumed that the microgrid is in the grid-connected state and ω n is equal to ω g .When the grid frequency decreases, the VSG can automatically adjust its own output to increase the active power injected into the grid, thus realizing the function of primary FM, and at this time, the working point moves from point A to point B in Figure 2, although the opposite is true when the grid frequency increases.However, the primary FM is a differential regulation.At this time, it is necessary to introduce the secondary FM, i.e., change the characteristics of the governor, and introduce the ADRC link in the difference adjustment link to achieve the purpose of error-free frequency tracking.

Proposed SFM Algorithm
According to Equation ( 1), the model of VSG can be described as: where x 1 is the speed deviation, x 2 is the total disturbance of the system, u is the system control input, b 0 is the gain of the system input, and f (t) is a bounded function.
Figure 3 shows the overall block diagram of SFM, including the active power loop, reactive power loop, and other parts.This paper mainly proposes an SFM control algorithm based on ADRC in the active power loop.The block diagram of the ADRC-based SFM of the VSG is an algorithm that maintains the system frequency stability by introducing ADRC into the power-frequency control loop of the VSG. Figure 4 shows the control schematic of ADRC, which consists of two parts: the ESO is used to observe the internal and external perturbation states and to improve the system controllability, and the NLSEF is used to provide the effective control quantities; z 1 is the estimated value of the output variable x 1 ; and z 2 is the estimated value of the total perturbation x 2 .
where α and δ 1 are the parameters of the newfal(•) and e 1 is the variable of the newfal(•).

ESO Design
ESO is the core of SFM, which expands the nonlinear factors of VSG and internal and external disturbances of the system into new state variables.The ESO designed in this paper can observe the internal and external disturbances of the system in real time and compensate them precisely.Based on the function designed in the previous section, the ESO designed in this paper is shown in Equation ( 5): where newfal (e 1 , α, δ) = |e 1 | α • tanh(δe 1 ), β 1 , β 2 are the gain of the input error and both are greater than 0, α is the nonlinear factor, δ is the nonlinear time interval length, and tanh(•) is the hyperbolic tangent function.
The constructed Lyapunov function is shown in Equation ( 7): Derivation on V ζ can be obtained: Since f (t) is a bounded function, it can be obtained that: According to Equation ( 9), when |ζ 2 | ≤ σ β 1 (σ is the maximum value of | f (t)|), Vζ ≤ 0, the system represented by Equation ( 6) is stable.When the system represented by Equation ( 6) enters the steady state, there are: From Equations ( 10) and ( 11), the following can be obtained: Taking absolute values for both sides of Equation ( 11) and based on |ζ 2 | ≤ σ β 1 , Equation ( 12) can be further obtained: Since the value of β 2 is positive, it follows that: The analysis of newfal(e 1 , δ, α) shows that newfal(e 1 , δ, α) is monotonically increasing in the domain of definition, and combined with Equation ( 12), it can be seen that newfal (e 1 , δ, α) has the upper and lower bounds, then the variable ζ 1 has upper and lower bounds, and when σ takes a certain value, it is enough to take a larger value of β 2 to obtain a smaller error.
Since ζ 1 = e 1 , ζ 1 have upper and lower bounds, the error e 1 has upper and lower bounds, and a smaller error e 1 can be obtained by taking a larger value of β 2 .
Since ζ 2 and e 1 have upper and lower bounds, it follows that e 2 have upper and lower bounds.Therefore, β 1 and β 2 take a more appropriate value to obtain a smaller error e 2 .
(2) Performance evaluation of disturbance estimation in ESO Define F = new f (e 1 , δ, α)/e 1 , since the sign of F = new f (e 1 , δ, α) coincides with e 1 .It can be shown that when e 1 = 0, F > 0. ESO can be recharacterized as: Here, β 2 F can be thought of as the gain coefficient that varies with error.Applying the Laplace transform to Equation ( 13), the perturbation estimation function for ESO can be derived.
Theoretically, the higher the bandwidth ω 0 , the faster the response of the ESO, which can compensate the system perturbation faster.
From Equation ( 15), we can obtain the matrix A = −β 1 0 −β 2 F 0 , which is the linear ESO error equation of the state matrix for estimating the effect of the perturbation.From the first criterion of the Lyapunov function, the error of LESO converges to 0 when all the eigenvalues of the matrix lie in the left half plane of the s-plane.Therefore, the observer gain is chosen as β 1 = 2ω 0 , β 2 F = ω 2 0 , to ensure that the characteristic polynomial stabilizes.
Figure 5 shows the frequency characteristic curve of ESO for perturbation estimation.The arrows show the direction of increasing ω 0 .Changing the ω 0 of the ESO so that it starts from 100 rad/s with a slope of 20, the arrow shows the direction of ω 0 decreasing.It can clearly be seen that the gain of the ESO is relatively higher as ω 0 increases, implying that the ESO has a stronger ability to estimate perturbations, which is consistent with the theory.Frequency(Hz) From Equation ( 15), the transfer function of the disturbance estimation error of ESO can be derived:

Magnitude(dB)
When the perturbation is a ramp signal with slope k, ω 0 is varied so that it increases in steps of 20 rad/s from 100 rad/s to 200 rad/s, and the total perturbation action changes in a ramp with a slope of 20, with the arrow indicating the direction in which ω 0 decreases.As can be seen in Figure 6, the estimated speed of the ESO increases with an increasing ω 0 and the estimation error decreases with increasing ω 0 .
When the bandwidth of the ESO is 100 rad/s, the slope of the total perturbation is varied so that it increases in steps of 2 from 20 to 30, with the direction of the arrow being the direction of the increasing slope.As can be seen in Figure 7, the ESO estimation error increases as the slope increases.

NLSEF Design
The conventional linear superposition method to deal with errors is simple but not very effective in dealing with nonlinear problems.In this paper, a nonlinear NLSEF is designed to nonlinearly compute the error signal, which improves the control accuracy of the control system and enhances the system robustness.The error signal between the ESO's estimate of the deviation signal z 1 and the desired deviation signal x 1 is: The design nonlinear state error feedback control law is shown in Equation ( 18): where ρ is the gain of the nonlinear controller and ρ > 0, z 2 /b 0 is the compensation terms of the system.

Experimental Verification
The experiment platform is built to test the effectiveness of the proposed algorithm.Figure 8 shows the experimental setup, where the hardware-in-the loop (HIL) is used.The HIL system, MT6016, is a high-performance semi-physical simulation platform with a small-step real-time simulation solver and a large-capacity FPGA hardware.The control algorithm is coded in a personal computer and loaded via a patch cable to be implemented by MT6016.Then. the interface board is connected to the MT 6016 and the data in MT 6016 are also sent to the oscilloscope to display the waveforms through the port connection on the interface board.In this case, a resistor of 1.998 Ω is used instead of the initial load.The control parameters of ADRC are ρ = 5000, β 1 = 5 × 10 6 , β 1 = 2.5 × 10 11 , b 0 = 100, δ 2 = 50, α = 0.1.The sampling time of the experiment is 2 × 10 −5 s.The parameters of the main circuit are shown in Table 1.The HIL testing system parameters are the same as those in the simulation tests.

Comparison between Proposed Algorithm and SFM Algorithm
In order to highlight the superiority of the FM algorithm in this paper, the FM algorithms of references [18][19][20] are introduced in this section for comparison.Figure 9 shows the response curve of the VSG operating initially with a resistive load of 1.998 Ω, and suddenly cutting in a resistive load of 1 Ω.Since the amount of frequency change exceeds the limitations of the oscilloscope, the changes in frequency, voltage, and current are scaled in this paper.(The same operation was performed in Figures 10 and 11).The cyan line in the figure is the frequency change curve, the blue line is the voltage change curve, and the red line is the current change curve.Figure 9a shows the effect picture under ADRC control strategy.Figure 9b shows the effect picture when the parameter of SFC is 2500.Figure 9c shows the effect picture when the parameter of SFC is 7000.Figure 9d shows the effect picture when the parameter of SFC is 10,000.From Figure 9a, it can be seen that the ADRC control strategy has a strong anti-interference ability, so the variation of frequency is only 0.037 Hz.From Figure 9b-d, it can be seen that, although the amount of frequency variation is decreasing as the parameter of the SFC increases, the frequency oscillation is more obvious.It can be clearly seen that when the system suddenly increases the load, the voltage is almost constant and the current value increases.Combined with the curve of the frequency change, it can be concluded that the frequency change in the VSG conforms to the function of active power regulating frequency.

VSG Frequency Response under Different Parameter Values
This section discusses the effect of different inertia and damping on the frequency dynamic characteristics under the ADRC FM control strategy.The VSG operation is consistent with Section 4.1.Figure 10 shows the effect of the variation of J on the VSG operation when the value of D is fixed at 100.The cyan line in the figure is the frequency change curve, the blue line is the voltage change curve, and the red line is the current change curve.In Figure 10a-d, the values of J are varied as 5-10-20-25.It can be seen that the inertia support of the system becomes stronger and stronger as J increases, which leads to the difficulty of the system in responding to the frequency change in time, and the longer the system needs to respond to the frequency change, which leads to the longer frequency stabilization time of the system, and a longer amount of time required to recover to the stable state.

Conclusions
In this paper, an SFM method based on ADRC is proposed, which can adjust the frequency according to the frequency offset of the system and realize the frequency recovery control.ADRC contains NLSEF and ESO modules.The NLSEF module can provide effective control quantities.The ESO module can estimate the internal and external perturbations of the system in real time and compensate for them, so as to ensure that the frequency can be quickly adjusted under the condition of large load perturbation.Finally, through the experimental comparison with the PI control strategy, it is proven that the control method in this paper has obvious advantages in dynamic response speed and steady-state accuracy.

Figure 1 .
Figure 1.Principle block diagram of power-frequency controller.

Figure 2 .
Figure 2. Schematic diagram of the principle of secondary frequency modulation.

Figure 3 .
Figure 3. Overall control structure of VSG control.
3.1.ADRC Design3.1.1.Nonlinear Function DesignThe nonlinear function is the core part of ADRC and affects the control effect of ADRC.The following factors should be considered when designing a nonlinear function: the nonlinear function is continuous and derivable at the origin.Based on the above design principles, a nonlinear function is constructed in this section using the hyperbolic tangent function.The function gives up the linear part of the function and is continuous and differentiable throughout the domain.The constructed nonlinear function is as follows:newfal(e 1 , α, δ 1 ) = |e 1 | α tanh(δ 1 e 1 )

Figure 9 .
Figure 9. Frequency response under different control methods.(a) ADRC control strategy, (b) SFC control strategy with parameters of 2500, (c) SFC control strategy with parameters of 7000, (d) SFC control strategy with parameters of 10,000.

Figure 10 .
Figure 10.Frequency response under different values of J.

Figure 11
Figure11shows the effect of variation of J on the VSG operation for a fixed value of J of 5.The cyan line in the figure is the frequency change curve, the blue line is the voltage change curve, and the red line is the current change curve.In Figure11a-d, the values of D are varied as 40-70-100-150.It can be seen that with a fixed value of J, the frequency fluctuation is enhanced and the frequency deviation is reduced as D increases.The frequency response of the system becomes slower and the frequency recovery time becomes longer.

Figure 11 .
Figure 11.Frequency response under different values of D.