Variable Virtual Impedance-Based Overcurrent Protection for Grid-Forming Inverters: Small-Signal, Large-Signal Analysis and Improvement

Grid-forming inverters are sensitive to large grid disturbances that may engender overcurrent due to their voltage source behavior. To overcome this critical issue and ensure the safety of the system, current limitation techniques have to be implemented. In this context, the variable virtual impedance (VI) appears as a suitable solution for this problem. The design of the variable virtual impedance basically rests on static considerations, while, its impact on the system stability and dynamics considering both small-signal and large-signal aspects can be significant. This paper proposes small-signal and nonlinear power models to assess the impact of the virtual impedance parameters on the grid current dynamics and on the angle stability. Thanks to the proposed approach, it has been demonstrated that the virtual impedance ratio <inline-formula> <tex-math notation="LaTeX">$\sigma _{X_{VI}/R_{VI}}$ </tex-math></inline-formula> has a contradictory effect on the system dynamics and the transient stability, i.e., a resistive virtual impedance results in a well-damped current response but a very limited transient stability margin, while an inductive virtual impedance results in a poorly-damped current response but an acceptable transient stability margin. Based on that, it has been concluded that the conventional virtual impedance cannot cope at once with the current dynamic performances and the transient stability. To overcome this constraint, a Variable Transient Virtual Resistance (VTVR) has been proposed as an additional degree of freedom to vary <inline-formula> <tex-math notation="LaTeX">$\sigma _{X_{VI}/R_{VI}}$ </tex-math></inline-formula>. It decreases <inline-formula> <tex-math notation="LaTeX">$\sigma _{X_{VI}/R_{VI}}$ </tex-math></inline-formula> in the transient to damp the current response and it increases <inline-formula> <tex-math notation="LaTeX">$\sigma _{X_{VI}/R_{VI}}$ </tex-math></inline-formula> in the quasi-static and steady-state to guarantee the maximum angle stability margin allowed by the variable virtual impedance. The effectiveness of the proposed control has been proven through time-domain simulations.


