Power Hardware-in-the-Loop-Based Performance Analysis of Different Converter Controllers for Fast Active Power Regulation in Low-Inertia Power Systems

Future electrical power systems will be dominated by power electronic converters, which are deployed for the integration of renewable power plants, responsive demand, and different types of storage systems. The stability of such systems will strongly depend on the control strategies attached to the converters. In this context, laboratory-scale setups are becoming the key tools for prototyping and evaluating the performance and robustness of different converter technologies and control strategies. The performance evaluation of control strategies for dynamic frequency support using fast active power regulation (FAPR) requires the urgent development of a suitable power hardware-in-the-loop (PHIL) setup. In this paper, the most prominent emerging types of FAPR are selected and studied: droop-based FAPR, droop derivative-based FAPR, and virtual synchronous power (VSP)-based FAPR. A novel setup for PHIL-based performance evaluation of these strategies is proposed. The setup combines the advanced modeling and simulation functions of a real-time digital simulation platform (RTDS), an external programmable unit to implement the studied FAPR control strategies as digital controllers, and actual hardware. The hardware setup consists of a grid emulator to recreate the dynamic response as seen from the interface bus of the grid side converter of a power electronic-interfaced device (e.g., type-IV wind turbines), and a mockup voltage source converter (VSC, i.e., a device under test (DUT)). The DUT is virtually interfaced to one high-voltage bus of the electromagnetic transient (EMT) representation of a variant of the IEEE 9 bus test system, which has been modified to consider an operating condition with 52% of the total supply provided by wind power generation. The selected and programmed FAPR strategies are applied to the DUT, with the ultimate goal of ascertaining its feasibility and effectiveness with respect to the pure softwarebased EMT representation performed in real time. Particularly, the time-varying response of the active power injection by each FAPR control strategy and the impact on the instantaneous frequency excursions occurring in the frequency containment periods are analyzed. The performed tests show the degree of improvements on both the rate-of-change-of-frequency (RoCoF) and the maximum frequency excursion (e.g., nadir).


