Synchronizing a synchronverter to an unbalanced power grid using sequence component decomposition

: The synchronverter is a device used in some microgrids to perform self - synchronization and represent the behavior of a synchronous machine. However, the original control has been proposed for balanced net -works, which is not present in all distribution systems. In unbalanced networks, the negative sequence may appear and generate a double frequency oscillation when delivering power or a non - symmetrical current from the inverter; thus, it must compensate unbalanced load. Therefore, this article shows that a synchronverter can be synchro nized using the positive sequence even when there are voltage unbalances. The proposed strategy was simulated in the Simulink - Matlab© software, considering an unba lanced power grid with a single inverter and a load. The results con ﬁ rm the e ﬀ ectiveness of this strategy, as the syn chronverter can follow the grid frequency and the wave shape amplitude after starting the frequency droop control.

Fortescue operator L s inductance of the filter L g inductance of the power grid R s resistance of the filter R g resistance of the power grid C capacitance of the filter V DC DC voltage i a , i b , i c current of a, b, and c phases i g grid current e a , e b , e c inverter voltage of a, b, and c phases Z L impedance of the load v ga , v gb , v gc grid voltage of a, b, and c phases I S virtual current τ f frequency time constant [

Introduction
In the last two decades, there has been a significant increase in distributed generation (DG), especially photovoltaic (PV) arrays and wind turbines [1,2]. However, there is a critical complication in satisfactorily connecting the DG with the power grid. The DGs do not have inertial movement or only a small amount because most of the resources do not have a rotational machine, and a backto-back inverter is commonly used in wind turbine applications to extract the maximum power from the wind [3]. The lack of inertia in the system leads to instability in the power grid they are connected to [4]. Several control techniques for inverter-based renewable energies' integration have been proposed to regulate voltage and share reactive power using variable virtual impedance [5]; correcting distortions in voltage and current waveforms [6]; and selecting inverter parameters to improve transient response [7]. Synchronverters are a type of inverters capable of mimicking the behavior of a synchronous machine [8][9][10][11]. The device uses droop control to regulate frequency and voltage, changing the active and reactive power [12]. In this way, the synchronverter acts as a voltage-controlled inverter. Furthermore, it can autosynchronize with the power grid without requiring a tracking device such as a phase-locked loop (PLL), only with the addition of a virtual impedance and current loop in the control algorithm [13].
The main algorithm of a synchronverter was developed to deal with symmetrical and balanced power grids. It has been used in the operation of a STATCOM to mimic a synchronous condenser [14]. Furthermore, a back-toback converter is used in wind turbine applications, where the rotor-side converter maintains the direct current (DC) link voltage and the grid-side converter keeps the maximum power point tracking [15]. It has also been implemented in three-phase phase width modulation (PWM) rectifiers without PLL requirements [16,17]. In addition, a transformerless PV inverter has been proposed, which contains the standard half-bridge legs and a neutral leg to have the possibility of connecting the PV ground to the system ground [18]. Several evaluations on the dynamic response of the synchronverter have been reported in refs [19][20][21][22][23][24].
When renewable energies or storage devices share power with the power grid, inverter-based technologies are needed to convert signals from DC to AC. Before connecting the inverters to the power grid, a PLL or a frequency-locked loop (FLL) is used to track the grid voltage waveforms and the frequency [25][26][27][28][29][30][31][32][33][34]. The above is not applicable for self-synchronized synchronverters that can operate without implementing PLLs or FLLs.
Some research authors have dealt with the problem of connecting a synchronverter with non-symmetrical or non-balanced grids. In refs [35,36], the power fluctuation and current harmonics are studied when the negativesequence voltage appears in the power grid. Two similar proposals are presented, where asymmetrical component decoupling is necessary to obtain positive and negative voltage and current components. Voltage and current control loops are added to calculate a reference current and eliminate power fluctuations and unbalanced current; and balance voltages in the islanded mode. The difference is in the coordinated system, alpha-beta, and dq0, respectively.
The main difference between synchronverters and grid-forming inverters lies in the control algorithm that allows sharing power with the main grid. While synchronverters use the equations that apply directly to synchronous generators, the grid-forming inverters use different electronic techniques, such as those presented in ref. [37].
This article presents the synchronization of a synchronverter with the positive-sequence component of the grid and synchronverter voltages, and the current flowing through the LCL filter. This technique is applied to an unbalanced distribution network represented by a Simulink© block named "Three-Phase Programmable Generator," which can generate harmonic signals such as a negative-sequence component in the fundamental frequency. The signal provided by the former generator is introduced to three blocks named "Control Voltage Source" through a Demux block. The main difference between the proposed and other techniques is that our proposal does not require a tracking device such as a PLL or an FLL to follow the grid voltage amplitude and phase.
The rest of the article is organized as follows. Section 2 describes the mathematical model of the synchronverter. Section 3 shows the mathematical model in the space vector-based symmetrical decomposition. Section 4 shows the equations related to the synchronization of the synchronverter. Besides, Section 5 presents the case study, the results, and the analysis. Finally, the conclusion and future work of this research are presented in Section 6.

Synchronverter
Synchronverter was first proposed by Zhong and Weiss [12]. This element is an inverter capable of mimicking a synchronous generator. Then, DG may be part of the frequency and voltage regulation in the system. Figure 1 shows the diagram of a synchronverter connected to a local load represented by a star-connected impedance (Z L ) and an infinite power grid denoted by the independent AC voltage sources (v ga , v gb , v gc ). The DC source must be a controlled DC bus, and the power may come from a PV array, wind turbines, storage devices, and other renewable energies. As this article focuses on synchronizing the AC circuit, the DC circuit is not considered.
A synchronverter is formed by the power and control parts [12,13]. The power part has a three-phase full-bridge inverter, a DC source, and an LCL filter. The capacitors in the LCL filter do not consider the internal resistance because of a weakness in the attenuation ability of the LCL filter and because the active power losses increase [38].
The measured phase voltages (e a , e b , e c ) and currents (i a , i b , i c ) in the outer part of the synchronverter are used to compute the delivered active and reactive power (P e , Q e ). The induced voltage calculated in the control part triggers the bridge gates. Figure 2 shows the block diagram with the control part used to obtain the induced voltage magnitude and the voltage angle θ. Self-synchronized synchronverter comprises three main loops.
The upward loop in Figure 2 covers the frequency regulation control that usually appears in synchronous generators.
Eq. (1) represents the swing equation, where θ̈represents the derivative of the grid frequency, J represents the moment of inertia, T m the mechanical torque, T e the electromagnetic torque, and D p a damping factor in accordance to that of a synchronous machine.
A proportional integral (PI) controller can keep the difference between the nominal and current frequencies in zero values. The controller avoids sharing power between the inverter and the grid, and it is activated for synchronization purposes through a switch Sw P . Once the synchronverter is synchronized, this switch is turned off.
The electromagnetic torque may be calculated with any of the following expressions: where M f is the mutual inductance between the stator windings and the rotor winding, i f is the rotor current, i is the three-phase stator current, P e is the delivered power, θṅ is the nominal angular frequency, and θ sinã nd θ cos̃are given by Eqs. (4) and (5).
An integrator and the moment of inertia (1/Js) produce the grid frequency that is implemented to obtain the angular speed or frequency (θ̇)). Another integrator is used to obtain the angle (θ), which is an output of the control part.
The bottom left loop in Figure 2 represents the excitation of a synchronous machine. The reactive power is set to a specific value (Q set ) and the delivered reactive power Q is calculated and fed back into the loop. The voltage magnitude must be calculated using Eq. (6) and filtered out to avoid the second frequency ripples [12].
where v m is the voltage magnitude; and v a , v b , and v c are the phase voltages measured in the power grid. The magnitude is subtracted from the nominal voltage and amplified by the voltage-droop coefficient D q , that is the ratio of the required change in reactive power Q ∆ to the change in voltage v ∆ . This Q ∆ is driven by the switch Sw Q to act in the set value or as a reactive power droop control. When Sw Q is OFF, M f i f is generated from the tracking error between Q set and Q by the integrator with the gain Ks 1/ , K being the counterpart of J, as shown in Eq. (7). When Sw Q is ON, the error between the grid voltage and the nominal voltage is considered, activating the reactive droop control as in Eq. (8). Eq. (9) provides the deviation value from the nominal voltage.
where Q is the calculated reactive power obtained from Eq. (10).
The bottom right loop in Figure 2 is known as the virtual current loop [13]. A virtual current i s is calculated using the tracking error between the measured grid voltage v g and the calculated induced voltage e multiplied by Ls R 1/ + , which is the impedance of the filter inductor. This current is used in Eqs. (2), (10), and (11) in the synchronization stage. Once the inverter is synchronized, the measured output current i is used. The switch Sw Z drives this process. When Sw Z is in position 1, the virtual current is considered, and when it is in position 2, the actual output current is considered. The induced voltage is the second output of the control part, and it can be calculated as: The operation modes of the self-synchronized synchronverter are summarized in ref. [13].

