Contribution of Wind Farms to the Stability of Power Systems with High Penetration of Renewables

Power system inertia is being reduced because of the increasing penetration of renewable energies, most of which use power electronic interfaces with the grid. This paper analyses the contribution of inertia emulation and droop control to the power system stability. Although inertia emulation may appear the best option to mitigate frequency disturbances, a thorough analysis of the shortcomings that face real-time implementations shows the opposite. Measurement noise and response delay for inertia emulation hinder controller performance, while the inherently fast droop response of electronic converters provides better frequency support. System stability, expressed in terms of rate of change of frequency (ROCOF) and frequency nadir, is therefore improved with droop control, compared to inertia emulation.


Introduction
In recent years, most electric power systems are undergoing a deep transformation due to the increasing share of renewable energy sources (RES) in their generation mix, both due to plummeting installation costs and environmental concerns. The successful integration of these RES while maintaining system security and reliability is a challenge, and one of the major limits to RES penetration is the frequency management [1].
In conventional power systems, most of the generation is interfaced to the grid via synchronous generators (SG). In case of a power imbalance in the system, SG rotors act as an energy buffer, increasing or decreasing their rotational speed to supply or to absorb the energy needed to keep system power balance, which causes the system frequency to change accordingly. The large inertia of the rotors greatly limits the Rate of Change of Frequency (ROCOF) in the system and therefore contains frequency excursions while other measures are taken (primary and secondary controls) to limit frequency excursions and restore nominal operation [2].
Most of the RES, however, are interfaced to the grid via electronic power converters, which do not naturally contribute to frequency containment due to their lack of inertial response. The consequence is a power system with lower inertia as the instantaneous RES penetration increases, which means higher ROCOF and larger frequency excursions for a given frequency event, such as the loss of a generator unit, therefore compromising power quality and system stability.
Most of the largest power systems in the world still have a significant inertia and can host additional RES without compromising stability. However, frequency management is already a problem for some regions with higher RES penetration, smaller systems or weaker grids. The situation is expected to become worse in some systems that have experienced a steady reduction of total inertia in the past years. Grid codes are being modified to include inertial response requirements, by setting minimum kinetic energy requirements and ROCOF limits [3][4][5][6][7].
There are several solutions to this problem. One possibility is to limit the instantaneous penetration of RES by curtailing their production, so that a higher share of conventional generation is connected at a given time. Another possibility is to increase the number of conventional generation units connected at a given time but decreasing their power output. However, these solutions either limit the RES integration or they reduce system efficiency.
Another solution is to provide frequency containment support using the RES electronic converters, by injecting an additional amount of power to the system during frequency events. Several alternatives have been proposed in the literature [8][9][10][11][12][13], and for the purposes of this paper we will classify them as either Virtual Synchronous Generators (VSG), Virtual Inertia implementations (VI) or Droop control strategies.
VSG includes all the control algorithms that implement the behaviour of a synchronous generator through a model of the machine, either as voltage-to-current or current-to-voltage, and with various model orders, from very detailed to very simple. These implementations are roughly equivalent to a real SG, in the sense that they are self-synchronizing and they exhibit an intrinsic inertial response, and therefore their impact in lowering ROCOF and frequency nadir (minimum frequency during an excursion) is similar. These algorithms are not considered in this paper, since it will focus on studying the impact of the other two categories.
Virtual Inertia includes those algorithms that implement the characteristic swing equation from the SG by measuring the ROCOF and yielding a current or power reference proportional to that of ROCOF, therefore, attempting to mimic SG response. However, there is an important difference compared to a VSG or a real SG once the implementation details are considered, as measuring ROCOF leads to measurement latencies and response delays.
Droop control includes those algorithms that implement a primary control that outputs a power that is proportional to the frequency error. The impact of Droop control during a frequency event will largely depend on the generator type, since synchronous generators implement slow droop control loops, while converter-based generation response is almost instantaneous.
In the literature, droop control and inertia emulation have been compared and found to be equivalent to some degree and under certain circumstances. In [14,15], both controls are found to be mathematically equivalent, although only in steady state for grid-forming converters or devices controlled as voltage sources, which is usually not the case. Moreover, during a transient, the converter can be considered to be a current controlled device, even if there is an outer voltage control loop, and therefore the behaviour will be different. In [16], a more pragmatic comparison is made regarding the effects of both controls in frequency nadir and ROCOF. It is found that fast droop control can be an alternative to inertia emulation as renewable energy penetration increases, although it requires increasing the droop gain, which may cause issues regarding the steady state operation of the system as the regulation efforts will change. Although some simulations are shown to test the proposed parameter tuning, no stability study is made to assess the impact in system stability.
An additional layer of complexity to the problem is added when considering inertia emulation in wind power systems. Unlike other renewable technologies, wind generation does have a real kinetic energy buffer because of the rotor and blades. However, that energy is limited and care should be taken when extracting energy from the rotor by slowing it down, as there is a limit to the power that can be extracted before the turbine stability is compromised [17][18][19][20].
This paper analyses the contribution of both inertia emulation and droop control algorithms to frequency regulation. Both controls are implemented in a doubly-fed induction generator (DFIG) wind power system and their impact during a frequency event is analysed regarding frequency nadir, ROCOF, and system stability.
This paper tries to overcome the limitations of the available literature by analysing the impact on power system stability of both inertia emulation and droop control algorithms in DFIG-based wind power systems. This stability analysis is based on a suitable dynamic system model that considers the response times of each algorithm, including the delays associated with frequency response and ROCOF measurement. The RES penetration is also considered in the analysis and it is found to have a major impact in system stability.
The impact of both inertia emulation and droop control algorithms on frequency nadir and ROCOF during a frequency event is then analysed through simulation. Different combinations of the synthetic inertia algorithms and different penetration levels are considered, and the results are discussed in the light of the previous stability study.
Finally, the impact of the two types of synthetic inertia on the wind turbine response is considered. Unlike other renewable technologies, wind generation does have a real kinetic energy buffer because of the rotating parts of the wind turbine. However, that energy is limited and care should be taken when extracting energy from the rotor by slowing it down, as there is a limit to the power that can be extracted before the turbine stability is compromised [20][21][22][23]. Here, a detailed analysis on the impact on the wind turbine speed is carried out. Firstly, at partial load operation, where maximum power is extracted from wind by using Maximum Power Point Tracker (MPPT) control; and secondly at full load, where the inertial response can be replaced from the wind through the pitch control.