I. INTRODUCTION
T HE RAPID development of intermittent renewable generation and High Voltage Direct Current (HVDC) links yields an important increase in the penetration rate of power electronic inverters in the power transmission systems. Nowadays, power inverters have the main function of injecting the power into the main grid, while relying on synchronous machines that ensure all system needs. This operation mode is known as "Grid-following" and has several limitations, e.g., the inability to operate in a standalone mode, the stability issues under weak grids and faulty conditions and the negative side effect on the system inertia [1]. These limitations call into question the reliability and the security of the future electrical system dominated by power electronic inverters. To tackle these challenges, the way the inverters are controlled today should be changed from following the grid voltage to forming the grid voltage. In this perspective, the grid-forming capability appears as a promising solution since it allows the inverter to operate as a voltage source, and to mimic some characteristics of synchronous generators (i.e., emulation of the swing equation) [2], [3], [4].
Due to the voltage source behavior of the grid-forming inverters, the overcurrent protection requires particular attention [5]. Compared to synchronous generators (SGs) that have a high short-circuit current capability, power inverters can cope with few percents of overloading and two times their rated current in one millisecond [6]. Therefore, the grid-forming inverters have to be protected against extreme faults such as short-circuits, line-tripping/re-closing and voltage phase jump only based on the control, while being able to remain synchronized and connected to the power system [7].
Two fundamental techniques are used to limit the current during large disturbances for grid-forming inverters. The first technique consists in saturating the current reference (CSA) [8]. This technique itself is implemented in different manners, e.g., with and without d − q axis priority [8], [9], circular technique in α − β [10] and the elliptic technique mainly used in unbalanced grid conditions [11]. In practice, this technique is implemented on the inverters with cascaded inner voltage and current control loops, in which the generated current reference is saturated during overcurrent. The second current limiting strategy is based on a variable virtual impedance (VI), which emulates the effect of an impedance 1949-3053 c 2022 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
when the current exceeds its nominal value [12], [13], [14], [15]. This method takes the advantage of dealing with overcurrent issues while keeping the voltage source behavior behind impedance, which allows expending the stability margin in contrary to the CSA [1]. Additionally, the VI can be adopted for various control structures (i.e., cascaded controls and direct controls [16], [17]). The VI for current limitation has already been initiated in the literature, i.e., some studies have focused on the smallsignal performances of the system when the VI is enabled, while others were focused on the transient stability during the post-fault phase. The design of the VI classically rests on static considerations and does not take into account the system dynamics [12], [13], [14], which has resulted in an oscillatory behavior of the current during large disturbances, particularly in case of a voltage sag. To improve this point, authors in [12] and [15] propose an additional Low-Pass Filter (LPF) on the virtual inductance component to damp the system. In a recent work [17], the authors propose an optimal tuning of the cut-off frequency of this LPF to guarantee a trad-off between the damping and the small-signal stability of the system. The proposed method effectively enhances the system response compared to the conventional method in [12], yet, a significant current overshoot is still present during large disturbances, which leads to a current threshold crossing during the transient. This is simply explained by the fact that the additional filter induces a delay on the VI action. Regarding the large-signal aspect, the transient stability including the VI is another challenge, which is less elaborated in the literature. In [1], [19], [20], the transient stability of the system embedding the VI for current limitation has been investigated and analyzed. Different methods to enhance the Critical Clearing Time (CCT) in case of a bolted fault have been proposed, i.e., the authors in [1] and [19] propose to decrease the power reference or to increase the power droop gain with respect to the AC voltage magnitude. Alternative solutions such as the increase of the inertia constant with respect to the AC voltage magnitude [21] and the boost of the reactive power [24] have also been proposed. These approaches have been summarized in [22]. However, in these prior works, the effect of the VI parameters themselves on the transient stability has not been considered. A summary of the state-of-the-art and the missing research points are given in the following lines: • The prior works were focused either on the small-signal aspect or the large-signal aspect when the VI is embedded. However, none of these works have investigated the influence of the VI on both aspects at the same time, i.e., the VI design can be made to improve the system dynamics, which does not guarantee the system synchronism after a large disturbance and vice-versa. • The prior works studied and enhanced the power control loop to increase the CCT when the VI is adopted, however, the VI parameters have not been considered as a crucial factor that may have a significant effect on the transient stability and particularly on the maximum power angle that guarantees the transient stability, and on which the power control gains (e.g., droop gain, inertia constant· · · ) have no effect. To fill the state-of-the-art gap, this paper proposes the following contributions: • A simplified small-signal model of the grid-forming inverter. The aim of this model is not to analyze the system stability during the saturation phase, but to properly assess the effect of the VI parameters on the system dynamics. • A generalized large-signal stability analysis of the gridforming inverter considering the impact of the VI parameters. • An improved VI to enhance the dynamic response of the currents while guaranteeing the maximum transient stability margin allowed by the VI. The effectiveness of the proposed analysis and solution is demonstrated through time-domain simulations performed in MATLAB/SimPowerSystem.
In this paper the Modular Multilevel Converter (MMC) has been chosen as a studied converter topology because of its suitability for HVDC applications and transmission systems. Nonetheless, the methodology and the proposed solutions can be applied to any Voltage Source Converter (VSC) topology.
The reminder of this paper is organized as follows. In Section II, the grid-forming MMC power and control structures are presented and explained. In Section III, the smallsignal and large-signal models are developed to assess the impact of the VI parameters on the system. In Section IV, an improved virtual impedance to enhance the system stability and dynamics is proposed. Finally, Section V concludes the paper.

II. GRID-FORMING-BASED MODULAR MULTILEVEL INVERTER
The circuit diagram and the control structure of the gridforming MMC are presented in Fig. 1 and Fig. 2, respectively. The MMC is supplied by a DC voltage source fed by an equivalent current source that emulates the primary energy source and is connected to the AC grid through an equivalent transformer impedance L t , R t . The grid side is modelled by the equivalent Thevenin voltage v e in series with the equivalent impedance R g , L g . In contrary to a conventional 2-Level VSC often connected to the AC side through an LC filter, the MMC does not require such a filter thanks to its ability to generate a quasi-sinusoidal voltage waveform at the output. With regard to the control side, the outer active power control generates the voltage angle θ m with respect to the power predefined setpoint and the measured power, while, the voltage magnitude v * v dq is directly driven to the modulation stage through the VI, where it is combined with the internal voltage of the MMC v * z to generate the modulated voltages. Each control function illustrated in Fig. 2 is further explained in the following sections.

