## 1 Introduction
### Variable Speed Wind Turbines Model  
There are many different solutions when designing a wind turbine. For example, there are several types of generators that can be coupled to the rotor. In this work, a variable-speed wind turbine using a DFIG (_doubly fed induction generator_) with pitch control enabled has been chosen as representative. The block diagram of the model is presented in Figure 8 [36]. This layout is formed by five subsystems interacting with each other. Following a conceptual path from the wind speed to the output power: a predefined Simulink wind turbine block, which receives the wind speed, the low-speed shaft rotational speed, and the pitch angle signals and calculates the mechanical torque applied to that shaft; this torque signal is compared in the mechanical system (which represents the gearbox mechanisms) with the torque applied to the DFIG generator and the rotational speeds of the two shafts are calculated through a first-order dynamics represented by a transfer function; the high-speed shaft signal is used in the speed governor block to calculate the new power setup, compared in the same block with the actual power to calculate the reference generator torque; in the DFIG, simply modeled through another first-order dynamics, the reference torque is imposed to the generator; and a pitch control block adapts the pitch angle, if necessary, as a function of the high-speed shaft rotational speed, to limit the output power to the maximum value for wind speeds higher than the nominal one. The inertia control is grafted in this model inside the speed-governor block. In particular, a multiplication factor \(f_{K,opt}\) (which is calculated in the inertial control block) called _signal for the optimization zone_ is used to shift the operation of the wind turbine from the MPPT curve to other curves by exploiting the kinetic energy of the rotor (Figure 9). This method is called the Extended OPPT Method [24]. The control function of the method is shown in Equation (12). As can be observed, \(f_{K,opt}\) depends both on the frequency deviation and on the time derivative of the frequency. Indeed, the effectiveness of this virtual inertia algorithm depends both on the magnitude of the frequency disturbance (through \(\Delta f_{s}\) and \(df_{s}/dt\)) and on the initial kinetic energy stored in the rotor before the disturbance. \[f_{k,opt}=[\omega_{g0[p\!u]}/(\omega_{g0[p\!u]}+k_{vir}\;\Delta f_{s[p\!u]})]^{ 3}-W_{vir}\;K_{0}/(K_{opt}\;\omega_{g0[p\!u]}^{3})f_{s[p\!u]}\;df_{s[p\!u]}/dt, \tag{12}\]  
where:  
\[K_{0}=2\;\omega_{g0[p\!u]}/\omega_{s0[p\!u]}\;k_{vir}\;H_{WT}, \tag{13}\]  
and \(\omega_{s0[p\!u]}\) is the pre-disturbance rotational speed corresponding to the system frequency, 1 p.u. Figure 8: Block diagram of a VSWT model. The inertia control block simply implements these equations in a block diagram, providing the \(f_{K,opt}\) signal as the final output, which, as already mentioned, is used to shift the operating point of the turbine. Looking at the \(P\)-\(\omega\) chart in Figure 9, it is possible to understand the functioning of the OPPT algorithm. Under the hypothesis of constant wind speed and normal operating conditions, the generator will deliver a power \(P_{A}\) associated with a rotational speed \(\omega_{g0}\). If an underfrequency event happens, caused for example by a mismatch between the injected and the consumed power in the system, an increase in the power output of the turbine will be required to reduce the frequency oscillation as much as possible. In particular, the non-null values of \(\Delta f_{s}\) and \(df_{s}/dt\) will activate the inertial response emulation of the wind turbine, with a consequent shift of the MPPT curve upwards (A \(\rightarrow\) B). The higher the severity of the underfrequency event (and so the magnitude of \(\Delta f_{s}\) and \(df_{s}/dt\)), the higher will be the value assumed by \(P_{B}\).