# Presynchronous Grid-Connection Strategy of Virtual Synchronous Generator Based on Virtual Impedance

Authors: Guanfeng Zhang; Junyou Yang; Haixin Wang; Jia Cui
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

The virtual synchronous generator (VSG) technology of inverter is widely used to provide the inertia and damping support for power system. However, an additional measurement device PLL (phase-locked loop) is required in the virtual synchronous generator grid connection to track the voltage phase, amplitude, and frequency, which restricts the flexible output of the distributed power generation system. To tackle this challenge, a method for grid-connected control of virtual synchronous generator based on virtual impedance is proposed. It is assumed that there is a virtual power exchange between the synchronous machine and the power grid when the virtual synchronous generator is off-grid, the virtual impedance is developed to calculate the virtual current, and when the virtual current is zero, the output voltage of the VSG can be synchronized with the voltage of the power grid, thereby seamlessly switching between off-grid and grid-connected VSG. A semiphysical simulation platform is built based on RT-LAB; simulation and experimental results show that the proposed grid synchronization control strategy of the VSG can achieve seamless transform between different VSG modes, which is simpler than the conventional synchronization control, while having a good active and reactive power tracing performance.


---

## Body

## 1. Introduction

With the rapid economic development, the problems of energy crisis and environmental pollution have become increasingly prominent. Traditional fossil energy is supplemented or replaced by clean energy, which is an important means to ensure sustainable development in the energy field. Distributed power generation has gradually become a new mode of electricity production and renewable energy consumption due to its efficient, flexible, and friendly grid connection characteristics. However, a large number of intermittent and random distributed power sources are connected to the grid, which greatly increases the complexity and difficulty of management and control of the grid and has a major impact on the safe, reliable, and economic operation of the grid. The existing distributed power generation system uses power electronic devices to be integrated into the grid, which is more flexible than traditional power generation systems.However, the conventional grid-connected inverter has a fast response speed, almost no moment of inertia, and is difficult to participate in grid regulation. Distributed power generation systems cannot provide the necessary voltage and frequency support for the distribution network with distributed power sources, nor can it provide the necessary damping effect for the relatively poorly stable microgrid.The lack of a mechanism to effectively “synchronize” with the distribution network and microgrid affects the friendly compatibility of the distributed power generation system with the existing power grid. If the grid-connected inverter has the external characteristics of a synchronous generator, it will inevitably improve the operating performance of the distributed generation system and the microgrid with the grid-connected inverter. Based on this idea, researchers have proposed the virtual synchronous generator (VSG) technology [1]. By changing the external characteristics of the grid-connected inverter and absorbing the advantages of the synchronous generator, which ensures the stable operation of the system. In 2007, the concept of virtual synchronization was first proposed by the European VCYNC project. The synchronverter algorithm was first proposed to realize the modeling of virtual synchronous generator [2]. In recent years, China has also made outstanding contributions in improving the stability of distributed generation systems with virtual synchronous generators [3].At present, the technology of virtual synchronous generator has entered the practical stage. In 2016, the State Grid Corporation of China transformed the inverter of wind power generator and photovoltaic power generation system in the Zhangbei Wind-Solar Storage and Transmission Demonstration Project to become the largest virtual synchronous generator demonstration project in the world [4]. In the same year, the photovoltaic virtual synchronous generator developed by the China Electric Power Research Institute Power Distribution Institute was officially launched in the Sino-Singapore Tianjin Eco-City. The technical functions of the virtual synchronous generator are basically realized, and it has entered the optimization phase from preliminary development stage, but there is still room for further research at the system-level grid-connected transient control and application level.A control strategy of VSG self-synchronous inverter is proposed to realize VSG no-load self-synchronization grid connection [5]. The microgrid frequency adjustment method based on virtual synchronous generator is studied to realize different operation modes of off-grid and grid-connected [6, 7]. Photovoltaics and energy storage are integrated based on virtual synchronous generator technology, realizing photovoltaic power generation friendly dissipation [8, 9]. The charge and discharge control method for DC unit of virtual synchronous generator was studied, and the optimized control method of the state of charge was given [10, 11]. Wind power grid-connected system based on virtual synchronous generator was proposed, which realized the goal of friendly grid connection with frequency response capability [12]. The abovementioned literatures all researched the application technology of the virtual synchronous generator in the existing distributed power generation system. In addition, the application of virtual synchronous generator technology for frequency modulation, voltage regulation, and fault was discussed in the context of microgrid operation [13, 14]. An electric vehicle charging method has been proposed based on virtual synchronous generator technology in [15]. A new seamless transfer method based on the second-order generalized integrator is proposed in [16], realizing switch from islanded mode to grid-connected mode smoothly. Single-PLL- and multi-PLL-based approaches are presented, and through the PLL presynchronization strategy, the voltage amplitude and phase angle before VSG grid connection are the same. However, PLL’s participation in grid voltage lock-in not only makes the control structure more complex, but also makes it difficult to guarantee its accuracy and reliability in the weak grid environment [17–20].These research results have the same basic principles at the level of the inverter-synchronous generator control strategy, the difference lies in the application. It can operate stably in both off-grid and grid-connected operation modes, and switch of operation mode can be realized without changing the controller structure. However, the synchronization time of off-grid seamless switch is long and lacks experimental verification.In summary, an improved virtual synchronous generator grid-connection method is proposed to solve the problem that the extra measuring device in the traditional grid-connection restricts the flexible output of the distributed generation system, avoid the problems such as nonlinear, slow response and difficult parameter design of the PLL, and realize the more concise and effective VSG smooth grid connection; meanwhile, a semiphysical verification method is given.This article is organized as follows. The equivalent model of virtual synchronous generator on-grid is given, the principle and the equations are illustrated and deduced inSection 2. The proposed synchronization control strategy of virtual synchronous generator based virtual inertia control is presented in Section 3. Simulations are carried out in MATLAB/Simulink to verify the validity of the proposed method in Section 4. In Section 5, RT-LAB hardware-in-the-loop simulation platform was built to verify the effectiveness of the control strategy mentioned in this paper. Various operating conditions with islanded mode, seamless switching, and grid-connected are presented. Finally, the conclusion is given in Section 6.