Power System Frequency Response
In this section, a brief overview of the main types of frequency response is presented, both from conventional synchronous generation and from inverter-based generation, trying to highlight the main differences that will be relevant for the subsequent analysis.

Inertia Provided by Synchronous Generation
Whenever there is a power imbalance between the mechanical power supplied to a synchronous generator and the electrical power supplied by the generator to the grid, there will be a change in the kinetic energy of the rotor to ensure that power balance is always kept. Therefore, there will be a change in the rotor angular speed as given by the well-known swing equation, shown in Equation (1), where all damping effects are neglected for simplicity. In that equation, ω m is the rotor angular speed in p.u., H is the inertia constant in s, and p m and p e are the mechanical and electric power of the generator in p.u., respectively. It is assumed that the frequency is close to nominal [2].
The additional power increment related to the change of kinetic energy in the rotor is called inertial response of the generator. Under a severe power imbalance, it is possible that ω m will oscillate, but if the system is stable, the angular speed of the rotor will converge to the system electrical frequency, ω e . Considering the aggregated response of all synchronous generation and considering that eventually for all machines ω m equals ω e , it is commonly said that the inertial power response in a system p i , which is equal to the power imbalance between generation p g and load p l , is proportional to the rate of change of the electrical frequency ω e or ROCOF, although this is not necessarily true during the transients.
where H is now the total inertia constant of the system. It is worth noting that this equation represents the average response of the system, not the response of the generator. The synchronous generator power response is roughly proportional to the sine of the angle difference between rotor and grid voltage, as a simple voltage-behind-impedance generator model shows. This inertial power response is instantaneous, and therefore at the beginning of a frequency event it will be the cause of the frequency drop while the controls ramp up, as it can be seen in Figure 1, where the time at which the different generator responses take place is shown.

