Adaptive Anti-Saturation Control Design of Transformers in Converter-Based Grid Emulators

Transformer saturation is a common issue in megawatt converter-based grid emulators (GEs) when emulating grid faults. This problem necessitates the use of anti-saturation control (ASC) with GEs. However, conventional ASC methods tend to distort the emulated grid voltage or even interact with the voltage control (VC) of GEs, causing instability in the system. This article, thus, proposes an adaptive ASC method and superimposes its output command to both modulation and VC references, which not only alleviate transformer saturation with the lower output voltage distortion, but mitigate its adverse interaction with the VC of converter-based GEs. Experimental results confirm the effectiveness of the adaptive ASC.


I. INTRODUCTION
T RANSFORMER saturation is reported as a common issue in medium-voltage megawatt converter-based grid emulators (GEs) when reproducing grid faults [1], [2], [3], [4], [5].The step changes with emulated grid voltage may introduce a significant dc magnetic flux in the transformers of GEs, which leads to a dc magnetizing current surge, reaching up to two or even ten times the rated current [6], [7].This inrush current tends to distort the emulated voltage, or even trigger the overcurrent protection of power semiconductor devices in converter-based GEs, leading to unintentional trips.
To address this issue, the anti-saturation control (ASC) methods are commonly used with converter-based GEs [1].A typical approach is the magnetizing current control (MCC) [8], [9], [10], which often utilizes a notch filter [10] or a moving average filter (MAF) [8], [9], along with a proportional-integral (PI) controller to eliminate the dc component of magnetizing current of a transformer.However, the control plant of MCC highly depends on the magnetizing inductance [11], which encounters a significant reduction during the transformer saturation [10], and hence, complicates the parameter tuning of MCC.
Alternatively, transformer flux control is a more practical approach to the anti-saturation of transformers in GEs [3], [4], [5], [12].It typically comprises three parts: the flux estimator, the steady-state flux control (SFC), and the transient flux control (TFC).The flux estimator, which is an integrator, determines the flux control plant [13].The SFC aims at eliminating the continuous dc flux offset [4], [14], while the TFC is employed to mitigate the transient inrush current.A virtual resistance is typically used with the TFC, which is activated only when the estimated flux exceeds the flux threshold [3], [5].Although switching a constant virtual resistance is effective for desaturating the GE transformer, it potentially introduces distortion in the emulated voltage at the point of common coupling (PCC) [15].A common practice involves tuning different virtual resistances by a trial-and-error method when emulating various grid faults [3], [5].However, this approach is time-consuming for each testing scenario and often ineffective, particularly in varying or extreme testing scenarios, such as the emulated faults with residual voltages close to zero [5], [15].
Besides the abnormal distortion, transient flux oscillations may arise when GEs utilize both flux control and closed-loop voltage control (VC) [5], [12], [15].As found in this article, the VC significantly interacts with the flux control when they are configured in parallel, due to the conflicting voltage regulation objectives.The VC focuses on regulating the PCC voltage to track its reference, while the flux control intends to alter the magnetic flux of the transformer through the converter output voltage.This control interaction tends to exacerbate the PCC voltage distortion or even induce repeated transformer saturation, causing instability of the overall system.This article, thus, proposes an adaptive ASC method and mitigates its interaction with the VC by superimposing the ASC output command to both modulation and VC references.This approach efficiently reduces inrush current and alleviates PCC voltage distortion in GEs when emulating various grid faults.The main contributions are outlined as follows.
1) Identified the causes and risks of interaction between the conventional transformer flux control and the VC.It is found that such interaction lowers the damping ratios of poles in the flux control, potentially triggering transient flux oscillations or even instability.2) An adaptive TFC is proposed which introduces a single-phase virtual resistance that is proportional to the estimated flux magnitude, thereby reducing the adverse influence of TFC on the emulated PCC voltage.The parameter tuning guideline is provided to compromise the trade-off between mitigating the inrush current and reducing the PCC voltage distortion.3) A small-signal model of the proposed adaptive ASC is developed, which confirms that the adverse interaction between the adaptive ASC and the VC is mitigated and the damping ratios of poles in the adaptive ASC are higher than in the conventional one.The effectiveness of the proposed ASC is finally validated in a medium-voltage megawatt converter-based grid emulation system using a controller hardware-in-the-loop (CHIL) testing platform.

