Control of Grid-Forming VSCs: A Perspective of Adaptive Fast/Slow Internal Voltage Source

Grid-forming (GFM) capability requirements are increasingly imposed on grid-connected voltage-source converters (VSCs). Under large grid disturbances, GFM-VSCs need to remain stable while providing GFM services. Yet, such objectives, as pointed out in this paper, inherently lead to conflicting requirements on the dynamics of internal voltage source (IVS) of GFM-VSCs, i.e., the fast IVS dynamics is needed to avoid the loss of synchronism with the grid, whereas the slow IVS dynamics is preferred for maintaining GFM capability. To tackle this challenge, an adaptive fast/slow IVS control is proposed, which switches GFM-VSC between fast and slow IVS dynamics based on system needs. The proposed method enhances the transient stability of GFM-VSC, whilst maximizing its capability of providing GFM service. Further, the approach is robust to different grid strengths and different types of grid disturbances. The experimental results verify the theoretical findings and the effectiveness of the proposed control method.


I.INTRODUCTION
The grid-forming (GFM) control is emerging as a promising approach for massive integration of voltage-source converters (VSCs) into electrical grids [1], [2]. Differing from the legacy grid-following (GFL) control that operates VSC as an externalvoltage-dependent current source, the GFM-VSC is controlled as a voltage source behind the impedance, and hence, its stable operation does not rely on the voltage stiffness of ac grid [3], [4]. It is well documented that GFM-VSCs exhibit superior small-signal stability over GFL-VSCs under weak ac grids [5]- [6]. The recent study further shows that with the proper design of the controller, the small-signal stability of GFM-VSC can be guaranteed with a wide variation of grid strength and operating points [7].
On top of the small-signal stability, control of GFM-VSC under large grid disturbances, including voltage sags, phaseangle jumps, high rate of change of frequency (RoCoF), and the combination thereof, is also of concern. Except for current limitation [8]- [10], GFM-VSCs should also remain synchronism with the grid (i.e., transient stability) during and H. Wu is with the AAU Energy, Aalborg University, 9220 Aalborg, Denmark (e-mail:, hew@energy.aau.dk).
X. Wang is with KTH Royal Institute of Technology, 10044, Stockholm, Sweden, and also with the AAU Energy, Aalborg University, 9220 Aalborg, Denmark. (e-mail: xiongfei@kth.se). (Corresponding author: Xiongfei Wang.) after different large disturbances [11]. Extensive studies are reported to enhance transient stability of GFM-VSCs, which can, in general, be categorized into two groups: • Guaranteeing the existence of equilibrium points (EPs) during large disturbances, which is typically realized by modifying the active/reactive power references of GFM-VSC [12]- [14], and by optimizing the current limitation algorithm [15]. • Optimizing the dynamic response of GFM-VSC to guarantee the system convergence to stable EPs (SEPs), which can be achieved by increasing the equivalent damping of GFM-VSC through shaping the active/reactive power control [16]- [19], or using the mode-adaptive control [20]- [21]. While the transient stability is an essential requirement, grid codes are evolving with more capability requirements on GFM-VSCs. More specifically, GFM-VSCs are expected to provide adequate services under grid disturbances, including the provisions of active inertia power to alleviate the RoCoF of the power grid, active phase jump power to counteract the step change of phase angle of grid voltage, as well as the fast fault current injection to boost system voltage during grid faults [22]. Those GFM capabilities are crucial for restoring the power system from abnormal events [23]. Hence, many research efforts have also been made to enhance the GFM capability of VSC through optimizing its active/reactive power control loops [24]- [26].
The state-of-the-art control solutions have made significant progresses in enhancing either transient stability or GFM capabilities of VSCs under large grid disturbances. However, few of them address these two requirements at the same time, even though it is demanded in practice [16]- [18]. In [16], it is demonstrated that increasing virtual inertia may lead to improved GFM capability in alleviating the RoCoF of the system, but at the cost of degraded transient stability. Subsequently, [17]- [18] proposed different damping solutions to mitigate this conflict. However, these solutions have several limitations: • They have only been tested under specific grid strength and single type of grid disturbance, namely grid voltage dips. • The entire analysis relies on a strong assumption that the current limit of the GFM-VSC is not triggered during grid disturbances, which might not hold in practice [16]- [18]. To tackle the abovementioned challenges, this paper, thus, revisits the underlying control philosophy that guarantees the transient stability and GFM capability of GFM-VSCs, from the perspective of internal voltage source (IVS) dynamics. It 2 is, for the first time, revealed that these two control objectives impose conflicting requirements on the IVS dynamics of GFM-VSC. More specifically, a slow IVS dynamics is demanded to facilitate GFM-VSC to provide GFM services [4], yet on the other hand, a fast IVS dynamics is needed for enhancing the transient stability of GFM-VSCs. Therefore, existing control solutions that using the fixed slow IVS control for GFM capability enhancement tend to jeopardize the transient stability of the system, and vice versa. To tackle this challenge, a high-level, implementation-agnostic control framework named as adaptive fast/slow IVS control, is proposed in this work to better coordinate the requirement of GFM capability and transient stability. The approach furnishes GFM-VSCs with slow IVS control when there are sufficient stability and current margins for providing GFM service, yet operates GFM-VSC with fast IVS control when its current limit is reached or it operates with large power angle, in order to prevent the loss of synchronization (LOS). A detailed realization of such adaptive fast/slow IVS control is further put forward, including: • A control-mode switching criterion that is based on the local output current magnitude of VSC is proposed, which is readily implemented in practice. • A standard slow active/reactive power control scheme is adopted for enabling slow IVS dynamics of the GFM-VSC. • Two widely used control methods for transient stability enhancement, i.e., hybrid-synchronization control [12], [27]- [28], and voltage magnitude based active power refence adjustment [13]- [14], [29], are revisited from the fast IVS control perspective. It is revealed that they have degraded performance under the weak grid. A fast IVS control that modifies the active power reference based on the output current magnitude is thus added to enhance the transient stability of GFM-VSC under the weak grid. Finally, experimental tests are performed to corroborate the theoretical analysis and the proposed control approach. The proposed adaptive fast/slow IVS control outperforms the stateof-the-art solutions in [16]- [18] with following advantages: 1) Robustness against various grid strengths (from very weak grid to stiff grid) and different types of grid disturbances, including grid voltage dips, phase angle jumps, high RoCoF, and the combinations thereof. 2) The proposed scheme does not rely on any assumptions and remains effective even when the current limit of the GFM-VSC is triggered during grid disturbances. Moreover, the proposed adaptive fast/slow IVS control is an open framework without any limitations on how fast/slow IVS control should be implemented (although an implementation example is given in this work). Hence, the more advanced fast and/or slow IVS control developed in the future can also be seamlessly incorporate within this control framework for further performance improvement.

