3.1. Data-driven fuzzy controller derivation

the other hand, the system represented by the expression of Eq. (14) can be solved, and θ

l¼1

The online control development requires a recursive estimate of the model parameters represented by the vector θ<sup>k</sup> of Eq. (9), while the input and output data uk and yk acquired online by the dynamic process of the wind turbine system. In fact, the adaptive control law computed at time step k is based on the recursive estimate of a model of the process, which is derived exploiting the dynamic data up to the sample k. In this way, the algorithm of the Frisch scheme defined by the expressions of Eqs. (14), (16) and (18) is expressed by means of an online scheme. Note that the expressions of Eqs. (16) and (18) are required in their recursive form. Therefore, while the derivation of the online form of the covariance matrix update is easily obtained as in

<sup>k</sup> <sup>Σ</sup>ψ<sup>~</sup> <sup>k</sup> <sup>þ</sup>

the formulation of the autocovariance expression rεh, <sup>k</sup> can be obtained recursively for 1 ≤ l ≤ k

data in the vector ψ<sup>k</sup> and the updated estimate θ<sup>k</sup> of the model parameters. The online

rε0, <sup>h</sup> for the recursive algorithm are equal to the variables of the classic Frisch scheme batch

Since variations of system properties have to be tracked online, in order to cope with timevarying systems, this chapter considers a further modification of the recursive estimation scheme. This point can be achieved by placing more emphasis on the more recent data, while

1 <sup>k</sup> <sup>ε</sup><sup>k</sup> <sup>θ</sup><sup>k</sup>

� �ε<sup>k</sup>þ<sup>h</sup> <sup>θ</sup><sup>k</sup>

1 <sup>k</sup> <sup>ψ</sup>kψ<sup>T</sup>

ε<sup>l</sup> θ � �ε<sup>l</sup>þ<sup>h</sup> <sup>θ</sup>

� � <sup>¼</sup> A z�<sup>1</sup> � �yk � B z�<sup>1</sup> � �uk (17)

� � (18)

<sup>k</sup> (19)

� � (21)

� � (20)

� � has to be computed at time step k using the lagged

� � at each time step. The initial values <sup>θ</sup>0, <sup>Σ</sup>ψ<sup>~</sup> <sup>0</sup> and

ε<sup>k</sup> θ

where the subscript h in Eq. (18) indicates a time-shift.

while the so-called sample autocovariance is defined in the form of Eq. (18):

<sup>r</sup>εh,N <sup>¼</sup> <sup>1</sup> N X N

<sup>Σ</sup>ψ<sup>~</sup> <sup>k</sup> <sup>¼</sup> <sup>k</sup> � <sup>1</sup>

ε<sup>l</sup> θ<sup>k</sup> � � ≈ ε<sup>l</sup> θ<sup>l</sup>

<sup>k</sup> <sup>r</sup>εk, <sup>k</sup>�<sup>1</sup> <sup>þ</sup>

only if the approximated expression of Eq. (20) is considered:

computation of the expression of the autocovariance matrix of Eq. (21):

<sup>r</sup>εh, <sup>k</sup> <sup>¼</sup> <sup>k</sup> � <sup>1</sup>

for l < k. In this way, only the residual ε<sup>k</sup> θ<sup>k</sup>

can be achieved using only the vector ε<sup>k</sup>þ<sup>h</sup> θ<sup>k</sup>

represents its solution.

224 Adaptive Robust Control Systems

the form of Eq. (19):

procedure.

The expression of Eq. (17) is determined:

This section describes the derivation of the fuzzy controller model. Once a reasonably accurate fuzzy description of the considered benchmark has been available, as described above, it is used offline to directly estimate the nonlinear fuzzy controllers. As already remarked, this design procedure differs from the approach proposed in Simani [11]. In fact, the control design proposed in this chapter relies on the so-called model inverse control principle, which is solved suing the fuzzy identification approach recalled above.

With reference to stable fuzzy systems, whose inverted dynamics are also stable, a nonlinear controller can be simply designed by inverting the fuzzy model itself. Moreover, when modelling errors and disturbances are not present, this controller is able to allow for exact tracking with zero steady-state errors. However, modelling errors and disturbance effects are always present in real conditions, which can be tackled by directly identifying the controller model (i.e. the inverse controlled model) using the FMID approach. Differently from Simani [11], a robust control strategy is thus achieved by minimising a cost function, which includes the difference between the desired and controller outputs, and a penalty on the system stability. In general, a nonconvex optimisation problem has to be solved, which hampers the direct application of the proposed approach. However, the optimisation scheme described in Simani et al. [6] can be exploited, which is based on a parametrised search technique applied at a higher level to formulate the control objectives and constraints.