II. SYSTEM DESCRIPTION AND PROBLEM FORMULATION A. Converter-Based Grid Emulation System
Fig. 1 illustrates the block diagram of a medium-voltage megawatt grid emulation system utilizing a general flux control [3], [5], [13].v 1 j , i 1 j , v pcc j , and i pcc j ( j = a, b, or c) denote the primary and PCC-side voltages and winding currents of the GE transformer, respectively.N tr and λ j are the turn ratio and the primary-side flux of the transformer, respectively.For the ASC, R v denotes the virtual resistance in the TFC.The SFC typically uses a notch filter with a low-pass filter (LPF) [5] or an MAF [12] to extract the dc component of magnetic flux.Further, the external VC output and the ASC output are superimposed to form the modulation reference.

B. Mechanism of Transformer Saturation
Fig. 2(a) illustrates a single-phase equivalent transformer model, where R 1 j (L 1 j ) and R pcc j (L pcc j ) denote the primary-side and PCC-side leakage resistances (inductances), respectively.R m j , L m j , i m j , and λ m j are the core-loss resistance, magnetizing inductance, current, and flux, respectively.Fig. 2(b) depicts the magnetic curve of the transformer with

TABLE I PARAMETERS OF MAGNETIC CHARACTERISTICS OF GE TRANSFORMERS
four critical points [2], where λ 0 , λ r , λ s , and λ p denote the initial flux, residual flux, saturation flux, and maximum flux, respectively.i m0 , i mr , i ms , and i mp are the magnetizing currents at each of these flux points.Table I shows typical ranges and settings of this study for magnetic characteristics of the GE transformer [16], [17].
The total flux on the primary side of the GE transformer after its energization is given by For normal operation, λ j can be a fundamental-frequency signal λ j_ac without dc deviation [2], [5].However, when emulating grid fault events, the step changes of voltage magnitude and phase angle tend to induce an additional dc flux component λ j_dc into λ j , especially during the fault recovery process [7].The post-fault flux without the ASC is expressed as [2] λ pt j (t) Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.= λ j (0) + where t sag and t rec denote the time instants of voltage sag and voltage recovery, respectively.v 1 f j (t) is the primary-side voltage of the transformer during emulated grid faults.When |λ pt j | > λ s , the transformer becomes saturated.Thus, the ASC aims at shaping v 1 j and v 1 f j to counteract λ j_dc for preventing transformer saturation.

