*3.1. Torque Controller*

The torque controller is divided into two main parts: the partial and the full load regimes. There is also the switching logic to change between both regimes. The input for the controller is the rotor speed Ω and the mean pitch angle *θmean*. The latter is used for the switching logic between the two load regimes. The output of the controller is the generator torque *Qgen* and the reference power *Pref* for the pitch controller. The reference power is simply the product of the instantaneous generator torque and the rotor speed: *Pref*(*t*) = *Qgen*(*t*) · Ω(*t*).

The variable speed controller is a PID controller with two different rotor speed setpoints. The controller is saturated with a maximum and a minimum limit so that Ω is adjusted to follow an optimum tip speed ratio in the partial load regime.

As a first step, the rotor speed Ω is low-pass filtered with a second order low-pass filter to exclude unwanted high frequency dynamics. The function of the low-pass filter is given by Appendix A Equation (A2). The speed error *eTC* is calculated using the difference of the low-passed rotor speed Ω*LP* and the current speed set-point Ω*set*: *eTC* = Ω*LP* − Ω*set*. The speed set-point is defined as

$$
\Omega\_{\rm{set}} = \begin{cases}
\Omega\_{\rm{min}} & \text{if } \Omega\_{LP} < \frac{\Omega\_{\rm{rated}} + \Omega\_{\rm{min}}}{2} \\
\Omega\_{\rm{rated}} & \text{if } \Omega\_{LP} \ge \frac{\Omega\_{\rm{rated}} + \Omega\_{\rm{min}}}{2}
\end{cases} \tag{1}
$$

where Ω*rated* and Ω*min* represent the rated and minimum rotor speed. The generator torque is computed using the equation

$$Q\_{PID}(t) = k\_{P-TC} \cdot e\_{TC}(t) + k\_{I-TC} \cdot \int\_0^t e\_{TC}(\tau)d\tau + k\_{D-TC} \cdot \frac{dc\_{TC}(t)}{dt}.\tag{2}$$

Here, *kP*−*TC*, *kI*−*TC* and *kD*−*TC* represent the proportional, the integral and the differential gain of the PID controller. Because the values of the generator torque are saturated, each time step, the integral term of *QPID* is recalculated as

$$Q\_l(t) = k\_{I-T\mathbb{C}} \cdot \int\_0^t \mathbf{e}\_{T\mathbb{C}}(\tau) d\tau = Q\_{PID}(t) - k\_{P-T\mathbb{C}} \cdot \mathbf{e}\_{T\mathbb{C}}(t) - k\_{D-T\mathbb{C}} \cdot \frac{d\mathbf{e}\_{T\mathbb{C}}(t)}{dt}.\tag{3}$$

This helps to avoid windup of *QI* and enables the controller to react quickly if the required torque signal changes from a previously saturated value.

#### 3.1.1. Partial Load Regime

In order for the torque controller to enforce an optimum tip speed ratio in the partial load regime, the generator torque is saturated with upper and lower limits: *Q<sup>P</sup> max* and *Q<sup>P</sup> min*. Between Ω*min* and Ω*rated*, the limits are identical and follow the optimal torque speed curve of the turbine:

$$\mathbf{Q}\_{\text{max}}^P = \mathbf{Q}\_{\text{min}}^P = \mathbf{K}\_{\text{opt}} \cdot \boldsymbol{\Omega}\_{LP}^2 \tag{4}$$

$$\eta = \frac{\pi \rho \mathbb{R}^5 \mathbb{C}\_{p-opt}}{2\lambda\_{opt}^3} \cdot \Omega\_{LP}^2. \tag{5}$$

In the last equation, *ρ* represents the air density, *R* the rotor radius and *Cp*−*opt* the power coefficient at optimum tip speed ratio *λopt*.

At two given rotor speed ranges, [Ω*min*−*a*, <sup>Ω</sup>*min*−*b*] and [Ω*max*−*a*, <sup>Ω</sup>*max*−*b*], the torque limits open up to allow the PID controller to keep the rotor speed at the required set-point. The switching logic for *Q<sup>P</sup> min* is given by:

$$\boldsymbol{Q}\_{\mathrm{min}}^{\mathrm{P}} = \begin{cases} \min\Big(\mathbb{K}\_{\mathrm{opt}} \cdot \Omega\_{\mathrm{LP}}^{2} \cdot \sigma(\Omega\_{\mathrm{min}-a}, \Omega\_{\mathrm{min}-b}, \Omega\_{\mathrm{LP}}), \mathbb{K}\_{\mathrm{opt}} \cdot \Omega\_{\mathrm{max}-a}^{2}\Big) & \text{if } \mathbb{K}\_{\mathrm{opt}} \cdot \Omega\_{\mathrm{max}-a}^{2} \le \mathbb{Q}\_{\mathrm{ref}}^{\mathrm{F}}\\ \mathbb{Q}\_{\mathrm{ref}}^{\mathrm{F}} & \text{if } \mathbb{K}\_{\mathrm{opt}} \cdot \Omega\_{\mathrm{max}-a}^{2} > \mathbb{Q}\_{\mathrm{ref}}^{\mathrm{F}}. \end{cases} \tag{6}$$

In the above equation, *Q<sup>F</sup> ref* represents the generator torque in full load regime and *<sup>σ</sup>*(·) represents a smooth switching function between the two limits <sup>Ω</sup>*min*−*<sup>a</sup>* and <sup>Ω</sup>*min*−*b*. The switch function is given by Equations (A5) and (A6). Complementary to Equation (6), *Q<sup>P</sup> max* follows the switching logic:

$$Q\_{\max}^{P} = \max\left( (1 - \sigma\_{\max}) \cdot K\_{\text{opt}} \cdot \Omega\_{LP}^{2} + \sigma\_{\max} \cdot Q\_{ref}^{F}, K\_{\text{opt}} \cdot \Omega\_{\min-b}^{2} \right). \tag{7}$$

The above equation uses the symbol *σmax* to denote the switch function *σ*(Ω*max*−*a*, <sup>Ω</sup>*max*−*b*, <sup>Ω</sup>*LP*).

Figure 3 shows the torque limits as a function of Ω.

**Figure 3.** Limits for torque controller at the partial load regime. Limits are shown for the constant power and constant torque strategies.

Below the minimum rotor speed, *Q<sup>P</sup> min* is kept at 0 kNm to allow the rotor to gain enough rotational speed at low wind speeds. Once the rotor speed reaches Ω*min*−*<sup>a</sup>* (95% of Ω*min* in the figure), *Q<sup>P</sup> min* is increased and equaled to *Kopt* · <sup>Ω</sup>2. This enforces the optimal torque-speed curve of the wind turbine below the rated speed. Once Ω gets close to <sup>Ω</sup>*max*−*<sup>a</sup>* (95% of <sup>Ω</sup>*rated*), *<sup>Q</sup><sup>P</sup> max* opens up to allow the PID controller to regulate the rotor speed. The parameters Ω*min*−*a*, Ω*min*−*b*, Ω*max*−*<sup>a</sup>* and Ω*max*−*<sup>b</sup>* are externally defined by the user. Figure 3 includes the behavior of the torque limits for the two torque control strategies in the full load regime: constant power and constant torque. These are explained in the next section.

#### 3.1.2. Full Load Regime

The full load regime of the controller uses the same PID controller for the controller torque, but now the torque limits *Q<sup>P</sup> min* and *<sup>Q</sup><sup>P</sup> max* take the same value *Q<sup>F</sup> ref* . The control strategy of the torque controller in the full load regime can be either constant power or constant torque. *Q<sup>F</sup> ref* takes different values depending on the strategy. These are:

$$Q\_{ref}^F = \begin{cases} \frac{P\_{\text{total}}}{\Omega\_{\text{rated}}} & \text{for constant torque} \\ \frac{P\_{\text{total}}}{\Omega} & \text{for constant power.} \end{cases} \tag{8}$$

While *Q<sup>F</sup> ref* is constant for the constant torque strategy, it is inversely proportional to the (unfiltered) rotor speed signal for the constant power strategy. This explains the 1/Ω behavior of *Q<sup>P</sup> min* and *<sup>Q</sup><sup>P</sup> max* for the constant power strategy in Figure 3.