In this way, the estimated controller based on the inverse process model and approximated via a fuzzy prototype is able to describe the complete behaviour of the monitored plant in its different working conditions (i.e. partial and full load situations). In fact, the rule-based fuzzy inference system of Eq. (8) has been derived for modelling the wind turbine dynamic process of Eq. (3) in its equivalent discrete-time form of Eq. (24):

$$y\_{k+1} = f(\mathbf{x}\_k, \mathbf{u}\_k) \tag{24}$$

where the state x

where rkþ<sup>1</sup> <sup>¼</sup> f xð Þ <sup>m</sup>

difference <sup>∣</sup>rkþ<sup>1</sup> � f xð Þ <sup>m</sup>

ð Þc <sup>i</sup> and b

the state of the fuzzy controller x

turbine regulator of Section 2.

method of discretisation.

oach recalled above:

3.2. Model-based adaptive controller derivation

regressand a

functions μð Þ<sup>c</sup>

ð Þc <sup>k</sup> ¼ x

<sup>k</sup> ; uk

<sup>k</sup> ; uk

ð Þc i .

parameters, i.e. the fuzzy membership functions μð Þ<sup>c</sup>

denoted by the superscript (c).

ð Þ m

<sup>i</sup> and the parameters a

<sup>k</sup> ;rk�<sup>1</sup>; …;rk�nþ<sup>1</sup> h i<sup>T</sup>

ykþ<sup>1</sup> <sup>¼</sup> f xð Þ <sup>m</sup>

ð Þc <sup>i</sup> and b

<sup>k</sup> ; uk � � <sup>¼</sup> f xð Þ <sup>m</sup>

Moreover, the fuzzy model of the process is used for providing the state vector x

the model-based strategy relying on the adaptive algorithm proposed in Section 3.2.

ð Þc

making the algorithm suitable for real-time implementations [12].

the identified controller model. The model of Eq. (27) contains the estimated membership

In this way, the series connection between the controller model (i.e. the identified inverse process model) and the process model itself should lead to an identity mapping as in Eq. (28):

ideal conditions. However, the model-reality mismatch and measurement errors are properly managed by means of the fuzzy modelling scheme recalled in Section 3. In this way, the

reference input rk. These computations are performed using standard matrix operations, thus

As already remarked, the effects of the model uncertainty and disturbance lead to a different behaviour of the model with respect to controlled process, thus resulting in a mismatch between the process outputs yk and their references rk. This mismatch can be compensated by means of the online mechanism described by the expressions of Eqs. (25) and (27). These issues motivate

Note finally that the fuzzy controller proposed in this section will replace the baseline wind

This section describes the model-based adaptive control strategy used in connection with the online estimation scheme presented above. In more detail, with reference to the wind turbine system recalled in Section 2, adaptive controllers for processes of the second order (na = n = 2) are designed. Moreover, the considered adaptive controllers are based on the trapezoidal

With reference to Eq. (9), the transfer function of the time-varying controlled system with na = nb = n = 2 is considered, whose parameters estimated using the online identification appr-

<sup>k</sup> ; f

�<sup>1</sup> x ð Þc <sup>k</sup> ;rk

� � for a proper value of uk. However, the expression of Eq. (28) holds in

� �<sup>∣</sup> can be made arbitrarily small by a suitable selection of the model

<sup>k</sup> is updated using the process model state x

ð Þc

and the reference rk signal represent the inputs of

Robust Control Applications to a Wind Turbine-Simulated System

http://dx.doi.org/10.5772/intechopen.71526

227

<sup>i</sup> of the identified controller model, which are

� � � � <sup>¼</sup> rkþ<sup>1</sup> (28)

<sup>i</sup> , the number of clusters M and the

ð Þ m

ð Þ m <sup>k</sup> and the

<sup>k</sup> . Therefore,

And, in particular, the TS fuzzy representation has the form of Eq. 25:

$$y\_{k+1} = \frac{\sum\_{i=1}^{M} \mu\_i^{(m)} \left( x\_k^{(m)} \right) \left( a\_i^{(m)} x\_k^{(m)} + b\_i^{(m)} \right)}{\sum\_{i=1}^{M} \mu\_i^{(m)} \left( x\_k^{(m)} \right)} \tag{25}$$

