{'fraction_non_alphanumeric': 0.02975284482133797, 'fraction_numerical': 0.008661303181851127, 'mean_word_length': 4.6270391517128875, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Multi-Mode Operation and Control of a Z-Source Virtual Synchronous Generator in PV Systems

The increasing penetration of power electronics-based distributed energy resources (DERs) displacing conventional synchronous generators is rapidly changing the dynamics of large-scale power systems. As the result, the electric grid loses inertia, voltage support, and oscillation damping needed to provide ancillary services such as frequency and voltage regulation. This paper presents the multi-mode operation of a Z-source virtual synchronous generator (ZVSG). The converter is a Z-source inverter capable of emulating the virtual inertia to increase its stability margin and track its frequency. The added inertia will protect the system by improving the rate of change of frequency. This converter is also capable of operating under normal and grid fault conditions while providing needed grid ancillary services. In normal operation mode, the ZVSG is working in MPPT mode where the maximum power generated from the PV panels is fed into the grid. During grid faults, a low voltage ride through control method is implemented where the system provides reactive power to reestablish the grid voltage based on the grid codes and requirements. The proposed system operation is successfully validated experimentally in the OPAL-RT real-time simulator.


I. INTRODUCTION
Recently, power electronics-based distributed generators (DGs) have been integrated into the modern power grid to improve its reliability and performance [1]. As a result, the dynamic behavior of the power grid is rapidly changing; for example, the grid loses voltage support, oscillation damping, and inertia [2], [3]. With no rotating masses and kinetic energy in the power electronics interfaces used in DGs, the inertial constant of the power grid is reduced [4]. This reduced inertia increases the rate of change of frequency (RoCoF) in the power system, which can trip the related RoCoF relays even with the presence of small disturbances [5]. Therefore, to address the reduced inertia problem in the power grid, the idea of the emulating the inertia has been introduced in [6], where the inverter mimics the synchronous generator (SG) behavior. The emulated inertia in the converter control loops, improves the grid stability, frequency response and power oscillation damping. A comprehensive The associate editor coordinating the review of this manuscript and approving it for publication was Mahdi Pourakbari Kasmaei . survey on the virtual synchronous generator (VSG) control algorithms is given in [4], [7]. The ultimate goal of all these algorithms is to emulate the swing equation to mimic the transient characteristics of the SG [8].
Although the VSG control is an effective solution in handling frequency related contingencies in the power grid, additional protective control schemes are still needed to be taken into account to immune the grid against voltage related contingencies [9]. To address this problem, providing the ancillary services from the DGs such as the reactive power compensation is required by grid codes to keep the grid functionality during fault conditions [10]. Many studies have been focused on low voltage ride-through (LVRT) operation for grid-tied PV systems [9], [11]- [16]. For example, the proposed control in [12] tried to maximize the harvested energy during LVRT and normal operation mode by formulating and solving an optimization problem while an adaptive control algorithm is hired in [16] which can tune the controller gains online without the need to solve the optimization problem. The implementation of VSG on a two-level inverter, i.e. voltage source inverter with LVRT is discussed in [17]- [20]. Reference [17] introduced a LVRT method on a multi-VSG system which can significantly improve the transient stability by reducing the VSG's voltage during the fault. Moreover, [18] showed the increase in the injected reactive current could push the VSG to enter into the over excitation zone and result in the failure of the LVRT control method.
Impedance source inverters (ZSIs), introduced in [21] are an example of single-stage inverters that are used in grid-tied PV systems and grid disturbances remediation such as LVRT [22]- [27]. For example, [28], [29] proposed a vector current controller with a feed forward injection of the negative-sequence grid voltage to bring back the voltage level to its normal operating condition. While the aforementioned methods can be successfully used to fix the voltage level, the produced reactive current to meet the LVRT requirements can lead to a high current stress on the converters in presence of unbalanced voltages in the grid [30]. To avoid this excessive current, the PV systems should disconnect from the power grid, which itself will exacerbate the negative impacts of the fault since the grid is losing part of its active power generation [31].
Although the previous research discussed the performance of ZSIs which can provide grid ancillary services, they didn't consider emulation of virtual inertia in the system. In this paper, the performance and operation of a ZSI capable of emulating inertia as well as providing grid ancillary services, Z-source virtual synchronous generator (ZVSG) is investigated and shown in Fig. 1. The system operation is analyzed under normal and grid fault conditions. In normal operation mode, the ZVSG is working in MPPT mode where the maximum power generated from the PV panels is fed into the grid. During grid faults, a constant peak current control for reestablishing grid voltage during voltage sag contingencies is considered. Using the grid codes, this LVRT method provides the required real and reactive power from the converter, without exceeding the ampere limit of a grid-connected interface converter.
The remainder of this paper is organized as follows. Section II describes the principal operation of the ZSI. Proposed control modes of operation are discussed in Section III. Section IV explains the control strategy during faults. The proposed system performance is validated in Section V with experimental results and Section VI concludes the paper.

II. PRINCIPAL OPERATION OF ZSI
ZSI is utilizing the shoot-through states, in which the load terminals are short circuited through both the lower and upper switches of any phase legs. This state is not applicable for conventional voltage source inverters, as the dc link will be shorted and the converter will be damaged [32]. Therefore, switches in a ZSI don't need any dead time since it can use all possible switching combination states. And as a result, the current distortion is reduced and a lower total harmonic distortion of the current is expected. In addition, by varying the modulation index m * of the inverter and the duration time of the shoot-through period, a boost capability for the ZSI is provided. The output voltage of the ZSI, u abc is calculated using (1): in which B is the boosting factor, V PV is the input dc voltage and V pn is the impedance network output voltage. Considering a symmetrical topology, L 1 = L 2 , C 1 = C 2 then (2) holds as: where v C and i L are the impedance network capacitor voltage and inductor current respectively. By writing volt-second and capacitor-charge average equations for inductor voltage and capacitor current, the input-output relations for a ZSI are shown in (3): in which D 0 is the shoot-through duty ratio and D 0 = 1 − D 0 is the non-shoot-through duty ratio. Simple boost modulation technique is used in this paper to control the D 0 [21], where to keep enough voltage control margin, D 0 must be less than or equal to (1 − m * ).

III. PROPOSED CONTROL MODES OF OPERATION
The proposed ZVSG converter is able to work under different scenarios. In the normal operating mode (rated frequency and voltage), the PV system is working under the MPPT condition. On the ac side of the inverter, the VSG algorithm is hired to control and track the rated frequency. The generated MPPT power by the PV panels, P MMPT is considered as an active power reference for the VSG control algorithm and the converter works with the unity power factor in this mode. After detecting the low voltage fault, the control method switches from MPPT to LVRT strategy. In this state, the reactive power needs to be injected to the grid to reestablish the voltage. Therefore, the control system needs to reduce the generated active power and increase the reactive power instead. The new references for the active and reactive power should be calculated based on the grid codes and the system requirements.

A. PROPOSED CONTROL UNDER NORMAL OPERATION 1) DC SIDE CONTROL
As depicted in Fig. 1, the MPPT is realized by the perturb and observe (P&O) algorithm. The measured voltage of PV array, V PV is compared with the reference voltage at the maximum power point V MPP , then a PI controller is used to obtain the shoot-through duty D 0 to control the output voltage of the impedance network, V pn .