## 2. Equivalent Model of Virtual Synchronous Generator On-Grid

If the virtual synchronous generator is equivalent to a voltage source, the equivalent circuit of single-phase virtual synchronous generator grid connection system is shown in Figure1, where e is the excitation voltage of a virtual synchronous generator, E is the virtual synchronous generator excitation voltage amplitude, i is the output current of virtual synchronous generator, XS is the line impedance, ug is the grid voltage, Ug is the amplitude of grid voltage, αg is the phase angle of the grid voltage, and α is the phase angle of the excitation voltage of VSG.Figure 1
Equivalent circuit diagram.The active power transmitted by the virtual synchronous generator is shown in the following equation:(1)P=3UgE2Xssinα−αg,δ=α−αg,where δ is the virtual power angle.The transmission of reactive power by the virtual synchronous generator is shown by(2)Q=3UgEcosα−αg−Ug2XS.When the virtual synchronous generator is connected to the grid, the frequency, phase, and amplitude of the output voltage should be close to the grid voltage, which is expressed by(3)f−fg≤fmin,E−Ug≤Umin,α−αg≤αmin,where f, E, and α are the voltage frequency, amplitude, and phase of the virtual synchronous generator, respectively, g subscript is the grid side variable, min subscript is the set safety threshold, and the safety thresholds fmin, Umin, and αmin in the optimal grid-connected case are zero.From equations (1) and (2), it can be seen that the power transmission equation of virtual synchronous generator grid-connected mainly depends on the voltage amplitude and phase angle; that is, to meet the requirements of smooth grid-connected, the safety threshold should meet the requirements of the following equation:(4)Umin=0,αmin=0.Substituting equations (3) and (4) into equations (1) and (2), the following equation is obtained:(5)P=0,Q=0.It can be seen that the synchronization of the virtual synchronous generator to the grid can be understood as that the active power and reactive power transmitted by the virtual synchronous generator to the grid are zero.The output power of the virtual synchronous generator is deduced under the assumption that the virtual synchronous generator is connected to the grid, but the actual situation is that the virtual generator is off-grid and has no output power under the no-load state. In order to give the control strategy of virtual synchronous generator with zero output power, a virtual power exchange between a virtual synchronous generator and the grid is needed.