The current state xk = [yk , …, yk � <sup>n</sup> + 1, uk � 1, …, uk � <sup>n</sup> + 1] <sup>T</sup> and the input uk represent the inputs that drive the model of Eq. (25). Its output represents the prediction of the system output at the next sample yk + 1. The model of Eq. (25) requires the estimated membership functions μð Þ <sup>m</sup> <sup>i</sup> , the state x(m) and the parameters a ð Þ m <sup>i</sup> and b ð Þ m <sup>i</sup> of the controlled system, which are denoted by the superscript (m).

Therefore, the input uk generated by the control law feeds the monitored process such that its output yk + 1 asymptotically follows the desired (reference) output rk + 1. This behaviour is obtained using the inverse model principle, represented by the expression of Eq. (26):

$$
\mu\_{k+1} = f^{-1}\left(\mathbf{x}\_k^c, r\_k\right) \tag{26}
$$

that is a nonlinear function of the vector xc <sup>k</sup> and the reference rk.

However, in general, with reference to Eq. (26), it is difficult to determine the analytical expression of the inverse function f �1 (�). Therefore, the methodology proposed in this chapter suggested to exploit the identified fuzzy TS prototype of Eq. (25) to provide the particular state x ð Þ m <sup>k</sup> at each time step k. In this way, from this mapping, the inverse mapping ukþ<sup>1</sup> ¼ f �<sup>1</sup> x ð Þc <sup>k</sup> ;rk � � is directly identified the form of Eq. (8), if the controlled system is stable, and in particular in the form of Eq. (27):

$$u\_{k+1} = \frac{\sum\_{i=1}^{M} \mu\_i^{(c)} \left( \mathbf{x}\_k^{(c)} \right) \left( a\_i^{(c)} \mathbf{x}\_k^{(c)} + b\_i^{(c)} \right)}{\sum\_{i=1}^{M} \mu\_i^{(c)} \left( \mathbf{x}\_k^{(c)} \right)} \tag{27}$$

where the state x ð Þc <sup>k</sup> ¼ x ð Þ m <sup>k</sup> ;rk�<sup>1</sup>; …;rk�nþ<sup>1</sup> h i<sup>T</sup> and the reference rk signal represent the inputs of the identified controller model. The model of Eq. (27) contains the estimated membership functions μð Þ<sup>c</sup> <sup>i</sup> and the parameters a ð Þc <sup>i</sup> and b ð Þc <sup>i</sup> of the identified controller model, which are denoted by the superscript (c).

In this way, the series connection between the controller model (i.e. the identified inverse process model) and the process model itself should lead to an identity mapping as in Eq. (28):

$$y\_{k+1} = f\left(\mathbf{x}\_k^{(m)}, u\_k\right) = f\left(\mathbf{x}\_k^{(m)}, f^{-1}\left(\mathbf{x}\_k^{(c)}, r\_k\right)\right) = r\_{k+1} \tag{28}$$

where rkþ<sup>1</sup> <sup>¼</sup> f xð Þ <sup>m</sup> <sup>k</sup> ; uk � � for a proper value of uk. However, the expression of Eq. (28) holds in ideal conditions. However, the model-reality mismatch and measurement errors are properly managed by means of the fuzzy modelling scheme recalled in Section 3. In this way, the difference <sup>∣</sup>rkþ<sup>1</sup> � f xð Þ <sup>m</sup> <sup>k</sup> ; uk � �<sup>∣</sup> can be made arbitrarily small by a suitable selection of the model parameters, i.e. the fuzzy membership functions μð Þ<sup>c</sup> <sup>i</sup> , the number of clusters M and the regressand a ð Þc <sup>i</sup> and b ð Þc i .

Moreover, the fuzzy model of the process is used for providing the state vector x ð Þ m <sup>k</sup> . Therefore, the state of the fuzzy controller x ð Þc <sup>k</sup> is updated using the process model state x ð Þ m <sup>k</sup> and the reference input rk. These computations are performed using standard matrix operations, thus making the algorithm suitable for real-time implementations [12].

As already remarked, the effects of the model uncertainty and disturbance lead to a different behaviour of the model with respect to controlled process, thus resulting in a mismatch between the process outputs yk and their references rk. This mismatch can be compensated by means of the online mechanism described by the expressions of Eqs. (25) and (27). These issues motivate the model-based strategy relying on the adaptive algorithm proposed in Section 3.2.

Note finally that the fuzzy controller proposed in this section will replace the baseline wind turbine regulator of Section 2.

#### 3.2. Model-based adaptive controller derivation

application of the proposed approach. However, the optimisation scheme described in Simani et al. [6] can be exploited, which is based on a parametrised search technique applied at a

In this way, the estimated controller based on the inverse process model and approximated via a fuzzy prototype is able to describe the complete behaviour of the monitored plant in its different working conditions (i.e. partial and full load situations). In fact, the rule-based fuzzy inference system of Eq. (8) has been derived for modelling the wind turbine dynamic process