A. Inverter Topology and Modeling
The basic topology of an MMC is shown in Fig. 1. The MMC consists of six arms with a series connection of N cells with capacitors C. The arms are connected to a reactor L arm , R arm to form the connection between one of the DCterminals and the AC-side. Two arms are connected to the upper and lower DC-terminals to form one leg for each phase j ∈ a, b, c.
By applying Kirchhoff's Voltage Law (KVL), the following equations can be obtained for each phase of the MMC: In order to decouple the AC side from the DC side, (1) can be added to (2) to determine the DC side model, and (1) can be substituted from (2) to obtain the AC side model, respectively: with: In (6) and (7), i z , v z j and v v j denote the circulating current, the sum and difference between the upper and lower modulated voltages, respectively. Eq. (4) can be written in the Synchronous Rotating Frame (SRF) in per-unit as: where ω b and ω g represent the base frequency in rad/s and the grid-frequency in per-unit, respectively. The active and reactive power formulas in SRF are given by: The stored energy in upper/lower arms can be calculated as: Referring to [23], it can be convenient for control purposes to adopt a ( − ) representation for the energy as in (3)-(4), which yields:ẇ w j and w j represent the energy sum and difference between upper and lower arms, respectively. Based on (3)-(13), the system state variables are the circulating currents i z flowing through the filter L a rm , the grid current i g flowing through the total impedance L t + L g and the equivalent voltages v c across the equivalent capacitors C σ .

B. Grid-Forming MMC Control
In this subsection, only the grid-forming capability is presented. The energy-based and the DC voltage controls used in this paper are recalled in the Appendix. Details on the energy-based control structure can be found in [25].
1) Active Power Control: In this paper, the outer active power controller is based on the PLL-free PI-controller [21]: with H, k p and P * denoting the inertia constant, the damping factor and the active power setpoint, respectively. θ m denotes the time-domain angle. In addition to the ability of the PIcontroller to provide an inertial response, it takes the advantage of guaranteeing a decoupling between the active power regulation and the frequency support function exactly as a VSM [21] without a need for a dedicated PLL, which makes the power control much simpler.
2) Voltage Generation: The AC voltage formed by the MMC is aligned with the d − axis and directly driven to the modulation stage through the variable virtual impedance, which will be presented in the following subsection.
V * * denotes the AC voltage magnitude setpoint.

3) Variable Virtual Impedance for Current Limitation (VI):
To ease the understanding of the VI design, the MMC referring to [18] can be simply modeled as illustrated in Fig. 3 assuming that the internal energy of the MMC and the DC voltage are well regulated and decoupled from the AC side. This assumption has been justified in [18] and will also be checked in this paper through time-domain simulations. Let us consider a three phase to ground fault at the Point of Common Coupling (PCC) (v g = 0 p.u) as depicted in Fig. 4. The idea behind the VI is to increase the output impedance of the system virtually when a fault is detected: Considering σ as X VI /R VI ratio, (19) can be written: For I g = I max , the maximum virtual inductance X VI max and R VI max are obtained by solving (20): where: Since the VI should only act on the system when the current exceeds its rated value (I n = 1 p.u): To allow a smooth variation of the VI in the interval [I n , I max ], the adaptive coefficient k R is defined as the ratio that adapts the virtual impedance with respect to the current magnitude I g . It is given by: From (21)- (24), the variable virtual impedance formula is obtained: Based on (25)-(26), the ratio σ is the only adjustable degree of freedom. In the next section, its impact on the system dynamics and the transient stability is investigated.