## 3. Synchronization Control Strategy of Virtual Synchronous Generator

The virtual synchronous generator is composed of DC power supply, DC/AC inverter, and filter circuit. The DC power supply can be regarded as the prime mover to provide the power required by the virtual synchronous generator. The control system of inverter is the core of VSG, which mainly includes VSG ontology model and control algorithm. The former mainly simulates electromagnetic relationship and mechanical motion of synchronous generator from mechanism, while the latter simulates active frequency modulation and reactive voltage regulation and other characteristics of synchronous generator from external characteristics.The basic equation of virtual synchronous generator is shown in the following equation:(6)u=−Ri−Lmdidt+e,e=ωMfifsin˜θ,Jdωdt=Tm−Te−Dpω−ωref,Te=Mfifi,sin˜θ,Q=−ωMfifi,cos˜θ,where Tm is the virtual mechanical torque, Dp is the virtual damping coefficient, J is the virtual moment of inertia, Mf is the mutual inductance coefficient, u and i are the measured voltage and current, Te is the virtual electromagnetic torque, if is the virtual excitation current, θ is the electrical angle, e is the excitation voltage, ω is the angular velocity, ω=dθ/dt, and ωref is grid synchronization angular velocity. sin˜θ and cos˜θ are defined as follows:(7)sin˜θ=sinθsinθ−2π3sinθ+2π3,cos˜θ=cosθcosθ−2π3cosθ+2π3.The control part mainly includes power-frequency regulator, excitation regulator, and presynchronization unit, as shown in Figure2. The output active power P of VSG is composed of the active power reference value Pref and the frequency change difference ΔP as follows:(8)Dp=−ΔTΔω≈−ΔPΔω⋅ωref,P=Pref+Dpωrefωref−ω.Figure 2
Control diagram of VSG based on virtual impedance.The coefficientDp is also commonly called the P-f droop control coefficient and is a set value that reflects the active power-frequency droop control characteristics. Due to the droop characteristic between active power and frequency, VSG has the self-synchronization characteristic of transmission generator. When the power grid frequency rate goes up (down), the VSG automatically reduces (increases) the active power injected into the grid and participates in the primary frequency modulation of the large grid.Similarly,Dq is the reactive power-voltage droop control coefficient, which reflects the reactive power-voltage droop control characteristics (Q−U characteristics). Due to the existence of reactive voltage droop control, the VSG can participate in the primary voltage regulation of large power grid; when the voltage amplitude of the power grid is lower than (higher than) the rated voltage Uref, the reactive power Q of VSG output is higher than (lower than) the fixed value of reactive power rate Qref.(9)Dq=−ΔQΔU=−Qref−QUref−U.The basic control of virtual synchronous generator includes virtual speed regulation control and virtual excitation control. Based on the aforementioned mathematical model of virtual synchronous generator and typical active frequency drooping characteristic, virtual speed regulation control adopts the double-loop structure of power outer loop frequency inner loop to simulate the active power-frequency characteristic, inertia, and damping link of the synchronous generator. Virtual excitation control does not involve the abovementioned mathematical model, but mainly considers the external characteristics of virtual synchronous generator, so the traditional reactive power-voltage droop control structure is adopted [21].In order to connect the virtual synchronous generator to the power grid smoothly, the traditional control method needs the special PLL to provide the voltage, frequency, and phase angle of the power grid to realize the synchronization, but the PLL is a nonlinear element and it takes time to adjust the parameters of the PLL. When there are multiple PLL in a system, these PLL will attempt to interlock, reducing the performance and stability of the system and increasing the complexity of the system.Therefore, in the virtual synchronous generator island/grid switching process, this paper proposes a virtual synchronous generator presynchronization method based on virtual impedance; the virtual impedance designed by this method is to virtualize a power exchange between virtual synchronous generator and the grid.Assuming that there is a virtual impedanceXV between the VSG terminal and the power grid, and αg=0, the output virtual active power PV of the VSG is(10)PV=EUg2XVXVCOSφV−αV−Ug22XVCOSφV,where the virtual impedance XV and the virtual impedance angle φV satisfy(11)XV=ωL12+R12,φV=arctanωL1R1.The virtual current can be obtained by dividing the deviation betweene and the grid voltage ug by the virtual synchronous reactance:(12)iV=e−ugL1s+R1,where iV is the virtual current, L1 and R1 constitute the virtual impedance, R1 is the virtual resistance, and L1 is the virtual inductance. In theory, the smaller the L1 is, the faster the system synchronizes. However, when L1 is too small, the synchronous control process will be shaken, so L1 is generally slightly smaller than the filter inductance LS.It can be seen from equation (10) that when the amplitude and phase of the VSG output voltage and the grid voltage are exactly the same, the virtual power PV is equal to 0, so PI closed-loop control of the virtual power is needed to synchronize the VSG output voltage with the grid voltage. However, the premise of this method is that the amplitude and frequency of E and Ug are the same. Therefore, the presynchronization control unit based on virtual impedance and voltage frequency control is designed as shown in Figure 2, assuming a virtual impedance exists between virtual synchronous generator output voltage and the grid voltage, the virtual current can be calculated as shown in equation (12).In off-grid state, switchSa and switch Sc are closed to make the voltage amplitude and frequency of VSG consistent with the grid, the VSG, and load form a microgrid, which runs in the V/F mode. Then switch B1 is closed to realize the synchronization of the VSG output voltage and the grid voltage. After the synchronization is completed, while closing the grid-connected switch, turn off the switch Sa and Sc, and then VSG is pulled into synchronization by the grid.If VSG is running in VF state,Sa and Sc are already closed, the switch B1 can be closed directly to synchronize the VSG output voltage with the grid voltage.In the grid-connected state, the switchB2 is closed, the real current ig is routed into the controller for normal operation, and the virtual synchronous generator runs in grid-connected mode.