Space vector-based symmetrical decomposition
Three-phase electrical systems are based on three voltages and three currents that interact to provide both active and reactive powers to the loads. In classic theory, a set of balanced signals means the same magnitude and electrical rotational separation of 120°. This assumption is correct in transmission systems, but not all distribution networks comply with such a balance scenario because of the single-and two-phase loads or even the power grid asymmetry.
Power converters particularly need a space vector transformation to deal with these unbalances. This section presents symmetrical component decompositions for both the frequency and time domains.

Symmetrical components in the frequency domain
Grid-connected power converters are very sensitive to voltage disturbances at the point of common coupling (PCC). When considering sensitivity, it is essential to detect the unbalanced voltage vector properly. The symmetrical decomposition should be performed to accomplish such detection, and it was first presented by Fortescue in 1918 [39]. With this method, a group of three unbalanced voltage or current signals may be separated into three balanced vectors. Those vectors are well known as positive, negative, and zero sequences. The positive sequence presents a counterclockwise rotation, keeping the abc rotational order. Meanwhile, the negative sequence establishes a clockwise rotation, maintaining the acb rotational order. Both cases have three vectors separated by 120°or 2π/3 radians. There are three vectors with the same magnitude and angle in the zero-sequence signal, which is zero degrees.
To transform from a natural frame to a ( + − 0) frame in the frequency domain, the following transformation must be considered: After expanding each term, the following voltage vectors and the Fortescue transformation matrix are obtained: where α = e j2π/3 = 1 ∠ 120°is the Fortescue operator, which keeps the vectors 120°apart. Eq. (12) may be used for calculating the sequence components for the phase a in the frequency domain. If necessary, phases b and c can be calculated as well, as observed in Eq. (14).
Whether the voltage or current vectors are expressed in the symmetrical components for the phase a, the transformation to the natural frame can be obtained by: The above formulation is correct for frequency domain vectors. When signal processing of the voltage and current vectors is needed in the time domain, an adequation should be introduced.