2) AC SIDE CONTROL
By implementing the mechanical equation of a conventional SG into the control loops of a PV system, similar behavior can be expected during normal operation and also frequency related contingencies due to applying any change (decrease or increase) in the load. VSG algorithm is implemented in two stages. First, the swing equation of the SG is solved numerically in each computation cycle to generate a reference angle. Second, the calculated angle is used to form a three phase reference voltage. Mechanical equation of a SG can be described as (4): where H is the inertia time constant, ω is the angular frequency and D P is the power damping coefficient. T e and T m are the electromagnetic and mechanical output torque shown in (5): in which P e and P ref are the measured and reference of the PV output active power, k f is the active power droop coefficient and f 0 , f are the rated and measured frequency of the system, respectively. The reference voltage magnitude of the VSG algorithm, E ref is calculated as in (6): in which E 0 is set equal to the grid voltage amplitude and E Q is the reactive power component adjustment that will be discussed further in Section IV-B. In normal operation mode, since no reactive power is injected to the grid, E Q is set to 0. Using E ref as the reference voltage amplitude and the calculated reference angle (θ) in (4), the three phase reference voltage of the ZVSG can be calculated in (7): As being depicted in Fig. 2, this voltage will be fed into the Park transformation (8) to make the appropriate references in d and q channel to control the voltage and current of the VOLUME 9, 2021 converter on the ac side. .
Hence, the calculated voltage in (7) is used as the reference for outer voltage loop, and the input angle (δ) for this transformation is calculated using a Virtual Flux Orientation Control (VFOC) method which is explained in details in Section III-B. The voltage and current of the converter are controlled through a conventional outer voltage and inner current loops. Assuming balanced current and voltage values , there is no zero sequence component after Park transformation.