Virtual Inertia
An alternative to mimic synchronous generation inertial response is to measure ROCOF and to add to the DFIG power reference an inertial term computed as per the swing equation shown in Equation (2). The equation that defines this control loop is given in Equation (3), where ∆P V I is the active power reference calculated by this loop, in p.u.; K d is the derivative constant in s, and ∆ f is the frequency deviation measured by the PLL in p.u. Figure 2 shows the scheme of the Phase Locked Loop (PLL). The main objective of the PLL is to obtain the grid voltage angle θ PLL needed for the DFIG voltage-oriented control. However, on the other hand, the increment of the frequency over the nominal frequency is obtained as well, as an intermediate variable, as shown in the figure. The resulting virtual inertia control scheme can be seen in Figure 3. This approach allows to represent the average behaviour of synchronous generation in a way that is easily integrated in existing control algorithms, since it only requires adding an additional power term to the DFIG power reference. However, measuring ROCOF, as any derivative magnitude, is prone to error and noise. Intensive filtering is therefore applied, which causes a significant latency period [22]. Estimating the derivative of the frequency requires measures over long time windows, typically 200-500 ms [22][23][24], leading to measurement latencies and response delays around 100-250 ms. During a frequency event, response time is of paramount importance when trying to limit ROCOF and frequency nadir, and therefore a significant difference compared to SG and VSG performance can be expected.
This delay in the control signal may cause an increased ROCOF at the beginning of a frequency event until the power response is effective. This delay may cause problems with ROCOF system protections if not properly tuned. Moreover, introducing a delay in the control response may be a source of system instability.
There is a lack of a standard for the requirements on ROCOF maximum latency and error for Fast Frequency Response applications. In [22], an enquiry among utilities yielded that an ideal target would be a latency of 100 ms and a peak error of 0.02 Hz/s for this application. However, taking into account the state-of-the-art in ROCOF measurements, it is challenging to achieve such performance, although it seems possible in most situations. Depending on the ROCOF measuring algorithm and the expected perturbations and noise levels, latencies up to 250 ms (corresponding to a measurement window of 500 ms) may be needed to provide a suitable measure. In this paper, a latency of 150 ms has been chosen as a realistic value.

Droop Control
The equation that defines this control loop is presented in Equation (4), where ∆P droop is the active power reference calculated by this loop, in p.u.; R is the droop constant, in p.u.; and ∆ f is the PLL frequency deviation, in p.u. While the control scheme for primary droop control in all generations is similar, as depicted in Figure 4, from the point of view of the system response to a frequency event, the impact of droop control implemented in synchronous generation and the impact of droop control in converter-based generation will be very different due to very different response times. Primary frequency control in large synchronous generators can be slow due to the inherent delay of the responses of valves and turbines and becomes of significant magnitude typically 5-10 s after the event. Therefore, inertia response is absolutely needed to contain the frequency excursion during the first moments of a frequency event, while droop control ramps up.
Droop control in electronic converters can be very fast, in the range of milliseconds if the primary energy source allows it. Of course, being a proportional controller, its contribution to frequency containment will not be significant during the very first moments of the event when the frequency error is very small. However, as soon as the frequency error increases, the droop controller will effectively contribute to frequency containment, in a time frame comparable to those of synchronous generator inertia and virtual inertia, helping to reduce ROCOF and to increase frequency nadir. Figure 5 shows the electrical system modelled for the simulations. This system consists of a DFIG connected to a wind turbine, through a gearbox with a 1:100 ratio. The dynamic model of a DFIG has been employed in the subsequent analysis. DFIG parameters are gathered in Table 1, expressed per unit. The equations that define the dynamic model of the machine, referred to as a synchronous rotational frame (dashed variables are phasors), are as follows:

System Description
where v s is the stator voltage, i s is the stator current, Ψ s is the stator flux, v r is the rotor voltage, i r is the rotor current, Ψ r is the rotor flux, and L s and L r are the stator and rotor inductances, respectively; R s and R r are the stator and rotor resistances, respectively; ω s is the synchronous rotational speed; and s is the slip of the machine. To simulate the renewable penetration, the contribution of this generator is extended to represent more generators connected to the same grid, which is used to obtain the desired penetration level, in what is usually known as an aggregated model. The synchronous generation model employed is depicted in Figure 6 and it represents the mechanical model of a synchronous generator [2]. Variables are named as follows: ∆P re f is the grid equivalent mechanical power reference variation; ∆P load is the demand active power variation; ∆P DFIG is the DFIG-based renewable generation active power variation; H is the system time constant; D is the system damping constant; R conv is the droop constant; and K i is the secondary regulation constant. Secondary regulation is only enabled for the simulations and disabled for the theoretical study for a clearer analysis. Transfer functions of the governor and turbine model are based on a reheat steam turbine according to [2]. Variables are expressed in per unit and referred to conventional units' base so that the dynamic model parameters are invariant with variations of the penetration level. System model parameters are gathered in Table 2.