Symmetrical components in the time domain
The symmetrical components decomposition in the time domain was developed by Lyon [40]. If Eq. (13) proposed by Fortescue is applied to the arrays of unbalanced sinusoidal waveforms presented in Eq. (17), it is possible to obtain the instantaneous variables as in Eqs. (18) and (19).
The Lyon transformation may be expressed in Eq. from an unbalanced input vector v abc . Therefore, it is necessary to apply a time-shifting operator that is typically achieved by a T 2 3 / , where T is the signal period. Since the total period equals 360°, the shifting operator corresponds to 120°. The Fortescue operator can also be represented as α j 1 2 3 2 = − / + / . The time-shifting operator can be implemented by using a filter to generate 90°phase-shifting related to the j imaginary operator [41]. Figure 3 presents a simple implementation for a time-shifting operator using a second-order low-pass filter (LPF) tuned at the input frequency (ω in ) and a damping factor ξ = 1. For calculating the a 2 operator, it is only necessary to multiplicate the output signal of the LPF by −1. The LPF is calculated as in Eq.

Synchronization of the synchronverter
Grid-connected power converters may be synchronized in several ways, such as PLL or FLL [43,44]. In this article, the synchronization process is achieved using the positive-sequence instantaneous values of grid voltage, synchronverter voltage, and the current between the synchronverter and the power grid. These instantaneous values are used to accomplish the synchronization part of the self-synchronized synchronverter presented by Zhong et al. [13]. Each vector is split into a, b, and c phases and introduced in the LPF presented in Figure 3. As a result, every single phase has three resulting signals: the original (v a , v b , v c ), the one shifted by the Lyon operator (av a , av b , av c ), and the one shifted by the square Lyon operator (a 2 v a , a 2 v b , a 2 v c ). Then, the instantaneous positive and negative sequences per phase are calculated using these resulting signals, as in Eqs. (22) and (23). The same process applies to the power converter output voltage (e abc ) and the current flowing from the converter to the power grid (i abc ). Figure 4 introduces the synchronization process using the instantaneous positive-sequence values. The terms e abc + , v g_abc + , i abc + , and i s_abc + are the instantaneous positivesequence voltages of the synchronverter, the instantaneous positive-sequence voltage of the power grid, the instantaneous positive-sequence current, and the virtual instantaneous positive-sequence current, respectively. The parameters for calculating the virtual current are based on the resistance and inductance taken from the LCL filter that allows the connection to the power grid.
From Figure 4, it is possible to identify the equations used for the synchronization. First, there is a difference between the synchronverter voltage and the grid voltage, and this is useful for calculating a virtual current as follows: where Ls and R may be the actual or virtual values of the LCL filter connected between the synchronverter and the PCC. i s_abc + is the positive sequence of the virtual current. A switch allows the path of the virtual current or the measured current to the synchronverter formulation. While synchronizing, the virtual current is used until the power switch that connects the synchronverter to the grid is closed. At that point, the measured current is the one that is used for calculations for the synchronverter control.