> a ð Þ m <sup>i</sup> x ð Þ m <sup>k</sup> þ b ð Þ m i

P M i¼1 μð Þ <sup>m</sup> <sup>i</sup> x ð Þ m k � �

that drive the model of Eq. (25). Its output represents the prediction of the system output at the next sample yk + 1. The model of Eq. (25) requires the estimated membership functions μð Þ <sup>m</sup>

Therefore, the input uk generated by the control law feeds the monitored process such that its output yk + 1 asymptotically follows the desired (reference) output rk + 1. This behaviour is

> �<sup>1</sup> xc <sup>k</sup>;rk

However, in general, with reference to Eq. (26), it is difficult to determine the analytical expres-

suggested to exploit the identified fuzzy TS prototype of Eq. (25) to provide the particular state

is directly identified the form of Eq. (8), if the controlled system is stable, and in particular in the

P M i¼1 μð Þ<sup>c</sup> <sup>i</sup> x ð Þc k � �

a ð Þc <sup>i</sup> x ð Þc <sup>k</sup> þ b ð Þc i

� �

<sup>k</sup> and the reference rk.

ð Þ m

obtained using the inverse model principle, represented by the expression of Eq. (26):

ukþ<sup>1</sup> ¼ f

<sup>k</sup> at each time step k. In this way, from this mapping, the inverse mapping ukþ<sup>1</sup> ¼ f

� �

ykþ<sup>1</sup> <sup>¼</sup> f xk ð Þ ; uk (24)

<sup>i</sup> of the controlled system, which are denoted by the

(�). Therefore, the methodology proposed in this chapter

� � (26)

<sup>T</sup> and the input uk represent the inputs

(25)

<sup>i</sup> , the

�<sup>1</sup> x ð Þc <sup>k</sup> ;rk � �

(27)

higher level to formulate the control objectives and constraints.

And, in particular, the TS fuzzy representation has the form of Eq. 25:

P M i¼1 μð Þ <sup>m</sup> <sup>i</sup> x ð Þ m k � �

ykþ<sup>1</sup> <sup>¼</sup>

ð Þ m <sup>i</sup> and b

�1

ukþ<sup>1</sup> ¼

P M i¼1 μð Þ<sup>c</sup> <sup>i</sup> x ð Þc k � �

The current state xk = [yk , …, yk � <sup>n</sup> + 1, uk � 1, …, uk � <sup>n</sup> + 1]

state x(m) and the parameters a

that is a nonlinear function of the vector xc

sion of the inverse function f

superscript (m).

226 Adaptive Robust Control Systems

x ð Þ m

form of Eq. (27):

of Eq. (3) in its equivalent discrete-time form of Eq. (24):

This section describes the model-based adaptive control strategy used in connection with the online estimation scheme presented above. In more detail, with reference to the wind turbine system recalled in Section 2, adaptive controllers for processes of the second order (na = n = 2) are designed. Moreover, the considered adaptive controllers are based on the trapezoidal method of discretisation.

With reference to Eq. (9), the transfer function of the time-varying controlled system with na = nb = n = 2 is considered, whose parameters estimated using the online identification approach recalled above:

$$\boldsymbol{\Theta}\_{k} = \begin{bmatrix} \widehat{\boldsymbol{a}}\_{1}, \widehat{\boldsymbol{a}}\_{2}, \widehat{\boldsymbol{b}}\_{1}, \widehat{\boldsymbol{b}}\_{2} \end{bmatrix}^{T} \tag{29}$$

Finally, Section 4 will show the achieved results regarding the design and the application of the

This section presents the simulation results achieved with the proposed data-driven and model methods relying on both the fuzzy modelling technique oriented to the identification of the fuzzy controller model and the adaptive control strategy using the online estimated models.

Regarding the fuzzy modelling and identification method, the GK clustering algorithm recalled in Section 3 exploits a number M = 3 of clusters and delays n = 2. These variables were applied for clustering the first data set consisting of {Pgk, ωgk, βrk}. A number of samples k = 1, 2,

exploited for clustering the second data set {Pgk, ωgk, τgk}. After this procedure, the structures of the TS prototypes were derived for each output yk equal to Pgk and ωgk. In this way, the 2 continuous-time outputs y(t)=[ωg(t), τg(t)] of the wind turbine continuous-time model of