Wind Turbine Model
The expression of the mechanical power delivered by the wind turbine is given in Equation (9). The parameters of the wind turbine are shown in Table 3. Where P is the mechanical power delivered by the turbine, in W; ρ is the air density, expressed in kg/m 3 ; A is the area swept by the blades, in m 2 ; cp (λ, β) is the wind turbine power coefficient; β is the pitch angle; λ is the tip speed ratio; v is the wind speed, in m/s; ω is the rotational angular speed of the turbine, expressed in rad/s; and R is the wind turbine radius, expressed in m.
Indirect speed control is used for MPPT, as shown in the top part of Figure 7. This MPPT strategy uses the maximum power to optimal rotational speed characteristic to set the power reference command to the power controller of the wind turbine for a certain range of rotational speeds; when maximum rotational speed is reached, MPPT can no longer be applied and a speed control loop is used to control the rotational speed around nominal. The speed control loop uses the relationship between the wind turbine mechanical power and pitch angle to control the rotational speed by increasing the pitch angle when wind speed increases (Figure 8).  Pitch control acts when the nominal rotational speed of wind turbine is reached; its objective is to avoid the machine exceeding its nominal speed and power, reducing the wind turbine mechanical power by increasing the pitch angle. The pitch rotational speed is limited to around ±10 • /s. This restriction plays a key role in frequency regulation, as will be shown later. Pitch control scheme is shown in Figure 8.
The lower part of Figure 7 shows the frequency regulation control scheme for virtual inertia emulation and droop control, in what is usually called synthetic inertia. The contribution of each loop is directly added to the output of the MPPT to set the total generator active power reference.
Adding a synthetic inertia power increment will cause a mismatch between the wind turbine and generator torque, accelerating or decelerating the group. A negative power increment reference causes an acceleration, which always leads to a stable operational point. Whereas a positive power increment reference may cause a continuous deceleration if the maximum wind turbine torque is reached; from this point, a further reduction in the rotational speed will decrease the wind turbine torque. This is depicted in Figure 9 where an example of stable positive increment contribution is shown. If rotational speed deviation increases and the maximum torque is surpassed, there exists a risk of reaching torque values lower than the electromagnetic torque applied by the DFIG according to the wind speed, causing a continuous deceleration and forcing the wind turbine to stop. This may happen when adding the synthetic inertia power contribution; all the aforementioned are depicted in Figure 8 with an example of stable inertia contribution that causes a deceleration from point A (previous to inertia response) to point B.
It is worth mentioning that due to the nature of the wind turbine torque-rotational speed curve, when providing inertial response at partial load after a negative frequency deviation, a new stable operational point can be reached at a lower rotational speed. This will produce an MPPT active power reference lower than the actual maximum power for a certain wind speed (point C), which helps to soften the inertial response. However, on the other hand, the total power supplied by the DFIG in steady state (at point B) would be lower than the actual maximum power (point A), which shows that power is increased only during the transient speed response from A to B, as it will be obtained later. Nevertheless, it has to be noted that once the frequency nadir is reached, the sign of the virtual inertial contribution changes while the droop control contribution starts to decrease. Therefore, in steady state without ROCOF and frequency deviation due to the action of the secondary frequency control, the wind turbine operating point will naturally return to the initial point A.