Motivation behind the Proposed PHIL Setup
Due to the societal ambition regarding an accelerated energy transition in several electrical power systems worldwide, a progressive technological upgrade (i.e., massive deployment of different types of power electronic converters) is taking place, occurring more prominently in the generation mix. To date, several studies have envisioned or are currently investigating futuristic topologies and operating conditions with shares from decoupled renewable power generation (e.g., type-IV wind turbines) equal to or higher than 50% [1][2][3]. One expected issue of high concern that is an intensive research focus of this upgrading is the degradation of the time-varying frequency excursions occurring in the frequency containment period, especially when large active power imbalances occur [4]. Specifically, undesirable values of RoCoF and the nadir occur within a few ms from the time of occurrence of an active power imbalance without the incorporation and action of FAPR on sources that can eventually provide dynamic frequency support [4][5][6][7].
An FAPR control strategy is theoretically expected to adjust the active power output in less time than the typical timeframe of reaction by governor systems attached to conventional power plants. This feature has been acknowledged in several recent publications as a preferred means for quickly bound dynamic frequency deviations. This is motivating a very broad and ongoing open discussion in the power engineering scientific community towards the definition of proper schemes and performance requirements for testing different types of FAPR strategies [8,9]. Interested readers are referred to [10] for comprehensive review of the feasible boundaries for FAPR, taking into account the dilemma concerning the energy needed to perform FAPR vs. the time for recovery after the action of FAPR. The FAPR control strategies selected for study in this paper can use one of the following three options: (i) droop-based (proportional) strategies depending on measured instantaneous frequency deviations [11][12][13][14]; (ii) frequency derivative-based strategies [15][16][17]; and (iii) virtual synchronous power (VSP) strategies. Each strategy can be customized to perform based on measured instantaneous frequency deviations or measured instantaneous variations of active power imbalances [18][19][20][21][22]. The VSP controller is much versatile compared to the droop and derivative controllers. The objective of the VSP controller remains the same as that of the droop and derivative controller, which is to improve the nadir frequency and RoCoF. However, this controller provides a single solution, simultaneously influencing both the nadir and RoCoF. In this approach, the input signal of the FAPI controller is the power deviation instead of frequency in other methods. The active power loop control on VSP has a second-order characteristic, which has the simultaneous influence of damping and inertia emulation of the system [23,24].
Current efforts are directed towards the use of advanced simulation and co-simulation techniques for the offline study and design of the above-indicated FAPR strategies for power electronic energy-based generation. A common drawback of simulation-based studies is that they may not completely capture the intrinsic dynamic features of real (e.g., vendor-specific) converters. Hence, the focus of this paper is on the implementation and use of a power hardware-in-the-loop (PHIL) setup for the evaluation of FAPR control strategies for fast and effective dynamic frequency support in future low-inertia sustainable electrical power systems. The proposed PHIL setup combines a real-time simulation platform (RTDS) with a mockup converter. This enables the proposed PHIL setup to select and focus on the most relevant aspects for efficient and confident testing of different FAPR control strategies. The urgent need for this versatility has been pointed out in several publications, and is related to the need to extensively use PHIL in the research of power electronic converter-dominated electrical power systems [25][26][27]. The detailed modeling and simulation of the studied system is done based on the advanced functionalities of RTDS. Any power electronic-interfaced device (e.g., a type-IV wind turbine (WT)) can be partly modeled within RTDS, whereas the power electronic converter to be investigated (e.g., the grid side converter) is a physical device that interfaces to the RTDS through a special communication scheme based on the Aurora protocol. Unlike existing PHIL setups for the study of other control functions (e.g., voltage regulation), the proposed scheme enables a versatile and stable PHIL setup, and also allows for an easy implementation of any user-defined FAPR in a so-called a real-time target processor [28][29][30][31][32]. This allows for the evaluation of the feasibility and effectiveness of FAPR when acting on a real/mockup converter. In addition to the useful information that the proposed PHIL setup provides regarding the performance of FAPR strategies, it also decreases the period of simulation Energies 2021, 14, 3274 3 of 15 development (i.e., low latency, in the order of a few ms), prevents simulation inaccuracy, and decreases the risk of practical implementation (e.g., there is no need for interfacing through analogue/digital cards). These are among the major research challenges in the development of PHIL, as acknowledged in [27][28][29][33][34][35].
The subsequent parts of the story shown in this paper are structured as follows. The proposed PHIL test setup for the testing of FAPR strategies is presented and discussed in Section 2. A concise overview of the selected FAPR strategies under study are presented in Section 3. Section 4 provides information about the implementation and testing of FAPR controllers. A summary of the findings and an outline for subsequent research are given in Section 5.

Conceptual Overview of the Proposed PHIL Setup
The proposed PHIL setup is illustratively represented in Figure 1. The setup involves the following components:  Figure 2 depicts a descriptive figure of various terms and components involved in the proposed PHIL setup. The stepwise illustration of PHIL-based control strategy implementation and testing is performed as follows:

Working Principle of the PHIL Setup
1. The real-time EMT representation of the studied system is performed in RSCAD [22 and runs in NovaCor, which can be interfaced with external physical devices (e.g. DUT). 2. The control strategies to subordinate the grid emulator and the DUT are implemented using the RTT. The implementation is done through a combined environment of Triphase (Triphase Technologies, Bangalore, India) and Matlab/Simulink (MathWorks, Natick, MA, USA). The RTT and NovaCor exchange signals (e.g., waveforms of voltages and currents) through an optical fiber. 3. The RTDS sends setpoints to RTT. These setpoints govern the instantaneous voltage of the grid emulator as well as the setpoints for the output current of the DUT. 4. The Aurora protocol is applied for the bidirectional transfer of information between RTDS and the RTT. The RTT has a circular inter-process communication (CIPC) buffer. The CIPC constitutes a distributed strategy for the sharing of memory through ring buffers. This facilitates the exchange of information of simulations from Matlab/Simulink control and signal processing models that are compiled in the RTT Each buffer has a writer block that writes data into the buffer, from which multiple readers can read out the data. The Simulink model has blocks to perform write/read bus definitions. The bus definitions contain the names and sizes of the signals extracted from the read block. It should be ensured that the same bus name previously defined as the input/output bus name is used in the write/read blocks. In this way, 256 signals can be exchanged between the RTT and the RTDS.

NovaCor chassis of the RTDS [20]
: This is a high-performance multicore processor used for the modeling and real-time simulations of power electronic converted dominated power systems. Additionally, the Aurora protocol is applied to provide a communication interface between the chassis and the RTT, which are linked through a dedicated optical fiber.
Real-time target (RTT): This element constitutes a PC-based (multi-core) module working with a real-time operating system (e.g., Linux/Xenomai). It is used to enable the exchange of signals between the NovaCor chassis and the actual hardware used (i.e., for grid emulation and DUT). The studied FAPR control strategies are programmed in the RTT.
Grid Emulator: This component has a back-to-back layout, comprising a so-called front-end converter unit (to regulate the DC voltage) and a VSC unit that is used to create dynamic signals (i.e., time-varying waveforms of smaller amplitude) that resemble the simulated instantaneous waveforms (e.g., voltage, currents) obtained by using the NovaCor chassis.
DUT: This is a small-sized (15 kW) VSC which can represent the grid side converter of a decoupled (type-IV) WT. The FAPR is programmed in the RTT and acts on the DUT in real time. The inner and outer controllers of this DUT can be modified and tuned to resemble the generic models used in the NovaCor chassis. Therefore, this component is used in this paper to quantitatively corroborate the findings from pure software-based (RSCAD) simulation studies.  1.
The real-time EMT representation of the studied system is performed in RSCAD [22] and runs in NovaCor, which can be interfaced with external physical devices (e.g., DUT).

2.
The control strategies to subordinate the grid emulator and the DUT are implemented using the RTT. The implementation is done through a combined environment of Triphase (Triphase Technologies, Bangalore, India) and Matlab/Simulink (MathWorks, Natick, MA, USA). The RTT and NovaCor exchange signals (e.g., waveforms of voltages and currents) through an optical fiber. 3.
The RTDS sends setpoints to RTT. These setpoints govern the instantaneous voltage of the grid emulator as well as the setpoints for the output current of the DUT.

4.
The Aurora protocol is applied for the bidirectional transfer of information between RTDS and the RTT. The RTT has a circular inter-process communication (CIPC) buffer. The CIPC constitutes a distributed strategy for the sharing of memory through ring buffers. This facilitates the exchange of information of simulations from Matlab/Simulink control and signal processing models that are compiled in the RTT. Each buffer has a writer block that writes data into the buffer, from which multiple readers can read out the data. The Simulink model has blocks to perform write/read bus definitions. The bus definitions contain the names and sizes of the signals extracted from the read block. It should be ensured that the same bus name previously defined as the input/output bus name is used in the write/read blocks. In this way, 256 signals can be exchanged between the RTT and the RTDS.

5.
The simulated instantaneous voltage from the system model running in RSCAD-RTDS is given to the RTT to reproduce the desired voltage waveform (with the same frequency but with smaller amplitude) at the AC side (i.e., the point of interconnection of the DUT) of the VSC of the grid emulator. 6.
Since the RTDS and the RTT run simultaneously in real time, there exists the freedom to choose RSCAD or Simulink to implement each of the selected FAPR strategies. The current reference signals are affected by the implemented FAPR strategies. The VSC (DUT), which is connected to grid emulator with virtual PCC conditions injects active power based on the modulated active current reference (I d_ref ).
Energies 2021, 14, x FOR PEER REVIEW (DUT), which is connected to grid emulator with virtual PCC conditions inject power based on the modulated active current reference (Id_ref).

Description of FAPR Control Strategies under Study
The selected FAPR control strategies are briefly presented in this section. Am selected strategies are the:

Description of FAPR Control Strategies under Study
The selected FAPR control strategies are briefly presented in this section. Among the selected strategies are the: Figure 3 shows the droop-based FAPR's scheme. The input f constitutes the measured signal of time-varying frequency at a point of interface between the power plant and the system. Figure 1 illustrates that this signal can be obtained through a phasor measurement unit (PMU). The PMU is used to measure the frequency; it is taken from the RSCAD library. The PMU block is composed of a low-pass filter, sampling circuit, time-synchronized signal, and processing unit. Before processing the input signal for the estimation of its phasor value, it is filtered and sampled to overcome the problem of aliasing. It uses the FFT algorithm for its phasor estimation. The estimated phasor value consists of the magnitude, phase, frequency, and rate of change of frequency of its input signal. The instantaneous value of f is continuously contrasted with a fixed setpoint (e.g., with 50 Hz taken as the reference frequency f ref ). Next, the resulting error (∆f) is fed to a control loop that comprises a dead band and a gain (K p ). Both elements are tuned based on system-dependent dynamic properties.  The signal Δf is amplified by Kp. The output signal ΔPref of FAPR is a supplementary signal attached to the other active power control loop of a grid side converter. ΔPre performs exclusively when an active power imbalance occurs in the system. The drawback of the droop-based FAPR strategy resides in the slow initial response, which could be attributed to low frequency error values. Figure 4 overviews the FAPR based on a droop-derivative hybrid control approach. The setpoint fref and the signals f and Δf are obtained as indicated in Section 3.1. Δf is passed through 2 parallel control loops: The first is a droop controller, which is described in the previous section. The actuation of the droop controller is active for the entire frequency curtailment period. The second loop is a derivative control, whose output is a derivative gain of the frequency error signal. The derivative controller is active only for the initial few seconds and lasts until the frequency signal reaches the maximum allowed frequency deviation. The combined effect of the outputs of the droop-based loop and derivativebased loop produces ΔPref, which modulates the active power response of the WT to improve both the RoCoF and maximum frequency deviation (e.g., the nadir). The signal ∆f is amplified by K p . The output signal ∆P ref of FAPR is a supplementary signal attached to the other active power control loop of a grid side converter. ∆P re performs exclusively when an active power imbalance occurs in the system. The drawback of the droop-based FAPR strategy resides in the slow initial response, which could be attributed to low frequency error values. ∆f is passed through 2 parallel control loops: The first is a droop controller, which is described in the previous section. The actuation of the droop controller is active for the entire frequency curtailment period. The second loop is a derivative control, whose output is a derivative gain of the frequency error signal. The derivative controller is active only for the initial few seconds and lasts until the frequency signal reaches the maximum allowed frequency deviation. The combined effect of the outputs of the droop-based loop and derivative-based loop produces ∆P ref , which modulates the active power response of the WT to improve both the RoCoF and maximum frequency deviation (e.g., the nadir).

The Droop-Derivative Based FAPR Strategy
The droop derivative FAPR strategy should be tuned (taking into account systemdependent dynamic properties) to cause a prominent ramping of the active power output at the AC side of a grid side converter whenever an over/under-frequency event occurs. The parameters of the droop control loop are described in Section 3.1. The parameters of the derivative control loop are shown in Figure 2, and involve the sequential reaction of a LPF (low-pass filter), a washout filter, and another gain factor (K d ). previous section. The actuation of the droop controller is active for the entire frequency curtailment period. The second loop is a derivative control, whose output is a derivative gain of the frequency error signal. The derivative controller is active only for the initial few seconds and lasts until the frequency signal reaches the maximum allowed frequency deviation. The combined effect of the outputs of the droop-based loop and derivativebased loop produces ΔPref, which modulates the active power response of the WT to improve both the RoCoF and maximum frequency deviation (e.g., the nadir).

Low-pass filter Washout
Filter The droop derivative FAPR strategy should be tuned (taking into account systemdependent dynamic properties) to cause a prominent ramping of the active power output at the AC side of a grid side converter whenever an over/under-frequency event occurs. The parameters of the droop control loop are described in Section 3.1. The parameters of the derivative control loop are shown in Figure 2, and involve the sequential reaction of a LPF (low-pass filter), a washout filter, and another gain factor (Kd). Figure 5 depicts the VSP controller, which measures the power required at the PCC to the reference power available at the bus. In this control scheme is a damping coefficient, and n constitutes the natural frequency for implementing this second-order function.  Figure 5 depicts the VSP controller, which measures the power required at the PCC to the reference power available at the bus. In this control scheme ζ is a damping coefficient, and ω n constitutes the natural frequency for implementing this second-order function. As shown in Figure 6, the power going out from the node bus ( _bus) reacts to the grid when there is a load disturbance, whereas _wt will not be instantaneously altered. This difference will be taken as error, ΔP, in the VSP control block (cf., Figure 5), which is further passed through a dead-band block, and later through a second-order transfer function. The output of this block defines the duty cycle of a PWM controller. Hence, the limits of this block are between 0 and 0.9.  Figure 7 describes the connection diagram of a battery power management system (BPMS), which has a battery energy storage system (BESS), and a DC-DC converter that operates bi-directionally. The BESS is integrated to the DC link of VSC converter through the DC-DC converter. The main function of the BPMS is to appropriately discharge the battery as per the pulse generated from the VSP control block. The state of the battery charge is not relevant to this study, and will be addressed in a future publication. The storage is used to inject active power to emulate the inertia. It has been assumed that during the activation of FAPR control, the battery is fully charged. The function of machine side converter is to convert the variable AC power generated by the wind turbine into the DC power. It also tracks the maximum power point of wind-generated power. As shown in Figure 6, the power going out from the node bus (P_ bus ) reacts to the grid when there is a load disturbance, whereas P_wt will not be instantaneously altered. This difference will be taken as error, ∆P, in the VSP control block (cf., Figure 5), which is further passed through a dead-band block, and later through a second-order transfer function. The output of this block defines the duty cycle of a PWM controller. Hence, the limits of this block are between 0 and 0.9. As shown in Figure 6, the power going out from the node bus ( _bus) reacts to the grid when there is a load disturbance, whereas _wt will not be instantaneously altered. This difference will be taken as error, ΔP, in the VSP control block (cf., Figure 5), which is further passed through a dead-band block, and later through a second-order transfer function. The output of this block defines the duty cycle of a PWM controller. Hence, the limits of this block are between 0 and 0.9.  Figure 7 describes the connection diagram of a battery power management system (BPMS), which has a battery energy storage system (BESS), and a DC-DC converter that operates bi-directionally. The BESS is integrated to the DC link of VSC converter through the DC-DC converter. The main function of the BPMS is to appropriately discharge the battery as per the pulse generated from the VSP control block. The state of the battery charge is not relevant to this study, and will be addressed in a future publication. The storage is used to inject active power to emulate the inertia. It has been assumed that during the activation of FAPR control, the battery is fully charged. The function of machine side converter is to convert the variable AC power generated by the wind turbine into the DC power. It also tracks the maximum power point of wind-generated power.  Figure 7 describes the connection diagram of a battery power management system (BPMS), which has a battery energy storage system (BESS), and a DC-DC converter that operates bi-directionally. The BESS is integrated to the DC link of VSC converter through the DC-DC converter. The main function of the BPMS is to appropriately discharge the battery as per the pulse generated from the VSP control block. The state of the battery charge is not relevant to this study, and will be addressed in a future publication. The storage is used to inject active power to emulate the inertia. It has been assumed that during the activation of FAPR control, the battery is fully charged. The function of machine side converter is to convert the variable AC power generated by the wind turbine into the DC power. It also tracks the maximum power point of wind-generated power. the DC-DC converter. The main function of the BPMS is to appropriately discharge the battery as per the pulse generated from the VSP control block. The state of the battery charge is not relevant to this study, and will be addressed in a future publication. The storage is used to inject active power to emulate the inertia. It has been assumed that during the activation of FAPR control, the battery is fully charged. The function of machine side converter is to convert the variable AC power generated by the wind turbine into the DC power. It also tracks the maximum power point of wind-generated power.

Experimental Testing of FAPR Control Strategies through PHIL
The widely used IEEE 9-bus system is modified by reducing the share of synchronous generation and increasing the wind power share. A total of 52% generation is contributed by renewable energy sources (RES), as depicted in Figure 8. Further, full-scale Type-4 WT models with functional switching converters are used. The type-IV wind generators interfaced with the back-to-back voltage source converters (VSCs) are the most commonly employed configuration of the wind power plant. The type-IV model is taken as a representative form of generation technology due to the advantages that this technology introduces, e.g., better low voltage ride-through (LVRT) capabilities, full-speed ratio control, absence of gear box, etc. Additionally, as to be presented, control modifications are performed in the grid-side voltage source converter (VSC). The developed test setup is generic for the testing of other converter control strategies reported in the literature. It is also applicable to other types of power electronic-interfaced wind turbines. This aids in understanding the impact of additional active power extraction in the frequency containment stage. Please note that the emulation of the mechanical part and most of the electrical parts of the WT model is developed in RSCAD, whereas the DUT converter emulates the electrical characteristics of the gird side converter of the full-scale type-IV WT. Table 1 presents the steady-state profile before the occurrence of an active power imbalance in the developed and simulated variant of the IEEE 9 bus system with 52% wind share. The total level of inertia is reduced because of the decommissioning of conventional plants with synchronous generators.
To test the FAPR control strategies, a generation-load imbalance had to be created. More specifically, an under-frequency event was created. To this aim, a sudden load was created at bus 8. After testing the impact of load frequency variations at various busses, it was found that the load generation imbalance at bus 8 had a greater impact on buses 2 and 3, where the type-IV wind power plant was connected. A 5% increase in load can be considered to present a large load generation imbalance for the study of frequency stability in the selected test system. Besides, it is assumed that the FAPR strategy performs within 10 s [7].
The parameters of the FAPR controllers were tuned by performing the sensitivity analysis illustrated in Figure 9. The value of these parameters depends on the level of renewable power penetration, the amount of active power to be injected, and the dynamic (time) evolution of RoCoF and the nadir of the measured frequency response(s). The following parameters were obtained: the dead-band of frequency was 2% for all FAPR strategies; K p = 1.5 for droop-based FAPR (cf. Figure 3); K p = 1.9, K d = 0.4, G = 8 × 10 5 , F cut-off = 0.5 Hz (lead-lag filter), and T w = 1 × 10 −5 s (washout filter) for the droop-derivative-based FAPR (cf. Figure 4); and K v = 1.25, ζ = 0.35, and ω n = 70.71Hz for VSP-based FAPR (cf. Figure 5).
are performed in the grid-side voltage source converter (VSC). The developed test setup is generic for the testing of other converter control strategies reported in the literature. It is also applicable to other types of power electronic-interfaced wind turbines. This aids in understanding the impact of additional active power extraction in the frequency containment stage. Please note that the emulation of the mechanical part and most of the electrical parts of the WT model is developed in RSCAD, whereas the DUT converter emulates the electrical characteristics of the gird side converter of the full-scale type-IV WT. Table 1 presents the steady-state profile before the occurrence of an active power imbalance in the developed and simulated variant of the IEEE 9 bus system with 52% wind share. The total level of inertia is reduced because of the decommissioning of conventional plants with synchronous generators.  To test the FAPR control strategies, a generation-load imbalance had to be created. More specifically, an under-frequency event was created. To this aim, a sudden load was created at bus 8. After testing the impact of load frequency variations at various busses, it was found that the load generation imbalance at bus 8 had a greater impact on buses 2 and 3, where the type-IV wind power plant was connected. A 5% increase in load can be considered to present a large load generation imbalance for the study of frequency stability in the selected test system. Besides, it is assumed that the FAPR strategy performs within 10 s [7]. The parameters of the FAPR controllers were tuned by performing the sensitivity analysis illustrated in Figure 9. The value of these parameters depends on the level of renewable power penetration, the amount of active power to be injected, and the dynamic (time) evolution of RoCoF and the nadir of the measured frequency response(s). The following parameters were obtained: the dead-band of frequency was 2% for all FAPR strategies; Kp = 1.5 for droop-based FAPR (cf. Figure 3); Kp = 1.9, Kd = 0.4, G = 8 × 10 5 , Fcut-off = 0.5 Hz (lead-lag filter), and Tw = 1 × 10 −5 s (washout filter) for the droop-derivative-based FAPR (cf. Figure 4); and Kv = 1.25, ζ = 0.35, and n = 70.71Hz for VSP-based FAPR (cf. Figure 5).

Select inverter interfaced RES
Step  Figure 9. Procedure for parametric sensitivity-based tuning of FAPR Figure 10 shows the response the system's generators and the resulting frequency dynamics. Note in Figure 10 that the injection of active power by the wind generators remains constant because of the absence of the FAPR strategy. In order to test the FAPR control strategies, the following steps were performed using the proposed PHIL setup (cf.   Figure 10 shows the response the system's generators and the resulting frequency dynamics. Note in Figure 10 that the injection of active power by the wind generators remains constant because of the absence of the FAPR strategy. In order to test the FAPR control strategies, the following steps were performed using the proposed PHIL setup (cf. Figure 11): 1.
The RTDS Nova Core was used to compile and run the system under study (cf. Figure 8).

2.
The time-varying samples of voltage and frequency (e.g., measured at bus 7 in Figure 8) were transferred from RTDS to the RTT by using the Aurora protocol. These voltage and frequency values were taken as a reference to create the voltage waveform of the grid emulator, which is connected to the AC side of the DUT.

3.
The active power and reactive power at the AC side of the DUT were controlled by I d_ref and I q_ref . 1. The RTDS Nova Core was used to compile and run the system under study (cf. Figure  8). 2. The time-varying samples of voltage and frequency (e.g., measured at bus 7 in Figure  8) were transferred from RTDS to the RTT by using the Aurora protocol. These voltage and frequency values were taken as a reference to create the voltage waveform of the grid emulator, which is connected to the AC side of the DUT. 3. The active power and reactive power at the AC side of the DUT were controlled by Id_ref and Iq_ref.     The time-varying injections of active power by the selected FAPR control strategies and their implications for dynamic frequency performance are plotted in Figure 13 and Figure 14, respectively. The degree of improvement in frequency dynamics depends on the speed of adjustment and the amount of power injected into the grid. The droop derivative-based FAPR's power injection rise time was less than that of the only droopbased control strategy. Hence, the former was more effective in improving both the nadir and frequency slope before the nadir than the latter. Unlike the droop and droop The time-varying injections of active power by the selected FAPR control strategies and their implications for dynamic frequency performance are plotted in Figures 13 and 14, respectively. The degree of improvement in frequency dynamics depends on the speed of adjustment and the amount of power injected into the grid. The droop derivative-based FAPR's power injection rise time was less than that of the only droop-based control strategy. Hence, the former was more effective in improving both the nadir and frequency slope before the nadir than the latter. Unlike the droop and droop derivative-based FAPR control strategies, the VSP-based FAPR-based control strategy was independent of frequency measurement. Hence, the response of VSP-based FAPR was faster and exhibited lower rise time of the WT's time-varying active power injection (cf., Figure 13). Therefore, the impact of the VSP-based FAPR on frequency dynamics improvement was noticeably better than the impact of droop-based FAPR and derivative-based FAPR, as shown in Figure 14.  It is worth pointing out that the duration of droop derivative-based FAPR was assumed to be 10 s. From Figures 15 and 16 it can be seen that droop-derivative-based FAPR caused a temporary increase (lasting around 2 s) in the output power of WG1 of up to 30% above its nominal output power (needed for effective frequency support). Next, the threshold for active power adjustment by droop derivative-based FAPR was reduced  It is worth pointing out that the duration of droop derivative-based FAPR was assumed to be 10 s. From Figures 15 and 16 it can be seen that droop-derivative-based FAPR caused a temporary increase (lasting around 2 s) in the output power of WG1 of up to 30% above its nominal output power (needed for effective frequency support). Next, the threshold for active power adjustment by droop derivative-based FAPR was reduced (cf., small figure inside Figure 15) such that the frequency support can last for 8-10 s, Figure 14. Dynamics of frequency due to FAPR controllers. Figures 15 and 16 illustrate the response of WG1 equipped with droop-derivativebased FAPR, taking into account the condition of wind energy extraction above the nominal power during an under-frequency event. Figure 15 corresponds to the variation of the electrical power output due the activation and deactivation of the droop derivative-based FAPR. The small figure inside Figure 15 illustrates the variation of the output signal of the droop derivative-based FAPR. Figure 16 corresponds to the variation of mechanical power over time (considered as an indication of the variation of the stored mechanical energy).

Conclusions
This paper presents a study based on EMT real-time simulations and a proposed PHIL test setup for the testing of mitigation measures for frequency stability. The emphasis was on FAPR control strategies attached to the VSC unit that interfaced a type-IV WT with a power system. The use of local storage (i.e., taking electrical batteries as an example) was one assumption motivated by several studies from the current state of the art. Other alternatives (e.g., those more convenient from a techno-economic point of view) are currently being explored and will be reported in a subsequent article. For the studied system (with a variant of the IEEE 9 bus system with 52% supply from wind power plants), by performing EMT simulations and PHIL testing of FAPR with RSCAD, it was

Conclusions
This paper presents a study based on EMT real-time simulations and a proposed PHIL test setup for the testing of mitigation measures for frequency stability. The emphasis was on FAPR control strategies attached to the VSC unit that interfaced a type-IV WT with a power system. The use of local storage (i.e., taking electrical batteries as an example) was one assumption motivated by several studies from the current state of the art. Other alternatives (e.g., those more convenient from a techno-economic point of view) are currently being explored and will be reported in a subsequent article. For the studied system (with a variant of the IEEE 9 bus system with 52% supply from wind power plants), by performing EMT simulations and PHIL testing of FAPR with RSCAD, it was It is worth pointing out that the duration of droop derivative-based FAPR was assumed to be 10 s. From Figures 15 and 16 it can be seen that droop-derivative-based FAPR caused a temporary increase (lasting around 2 s) in the output power of WG1 of up to 30% above its nominal output power (needed for effective frequency support). Next, the threshold for active power adjustment by droop derivative-based FAPR was reduced (cf., small figure inside Figure 15) such that the frequency support can last for 8-10 s, during which synchronous generation should be able to perform primary frequency control. Note also that the mechanical power (and also the kinetic energy) decreased at a constant rate after the activation of droop-derivative-based FAPR, causing a continuous reduction in the output power of WG1. Once the droop derivative-based FAPR was deactivated (around

Conclusions
This paper presents a study based on EMT real-time simulations and a proposed PHIL test setup for the testing of mitigation measures for frequency stability. The emphasis was on FAPR control strategies attached to the VSC unit that interfaced a type-IV WT with a power system. The use of local storage (i.e., taking electrical batteries as an example) was one assumption motivated by several studies from the current state of the art. Other alternatives (e.g., those more convenient from a techno-economic point of view) are currently being explored and will be reported in a subsequent article. For the studied system (with a variant of the IEEE 9 bus system with 52% supply from wind power plants), by performing EMT simulations and PHIL testing of FAPR with RSCAD, it was observed that fast active power injection (lower rise time) and the amount of available energy were the two key factors influencing the effectiveness of a FAPR controllers. The rise time of the droop derivative-based FAPR's power injection was less than that observed in the case of the droop-based FAPR control strategy. Hence, the former was more effective in improving both the nadir and frequency slope before nadir than the latter. Unlike the droop and the droop derivative-based FAPR controller, the VSP-based controller was independent of the frequency measurement. Besides, its response was faster and exhibited a lower rise time of active power injection. As a result, its impact on frequency dynamics improvement was better than that of the droop controller and the droop derivative control strategies. The main merits of the VSP-based FAPR control strategy are its simple practical implementation and frequency measurement-independent characteristics. Hence, it can be considered as the most suitable candidate for fast active power frequency control. Future research will be devoted to the extension of the setup to consider other possible sources for fast active power frequency control (e.g., electrolyzers, solar photovoltaic systems). Furthermore, the development and testing of other controllers that can be attached to power electronicinterfaced devices to support other primary control functions (e.g., oscillation damping) will be carried out. Funding: This research was carried out as part of the MIGRATE project. This project has received funding from the European Union's Horizon 2020 research and innovation program, under grant agreement no. 691800. This reflects only the authors' views, and the European Commission is not responsible for any use that may be made of the information it contains.

Informed Consent Statement: Not applicable.
Data Availability Statement: Not applicable.