C. Issues of Conventional Flux Control 1) PCC Voltage Distortion:
In accordance with grid-code requirements, the allowed deviation of the emulated PCC voltage at steady state, i.e., output command of SFC, is often limited within ±0.05 p.u. [1].Consequently, the TFC primarily determines the ASC behavior.Fig. 3 shows the impact of conventional TFC on the PCC voltage during a balanced fault emulation.When |λ pt j | is higher than the flux threshold λ th , the TFC is enabled and generates R v λ j .This constant R v introduces a notable deviation in v pcc j from its original reference, as indicated by the dashed line in Fig. 3.
2) Interaction Between Conventional ASC and VC: This interaction involves two aspects: the impact of VC on the ASC effectiveness and the influence of ASC on VC dynamics.To clarify these impacts, it is crucial to first perform separate analyses for the conventional ASC with an open-loop VC and the closed-loop VC without ASC.Afterward, the interaction principle can be characterized by comparing these two separate control schemes with the conventional ASC featuring a closedloop VC.However, the nonlinear behavior of the saturated transformer complicates the interaction analysis.To handle this issue, the small-signal modeling at the worst-case operating point is a straightforward approach [18], [19].
Taking the L-filtered GE as an example, Fig. 4 shows the block diagram of the small-signal model with the conventional ASC and a closed-loop VC.For simplicity, this model is linearized at the operating worst-case point, i.e., λ p = 2.5 p.u. and L m = λ p /i mp = 0.5 p.u. R 1 j , R pcc j and SFC dynamics are neglected and N tr = 1.G v , G d , and G p_vc denote transfer functions of the proportional-resonant (PR) controller for VC, the time delay, and the VC plant, respectively [1].
The closed-loop gain G cl_asc_con of the conventional ASC with an open-loop VC is expressed as  where G p_vc = L m j /(L m j -L eq -L 1 j ).At the low-frequency range, e.g., within 50 Hz, G d ≈ 1 and the GE is a first-order system.
The closed-loop gain G cl_vc_con of the closed-loop VC without ASC is derived as The closed-loop gain G cl_o_con of the conventional ASC with a closed-loop VC is given by Fig. 5 depicts the poles and zeros of G cl_asc_con and G cl_vc_con .In Fig. 5(a), the damping ratios of these left-halfplane poles are always 1, due to the first-order system behavior when only utilizing the conventional ASC.In Fig. 5(b), the proportional gain K pv of VC should be lower than 0.8 p.u. Otherwise, high-frequency instability issues may occur.
Fig. 6 shows the poles and zeros of G cl_o_con .Compared to Fig. 5(a), Fig. 6(a) shows that adding the closed-loop VC increases the system order and reduces damping ratios ξ of low-frequency domain poles, e.g., ξ = 0.14 for the case of R v = 0.8 p.u. Compared to Fig. 5(b), Fig. 6(b) depicts that adding the ASC introduces low-damped poles, and increasing K pv can provide more damping, but the GE is still an underdamped system.Fig. 7 illustrates the impact of the interaction between the VC and the conventional ASC on λ j .Due to insufficient damping, the TFC has a long setting time, e.g., larger than 1 sinusoidal cycle, which leads to transient flux oscillations.Switching an R v with a low damping effect may even induce repeated |λ j | > λ th , causing instability of the GE system.

III. ADAPTIVE ASC
This section elaborates first on the general idea of the adaptive ASC and its quantitative parameter tuning.Then, a small-signal model considering the worst-case operating point is developed to analyze the interaction between the adaptive ASC and the VC.