Results
The implementation was performed with a three-phase synchronverter connected with a breaker to a balanced and unbalanced power grid and a local resistive load in Simulink-Matlab©. The PWM generation is modeled through a "Universal Bridge" mask together with a "PWM Generator (2-Level)" mask fed by the reference voltage obtained by the synchronverter.
The simulation time was adjusted in two seconds to emulate the synchronization and the entrance of each control loop, namely, frequency droop control, voltage droop control, virtual current, and the connection to the grid with the breaker. The system is presented in Figure 1.
According to ref. [12], there are four switches in synchronverter behavior. Those are SW P which allows the frequency droop control; SW Q that allows voltage droop control; SW Z which changes the current that feeds the synchronverter control from the virtual-to the measured-current; and SW B which is the power breaker that connects the inverter to the power grid.
The simulation model parameters are presented in Table 1, and the switch activation times are shown in Table 2.
Three scenarios were performed. The first scenario considers the synchronization of both the conventional synchronverter and the proposed positive-sequence synchronization when the voltage grid is balanced. The second scenario considers the synchronization when the voltage grid is unbalanced, and a comparison is performed to demonstrate the effectiveness of the proposed method. Finally, a third scenario is accomplished with a voltage dip of 50% and unbalanced voltage conditions. In the following subsections, these three scenarios are presented and analyzed.

Synchronization with a balanced power grid
A "Three-Phase Programmable Generator" mask in Simulink© with a phase-voltage amplitude of 48 2 3 / was used to simulate a balanced grid (48V is the line voltage). Additionally, the harmonic generation was not injected. The initial setting for active and reactive power on the inverter was zero. At 1.5 s, the active power changes to 5,000 W (nominal active power of the local load). The reactive power remains at zero because the local load has no reactive power demand. Figure 5 shows the results of this scenario. The conventional synchronverter proposed in ref. [13] was also tested, and we obtained the same results as those presented in Figure 5. The conventional synchronverter behaves just like the positive-sequence synchronized synchronverter proposed in this article based on the balanced nature of grid voltage and local load.
From 0 to 0.5 s, the synchronverter is synchronized correctly, and it can be observed from Figure 5 (voltage plot) that the inverter and grid voltages are in phase. After that, the frequency droop control is activated, as observed in the current plot, when the virtual current goes down to zero. At 1.5 s, the measured current goes into the synchronverter control algorithm, and the breaker is closed to allow sharing power with the grid. The active   power delivered to the load and the power grid is displayed in the delivered power plot of Figure 5, and it is identified as 5,000 W as set initially. The reactive power is not plotted because it is zero all time, based on the entirely resistive load nature. Figure 5 also shows that the frequency remains at 60 Hz during the steady state operation, and in transient state behavior, the changes are small enough to be corrected by the frequency droop control loop. Some transients appeared on the inverter voltage e, but were corrected immediately by the voltage droop control loop.
Total harmonic distortion (THD) was computed for the injected current i abc and voltage e abc after the connection has started (at 1.6 s) and through 5 cycles. The harmonic components and THD are illustrated in Figures 6  and 7. Figures 6 and 7 show that the THDs for the current and voltage are lower than 3%, which means that the inverter may be connected to the power grid.