B. VIRTUAL FLUX ORIENTATION CONTROL
Using the VSG control method, the operating point of the converter during synchronization in case of the load changes is dependent on the frequency and the correct phase angle of the grid at each time instant. This angle is fed into the Park transformation as an input angle and is commonly measured by a phase locked loop (PLL), in which the frequency and phase angle are calculated from the measured voltage of the grid (v abc ). This voltage oriented control algorithm used in PLL, gives acceptable performance under normal voltage conditions, but its performance deteriorates when the grid voltage is including other harmonics [33]. Virtual flux orientation control methods have been introduced in [34] and [35] as a solution to accurately detect the fundamental component of the voltage even under harmonic distortion. By calculating the integral of the grid voltage (v abc ), virtual flux is derived as (9): In this method, the impact of the harmonic distortion is eliminated since the integral calculation has the same function as a low-pass filter. When ψ abc overlaps with d-axis of the synchronous reference frame (SRF), there is a quadrature lagging between the flux (ψ abc ) and voltage (v abc ). To calculate the position angle for the Park transformation, first the ψ abc is transformed to αβ reference frame using Clarke transformation then, the input angle is calculated in (10): A first order low-pass filter can be used instead to calculate the integral in (9), since using a pure integrator leads into saturation problems [34]. On the other side, for a simple dc signal, low-pass filters result in phase and magnitude errors. However, by reducing the cutoff frequency (ω c ) of the filter, this problem can be solved to some extents, but it could cause to a decrease in the filter bandwidth and the worsening of its dynamics. In addition, a small cut-off frequency can break the orthogonality between the flux and voltage which introduces additional complexity in phase tracking process. In this paper, a robust virtual flux calculation is hired as shown in (11): where G BPF (s) is the band-pass filter transfer function to ensure successfully selection of the first harmonic of the voltage and G c (s) represents a lag compensator (λ > 1) to preserve the orthogonality between flux (ψ) and voltage (v). To evaluate the performance of the proposed method, the bode diagrams of the pure integrator g 1 (s) = 1 s , low-pass filter g 2 (s) = 1 s+ω c and g 3 (s) in (11) are shown in Fig. 3. Since the amplitude of the g 3 (s) is less than g 1 (s) and g 2 (s) around the frequency of the operating point, it shows a more robust behavior in that working region as it would result in a better disturbance rejection.

C. GRID CONNECTION PRE-SYNCHRONIZATION
During islanded mode of operation, DGs work as voltage sources that provide the micro-grid with the frequency and voltage support. However this voltage reference can be slightly different from the grid. As mentioned in previous sections, the control objectives are achieved by transforming the states of the DG (voltage and current) into the SRF using Park transformation. Thus, the ZVSG and grid parameters are operating in their own local reference frame [36]. These control parameters are rotating with the same angular speed but there might be a phase difference between their respective d (or q) axis which is depicted in Fig. 4. This phase difference would result in a current impulse at the point of common coupling (PCC) when the DGs are directly connected to the grid. This current impulse will lead into a grid failure or unexpected series of incidents such as tripping the over current protection relays.
Therefore a pre-synchronization method is needed that converts all the state variables to a unified SRF. In this paper, a VFOC based control is hired to track the phase of grid voltage, as depicted in Fig. 5. The goal for this control is to adjust the relative phase difference ( θ) between the output voltage of the ZVSG and the grid. As shown in Fig. 5, assuming the grid voltage v a aligns with the d axis, due to 90 • phase added because of VFOC, the resulted dq components  Here the angle (δ) produced by VFOC is used as the input phase angle to the Park transformation. Then controller is needed to regulate the converter voltage and track the grid voltage reference, u d = 0. To fulfill this goal, u d is sent to a PI controller and is compared with a constant zero reference and the resulted angular frequency compensation ω p in (12), can be fed in the power and frequency control of the outer loop in Section (III-A2).
Hence, the negative feedback controller will round off the relative phase angle, θ. The calculated ω p will be added to VSG control loop as shown in Fig. 6 to correctly bias the VSG angle, θ.

IV. PROPOSED CONTROL UNDER VOLTAGE SAG
As mentioned in Section I, the proposed ZVSG is able to work in different modes of operation. In the following, the solution for reviving the voltage during the grid fault is discussed in detail. After detecting the fault, the PV control system needs to reduce the active power output, if not, the generated reactive power required to bring back the voltage level will result in overrating the converter current limit and increasing the maintenance cost. To fulfill this goal, ZVSG needs to change its controller mode from normal MPPT operation to the LVRT, which demands in changing the dc control and modifying the ac side control.