A. General Idea
Fig. 8 illustrates the overall diagram of the adaptive ASC and the VC.Instead of directly addressing v 1 j of the GE transformer, the flux estimation is achieved by the integral of the modulation reference to avoid using additional voltage sensors.According to Fig. 2, when the magnitude of single-phase flux exceeds λ s , the transformer core becomes saturated.Thus, the SFC and adaptive TFC are designed on a per-phase basis.The SFC employs an MAF to extract the dc flux for each phase, while the TFC incorporates a virtual adaptive resistance R v j that is proportional to transformer flux magnitude for enhancing the transient dynamics of the ASC.Further, the ASC output command is superimposed to both modulation and VC references to mitigate the adverse interaction between the ASC and the VC.
Fig. 9 shows the block diagram of the adaptive resistance R v j .To calculate the single-phase flux magnitude λ est j_mag , a transported T /4 delay, i.e., 5 ms, is used to create the fictitious quadrature signal λ est j_β of each phase flux.In this case, λ est j is equivalent to the α-axis component, called λ est j_α .However, the introduction of T /4 delay may postpone the activation of the adaptive TFC, degrading the effectiveness of transient inrush current mitigation.Thus, a compensation block for the inaccurate flux magnitude during the T /4 delay is employed.Consequently, the adaptive resistance is expressed as follows: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.where λ est j_mag and λ th denote the magnitude of estimated flux per phase and the flux threshold.t com is the enabling interval of the compensation block.λ th = 1.1 p.u. and t com = 5 ms are selected in this study.k R is a critical coefficient of the adaptive resistance R v j .
B. Parameter Tuning for Adaptive Resistance of TFC 1) Lower Limit of k R : Using a higher k R can increase R v j to dampen inrush current during transformer saturation.Yet, this adjustment also increases the output command of the TFC, leading to more severe distortion in the emulated PCC voltage.To reduce voltage distortion and limit the inrush current within a tolerable range, the lower limit of k R needs to be identified.Considering the TFC effect, the post-fault flux per phase is reshaped as The generalized primary-side voltage of the GE transformer during emulated faults is expressed as where V 1 is the rated voltage magnitude of v 1 j .f (D), α j and θ f j denote a function related to fault depth D, the phase angle, and the angle of phase jump, respectively.
The per-unit output command of the TFC is expressed as where λ j_dc is the dc flux at the instant of fault recovery.Substituting ( 9) and ( 10) into ( 8), the post-fault flux λ pt j is rewritten as where λ j_dc is given by According to Fig. 2, a tolerable inrush current is positively related to the transformer flux.It is assumed that λ est j_aw = 1.1λ s is regarded as the maximum allowable flux after enabling the TFC in this study [3], [5].To ensure λ pt j (t) ≤ 1.1λ s when t > t rec , R v j should satisfy the following condition: Following (12), as t rec undergoes changes, λ j_dc can reach its maximum value when t sag , f (D) and θ f j are determined.In this case, R v j is primarily dependent on t rec and t.
Taking the wind turbine (WT) test as an example, three types of grid faults are required to be reproduced, including the balanced fault without phase jump, the balanced fault with phase jump, and the line-to-line fault [1].For the balanced fault with/without phase jump, v 1 f j is rewritten as where α j = [0, −2π/3, 2π /3].For the line-to-line fault, taking the b-to-c fault as an example, where K f is the fault factor related to D, i.e., K f = 1 − D.
The voltage sag is accompanied by a phase jump.When D = 1, the angles of the worst case phase jump for phase b and phase c are θ f b = −π/3 and θ f c = π/3, respectively.Fig. 10 illustrates the relationship among R v j , t rec , and t during the required three testing scenarios.In each scenario, the worst case point is selected by regulating f(D) and θ f j Fig. 11.Feasible parameters for k R .[1].As a result, three conservative resistances for R v j are identified, i.e., 0.64, and 0.29 p.u., to cover three types of fault emulation, respectively.
According to (6), the lower limit of k R can be expressed as 2) Upper Limit of k R : To avoid overmodulation of the GE, the output command of the TFC should be lower than 1 p.u.Thus, the maximum k R is determined by Following ( 16) and ( 17), Fig. 11 illustrates the feasible parameters of k R .According to Fig. 9, during flux magnitude calculation after t rec , the flux magnitude λ est j_mag may be any value of [0, λ est j_aw ].Thus, to cover all possibilities of λ est j_mag and balance the trade-off between reducing inrush current and alleviating PCC voltage distortion, a compromised value of k R = 1.3, i.e., the half of the feasible zone of k R , is suggested.