A. Small-Signal Modeling and Analysis
Note that the small-signal of a variable can be written as x = x 0 + x, where the indices "0" and " " denote the initial condition and the small variation around the operation point, respectively. To build the small-signal state-space model of the MMC including the VI, the equations (8) with δ m = θ m − θ g . The grid currents dynamic equations in (8)-(9) can be written: In (36)-(37), R VI and X VI are considered variables since they depend on the current magnitude I g . From (25)-(26), the smallsignal expressions of R VI and X VI are given by: where: By putting (40) in (38)-(39) and replacing R VI and X VI in (36)-(37) by their expressions in (38)-(39), the generated voltages v * v dq in the SRF can be written as: with: Considering the equations (27)-(46), the linear state-space representation of system and control equations is given by: The state matrices A, B, C, D are given at the bottom of the previous page. The state matrix A is highly dependent on the operating points because of the VI. It is simple to check the correctness of the developed calculation since, S and V, R and Q present respectively the virtual inductance and resistance, i.e., when I g = I max , V = −S = X VI max and R = Q = R VI max . The proposed state-space model is effective only when I g 0 ≥ I n , but, it can still be used to analyze the system dynamics and the small-signal stability in normal conditions by setting k R = 0. Note that, no instability issue related to the transition between both control modes has been noticed in this paper and in prior works [1], [12], [14], [16], [17], [20]. Nonetheless, it is important to mention that this transition phase has not been theoretically studied in this paper. Let us consider the system and control parameters listed in Table I. A sensitivity analysis of I g 0 = i 2 and σ on the eigenvalues evolution is performed in Fig. 5.a. The methodology of varying the current magnitude consists in fixing I g0 in the range [I n , I max ], changing iteratively i g d 0 in the range [0, I max ] and determining i g q 0 from i g q 0 = I 2 g 0 − i 2 g d 0 for each iteration.
Using the participation factors, the eigenvalues λ 1−2 are linked to the grid currents, while λ 3−4 are linked to the power controller (see Fig. 6). The evolution of λ 1−2 is positively affected by the increase of I g0 and the decrease in σ , i.e., the resistive effect of the VI with σ < 5 decreases the absolute imaginary part (λ 1−2 ) and increases the absolute real part (λ 1−2 ), which can be interpreted by the increase of the grid Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.  currents damping factor as it can be deduced from (48). This statement is also illustrated by the 3-D surface in Fig. 5.b, where the grid current overshoot D given in (48) is assessed with respect to the variation of σ and I g0 , e.g., for I g0 = I max and σ = 10, the current overshoot is about 80%, whereas, for I g0 = I max and σ = 0.1 the current overshoot is about 0.03%. To support these theoretical results, time-domain simulations are performed in Fig. 5.c, where a voltage sag of 100% is applied. This event is considered as a large disturbance and it is not particularly used to evaluate the small-signal stability, but it aims to excite the system modes and to evaluate the overall dynamic response of the system. One can notice from the obtained results that the system damping is enhanced with the decrease in σ , which is aligned with the results obtained in Fig. 5.a and Fig. 5.b.
ζ represents the damping coefficient. k factor equal 100.