Scenarios and Controller Tuning
The synthetic inertia control consists of two loops, the virtual inertia loop and the droop control loop (Figure 7). The virtual inertia control consists of producing a power increment proportional to the derivative of the frequency. The frequency derivative is calculated through the moving average method with a moving window of 150 ms [22].
The droop control emulates the governor speed control of conventional generators, providing a power increment proportional to measured frequency deviation. To maintain a given primary regulation reserve, the equivalent droop constant of the system must remain constant in each scenario. Here, the droop constant is set to 0.06 according to the maximum allowed frequency deviation proposed in [21] against a large event in the grid.
The virtual inertia loop emulates the inertial response of a synchronous generator, which instantaneously balances the electrical active power generated and demanded, extracting the difference to the mechanical power from the rotor kinetic energy, causing a rotor acceleration or deceleration. In the case of virtual inertia, the ROCOF is measured in first place and then the corresponding power response is calculated. To calculate this power, a derivative constant must be tuned according to the renewable penetration level to contribute to the power imbalance accordingly. However, system operators usually ask for an adjustable derivative constant among a certain range of values [6] to make the unit adaptable to this penetration level. Synthetic inertia controller parameters are adjusted as follows: where: S b sys = S b conv + S b ren (15) where R droop is the droop constant of the droop control loop, referred to the renewable power base, S b ren ; R sys is the system equivalent droop constant, referred to the system power base, S b sys ; R conv is the conventional generation droop constant, referred to its power base, S b conv ; K d is the gain of the virtual inertia loop, in s; H conv is the inertia constant of the conventional generation, referred to conventional generation base, in s; and p is the renewable penetration. This parametrization allows the renewables to contribute in the same way as the conventional generation they are displacing. Nevertheless, this contribution is affected by the inherent delays in the time response of the renewable generation. These delays mainly affect the virtual inertia response, which has the leading role in the most critical period, the first instants after the power imbalance. For this reason, even though renewable generation embodies this control, physical inertia of the system will be unavoidably reduced with its penetration, which means a larger initial ROCOF after an event.

Stability Analysis
A small signal stability analysis has been performed to assess the stability of the system when adding the virtual inertia and droop control loops. For this analysis, the linear models of the system components have been obtained and validated through a step response comparison with the dynamic simulation. The elements of the system have been modelled according to the equations presented in this paper for control loops and the electrical and mechanical system. The whole system has been linearized through a numerical linearization method using a block-by-block linearization. This block-by-block approach individually linearizes this block in the model and combines the results to produce the linearization of the system. The linearized model includes the synchronous generator, the DFIG, and the control system including the PLL block and ROCOF calculation. The state space model of the linearized system presents the following form: where A is the state matrix, u and y are the input and output variables, respectively; and x is the state variable vector, as follows: Right and left eigenvectors of the state matrix A are also calculated. From the right and left eigenvectors, participation factors can be easily calculated to find the relationships between eigenvalues and state variables. The right and left eigenvectors (v i and w i respectively) corresponding to the eigenvalue λ i of the state matrix A are defined as: Then, the participation factor of the j-th variable in the i-th mode is defined as: Then, the participation factors are normalized by dividing by the sum of the participation factors affecting a certain mode. Table 4 presents the modes of the system with both virtual inertia and droop control with a 20 % of penetration level. While Table 5 presents the corresponding participation factors. All the modes are stable. Modes 7 and 8 are the ones with lowest damping ratio. Those modes are related to the interaction of the stator flux.   Figure 10 shows most relevant system eigenvalues for different control configurations with a 20% penetration level. Attending to eigenvalues 7, 8, 12, and 13, it can be observed that the virtual inertia loop brings them closer to the positive half plane, i.e., it makes the system more unstable. On the other hand, the droop control provides damping, making the system more stable, as it will be seen later. This is more noticeable with eigenvalues 12 and 13, where the grid frequency state variable has a high participation factor, as depicted in Table 5.  Figure 11 shows the most relevant system eigenvalues for the system with both synthetic inertia loops for different penetration levels. The figure clearly shows that the stability worsens as the penetration level increases, the eigenvalues 7 and 8 being the most concerning, where the DGIF stator flux components have a high participation factor. This means that the increasing penetration affects the stability of the DFIGs. The eigenvalues 12 and 13 are those numbered according to the corresponding penetration level from 1 (p = 10%) to 9 (p = 90%). Figure 11. System eigenvalues locus for different penetration levels with synthetic inertia control.