C. Interaction Analysis Between Adaptive ASC and VC
1) Modeling of Adaptive ASC With Open-Loop VC: When the transformer is saturated, the mitigation effect of inrush current is primarily dependent on the TFC.For simplicity, the SFC dynamics and the nonlinear dynamics of TFC within t com are neglected.Additionally, three single-phase adaptive ASC controls are symmetrical and uncoupled among three phases.In contrast, in each phase j, the nonlinearity of ASC introduced by the adaptive TFC may lead to asymmetrical and coupled dynamics between phase j(α-axis) and its fictitious β axis [20].Therefore, the single-phase small-signal modeling analysis is conducted.Considering the complexity of fictitious αβ-frame modeling due to the asymmetrical dynamics, the fictitious dq-frame modeling method is used to facilitate the small-signal linearization.Fig. 12 shows the diagram of the equivalent flux magnitude calculation in the fictitious   dq frame.The adaptive resistance per phase is given by In the worst case scenario, λ est j_mag0 is up to λ p = 2.5 p.u. Accordingly, around the operating points λ est j_d0 and λ est j_q0 , the small-signal representation of R v j can be linearized as According to Fig. 8, the modulation reference per phase in the fictitious dq frame is expressed as Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.Following (19), the small-signal representation of ( 20) is expressed as where bold letters are used to denote the vector set and transfer matrixes, e.g., R vj_tot is a two-by-two virtual resistance matrix in the fictitious dq frame.R v j_dd , R v j_dq , R v j_qd , and R v j_qq are expressed as follows: where R v j0 is the operating point of the virtual resistance, which can be derived by R v j0 = k R (λ est j_mag0 − λ th ).Fig. 13 shows the block diagram of the fictitious dq-frame model for the GE using the adaptive ASC with an open-loop VC per phase.I is a two-by-two-unit diagonal matrix.G d and G p_asc are the matrixes for time delay and control plant blocks, which are expressed as follows:  The closed-loop gain G clj_asc of the ASC is derived as 2) Modeling of Closed-Loop VC Without Adaptive ASC: To maintain consistency, the VC is also modeled in the fictitious dq frame.Fig. 14 depicts the block diagram of the small-signal model for the GE using the VC without ASC, where Z iv1 and Y m are expressed as follows: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.Thus, the control plant G p_vc of the VC can be expressed as The closed-loop gain G clj_vc of the VC is given by 3) Modeling of Closed-Loop VC With Adaptive ASC: Fig. 15 shows the small-signal model of the GE utilizing the closed-loop VC with the adaptive ASC.The closed-loop gain G clj_o_p of the overall system is expressed as 4) Analysis of Poles and Zeros: Fig. 16(a) shows the poles of G clj_asc .Compared to the conventional ASC with an open-loop VC, the adaptive dynamics of R v j lead to the damping ratio ξ of some poles lower than 1 when k R < 0.9.Nevertheless, using the designed k R = 1.3 can provide sufficient damping (ξ = 1) to mitigate inrush current during transformer saturation.Fig. 16(b) shows the poles and zeros of G clj_vc , where the GE system is stable when K pv < 0.8 p.u. Fig. 17 depicts the poles and zeros of G clj_o_p .Compared to Fig. 16(a), Fig. 17(a) shows that adding the closed-loop VC weakens the damping effect of the adaptive ASC.Even so, the damping ratios of poles in the adaptive ASC (e.g., ξ = 0.77) are higher than that in the conventional ASC (e.g., ξ = 0.14).Using the designed k R = 1.3 ensures sufficient damping provision.Compared to Fig. 16(b), Fig. 17(b) shows that although adding the adaptive ASC introduces additional low-frequency poles, they have a minor impact on the system stability.

IV. EXPERIMENTAL VALIDATION A. Setup Description
Fig. 18 illustrates a CHIL testing setup utilizing dual RT Boxes.Taking the megawatt modular multilevel converter (MMC)-based GE with three single-phase transformers as an example, the control algorithms are implemented in the bottom RT Box, while the top RT Box simulates the primary circuits of the MMC with full-bridge submodules (SMs) and a grid-following device under test (DUT).Table II shows the partial parameters for realistic and simulated GEs.

B. Testing Results
Figs. 19-21 show the balanced fault emulation results for the GE without connecting a DUT.Fig. 19 compares the behavior of the GE using open-loop VC with or without ASC.In Fig. 19(a), the transformer becomes saturated without ASC, leading to an inrush current of up to 3 p.u., which would trip the GE in practice.In Fig. 19(b), using the conventional flux control effectively mitigates the inrush current, which unfortunately leads to the abnormal PCC voltage.In contrast, the proposed adaptive ASC not only mitigates transformer saturation, but also has a minor influence on the PCC voltage, as shown in Fig. 19(c).
Fig. 20 validates the analysis of the interaction between the closed-loop VC and the conventional ASC.In Fig. 20(a), the transformer is saturated without ASC, resulting in an inrush current of up to 4.2 p.u.By contrast, Fig. 20(b) shows that incorporating the conventional ASC can mitigate the Authorized licensed use limited to the terms the applicable license agreement with IEEE.Restrictions apply.inrush current.However, this addition leads to repeated flux oscillations.In Fig. 20(c), increasing the proportional gain K pv of the VC helps dampen the low-frequency flux oscillations.However, the transient inrush current remains as high as 2.8 p.u. and cannot be eliminated.Fig. 21 illustrates the impact of k R on both the mitigation of inrush current and the distortion in the PCC voltage when using the adaptive ASC and a closed-loop VC.Fig. 21(a) shows that even with a small k R value of 0.3, the proposed ASC can mitigate the steady-state inrush current, whereas it provides only limited damping for the transient inrush current.In