B. Large-Signal Analysis
When the system is subjected to a large disturbance, the power inverter has to keep the synchronism with the AC grid  voltage using local measurements. This ability is assessed in this section considering the impact of VI.
When the VI is deactivated, the quasi-static expression of the active power is given by: Based on (49), Fig. 7 depicts the (P-δ) curve of the gridforming inverter. For a given P * , there are two equilibrium points (a) and (a'), where the power P is equal to its reference P * . However, only the equilibrium point (a) is stable from a small-signal perspective [7]. From a large-signal perspective, the angle δ max corresponding to the equilibrium point a is defined as the maximum angle guaranteeing the angular stability [7], [13], and it is given by: With the introduction of the VI, the new quasi-static expression of the active power deduced from Fig. 4 is expressed as follows: with X T = X eq + X VI max , R T = R eq + R VI max where: In the power transmission systems, the resistive effect is often neglected because of the high X/R ratio of the lines. In (51), the resistive effect is not negligible anymore because of the virtual impedance ratio σ that may be σ << 10. The activation of the VI results in a decrease of P max 1 to P max 2 since the total impedance increases. As a consequence, the maximum angle allowing a stable re-synchronization δ max VI will be decreased as illustrated in Fig. 8. It is given in this case by: where: In Fig. 9, the P − δ curve including the VI has been drawn with respect to different values of σ = [0.1, 10]. It is noticeable that the decrease in σ yields a decrease of the maximum transmitted active power and reduces the maximum angle δ max VI , which results in a reduction of the transient stability margin. In some cases with a high operating point and a small σ < 5, the synchronism is not possible anymore since no equilibrium point exists.
For a given σ guaranteeing the existence of an equilibrium point during the post-fault phase, the condition where the system does not exceed δ max VI depends on the fault type and its duration. These theoretical aspects will be extended and validated in the following section considering practical case studies.

1) Case Study -100% Grid Voltage Sag:
Initially the inverter is operating in normal condition around its equilibrium point x e (P 0 = 0.9 p.u corresponding to δ m 0 = 0.2131 rad), then, a voltage sag of 100% is applied.
From (51), the voltage drop (v g = 0 p.u) results in the cancellation of the active power, which thereby yields a mismatch between the active power reference and the measured active power. According to the power control function in (16), the power mismatch results in a frequency deviation and consequently to the increase of the angle δ m . Once the fault is cleared, the power angle remains increasing since ω m stays greater than zero for a given duration because of the inertial effect. If the angle increase exceeds δ max V I , the system leads to instability, otherwise, the angle starts to decrease when ω m < 0 until it reaches the equilibrium point x e , where P = P * and ω m = 0 p.u. More details on the synchronization process of the grid-forming VSC can be found in [20]. The simulations in Fig. 10 comply with the described re-synchronization process, where the evolution of δ m with respect to ω m is drawn during the fault and the post-fault phases. Two fault durations were simulated, from which the effectiveness of the theoretical δ max VI has been proven (see the orange and yellow curves). Note that it is also possible to see that for σ = 10, the system remains stable for a fault duration of 140 ms. Whereas, with σ = 4, the system can only cope with 80.5ms since δ max VI has been decreased. If σ is further decreased, the stability margin will be more restricted. Some solutions have already been proposed in the literature to increase the CCT by increasing the inertia constant during the voltage sag [20], [24], which slows down the variation of δ m . Nevertheless, it is worthy mentioning that in contrary to the VI influence, the inertia constant increase cannot modify or improve the maximum angle δ max that guarantees the transient stability. To prove the effectiveness of this statement, the AC grid modeled as an infinite bus has been replaced by an inertial AC voltage that includes the frequency governor, a  lead-lag function to emulate the dynamic of the turbine, and the swing equation [1]. The illustration of the equivalent grid is given in Fig. 11. One can notice from Fig. 12 that the inertial grid has affected the CCT since the grid frequency is now variable, and the grid inertia is not infinite anymore. However, the maximum limit δ max has only been affected by σ and not by the inertia constant, which means that whatever the inertia constant is, the system remains stable only and only if the power angle does not exceed δ max VI . On the other hand, it is true that the inertia increase affects the CCT positively in the case of voltage sag, however, in case of a phase-jump for instance, the inertia has no contribution to the transient stability and only δ max VI decides on the ability of the system to keep the synchronism or not. This point is further demonstrated in the next subsection.

2) Case Study 2 -Grid Phase-Jump:
The phases-jump is a common event in the transmission systems that may occur because of heavy loads connection, lines tripping and reclosing. The maximum phase-jump that the system can handle while keeping the synchronism with the AC grid can be deduced graphically from Fig. 8. Its expression is given by: δ 0 and δ max VI are given in (49) and (53), respectively. Theoretically, in case of a strong grid (SCR = 20) with P * = 0.6 p.u corresponding to δ m = 0.167 rad. The system can cope with ≈ 118 • for σ = 5, and ≈ 90 • for σ = 2. The effectiveness of these calculations is demonstrated in Fig. 13, where two phase-jump values around the calculated value are evaluated δ jump j < δ max jump < δ jump j for both σ = 5 and σ = 2. As expected, the results show that the transient stability became more limited when the ratio σ is reduced.
In Fig. 14, one of the marginally unstable cases (δ jump = 91 • ) has been studied again considering now a higher inertia constant (H = 7s instead of H = 5s). Based on the obtained results, it can be concluded that the inertial effect does not contribute to the transient stability margin enhancement in case of a phase-jump such as the VI ratio.  3) Discussion: From Section III-A and III-B, it is now clear that σ has a contradictory effect on the grid current dynamics and the large-signal stability, i.e., a small value of σ results in a well damped response but very limited transient stability margin and vice-versa. It is possible to conclude at this stage that the conventional VI cannot cope at once with the current dynamic response and the transient stability without additional degrees of freedom. In the following section, an improved VI is proposed to enhance the grid current dynamics while guaranteeing the maximum transient stability margin allowed by the VI.