## 4. Simulation Analysis

Based on the above research, this paper uses MATLAB/Simulink software for simulation verification; the simulations are based on the microgrid configuration in Figure3, which operates in islanded mode before t = 0.04 seconds. The values of relevant parameters in equations and block diagrams of this paper are shown in Table 1.Figure 3
Simulation system.Table 1
Simulation parameters.
SymbolDescriptionValuesugridGrid voltage400 VeExcitation voltage380 VCFilter capacitor40μFLSFilter inductance0.45 mHRSFilter resistance0.2 ΩLgLine inductance0.1 mHRgLine resistance0.02 ΩL1Virtual inductance0.2 mHR1Virtual resistance0.05 ΩPloadLoad power10 kWfnGrid rated frequency50 HzfcSwitching frequency5 kHzComparing the grid connection control method proposed in this paper with the direct interconnection method of virtual synchronous generator, the simulation results are in Figure4.Figure 4
Voltage and current of the virtual synchronous generator.
(a)(b)When the virtual synchronous generator is running with load, the voltage amplitude and frequency are consistent with the power grid, and there is a phase difference between the output voltage of the virtual synchronous generator and the power grid voltage, as shown in Figure4. When t = 0.04 s, direct interconnection will generate a large inrush current. It adversely affects the stable operation of the virtual synchronous generator and cannot meet the requirements for smooth grid connection.Adopting the presynchronization control method based on virtual impedance, the virtual synchronous generator tracks the voltage phase of the power grid through continuous adjustment, as shown in Figure5, the output voltage of the virtual synchronous generator is kept in synchronization with the grid voltage, and there is no inrush current after the grid connection operation; the island/grid connection is realized seamlessly.Figure 5
Voltage and current of virtual synchronous generator based on virtual impedance.
(a)(b)