V. CONCLUSION
This article analyzes the issues of conventional flux control and proposes an adaptive ASC to mitigate its interaction with the VC in GEs.Experimental test results confirm that the adaptive ASC with the designed virtual resistance effectively mitigates transient inrush current and prevents significant distortion in the emulated PCC voltage.The interaction between the VC and the ASC arises from both controllers aiming for conflicting voltage regulation objectives.This issue can be addressed by superimposing the ASC output command to both modulation and VC references.

Fig. 1 .
Fig. 1.Block diagram of the grid emulation system utilizing a general flux control.

Fig. 3 .
Fig. 3. Impact of conventional TFC on the emulated PCC voltage.

Fig. 4 .
Fig. 4. Block diagram of the small-signal model with a closed-loop VC and the conventional ASC.

Fig. 5 .
Fig. 5. Poles and zeros of G cl_asc_con and G cl_vc_con .(a) Conventional ASC with an open-loop VC.(b) Closed-loop VC without the conventional ASC.

Fig. 6 .Fig. 7 .
Fig. 6.Poles and zeros of G cl_o_con for conventional ASC with a closed-loop VC.(a) Impact of R v when K pv = 0.1 p.u.(b) Impact of K pv when R v = 0.8 p.u.

Fig. 14 .
Fig. 14.Block diagram of the small-signal model with the VC.

Fig. 15 .
Fig. 15.Block diagram of the small-signal model with the adaptive ASC and the closed-loop VC.

Fig. 16 .
Fig. 16.Poles and zeros of G clj_asc and G clj_vc .(a) Adaptive ASC with an open-loop VC.(b) Closed-loop VC without the adaptive ASC.

Fig. 17 .
Fig. 17.Poles and zeros of G clj_o_p for the closed-loop VC with the adaptive ASC.(a) Impact of k R when K pv = 0.1 p.u.(b) Impact of K pv when k R = 1.3.

Fig. 19 .
Fig. 19.Balanced fault emulation results for the GE using an open-loop VC with or without ASC.(a) Without ASC.(b) With conventional ASC and R v = 0.65 p.u. (c) With adaptive ASC and k R = 1.3.

Fig. 20 .
Fig. 20.Balanced fault emulation results for the GE using a closed-loop VC with or without the conventional ASC.(a) Without ASC and K pv = 0.1 p.u.(b) With the conventional ASC and K pv = 0.1 p.u., R v = 0.65 p.u. (c) With the conventional ASC and K pv = 0.7 p.u., R v = 0.65 p.u.
Fig. 21(b) and Fig. 21(c), increasing k R can enhance the damping to mitigate inrush current.Yet, this improvement comes at the cost of more severe distortion in the PCC voltage.Thus, a compromise value of k R = 1.3 is finally utilized in this study, aligning with the theoretical analysis.

Fig. 22
Fig. 22 demonstrates the feasibility of the proposed adaptive ASC with k R = 1.3 in the GE considering the DUT connection.Three types of fault scenarios are successfully reproduced, i.e., the balanced fault without phase jump, the balanced fault with phase jump, and the line-to-line fault including the simultaneous voltage sag and phase jump.The adaptive ASC effectively limits the inrush current within 1 p.u. and reduces the PCC voltage distortion after fault clearance.

TABLE II PARAMETERS
OF THE MEGAWATT MMC-BASED GES