A. Variable Transient Virtual Resistance Design
From the analysis proposed in the previous sections, it has been proven that a large σ ≥ 5 yields an acceptable transient stability margin, but an oscillatory current behavior, while a small σ << 5 yields a very limited transient stability margin, but a well-damped current response. In this section, the idea is to propose a variable σ so that a small VI ratio is adopted in transient to damp the grid current response, and a large σ in the quasi-static and the steady-state to increase the transient stability margin. The variable σ expressed in (56) is varying via a Variable Transient Virtual Resistance (VTVR) given in (57).     D and ω D denote the damping factor and the cut-off frequency of the High-Pass Filter (HPF), respectively. Note that in steady-state, σ = X VI /R VI since R VTVR will be cancelled because of the HPF. Based on the specified values for the transient (σ TR = 0.5) and for the steady-state (σ SS = 8), the parameters of the Improved Variable Virtual Impedance can be determined, i.e., R VI max , X VI max can be determined from (21)-(22) using σ SS , Fig. 20. 150ms three-phase fault, (A) The VI in [12], [17] with σ = 8, (B), The VI in [12], [17] with σ = 0.5, (C) The proposed VI with σ SS = 8 and D = 5.97 p.u.
while D is deduced from lim s→0 σ (s), which yield: The cut-off frequency of the HPF can be chosen simply so that R VTVR acts only during the first fault instant (ω D = 1e 3 rad/s). The illustration of the improved VI is shown in Fig. 15. Fig. 21. Line re-closing, (A) The VI in [12], [17] with σ = 8, (B), The VI in [12], [17] with σ = 0.5, (C) The proposed VI with σ SS = 8 and D = 5.97 p.u.

B. Practical Case Studies and Comparison
In this subsection, the proposed approaches considering all MMC dynamics including the internal energy management and the DC voltage control are validated. The system behavior based on the proposed VI is compared to the VI methods in [12] and [17], which are recalled in Fig. 16 and Fig. 17, respectively. Note that the goal of this comparison is not to criticize the prior works in [12], [17] since the choice of σ has been made in these works considering particular conditions related to the applied event and the system configuration. The aim here is to show the limitation of the VI structures themselves.
Two grid cases are considered in this paper. They are illustrated respectively in Fig. 18, and Fig. 19, i.e., a three-phase bolted fault and a line re-closing under a weak grid condition.
The following quantities are simulated: the grid current magnitude I g , the PCC voltage magnitude V g , the DC voltage u dc , the angle difference between the VSC and the grid δ m , the active and reactive power P/Q. 1) Case Study 1 -Three-Phase Bolted Fault at PCC: The operating point is initially set to P 0 = 0.6 p.u, then a 150ms three-phase fault is applied at the PCC level at t = 2.2s. The simulation results are gathered in Fig. 20. Fig. 20.A and Fig. 20.B are assessing the system performances for both VIs in [12], [17] with σ = 8 and σ = 0.5, respectively. Fig. 20.C shows the system performances based on the proposed VI.
The results in Fig 20.A show that when the system is subjected to the fault, the PCC voltage and the active power drop to zero, which results in a current increase. The latter is limited to I max after a strong transient, i.e., with the VI proposed in [12], the current reaches a peak value of 1.62 p.u and oscillates about 20ms before being limited to I max . This undamped behavior is also appearing on the active and reactive power. With regard to the VI proposed in [17], the current damping has been improved compared to the VI in [12], nevertheless, the transient current peak reaches about 2 p.u before being limited to I max . During the fault phase, the active power drop yields a power mismatch that engenders the power angle deviation as shown by the simulations. However, once the fault is cleared, the system stably recovers its equilibrium point within 800ms. This duration is linked to the clearing angle, the power angle dynamics that depend on the total output impedance, the power controller parameters and the VI parameters [20]. In Fig. 20.B, σ has been reduced to σ = 0.5. The simulation results show that the system dynamics have been improved during the transient as expected, however, once the fault is cleared, the system leads to instability since the δ max VI has been considerably reduced compared to the previous condition (i.e., σ = 8), which does not help the power angle to stably recover its equilibrium point. This phenomenon confirms the analysis in Section III-B.