## 5. Experimental Verification

RT-LAB hardware-in-the-loop simulation platform was built to verify the effectiveness of the control strategy mentioned in this paper [22, 23], which includes a controllable load, a 10 kW·h lithium battery energy storage system, a 10 kW converter, RT-LAB, and a simulated power grid, as shown in Figure 6. Among them, RT-LAB is designed as a virtual synchronous generator controller, which simultaneously collects the voltage, current, frequency, etc., of the converter and the simulated power grid and sends out control pulses to form a closed loop. The lithium battery is used as a DC power source, and the lithium battery plus converter system is a virtual synchronous generator, which is directly connected to the controllable load and supplies power to the controllable load. First, the energy storage virtual synchronous generator and the controllable load form an isolated microgrid, which runs in the V/F mode with a frequency of 50 Hz. The controllable load suddenly increases by 0.5 kW at t = 6 seconds; then the virtual impedance strategy is started at t = 9 seconds. The isolated microgrid is connected to the simulated power grid through a control switch a t = 10 seconds and switches from off-grid to grid-connected mode. The experimental results of the VSG off-grid process are shown in Figures 7–12.Figure 6
Experimental system.Figure 7
Frequency change of virtual synchronous generator at instant of grid connection.Figure 8
Comparison of active power response of virtual synchronous generator.Figure 9
Comparison of reactive power response of virtual synchronous generator.Figure 10
Comparison of active power response of the grid.Figure 11
Comparison of reactive power response of the grid.Figure 12
Voltage waveform based on virtual impedance.According to the test waveforms of the virtual synchronization machine during the off-grid connection, the control strategy proposed in this paper can achieve synchronization with the power grid before closing. When the virtual synchronous generator is running in island mode, the frequency is stable at 50 Hz, and the load power is suddenly increased, causing the frequency to drop att = 6 s and quickly recover to 50 Hz, effectively reducing frequency fluctuations during the switching process at t = 10 s, as shown in Figure 7. Figures 8–11 show that there is no obvious impact on active and reactive power of virtual synchronous generator and the grid when closing at 10 s.The control strategy based on virtual impedance can achieve synchronization with the grid voltage in 0.25 s as shown in Figure12, and the circuit breaker is turned on at t = 10 s, the frequency changes smoothly and then recovers. Actually, we can close the circuit breaker at any time after t = 9.25 s without obvious impact.In the process of grid connection, the impact of active power and reactive power is significantly reduced, and the output power is smoothly transitioned to achieve a flexible grid connection of the distributed power generation system. At the same time, this paper builds a semiphysical simulation platform through RT-LAB, forms a hardware-in-the-loop real-time simulation system, completes the inspection of the controller algorithm strategy, and provides a reference for the control of the converter's virtual synchronous generator.


## 6. Conclusion

In this paper, a grid synchronization control strategy for virtual synchronous generator based on virtual impedance is proposed, which enables the grid-connected inverter to participate in the voltage amplitude and frequency adjustment of the large grid when it is connected to the grid, and can operate in V/F mode to supply power to the local load when off-grid. The power tracking and seamless switching capability of the control strategy are verified by RT-LAB semiphysical simulation platform.The voltage of the virtual synchronous generator can be synchronized with the power grid by using the controller itself without the need of PLL, which is simpler and more effective than the traditional virtual synchronous generator grid connection method, which avoids the problems of nonlinearity, slow response, and difficult parameter design of the phase-locked loop.As this controller solves the problem that the additional measurement devices restrict the flexible output of the distributed power in the traditional grid connection, this improves the power grid’s ability to accept distributed power generation units.



---

*Source: 3690564-2020-11-09.xml*