A. System Description
There are many GFM control schemes available in literatures [3]- [4]. Among others, the GFM-VSC with singleloop voltage magnitude (SLVM) control and adaptive virtual impedance (VI)-based current limitation, as shown in Fig. 1, is adopted as the benchmark in this work [30]- [32]. Nevertheless, the core idea of this work is generic and can be easily extended to GFM-VSCs with other control schemes. As shown in Fig. 1, the GFM-VSC is connected to the point of common coupling (PCC) through an LC filter, and Zg represents the grid impedance. Po/Qo and vo/io denote the output active/reactive power and output voltage/current of VSC, while vinv and vg are the inverter bridge voltage and grid voltage, respectively.
The GFM-VSC synchronizes with the power grid through the active power control (APC), in which the active powerfrequency (P-ω) droop control as well as the inertial and Power grid Fig. 2. Equivalent circuit of VSC-grid system. damping emulation are embedded [33], as shown in Fig. 1. The output of the APC is the angle reference θref that is used for the dq transformation. ωn denotes the nominal angular frequency. D is the P-ω droop coefficient. Kp and H represent the virtual damping and inertia constant, respectively. It is worth noting that the emulated virtual inertia has the same effect as that of a low-pass filter (LPF) [34], and hence, no additional LPF is needed after the active power measurement.
The voltage magnitude reference of GFM-VSC is regulated by the reactive power control (RPC), e.g., the reactive powervoltage (Q-V) droop control shown in Fig. 1 [3]. Vref is the voltage magnitude reference while Vn is the nominal voltage magnitude. KRPC is the Q-V droop coefficient. GLPFq represents a first-order LPF used for the reactive power measurement.
The SLVM control uses an integrator Kiv/s to regulate the output voltage magnitude of VSC ( Vref [30], and a first-order LPF GLPFv is adopted to filter out high-frequency noise in Vomag. The active damping resistor Rad is added at the output of Kiv/s to damp the synchronous resonance introduced by the power control [5]. Rad is typically cascaded with a high-pass filter GHPF = s/(s+ωHPF) to eliminate its impact on the steady-state power control performance [5], and ωHPF represents the cutoff frequency of GHPF. The adaptive VI is used to limit the current of GFM-VSC under large grid disturbances, the general idea of which is to adjust the value of VI based on the fault current magnitude, as shown in Fig. 1. Xv and Rv represent the adaptive virtual reactor and virtual resistor, respectively, which are given by [31]- [32] ( ) (1) where Iomag denotes the magnitude of output current of VSC, and Ith is the threshold current beyond which the adaptive VI will be activated. kX is the proportional gain of the adaptive virtual reactor and nX/R represents the X/R ratio of the adaptive VI. GLPFi is the first-order LPF used for measuring Iomag. vzd, vzq represent the fictitious voltage drop across the VI, which is calculated as The emulation of VI is realized by subtracting the fictitious voltage drop vzd+jvzq, from the voltage reference Eref+j0, as shown in Fig.1. GLPFX represents the first-order LPF used for calculating vzdq, whose purpose is to guarantee the small-signal stability when the adaptive VI is activated [32]. For the detailed parameters tunning of the adaptive VI, please refer to [32]. Fig. 2 illustrates the equivalent circuit of the VSC-grid system, where GFM-VSC is represented by a controlled voltage source behind the impedance. Since the focused timescale of this work is longer than the fundamental period, the filter capacitor branch in Fig.1 can be treated as open circuit due to its large impedance in the low frequency range [5]

B. Fast or Slow IVS Control: Performance Comparison
This part intends to perform a conceptual comparison of GFM-VSC with slow and fast IVS control. For simplicity, the resistive part of the VI, filter impedance and grid impedance are neglected due to the high X/R ratio in the transmission grid.
Xtot represents the total reactance, which is calculated as Xtot=Xv+Xf+Xg. Defining the power angle δ as the phase difference between the internal voltage phasor of GFM-VSC E and grid voltage phasor Vg, i.e., δ = θrefθg, and the output active power of GFM-VSC can be calculated as [Unless otherwise mentioned, the per-unit (p.u.) representation is adopted in this work afterwards] [35] sin (3) Fig. 3 illustrates the Po-δ curve as well as phasor diagram of GFM-VSC when subjected to a small grid disturbance, e.g., a small phase angle jump of grid voltage. The solid and dashed lines represent phasors before and after grid disturbances, respectively, while variables after the disturbance are represented with the prime symbol, e.g., E'. The GFM-VSC is initially operated at the SEP a with power angle δs. By adopting the slow IVS control, the internal voltage phasor E can be kept almost unchanged at the instant of grid phase angle jump, leading to a sudden increase of δ from δs to δs', and consequent increases of the output current Io and output active power Po, as shown in Fig. 3(a). The fast provision of this additional active power under phase angle jump of the grid voltage (defined as "active phase jump power" in the grid code [22]) has been proven crucial for maintaining the power system stability. Moreover, since the change of the grid frequency finally ends up with the grid phase angle shifts, the GFM-VSC with a slow IVS control is also capable of providing fast active inertia power injection under grid frequency drifts, which is beneficial for alleviating the RoCoF of the power grid [22].
In contrast, the fast IVS control enables a tight regulation of the output active and reactive power of GFM-VSC to follow their references. This is realized by modifying the internal voltage phasor E in a fast manner to "follow" the change of the grid voltage phasor Vg, by which, there is a limit change on δ (also Io and Po) under the grid phase angle jump, as shown in Fig. 3(b). In that case, however, the GFM-VSC would have limited responses to grid disturbances, and thus, its benefit in stabilizing the power system is diminished. This article has been accepted for publication in IEEE Transactions on Power Electronics. This is the author's version which has not been fully edited and content may change prior to final publication.  Fig. 3. Phasor diagram of GFM-VSC when subjected to small grid phase jump. The solid and dashed lines represent phasors before and after grid disturbances, respectively, and the prime symbol is used to denote variables after the disturbance (a) With a slow IVS control, additional active output power is generated (b) With a fast IVS control, limited or no additional active output power is generated.
While the slow IVS control is crucial for maintaining GFM capability, it risks in destabilizing GFM-VSC itself under large grid disturbances (e.g., 60° phase angle jump required in the grid code [22]). As shown in Fig. 4 (a), GFM-VSC with slow IVS control might yield a very large δ under a large phase angle jump, which results in the crossover of the unstable EP (UEP) b. Then, since Pref >Po at new operating point a', δ will further increase and finally the LOS is resulted [11]. In contrast, the fast IVS control enables the fast modification of internal voltage phasor E to "follow" the change of the grid voltage phasor Vg, such that the change of δ is limited even under a large phase angle jump of the power grid, as shown in Fig. 4(b). Hence, the LOS is avoided. It is worth mentioning that even though the performance comparison of GFM-VSC with fast/slow IVS control is made by considering phase angle jump of the grid voltage, same conclusions also hold for grid voltage dips (grid faults), which can be easily demonstrated by following the similar analysis procedure and will not be repeated here due to the page limit.

A. Basic Idea
As pointed out in Section II-B, the GFM-VSC with a slow IVS control can naturally provide GFM service to counteract grid disturbances. Yet, from the transient stability perspective, a fast IVS control is preferred to minimize the risk of LOS. These conflicting control requirements make it difficult to simultaneously enhance the transient stability and GFM capability with a fixed control scheme. Therefore, an adaptive fast/slow IVS control is proposed in this work, which switches GFM-VSC between fast and slow IVS control based on its operation conditions, as shown in Fig. 5. The design principles of the adaptive fast/slow IVS control are as follows: • Since GFM-VSC cannot provide any additional power/current for GFM service after reaching its current limit (Iomag = Ilim), adopting the slow IVS control in this scenario does not make sense. Therefore, GFM-VSC is always operated with the fast IVS control to avoid the LOS under the current limiting mode. • In the case that the current limit of GFM-VSC is not reached (Iomag < Ilim), the risk of LOS is low when it is operated with small power angle [3]. Consequently, maintaining GFM capability should be prioritized by adopting the slow IVS control. However, the fast IVS control should be used to prevent the LOS when GFM-VSC is operated with large power angle. Hence, the mode switching between fast/slow IVS control can be realized by comparing the power angle δ with a pre-defined threshold δth, as shown in Fig. 5. The selection of δth will be discussed afterwards. Nevertheless, it is known from (3) that the calculation of δ requires the knowledge of grid voltage and of grid impedance [36], which is challenging in practice. Therefore, a switching criterion based on local measurements should be developed for practical implementation. The selected local variable x should hold a monotonic relationship with δ, such that the original switching criterion based on the comparison between δ and δth can be mapped to comparing x and xth. Moreover, the impact of different SCR and Vg should be also considered to guarantee the robustness of the switching criterion.

B. Iomag-based Switching Criterion
It is known from Fig. 5 that the local measurement variable Iomag is always needed to check whether GFM-VSC is operated under the current limit mode. Therefore, it is interesting to first investigate whether Iomag holds a monotonic relationship with δ before reaching the current limitation, such that the δ-based switching criterion can be mapped to the Iomag-based switching criterion It is known from Fig. 2 that the internal voltage phasor E is aligned with the dq-frame defined by the output phase angle of the APC. Based on Fig. 2, the dq components as well as the magnitude of the output current can be calculated as Substituting (4), (6)-(8) into (5), which yields 22 2 cos Substituting δ = δth into (10) It is known from (9) that Iomag is monotonously increased with the increase of δ before triggering the current limitation, which yields Iomag < Iomag_th ↔ δ < δth. Yet, it is clear from (10) that Iomag_th is not a constant value for specific δth, but is affected by two other variables, i.e., grid impedance Xg and grid voltage Vg. Define Iomag_th_min is the minimum value of Iomag_th considering different Xg and Vg, the sufficient condition for δ < δth becomes Iomag < Iomag_th_min. To calculate Iomag_th_min, the largest possible value of Xg, i.e., Xg=1p.u. (corresponding SCR=1) is considered, as Xg appears in the denominator of (10). On the other hand, the value of Vg for calculating Iomag_th_min can be obtained by solving which yields Since Vg cannot be a negative value, the value of Vg that is used for calculating Iomag_th_min is given by Substituting (13) into (10), Iomag_th_min can be calculated as This article has been accepted for publication in IEEE Transactions on Power Electronics. This is the author's version which has not been fully edited and content may change prior to final publication.
Considering a typical 0.1 p.u. filter reactance, i.e., Xf = 0.1 p.u., together with Xg =1p.u. and Eref =1.1p.u. (In order to maintain 1p.u. PCC voltage, Eref is slightly higher than 1p.u. to compensate the voltage drop across Xf [30]), the Iomag_th_minδth curve can be plotted based on (14), as shown in Fig. 6. It is clear that the maximum value of Iomag_th_min is around 1 p.u., which is lower than current limit of GFM-VSC, e.g., Ilim =1.5 p.u. selected in this work. Therefore, Iomag < Iomag_th_min is the sufficient condition for both δ < δth and Iomag < Ilim. Therefore, two switching criteria given by Fig. 5 can be combined, i.e., the GFM-VSC is operated with a slow IVS control provided Iomag < Iomag_th_min, otherwise it is switched to the fast IVS control.
The value of Iomag_th_min is dependent on δth, which should be selected smaller than δu (i.e., the corresponding power angle of the UEP b, see Fig. 4) to avoid the LOS [35]. It is noted that δu = 90° is yielded under the worst case where SCR=1 [3], and hence, δth <90° is required. A smaller δth can better guarantee the transient stability of GFM-VSC, yet it jeopardizes the GFM capability. Therefore, a tradeoff is needed in practice. In this paper, δth = 70° selected, which leads to Iomag_th_min = 0.94 p.u. based on (14).

C. Discussion and Practical Realization
It should be noted that Iomag = 0.94 p.u. ↔ δ = 70° only holds under the worst scenario where SCR=1 and Vg satisfies (13). In other cases, e.g., stiffer grid conditions, Iomag may reach 0.94 p.u. with a much smaller δ. As seen from the Iomagδ curve given by Fig. 7, Iomag = 0.94 p.u. ↔ δ = 10° is yielded with SCR=10 and Vg=1p.u. In this scenario, one might argue that the proposed Iomag-based switching criterion may unnecessarily switch GFM-VSC to the fast IVS control when it is operated with a small δ (e.g, 10°). However, it should be noted that the current limitation of GFM-VSC will also be triggered with a small δ under the stiff grid [Iomag = Ilim (1.5 p.u.) ↔δ = 15° when SCR=10, see Fig. 7]. Therefore, even if the ideal δ-based switching criterion in Fig. 5 can be used, the GFM-VSC would still be switched to the fast IVS control with a small δ (e.g, 15°), due to the triggering of the current limitation. Hence, it is true that the worst-case based design of Iomag-based switching criterion may jeopardize the GFM capability of VSC under the stiff grid compared with the ideal δ-based switching criterion, the degradation is not significant considering the presence of the current limit control. Fig. 8 illustrates the practical switching criterion used in this work. A hysteresis comparator and a time delay are added to avoid the frequent switching of control modes caused by the measurement noise. The GFM-VSC is switched to the fast IVS control when Iomag >Iomag_th_min, but can only be switched back to the slow IVS control if Iomag ≤ 0.9Iomag_th_min holds for a given amount of time (t1). A larger t1 leads to a better noise immunity of the criterion but it degrades the sensitivity. A compromise is, thus, needed in the practical application. In this work, t1 = 0.2s is adopted.

A. Basic Idea
Following the practical switching criterion given in Fig. 8, the detailed implementation of the adaptive slow/fast IVS control should be further investigated. Due to the low control bandwidth of the APC/RPC, the GFM-VSC is inherently a slow IVS when it is operated with the standard APC/RPC given in Fig. 1 [4]. Therefore, only modified control schemes that furnish GFM-VSC with a fast IVS will be discussed in this section. It is worth noting that even though the modifications can be made on both APC/RPC, the modification on RPC is not that effective, as RPC is often bypassed under grid faults, due to the saturation of Eref in Fig. 1. Therefore, the implementation of the fast IVS control would only consider the modification of APC in this work.
The underlying idea of fast IVS control is to retain the power angle δ under grid disturbances to prevent the LOS. This can be realized by modifying θref in the APC to guarantee that θref could follow θg under grid disturbances. In the following, two 7 existing solutions that modify θref through ω and Pref of APC are re-visited from the perspective of the fast IVS control, and their effectiveness under different grid strengths/disturbances are discussed. To circumvent the drawbacks of the two existing methods, a new fast IVS control that modifies Pref based on the Iomag is added. Fig. 9 illustrates the block diagram of the hybridsynchronization control (HSC) [12], [27]- [28], in which Voq is feedforwarded to modify ω through a proportional gain Kpvq. It is pointed out in [12] and [27] that the transient stability of GFM-VSC can be improved by adopting the HSC, whose underlying mechanism is re-visited here from the perspective of the fast IVS control. For a better illustration, the detailed expression of Voq will be derived first.
Therefore, ∆ꞷq in Fig. 9 can be expressed as Based on (18), the mechanism of the HSC that operates GFM-VSC as a fast IVS to prevent the LOS can be easily understood. For any disturbances that cause an increase of δ, a more negative ∆ꞷq is generated via the Voq feedforwarded path [see (18)], which reduces the ꞷ(θref) of GFM-VSC, and hence, counteracts the effect of δ increase. Yet, with a fixed Kpvq, it is also known from (18) that the effect of the Voq feedforward is dependent on two factors: (1-a) and Vg. More specifically: • Voq feedforward is more effective under the grid phase angle jump with Vg =1p.u., yet it becomes less effective under grid voltage dip due to the smaller Vg.
• Voq feedforward is more effective under the stiff grid where a is close to 0, yet it becomes less effective under the weak grid where a approaches to 1.

C. Vomag-based Pref Adjustment
Another widely used method of avoiding the LOS is to reduce Pref based on the dip of voltage magnitude Vomag. To that end, different implementations are given in [13]- [14], [29].
Among others, the simplest implementation, i.e., Pref = Pref0Vomag, is adopted in this work for illustration. The corresponding control diagram is given in Fig. 10, where Vomag can be calculated as Substituting (4), (6)-(8), (15) into (19), which yields It is clear from (20) that Vomag is reduced with the decrease of Vg and with the increase of δ. Hence, the Vomag-based Pref adjustment essentially operates the GFM-VSC as a fast IVS, which reduces Pref1 under grid faults or grid phase angle jump. The lower value of Pref1 helps to reduce ꞷ(θref) of GFM-VSC, which alleviates the risk of LOS. Nevertheless, it can be seen from (20) that the performance of this approach is affected by the grid strength that is characterized by the factor a. More specifically: • Vomag ≈Vg under the stiff grid where a→0, which is independent of δ. Thus, Vomag-based Pref adjustment is very effective under the grid voltage dip, but less effective under grid phase angle jump.
• Vomag ≈Eref under the ultra weak grid where a→1, which is independent of both Vg and δ. In this scenario, Vomagbased Pref adjustment is ineffective under both grid voltage dip and grid phase angle jump. Table II summarizes the performances of HSC and Vomag-based Pref adjustment in respect to the enhancement of transient stability, considering different grid disturbances and grid strengths. The HSC is more effective under the phase angle jump while Vomag-based Pref adjustment is more effective under the voltage dip. Therefore, these two methods are complementary to each other, and thus, can be used at the same time for the performance improvement. Nevertheless, the effectiveness of both methods is degraded under weak grid conditions. This is because both of them manipulate the APC based on the PCC voltage, which deviates significantly from the grid voltage under the weak grid. Therefore, a new fast IVS control that can improve the transient stability of GFM-VSC under weak grid conditions is needed.

D. Pref-Iomag Droop Control
It can be seen from (9) that for any given grid strength (Xg), Iomag is always increased with the increase of δ [as the term cosδ in (9) is decreased with the increase of δ]. Therefore, reducing Pref based on the increase of Iomag (which reflects the increase of δ) is a more robust fast IVS control against grid strength variations, which is named as Pref -Iomag droop control hereafter. Fig.11 illustrates the control diagram of the proposed method, whose principle can be elaborated as where n is the droop coefficient, and IPth is the threshold current beyond which the proposed Pref -Iomag droop control is activated. In this work, IPth =1.1p.u. is selected to avoid the impact of the proposed method on the steady-state operation of the system. A larger droop coefficient n indicates more Pref reduction with the same increasement of Iomag, which is beneficial for system transient stability. Yet, the risk of unnecessary Pref swing due to the measurement noise is also increased. In this work, n=10 p.u. is selected for a good compromise, which indicates that a 0.1 p.u. increase of Iomag leads to a 1p.u. decrease of Pref when Iomag≥ IPth. Moreover, to avoid that Pref1 becomes a negative value due to the Pref -Iomag droop control, a limiter is added to limit Pref1 within 0 to 1 p.u. Fig. 12 illustrates the final implementation of the proposed adaptive fast/slow IVS control. The fast IVS control is implemented by adding the Pref -Iomag droop control, Vomagbased Pref adjustment, and Voq feedforward on top of the slow IVS control, and is activated/de-activated based on the switching criterion defined in Fig. 8. When the fast IVS control is de-activated, Fig. 12 reduces to the standard control scheme given in Fig. 1, which is a slow IVS control that guarantees the GFM capability of VSC.

E. Small-Signal Stability Analysis
As mentioned, the GFM-VSC is equipped with standard APC/RPC when operated as a slow IVS, whose small-signal stability has been extensively investigated [7], [32], [37]. Hence, the small-signal stability analysis here will focus on the scenario where GFM-VSC is subjected to large grid disturbances with fast IVS control, i.e., Voq feedforward, Vomagbased Pref adjustment, as well as Pref-Iomag droop control, activated. The complete small-signal model of GFM-VSC with fast IVS control is derived in the Appendix, based on which, the closed-loop poles of the system can be calculated from (A.21), as shown in Fig. 13. It can be observed that all poles are located in the left half plane, indicating that the system is small-signal stable with used controller parameters (see Table  IV) in this work.

V.EXPERIMENTAL RESULTS
Experimental tests are carried out to validate the proposed adaptive fast/slow IVS control for the GFM-VSC, and the parameters given in Table III and IV are adopted. The controller parameters in Table IV are tunned based on [7], [32], [37]- [38] to guarantee the small-signal stability of the system. Fig. 14 illustrates the configuration of the experimental setup, where a 45 kVA Chroma 61850 grid simulator is used to generate the grid voltage and emulate different grid disturbances. The control algorithm is implemented in the DS1007 dSPACE system. The DS2102 highspeed D/A board    is used to transmit the calculated active power, power angle, current magnitude (Iomag) and the enable signal of fast IVS control (FastIVS_en) to the oscilloscope.

A. Verification of Switching Criterion
Experimental tests are carried out to verify the Iomag -based switching criterion given in Fig. 8. As shown in Fig. 15, the GFM-VSC is initially operated with slow IVS control (FastIVS_en=0) when Iomag (Pm =0.1 p.u.) is less than the minimum threshold, i.e., Iomag < Iomag_th_min = 0.94 p.u. When a symmetrical fault occurs with Vg reduced to 0.1 p.u., the GFM-VSC is operated under the current limiting mode where Iomag exceeds the minimum threshold, i.e., Iomag = 1.5 p.u > Iomag_th_min, and the fast IVS control is thus activated (FastIVS_en=1). After the fault is cleared, the Iomag is reduced to be less than 0.9Iomag_th_min, yet the GFM-VSC is still operated with the fast IVS control, as expected, for 0.2 s before it switches back to the slow IVS control. The experimental results given in Fig. 15 matches well with the proposed switching criterion given in Fig. 8.

B. Verification of GFM Capability
In order to verify the GFM capability of VSC with the proposed adaptive fast/slow IVS control, experimental tests are carried out by operating GFM-VSC under the stiff grid condition (SCR=10) with zero output power (Pm =0 p.u.) before grid disturbances. For better illustration, two types of control schemes are tested and compared: 1. Adaptive fast/slow IVS control: corresponds to the control scheme given in Fig. 12. 2. Fast IVS control: corresponds to the control scheme given in Fig. 12 with Pref -Iomag droop control, Vomagbased Pref adjustment, and Voq feedforward always enabled. Fig. 16 shows the dynamic responses of GFM-VSC when subjected to -5Hz/s RoCoF event of the power grid that lasts 0.1s. Since GFM-VSC is operated with small power angle before and after grid disturbances without triggering the current limitation, it would always operate with the slow IVS control (FastIVS_en=0) when the proposed adaptive control is adopted. Hence, despite of generating 0.5 p.u. droop-controlinduced active power due to 0.5Hz frequency dips, the GFM-VSC is also capable of providing additional active inertia power to counteract the RoCoF, as shown in Fig. 16(a). For comparison, Fig. 16(b) illustrates the dynamics of GFM-VSC with fast IVS control always enabled (FastIVS_en=1), it can be seen that the capability of GFM-VSC in providing active inertial power is significantly degraded. Fig. 17 shows the dynamic responses of GFM-VSC when subjected to -10° phase angle jump of the power grid (θg= -10°), and GFM-VSC is operated with small power angle before and after grid disturbances without triggering the current limitation. By adopting the proposed adaptive control, GFM-VSC would remain operating with slow IVS control (FastIVS_en=0), which maintains its capability of providing active phase jump power, as shown in Fig. 17(a). In contrast, it can be observed from Fig. 17(b) that much lower active phase jump power is generated from GFM-VSC under same grid phase angle jump, provided that GFM-VSC is always operated with the fast IVS control (FastIVS_en=1

C. Verification of Transient-Stability Improvement
In this part, more severe grid disturbances are considered to verify the transient stability performance of GFM-VSC with the proposed adaptive fast/slow IVS control. For better illustration, three types of control schemes are tested and compared: 1. Slow IVS control: corresponds to the basic GFM control scheme given in Fig. 1.

Adaptive fast/slow IVS control without Pref-Iomag droop:
corresponds to the control scheme given in Fig. 12, yet the Pref -Iomag droop control is not added. 3. Adaptive fast/slow IVS control: corresponds to the control scheme given in Fig. 12. Fig. 18 illustrates the dynamic responses of GFM-VSC under the stiff grid condition (SCR=10) considering phase angle jump+RoCoF disturbances [-60° phase angle jump (θg= -60°) together with -5Hz/s RoCoF that lasts 0.2s]. The GFM-VSC is initially operated with Pm =0.4 p.u. It can be seen from Fig. 18(a) that GFM-VSC becomes unstable by adopting the slow IVS control (FastIVS_en=0), where the oscillation in the output power and power angle can be clearly observed, indicating the LOS of GFM-VSC. In contrast, GFM-VSC can successfully ride through large phase angle jump+RoCoF disturbances by using the adaptive control with or without Pref -Iomag droop. As illustrated in Figs. 18(b) and (c), the adaptive control initially operates GFM-VSC with the slow IVS control (FastIVS_en=0), but is naturally switched to the fast IVS control (FastIVS_en=1) under grid disturbances to facilitate the grid synchronization. Moreover, adding Pref-Iomag droop 11 control can slightly improve the dynamics of GFM-VSC after grid disturbances, which can be observed by comparing Figs.  18 (b) and (c). Fig. 19 further illustrates that GFM-VSC with the adaptive fast/slow IVS control can stably ride through the combined large phase angle jump+RoCoF disturbances even if Pm is increased to 1 p.u. under the stiff grid condition. The only difference is that GFM-VSC is already operated with the fast IVS control (FastIVS_en=1) before grid disturbances due to the fact of Iomag > Iomag_th_min.    Fig. 19. Dynamic response of GFM-VSC with adaptive fast/slow IVS control when subjected to -60° grid phase angle jump (θg= -60°), together with -5Hz/s RoCoF that lasts 0.2s. SCR=10, Pm=1 p.u. Fig. 20 illustrates the dynamic responses of GFM-VSC under the stiff grid condition (SCR=10) considering symmetrical grid faults+phase angle jumps [Vg drops to 0.2 p.u. and lasts for 0.2s, together with -60° phase angle jump (θg= This article has been accepted for publication in IEEE Transactions on Power Electronics. This is the author's version which has not been fully edited and content may change prior to final publication. Citation information: DOI 10.1109/TPEL.2023.3268374 12 -60°)]. The GFM-VSC is initially operated with Pm =0.7 p.u. It can be seen from Fig. 20(a) that GFM-VSC with slow IVS control (FastIVS_en=0) loses synchronization with the power grid after the fault clearance, which yields one cycle of oscillation where power angle δ is increased to 360°. Even though GFM-VSC finally re-synchronizes with the power grid, the overall performance is not that satisfactory. In contrast, it can be observed from Figs. 20(b) and (c) that the proposed adaptive control operates GFM-VSC with the fast IVS control    (FastIVS_en=1) during grid faults, which enables its direct resynchronization with the power grid after the fault clearance. Moreover, the GFM-VSC is switched back to the slow IVS control (FastIVS_en=0) when it comes to the steady-state 13 operation after the fault clearance, retaining its GFM capability. Further detailed comparison between Figs. 20(b) and (c) indicates that adding Pref-Iomag droop control can slightly improve the post-fault dynamics of GFM-VSC in this scenario. Fig. 21 further illustrates that GFM-VSC with the adaptive fast/slow IVS control can stably ride through the combined grid voltage dips+phase angle jump disturbances even if Pm is increased to 1 p.u. under the stiff grid condition. Since the steady-state output current magnitude is larger than Iomag_th_min, GFM-VSC is kept with the fast IVS control (FastIVS_en=1) before and after grid disturbances.

1) Stiff grid (SCR=10)
The experimental results given in Figs. 18-21 clearly demonstrate the effectiveness of the proposed adaptive control in guaranteeing the transient stability of GFM-VSC under stiff grid conditions with different kinds of grid disturbances (grid voltage dips, phase angle jump, high RoCoF, and the combination thereof). The proposed Pref-Iomag droop control enables a slight improvement of the dynamic responses, yet the benefit is not that significant. This is because Vomag-based Pref adjustment as well as Voq feedforward already perform very well for transient stability enhancement under the stiff grid.
2) Weak grid (SCR=1.2) Fig. 22 illustrates the dynamic responses of GFM-VSC under the weak grid condition (SCR=1.2) considering phase angle jump+RoCoF disturbances [-60° phase angle jump (θg= -60°) together with -5Hz/s RoCoF that lasts 0.2s]. The GFM-VSC is initially operated with Pm =0.4 p.u. It can be seen from Fig. 22(a) that GFM-VSC becomes unstable by adopting the slow IVS control. Yet, it also cannot be stabilized with the adaptive control provided the Pref -Iomag droop is not used, as  This article has been accepted for publication in IEEE Transactions on Power Electronics. This is the author's version which has not been fully edited and content may change prior to final publication.  This article has been accepted for publication in IEEE Transactions on Power Electronics. This is the author's version which has not been fully edited and content may change prior to final publication. shown in Fig. 22(b). This is because Vomag-based Pref adjustment and Voq feedforward become less effective for transient stability enhancement under the weak grid, due to the significant deviations between the PCC voltage and Vg, as pointed out in Section IV. Therefore, only the adaptive control with Pref-Iomag droop included can stabilize GFM-VSC in this scenario, as shown in Fig. 22(c). Fig. 23 further illustrates that GFM-VSC with adaptive fast/slow IVS control can stably ride through the combined large phase angle jump+RoCoF disturbances even if Pm is increased to 1 p.u. under the weak grid condition. The only difference is that GFM-VSC is already operated with fast IVS control (FastIVS_en=1) before grid disturbances due to the fact of Iomag > Iomag_th_min. Fig. 24 illustrates the dynamic responses of GFM-VSC under the weak grid condition (SCR=1.2) considering symmetrical grid faults+phase angle jumps [Vg drops to 0.2 p.u. and lasts for 0.2s, together with -60° phase angle jump (θg= -60°)]. The GFM-VSC is initially operated with Pm =0.7 p.u. It can be seen from Fig. 24(a) that GFM-VSC becomes unstable by adopting the slow IVS control (FastIVS_en=0). Yet, by adopting the adaptive control without the Pref -Iomag droop, the GFM-VSC still suffers from one-cycle of oscillation after the fault clearance before it can re-synchronize with the power grid, as shown in Fig. 24(b). This is due to the reduced performance of Vomag-based Pref adjustment and Voq feedforward under the weak grid. In contrast, by adopting the adaptive control with Pref-Iomag droop included, the GFM-VSC can successfully ride-through grid faults and directly resynchronize with the power grid after fault clearance, as shown in Fig. 24(c). Fig. 25 further illustrates that GFM-VSC with adaptive fast/slow IVS control can stably ride through the combined grid voltage dips+phase angle jump disturbances even if Pm is increased to 1 p.u. under the weak grid condition. Since the steady-state output current magnitude is larger than Iomag_th_min, GFM-VSC is kept with the fast IVS control (FastIVS_en=1) before and after grid disturbances.
Figs. 22-25 clearly demonstrate that the proposed adaptive control can also guarantee the transient stability of GFM-VSC under weak grid conditions with different kinds of grid disturbances (grid voltage dips, phase angle jump, high RoCoF, and the combination thereof). Different from stiff grid scenarios, the proposed Pref-Iomag droop control is crucial in stabilizing GFM-VSC under the weak grid and should always be included.

3) Asymmetrical fault-ride through
Figs. 26-27 illustrate the dynamic response of GFM-VSC under signal-line-to-ground (SLG) fault and double-line-toground (DLG) fault considering both stiff and weak grid conditions. It can be seen that with the proposed adaptive fast/slow IVS control, GFM-VSC can stably ride through different kinds of asymmetrical faults regardless of grid strength variations. It is not surprising, as positive-sequence voltage only drops to 0.33 p.u even for the most severe asymmetrical faults, i.e., DLG faults [35]. This represents a better case in terms of transient stability compared with symmetrical faults, in which the remaining positive-sequence voltage could be lower than 0.33 p.u..

4) Compared with other state-of-the-art method
To further demonstrate the advantage of the proposed adaptive fast/slow IVS control, experimental tests are carried out by comparing the proposed method with the control scheme in [18] that enhances system damping by feedforwarding the frequency in the RPC loop, with which, a good comprise between transient stability and GFM capability can also be achieved. Yet, this method becomes ineffective if GFM-VSC is operated under the current limiting mode where the RPC loop is naturally bypassed. This is demonstrated by experimental results given in Fig. 28(a), where the LOS of GFM-VSC can be observed under large grid disturbances with current limit triggered, even if the method in [18] is used. In contrast, the proposed adaptive fast/slow IVS control allows GFM-VSC to stably ride through large grid disturbances under the current limiting mode, as shown in Fig. 28(b).