The performances of the fuzzy models that are derived using the procedure described above can be evaluated using the so-called Variance Accounted For (VAF) parameter [5]. In particular, the TS fuzzy model reconstructing the first output has a VAF index bigger than 90%, whereas for the second one, it was higher than 99%. This means that the fuzzy prototypes are able to describe the behaviour of the controlled process with very good precision. These estimated TS fuzzy models have been used for the derivation of the fuzzy controllers and

Two (multiple input single output) MISO fuzzy controller models with two inputs and one output have been used for the compensation of the blade pitch angle β(t) and the generator torque τg(t). By using the inverse model principle, they were estimated exploiting the methodology recalled in Section 3.1. Again, the GK fuzzy clustering method has led to 2 fuzzy regulators applied to the data sets {βrk, Pgk, ωgk} and {τgk, Pgk, ωgk}, respectively, with M = 3

The controller performances were verified and validated via extensive simulations by considering different data sequences generated via the wind turbine simulator. Table 1 reports the

<sup>θ</sup>ð Þ<sup>0</sup> [0.1, 0.15, 0.20, 0.25 0.30, 0.35]<sup>T</sup>

Recursive algorithm parameter Value

<sup>Σ</sup>ψ<sup>~</sup> ð Þ<sup>0</sup> <sup>10</sup>�<sup>1</sup> <sup>I</sup><sup>7</sup> δ 0.995

. The same number of clusters and shifts were

Robust Control Applications to a Wind Turbine-Simulated System

http://dx.doi.org/10.5772/intechopen.71526

229

The simulations achieved with these regulators are summarised in the following.

adaptive controller to the data from the wind turbine benchmark.

Eq. (3) are approximated by two TS fuzzy prototypes of Eq. (8).

applied to the considered wind turbine benchmark.

Table 1. Initialisation parameters of the adaptive algorithm.

clusters and n = 3 lagged signals.

4. Simulation results

…, <sup>N</sup> were considered with <sup>N</sup> = 440 � 103

Note that the subscript k for model and controller parameters will be dropped in order to simplify equations and formulas.

The control law corresponding to the discrete-time adaptive controller in its difference form of Eq. (30):

$$\begin{cases} \Delta \mathbf{e}\_k = \mathbf{e}\_k - \mathbf{e}\_{k-1} \\ \mu\_k = K\_p \left[ \Delta \mathbf{e}\_k + \frac{T\_s}{T\_I} \frac{\Delta \mathbf{e}\_k}{2} \right] + \mu\_{k-1} \end{cases} \tag{30}$$

with ek representing the tracking error, with ek = rk � yk, and rk the reference (setpoint) signal. Ts is sampling time. The controller parameters Kp and TI are here time-varying and derived from the online model parameters in the vector θk. The control law can be represented also in its feedback formulation as described by Eq. (31):

$$
\mu\_k = q\_0 e\_k + q\_1 e\_{k-1} + \mu\_{k-1} \tag{31}
$$

where the new controller variables q<sup>0</sup> and q<sup>1</sup> (or Kp and TI) are derived from the relations of Eq. (32):

$$\begin{cases} q\_0 = K\_p \left( 1 + \frac{T\_s}{2 \, T\_I} \right) \\ q\_1 = -K\_p \left( 1 - \frac{T\_s}{2 \, T\_I} \right) \end{cases} \tag{32}$$

where the parameters Kp and TI are functions of the (time-varying) critical gain and the critical period of oscillations, respectively, KPu and Tu:

$$K\_p = 0.6 K\_{P\_{\text{ul}}} \qquad \qquad T\_I = 0.5 T\_\text{u} \tag{33}$$

that depend on the time-varying model parameters in the vector θk. In particular, when considering a second-order model described by its (time-varying) parameters <sup>b</sup>a2, <sup>b</sup>a1, <sup>b</sup>b<sup>2</sup> and bb1, the variables KPu and Tu required by the Ziegler-Nichols method can be computed at each time step k from the following relations:

$$\begin{cases} K\_{P\_u} = \frac{\widehat{a}\_1 - \widehat{a}\_2 - 1}{\widehat{b}\_2 - \widehat{b}\_1} \\\\ T\_u = \frac{2\pi T\_s}{\text{arccoss}\chi}, \qquad \text{with } \chi = \frac{\widehat{a}\_2 \widehat{b}\_1 - \widehat{a}\_1 \widehat{b}\_2}{2\widehat{b}\_2} \end{cases} \tag{34}$$

In this way, the adaptive discrete-time linear controllers of Eq. (30) or (31) are designed on the basis of the time-varying linear model of Eq. (9) estimated via the online identification scheme from the data of the nonlinear wind turbine process of Eq. (3).

Finally, Section 4 will show the achieved results regarding the design and the application of the adaptive controller to the data from the wind turbine benchmark.