Frequency Response under Different Control Configuration
In this subsection, the system frequency response for different combinations of the proposed synthetic inertia control loops will be analysed. The following scenarios have been simulated in the wind turbine control: no synthetic inertia control loops, only droop control, only virtual inertia and synthetic inertia with both droop control and virtual inertia. For this study, the penetration level has been set to 20%. A step load active power increment of 0.1 p.u. is applied at t = 1 s. The reserve for primary regulation is equal to 2.5% of the system nominal power and the droop constant has been chosen so the nadir frequency is within the range indicated by [21] for continental Europe (±200 mHz) against a deviation as large as the reserve. During these simulations, the secondary control is not enabled for the sake of clarity. Also, note that the frequency response shown in Figure 12 shows a different steady state response when droop control is not applied in the wind turbine, because in that case the synchronous generator has to assume the total load increment, producing a higher frequency drop for the same droop constant. Table 6 gathers the values of frequency nadir and ROCOF at the beginning of the disturbance (actually, a 100 ms after, when the moving average calculation is completed) for each case depicted in Figure 12. This table shows that the virtual inertia improves the ROCOF, as this control action is higher at the beginning of the disturbance, while the droop control improves the frequency nadir, as this control action is higher as the frequency deviation increases. Therefore, the best result, in terms of ROCOF and frequency nadir, is obtained when both virtual inertia and droop control are employed.  Firstly, Figure 13 shows that the ROCOF immediately after the imbalance remains the same for all the loops combinations. This is due to the fact that the initial ROCOF is only determined by the physical inertia of the synchronous generators, because the synthetic inertia control does not respond until the ROCOF is calculated and a frequency deviation is produced, respectively, in each control loop. Therefore, at the first instant the load increment is assumed only by the synchronous generator, producing the same decelerating torque and ROCOF for all the wind turbine control configurations. It is not until a few milliseconds after that the ROCOF can be calculated by the wind turbine control and the converter begins to provide that extra inertial power, affecting the system ROCOF consequently. The contribution of the droop control is extremely weak during these first instants. So, in Figure 13, the control configuration with only droop control presents the highest ROCOF (obviously, except when there is no contribution at all by the wind turbine) in the first instants. Secondly, after a few seconds, when the frequency nadir is being reached, the frequency deviation is significant and then, the droop control provides a significant contribution to the frequency control. Figure 12 shows that except for the first instants, droop control presents a better performance than virtual inertia, with a lower frequency nadir and more stable response. This figure also shows that the combination of both control loops improves the overall frequency response.

Frequency Response for Different Penetration Levels
In this subsection, the influence of the penetration level on the system frequency response is analysed with the wind turbine embodying synthetic inertia control. For this study, the penetration level is increased from 10% to 90%. A 0.1 p.u. load increment is applied at t = 1 s, as before. Firstly, Figure 14 shows that the same steady state frequency is obtained, because the primary reserve is maintained constant and shared, in each case, proportionally between the synchronous generators and the wind turbines, Equation (11). Secondly, Figure 15 shows that the initial ROCOF increases as the wind power penetration increases. As explained in the former subsection, at the first instant only the synchronous generators can supply the load increment, because only they have physical inertia. Then, as the synchronous power decreases with the wind power penetration, so does the physical inertia; this means the same load increment produces a higher initial ROCOF. On the other hand, Figure 14 shows that as the wind power penetration increases, the frequency response becomes more damped, as the stability study proved. In fact, as the wind power penetration increases, the slow governor and steam turbine control is being replaced by the fast droop control of the DFIG, making the damping effect of the droop control more effective. Finally, Figure 16 shows the active power response of the DFIG. Firstly, it has to be remarked that the initial power increment, after the load increment, is zero. The zoom in the figure shows how power increases from zero. As explained in the former subsection, this is due to the fact that the ROCOF cannot be measured instantaneously and also the frequency deviation acting initially in the droop control is zero. Later, power increases quickly after both the virtual inertia and the droop control produce a power increment reference. Obviously, this power increment reference is higher with lower penetration levels, as from Figure 14, frequencies nadir are higher. On the other hand, with high wind power penetrations, a high frequency oscillation appears. This was introduced in the stability study, where it was shown how the DFIG stator flux presented oscillatory modes with a lower damping as the penetration increases. Finally, the active power steady state response shows, again, that the load increment is shared proportionally between the synchronous generators and the DFIGs. So, a load increment of 0.1 p.u. in the system base will produce a 0.1 p.u. power increment in both the synchronous generators and the DFIGs, in their respective bases.

Wind Turbine Response
This subsection focusses on the response of the wind turbine in 20% of wind power penetration scenarios under the sudden load increase of 0.1 p.u. Secondary regulation has been enabled for these simulations to represent a more realistic scenario, because the wind turbine cannot supply primary response power for too long as the mechanical stability limit can be reached. Therefore, the secondary control allows to eliminate the frequency deviation and therefore it makes zero the primary response power. For the sake of simplicity, the actuation time of the secondary control loop has been reduced in comparison with settling usually required by TSOs, which is around 15 min. Both synthetic inertia loops have been used.

