*2.2. Thermal Power Plants*

The different thermal generation technologies (i.e., steam, diesel, gas, and combined cycle) included in the isolated power system are modeled by different transfer functions proposed in [59,65]. These transfer functions supply the power variation of each thermal technology from the frequency deviation and power reference provided by the AGC. Both the model and the parameters can be found in [59]. Since fast response of combined cycle power plants is in charge of the gas turbines, frequency response of combined cycle and gas units is assumed to be equal. The total thermal generation is then the sum of each thermal unit power supplied.

#### *2.3. Variable Speed Wind Turbines*

One equivalent VSWT model aggregating all the VSWTs is used [59,66]. The proposed VSWT equivalent model includes the wind power model and both pitch and torque maximum power point tracking control. Further information can be found in [67]. The one-mass rotor mechanical model is used for simulations, which is detailed enough according to [68] for power converters decoupling the generator from the grid. The VSWT diagram is represented in Figure 4. This wind turbine model has been previously used in [69] for short-time period frequency analysis. The equivalent aggregated wind turbine modeling also includes the frequency control response strategy, described in Section 3.

**Figure 4.** Block diagram of VSWT.

#### *2.4. Automatic Generation Control (AGC)*

The secondary control action removes the steady-state frequency error after the primary frequency control. It is modeled similar to [70]. The total secondary regulation effort ( Δ*RR*) is obtained from:

$$
\Delta \mathcal{R} \mathcal{R} = -\Delta f \,\, \mathcal{K}\_{f'} \,\, \tag{2}
$$

being *Kf* determined according to the European Network of Transmission System Operators for Electricity (ENTSO-E) recommendations [71]. This regulation effort is distributed among each *i* synchronized thermal unit as a function of their participation factors ( *Ku*,*<sup>i</sup>*), which are related to the speed droop of each unit [72]. Subsequently, the result of adding all *Ku*,*<sup>i</sup>* must be one:

$$
\Delta p\_i^{ref} = \frac{1}{T\_{u,i}} \int \Lambda \text{RR } \mathbf{K}\_{u,i} \, dt \,\, = \,\,\frac{-1}{T\_{u,i}} \int \mathbf{K}\_{u,i} \, \mathbf{K}\_f \,\, dt,\tag{3}
$$

where *i* represents *gas*, *cc*, *die*, and *st* respectively. All thermal units connected to the grid participate in secondary control, whereas the participation factors of those units not connected are considered as zero, *Ku*,*<sup>i</sup>* = 0.

#### **3. Adaptive Frequency Control Strategy—Methodology**

The adaptive control approach proposed in this work tries to minimize the effort of VSWTs when providing frequency response. The proposed approach is based on the fast power reserve technique. This control strategy distinguishes two different periods after a sudden power imbalance: (i) overproduction and (ii) recovery. During overproduction, the stored kinetic energy in the rotating masses of the VSWTs is supplied to the grid as an additional active power Δ*p* during a few seconds, being thus *pw* over *pMPP*(*sw*). Subsequently, the rotational speed *ω* is reduced. Different definitions of this Δ*p* have been proposed. In fact, some authors consider Δ*p* as a fixed constant value [48–51], whereas others propose to estimate Δ*p* as dependent on the torque limit [52] or proportional to the frequency excursion [53]. The recovery period aims to restore *ω* to the prefault rotational speed value *ω*0. To overcome this, *pw* should be reduced below *pmech*(*ω*). Previous proposals specified an underproduction power *pUP* by different ways, being thus the supplied power of each VSWTs: *pW* = *pmech* − *pUP*.

In the proposed adaptive frequency control strategy, the initial value of Δ*p* for the overproduction period is related to the power system conditions. The authors propose a new frequency control approach based on the methodology followed in [73]. This reference estimates the exact and minimum amount of load needed to be shed after an imbalance depending on the RoCoF. In fact, a decision table that links the RoCoF with the strict amount of load shedding is developed based on presimulations. Then, the corresponding load shedding is activated after a contingency, tripping some amount of load demand immediately [74]. In this case, the proposed adaptive controller is based on a decision table that estimates the accurate value of Δ*p* for the VSWT overproduction.

The first step to formulate the decision table consists of defining several simulation scenarios that reflect the variability of the demand, the scheduling units, and/or the wind power penetration. To estimate the overproduction power Δ*p* after the outage of a thermal group, an iterative process is proposed for each scenario (see Figure 5). The condition considered to calculate such Δ*p* is that frequency *f* should not be below a certain limit *flim* for longer than a preset time limit *tlim*. Both values *flim* and *tlim* are related to the load shedding program of the power system. A counter is thus triggered when *f* is below *flim*, computing the time that frequency is under that *flim*. Initially, the *i*–scenario is simulated assuming that the overproduction power in the first iteration *j* is equal to 0 ( <sup>Δ</sup>*pj* = 0). If *f* is below *flim* for longer than *tlim*, <sup>Δ</sup>*pj* is increased by a fixed value Δ*pinc* with respect to the previous iteration ( <sup>Δ</sup>*pj* = <sup>Δ</sup>*pj*−<sup>1</sup> + Δ*pinc*) and the same *i*–scenario is simulated again with the new value of <sup>Δ</sup>*pj*. When the condition is satisfied (i.e., *f* is below *flim* less time that *tlim*), the minimum Δ*p* for the *i*–scenario ( Δ*pi*) that VSWTs should provide has been determined ( Δ*pi* = <sup>Δ</sup>*pj*). Note that the overproduction power Δ*p* is supplied with a delay of 200 ms, in order to have the measure of the RoCoF and in line with the delay time-interval in between 50 and 500 ms suggested in [75]. Once all the Δ*p* values have been determined from the simulations, a mathematical relationship between such Δ*p* and other variables of the power system need to be found. The obtained expression will be the decision table for the adaptive controller.

**Figure 5.** Flow-chart to estimate the overproduction of VSWTs.

When a power imbalance occurs, the VSWTs' controller determines the overproduction power Δ*p* according to the previous decision table. This situation causes a sudden *pw* increase and, after that, the supplied power starts to decrease. In this approach, instead of "forcing" the recovery period, the transition to recovery is carried out by the rotor speed PI controller in the converter, which slowly reduces the active power to achieve again *pMPP*(*sw*). In order to avoid a fast power change, that could cause a secondary frequency dip, *Kpt* and *Kit* (proportional and integral constants of the converter, refer to Figure 4) must be conveniently tuned. As a consequence, instead of fixing a *pUP* or defining an underproduction trajectory, the converter should adapt both the electrical power and the rotational speed to make them return to their pre-event values. Figure 6 presents the evolution of *PW* and *ω* under an imbalanced situation with the proposed approach, pointing out the overproduction and recovery periods.

**Figure 6.** Example of overproduction and recovery periods. (**a**) Electrical power (MW); (**b**) Rotational speed (pu). .