VI.CONCLUSION
With clear physical insights on different IVS dynamic requirements of GFM-VSC for enhancing the transient stability and GFM capability, an adaptive fast/slow IVS control has been proposed in this work. The method not only guarantees the transient stability of GFM-VSC under different grid strength and different types of grid disturbances (grid voltage dips, phase angle jump, high RoCoF, and the combination thereof), but also retains the GFM capability of VSC when there are sufficient stability and current margins. The effectiveness of the proposed method is verified by experimental tests. The efficacy of the proposed adaptive fast/slow IVS control under the large power network with multiple GFM-VSCs will be analyzed in future work. This article has been accepted for publication in IEEE Transactions on Power Electronics. This is the author's version which has not been fully edited and content may change prior to final publication.

APPENDIX
By considering the dynamics of the APC, there are two rotating dq frames of GFM-VSC [5]: one is the controller-dq frame that is defined by the output phase angle of the APC, and another is the system-dq frame that is aligned with phase angle of the grid voltage. For clarity, superscript s represents the variables in the system-dq frame, while the superscript c denotes the variables in the controller-dq frame.
Define δ as the phase angle difference between the controller-dq frame and the system-dq frame, i.e., δ = θrefθg. Then the relationships between the state variables in the controller-dq frame and the system-dq frame are given by It should also be noted that the output of SLVM control, i.e., Eref in Fig. 1, will be saturated during grid disturbances as Vomag ≠Vref, which naturally bypasses the RPC loop and the SLVM control [32].

1) Small-signal modelling of the power plant and adaptive virtual impedance control
This part has been addressed in authors' previous publication [32], and hence, only final results will be given. Readers are referred to [32] for more details The output current in system-dq frame can be expressed as ( )  This article has been accepted for publication in IEEE Transactions on Power Electronics. This is the author's version which has not been fully edited and content may change prior to final publication.

3) Small-signal modelling of Vomag-based Pref adjustment
The output voltage magnitude is calculated as The small-signal representation of (A.8) is given by: It is known from Fig. 12 that by using the Vomag-based Pref adjustment, the modified Pref is expressed as

4) Small-signal modelling of Pref-Iomag droop control
The output current magnitude is calculated as

5) Complete small-signal model
The complete small-signal model of GFM-VSC with fast IVS control activated can be derived by combining (A.4), (A.7), (A.12) and (A.17), whose block diagram of given in Fig. A1 This article has been accepted for publication in IEEE Transactions on Power Electronics. This is the author's version which has not been fully edited and content may change prior to final publication. Citation information: DOI 10.1109/TPEL.2023.3268374