Wind Turbine Response at Partial Load
For this scenario, the wind speed is constant and equal to 7 m/s. Therefore, pitch control is not activated. The simulation compares the frequency response of the wind turbine with and without the synthetic inertia control loops. Figure 17 shows that the frequency nadir improves significantly with the inclusion of the synthetic inertia control, even in this case of low penetration level, increasing from 49.05 to 49.4 Hz, approximately. The ROCOF is also improved significantly by the virtual inertia control loop contribution. Regarding wind turbine power control, Figure 17 shows that after the load increment, the wind turbine contributes to supply part of this load increment both through the virtual inertia control and the droop control. As remarked before, the contribution of the secondary control eliminates the frequency deviation, making zero the wind turbine power increment, which is necessary in order to maintain the WT mechanical stability. In other words, the wind turbine can support the synchronous generators only during a few tens of seconds: initially through the virtual inertia action and later through the droop control. Figure 17 also shows the wind turbine rotational speed, showing that the wind turbine power increment produces a deceleration, as energy is being extracted from the WT rotor. Then, when frequency is stabilized, the MPPT control will take the rotational speed again to its optimal value for the wind speed given. Note that the WT active power and rotational speed without synthetic inertia control are not of interest, because the DFIG PLL will obtain the grid voltage angle even with a changing frequency shown in the figure. Therefore, the DFIG power control will maintain constant power, as set by the MPPT, and the rotational speed will be maintained constant as well. In other words, assuming constant wind speed, without synthetic inertia, the WT can be considered a constant power source and it does not contribute to the grid imbalances.

Wind Turbine Response at Full Load
In this scenario, wind speed is constant and equal to 15 m/s. The WT is now operating at full load and the pitch control is acting to prevent that the WT exceeds its nominal power and rotational speed. As in the previous subsection, the simulation compares the frequency response of the wind turbine with and without the synthetic inertia control loops. The results are similar to the previous simulation. Figure 18 shows that the frequency nadir improves with the inclusion of the synthetic inertia control, increasing from 49.05 to 49.6 Hz, approximately, and the ROCOF is also improved. Figure 18 also shows the WT power contribution to the load increment. Although this power increment is similar to the previous case, there is a fundamental difference. While in the previous case, this power increment is supplied from the WT kinetic energy, here pitch control avoids the deceleration of the wind turbine by decreasing the pitch angle in order to maintain constant rotational speed (see pitch control scheme in Figure 8) and supplying the extra power demanded by the DFIG. This means that in this case, in opposition to the previous case, the WT would be able to supply the primary control power during a longer time as the WT mechanical stability is not concerned. Finally, as in the previous case, the WT power, rotational speed, and pitch angle are not of interest when the synthetic inertia is not enabled as the WT will act as a constant power source.

Conclusions
In this paper, synthetic inertia response and stability of DFIG-based wind farms have been discussed. Performance has been found to be adequate even for high RES penetration scenarios up to around 80%. The impact of both virtual inertia and fast droop control loops has been studied separately. Droop control, being much faster than primary regulation in synchronous generation, has been found to be very effective on its own in terms of increasing frequency nadir during frequency events, yielding results comparable to those of full synthetic inertia, and much better than virtual inertia. However, droop control does not reduce initial ROCOF just after the event and does not have a significant impact in ROCOF for a relatively long time, longer than the usual measurement window in protection devices (around 500 ms), which may be triggered. Moreover, as RES penetration increases, initial ROCOF increases very fast, in a non-linear way, as the system synchronous generation inertia decreases. This means that droop control will not be performant enough on its own unless ROCOF requirements are significantly relaxed and RES penetration level is kept low enough. Virtual inertia shows a high initial ROCOF similar to that of droop control, but it is capable of quickly reducing it if the measurement window is short enough, so that it is unlikely that it will cause tripping of ROCOF relays. Virtual inertia therefore crucially improves system response to frequency events as RES penetration reaches significant levels. However, the stability analysis clearly shows that while droop control has a damping effect in system response, virtual inertia decreases system stability and the system may become unstable as VI becomes significant. As RES penetration increases, these trade-offs should be considered to determine the optimal contributions of fast droop control and VI to frequency containment. Moreover, the availability of inertia in wind power systems is limited by the rotor kinetic energy and, therefore, careful tuning of VI control is needed to avoid reaching unstable operation.
Author Contributions: The authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.
Funding: This research was funded by the Spanish Ministry of Science, Innovation and Universities grant number PID2019-106028RB-I00.