A. DC SIDE CONTROL
During the fault, since the ZVSG is not working under MPPT operation mode, an alternative control is required to control the dc link voltage and generate the shoot-through duty cycle, D 0 . Therefore, an indirect control strategy is hired to control the voltage and current of the impedance network, where, the reference voltage (V pn−ref ) is tracked by an outer PI loop. Also, an inner proportional loop is used to track the inductor current (i L ), which helps to better regulate the current during transients and improve the stability margin of the system.

B. AC SIDE CONTROL
The proposed control system improves the voltage stability during grid faults by injecting reactive power to the grid. As mentioned earlier in Section I, by just controlling the injected reactive power, the grid current i g may exceed its limit and there is a risk of burning or shutting down due to exceeding the over current protection limit. To keep the current in the safe range, the injected peak current amplitude to the grid needs to be kept constant. Fig. 7 shows the current phasor diagram of the system, in which the system is in MPPT mode until a grid voltage fault occurs and the controller switches to LVRT mode. After the fault is sensed, the controller switches to the LVRT operation mode and the system is able to live with the voltage sag for a short while. The generated active power is reduced at the same time, and the required reactive power is injected into the grid to reestablish the voltage. The peak current is kept constant in this transition. Fig. 8 shows the E.ON grid code, in which the required reactive power to bring back the voltage level is a function of the voltage of the grid, v g , and can be calculated by VOLUME 9, 2021 FIGURE 8. Requirement for reactive current injection, based on E.ON grid code [37] 2014 IEEE. Reprinted, with permission, from [38].
deriving the reactive component of the current, i q as in (13): I rated = I gmax (13) in which I gmax is the maximum current that can be sent from ZVSG to the grid in case of occurring voltage sag and is equal to the rated current of the grid, I rated . Considering k = 2, if the grid voltage reduces to half of its rated value (v g ≤ 0.5 p.u.), the converter allocates all of its generation capacity to reactive power and i q will be equal to I rated . A dead band of ±0.1 is reserved which means, if v g happened to be in that range, it is considered as a disturbance and not a fault. Since I rated is considered to be kept constant, the required i d can be calculated using (14): By calculating the power components (i d and i q ), the active (P ref ) and reactive power (Q ref ) reference during LVRT mode can be calculated using the instantaneous power theory as in (15): As described in Section III-C, the grid voltage on d axis, v d is equal to zero, and (15) can be simplified to: The active power reference, P ref is sent through VSG algorithm to make the reference angle, θ which was discussed earlier in Section III-A. The VSG voltage and current control loops work as before, but with a new voltage reference. This new voltage reference can be calculated by first regulating reactive power in (17): where   grid voltage amplitude and Q e is the measured reactive power of the system. With the new reference voltage calculated using (6), and reference angle θ in Section III-A2, three phase balance voltage can be formed and transformed to SRF similar using (7) to make the appropriate reference for the voltage and current control loops.

V. SIMULATION AND RESULTS
The performance of the proposed ZVSG shown in Fig. 1, with control and system parameters given in Table 1 and Table 2 is evaluated in different modes of operation, such as steady state, sudden load changes and occurring voltage sag. Matlab/Simulink SimPowerSystems toolbox is used to simulate the converter and appropriate control algorithms. OPAL-RT digital simulator is used to achieve the real-time results, where, the converter switches are implemented in OP5607 Virtex7 FPGA module with the sampling time of T s = 0.1µs. And the control loops are implemented in OP5600 module with T s = 10µs. Choosing the appropriate sampling time for each module is based on the complexity of the control algorithms and achieving the desired performance. Hence, the following criteria are considered to evaluate the performance of the ZVSG: Maximum power  harvesting in steady state operation, increasing frequency stability margin by improving RoCoF of the system, injecting reactive power in LVRT mode based on the E.ON grid code [37].

A. FREQUENCY REGULATION
At this stage, the ZVSG is working under MPPT operation mode and RoCoF plots of the converter are depicted in Fig. 9. At t = 1 sec active load increased by 0.2 p.u.. Fig. 9a shows the RoCoF with different amounts of (H ), in which the lower the H , results in the larger RoCoF curve. The larger RoCoF puts the system at a higher risk and may cause triggering RoCoF relays and disconnecting the DGs from the grid. The same results are perceivable for changing damping constant, D p of the system as shown in Fig. 9b. Fig. 10 shows the inrush current of the ZVSG while connecting to the grid. Fig. 10a shows the current waveform when ZVSG is connected to the grid without any pre-synchronization control, while Fig. 10b shows the same waveform after hiring the proposed pre-synchronization method explained in Section III-C, in which a lower peak with a smoother transient period is observed where the transient peak current has reduced about 2200 A.