Synchronization with an unbalanced power grid
The second scenario considers an unbalanced power grid, and it is achieved by a three-phase programmable generator plus three independent controlled voltages in star connection and driven to the ground connector, while the programmable generator feeds the input. The harmonic generation is activated only in the fundamental component (60 Hz) in the negative sequence.  The negative-sequence phase voltage amplitude is 8.165 V, approximately 20.83% of the fundamental component, and the phase angle is −30°. Table 3 shows the parameters for generating the unbalanced voltage in the power grid. This scenario is complicated for the inverter because the unbalance percentage is relatively high. Eq. (25) illustrates the unbalance calculation according to the IEEE Standard 1159-2019 [45], where only the positive and negative magnitudes are considered.
The positive-sequence magnitude for this scenario was 39.192 V, while the negative was 8.165 V. The unbalance percentage is 20.83% and is too high compared with the 3% of the allowed value from the standard mentioned above [45]. Since the inverter can synchronize at this unbalance level, it could work appropriately during normal and real conditions. Figure 8 presents the results of this scenario. It is important to mention that the voltage plot compares only the phase a of inverter and grid voltages, and the unbalance is not noticeable directly, but the amplitude is different from 1 pu while the harmonic distortion is injected.
During the first half second, there is a difference between the positive-sequence grid and inverter-sequence voltage, and we can observe it with the existence of the virtual current I s in the current plot. At 0.5 s, the frequency control loop is activated, the virtual current goes to zero, and the voltage waves are synchronized, as shown in the voltage plot in Figure 8. Nonetheless, the phase-voltage amplitudes are not the same until the measured current at 1.5 s is introduced into the synchronverter control algorithm.  From the voltage plot, it is possible to observe that the unbalance lasts until 1.8 s when both the grid and the inverter voltages decrease to 1pu because the harmonic injection is not inserted any longer. The frequency remains at 60 Hz during the steady state operation. There is a slight oscillation during the transient state operation because of the frequency droop control operation and the grid connection through the power breaker. The active power shared to the resistive load starts at 1.5 s when the connection is allowed, and the plot shows an oscillation because of the double frequency component presented in the unbalanced network. Figure 9 provides further information regarding the voltage waveforms.
The time scale in Figure 9 was reduced from 1.4 to 2 s to better observe the voltage wave shapes. The inverter amplitude is 1 p.u. from the moment the frequency droop control starts up to the moment the power breaker is closed at 1.5 s, as the synchronverter not only follows the frequency of the power grid but the amplitude of the grid voltage too. The negative-sequence injection ends at 1.8 s, which is noticeable because the inverter and grid voltages return to 1 p.u.
The THD was computed for the injected current i abc and voltage e abc after the connection has started (at 1.6 s) and through 5 cycles. The harmonic components and THD are illustrated in Figures 10 and 11. Both figures show, on the positive-sequence synchronization, that the current and voltage THDs are below the limits defined in IEC/EN 61000-2-2 (10% for current and 5% for voltage).
The conventional synchronverter is tested in this scenario to validate the effectiveness of the positivesequence synchronization method proposed in this article, and its behavior is depicted in Figure 12. The most important point in Figure 12 focuses on the current plot because to get a correct synchronization, the virtual current must be zero after the active power control loop starts its operation at 0.5 s, and obviously, it does not occur. From the above, the conventional synchronverter control strategy is not a good option for connecting an

Synchronization considering a voltage dip of 50%
The third scenario contemplates a voltage dip of 50% together with a voltage unbalance condition. The unbalance voltage is the same as explained in Section 5.2. Again, the simulation time is 2 s. In this case, the voltage dip starts at 0.2 s and ends at 1.0 s to test the synchronization process of the positive-sequence synchronverter. This scenario is quite complicated for any inverter because it must simultaneously deal with the unbalance condition and voltage dip. This is not usually presented in real conditions because the protection system usually would trigger once the voltage dip is below 90% of the nominal value. The proposed method is evaluated and it can be observed that the voltage waveform follows the grid at the beginning. Once the dip voltage starts, the inverter tries to keep following the grid using its active power control loop by maintaining the nominal voltage. The virtual current increases at 0.2 s because of the dip voltage, but it is essential to highlight that this virtual current is not flowing through any device. The current plot of Figure 13 shows how the virtual current returns to zero once the dip voltage is released and the power sharing is accomplished effectively, as presented in the power plot of Figure 13.
Frequency is almost stable all the time, except for the transient effects of the dip condition and the connection    to the power grid (at 1.0 and 1.5 s, respectively). However, the frequency returns rapidly to the fundamental value of 60 Hz.

Conclusion
Synchronization is essential for the synchronverter to share the right power with the grid or a local load. Whether the synchronization process is not well accomplished, the stability of the inverter is compromised, the current injection will not be adequate, and the voltage amplitude will not follow the grid.
The positive sequence of the synchronverter voltage and the grid voltage may be used for calculating a virtual current that aids the synchronverter in synchronizing with the power grid. This virtual current helped calculate the excitation voltage, reactive power, and the reference voltage that triggers the MOSFETs or IGBTs through pulses. This current, together with the frequency droop control, is important for accomplishing the synchronization no matter whether the power grid is balanced or unbalanced.
The positive sequence was used in three scenarios to synchronize a synchronverter simulated on Simulink-Matlab©. The first scenario contemplated a balanced power grid and a local 5 kW resistive load. The second scenario considered an unbalanced power grid with an injection of a negative sequence rated at 20.83% of the positive-sequence amplitude and the same load. The third scenario considered the same unbalanced conditions as the second scenario and a voltage dip of 50%. The results showed that the synchronverter followed the grid frequency and the wave shape amplitude after the frequency droop control started in all cases.
In future work, the implemented technique may be used to reduce the unbalance percentage at the PCC when the synchronverter is connected to an unbalanced power grid or a non-symmetrical load.