B. GRID CONNECTION
C. VOLTAGE REGULATION Fig. 11 shows the overall system performance before the fault and after recovering from it. In this case study, first, the system is working with unity power factor and normal grid condition as shown in Fig. 11a. At t 1 the grid voltage is reduced to 0.75% of its rated value due to a three phase fault as shown in Fig. 11c. The sag detector detects the voltage reduction and the controller switches to LVRT operating mode, where the new references for the active and reactive power are calculated based on the grid codes and severity of the voltage sag. Therefore, the ZVSG injects reactive power to the grid that results in recovering the voltage at t 2 as shown in Fig. 11d. Since the grid voltage has returned to its rated value, the controller is changing to normal operation mode working with MPPT control. Shifting from MPPT to LVRT working mode, the amplitude of the grid current is kept constant, which guarantees that the over-current protection limit is not violated. VOLUME 9, 2021 FIGURE 11. Multi-mode operation of the ZVSG during (a) normal operation (c) voltage sage occurrence at t 1 and switching to LVRT mode and (d) returning to normal mode at t 2 .

VI. CONCLUSION
This paper studied the multi-mode operation of an impedance-source virtual synchronous generator which is comprised of a single-stage ZSI, equipped with VSG control algorithm and is capable of providing grid ancillary services. Since the PLL may fail to detect the correct angle in case of harmonic distorted voltage, a virtual flux orientation control method is hired which can select the correct angle to be fed to Park transformation. The operation of the system has been tested while transitioning from islanded to grid-connected mode where, to protect the system against inrush current while connecting to the grid, a pre-synchronizing control method is used to minimize the phase difference between grid and converter. In addition, a solution to survive the system against voltage faults is embedded in the system which can regulate the reactive power based on the grid codes.
Hence, the control paradigm will switch from MPP generation to LVRT mode after detecting voltage sag in the system. In this method, the peak of the grid current is kept constant during LVRT operation mode and ensures over current protection limit is not violated then. The ZVSG has been implemented in the OPAL-RT real-time digital simulator and its validity have been verified by conducting several case studies. The proposed seamless control framework helps to smoothly switch between normal and faulty conditions.

ACKNOWLEDGMENT
The authors wish to acknowledge the sponsorship and guidance provided by Ali Ghassemian of DOE's Office of Electricity. 53010 VOLUME 9, 2021 SARA AHMED (Member, IEEE) received the bachelor's, master's, and Ph.D. degrees from the Center for Power Electronics, Virginia Tech, in 2006, 2007, and 2011 respectively, all in electrical engineering with a power electronics concentration. She has five years of prior research and development industry experience at ABB U.S. Corporate Research Center, Raleigh, NC, USA, as a Senior Scientist. She is currently an Assistant Professor with the Department of Electrical and Computer Engineering, The University of Texas at San Antonio. She has more than 30 refereed publications and holds seven U.S. patents and two U.S. patent applications. Her primary research interests include the area of modeling, simulation and analysis of power electronics systems with a focus on control, stability, fault analysis, model prediction, integration of renewables, and hardware-in-the-loop modeling and testing.
NING KANG (Senior Member, IEEE) was a Principal Engineer with the Argonne National Laboratory, where she focused on research in transmission and distribution systems (T&D) co-simulation and planning and operations coordination, reliability impact of DERs on the bulk electric system (BES), advanced distribution management system (ADMS), and microgrid integration and impact analysis. She had six years of research and development experience in industry, when she was a Senior Research and Development Engineer with ABB U.S. Corporate Research Center, Raleigh, NC, USA. She is currently the Department Manager of the Idaho National Laboratory, Department of Power and Energy Systems, specializing in modeling of distributed energy resources (DERs), microgrid design and field deployment, hydropower analysis, clean and renewable energy resources integration into the grid, power and controller hardware-in-the-loop testing, development of intermediate-temperature and high-temperature electrolysis, and integrated energy systems involving various generation and storage technologies and flexible industry processes. At ABB, she was the main contributor to developing a substation-based protection and automation solution, a Volt-VAR optimization solution considering high DER penetration for ABB's DMS software, and condition-based and data-driven algorithms for ABB's recloser controllers. She is the main creator of an open-source T&D systems co-simulation software (TDcoSim). She has coauthored more than 39 journal and conference papers, book chapters, and technical reports and holds five U.S. patents and one U.S. patent applications.