# Control of a Variable Blade Pitch Wind Turbine Subject to Gust Wind and Actuators Saturation
## 2 Materials and Methods
### Takagi-Sugeno Fuzzy Model  
A nonlinear dynamic system with disturbances is be represented by the following (T-S) fuzzy model:  
Model Rule \(i\): IF \(z_{1}(t)\) is about \(\mu_{i1}[z_{1}(t)]\), \(\ldots,z_{p}(t)\) is about \(\mu_{ip}[z_{p}(t)]\), THEN  
\[ \begin{cases}\dot{x}(t)=A_{i}x(t)+B_{i}u(t)+D_{i}\varphi(t)\\ y(t)=C_{i}x(t)\end{cases}  \tag{9}\]  
where \(\mu_{ij}[z_{p}(t)]\) is the grade of the membership of \(z_{p}(t)\), \(x\) represents the state vector, \(u\) is the control input vector, \(y\) is the output vector, (\(i=1,2,\ldots,r\)) specifies the number of fuzzy rules, and \(\varphi(t)\) represents the disturbance. \(A_{i}\), \(B_{i}\), \(D_{i}\), and \(C_{i}\) are known constant matrices with appropriate dimensions. The firing strength of each rule can be determined using _T-norm_ product as follows:  
\[w_{i}[z(t)]=\prod_{j=1}^{p}\mu_{ij}[z_{p}(t)] \tag{10}\]  
and the normalized membership functions are computed as  
\[h_{i}[z(t)]=\frac{w_{i}[z(t)]}{\sum_{i=1}^{r}w_{i}[z(t)]} \tag{11}\]  
connecting all the rules, the (T-S) fuzzy model takes the following form:  
\[\Sigma_{T--S}: \begin{cases}\dot{x}(t)=\sum_{i=1}^{r}h_{i}[A_{i}x(t)+B_{i}u(t)+ D_{i}\varphi(t)]\\ y(t)=\sum_{i=1}^{r}h_{i}C_{i}x(t)\end{cases}  \tag{12}\]  
There are many advantages of using fuzzy logic controllers over conventional controllers. For instance, if the (T-S) fuzzy model is derived using the sector nonlinearity approach [42], it will provide a way to obtain an exact representation of the full nonlinear model as a weighted combination of linear submodels, where the nonlinearities of the system are shifted into the membership functions. Moreover, the advantage of the fuzzy logic controller is its aptitude for dealing with nonlinearities and uncertainties. Other advantages of the Fuzzy logic controller, to mention a few, can be illustrated as follows:  
* They are cheaper to develop, they cover a wider range of operating conditions, and they are more readily customizable in natural language terms. * They are quick to comprehend conceptually, the ideas underlying them are fundamental. * They are flexible, they enable emerging Fuzzy structures to be applied to their features by applying new information to established rules. * They are tolerant of incorrect data, complex uncertainty, and unmodeled dynamics. Because of these advantages, (T-S) fuzzy model structures are an ideal basis for the design of controllers and observers. In this paper, we derive an approximated (T-S) fuzzy model Equation (12) by linearizing the nonlinear model equations around different operating points and using predefined fuzzy membership functions to combine the linear submodels to an overall nonlinear model. For instance, when the rotor is operating around the nominal speed, the aerodynamic torque might be estimated as  
\[T_{a}\approx\frac{\partial T_{a}}{\partial\omega_{r}}\omega_{r}+\frac{\partial T_ {a}}{\partial\beta}\beta+\frac{\partial T_{a}}{\partial V}V \tag{13}\]  
Considering the following premises variable represented by two rules each:  
\[ \begin{cases}\omega_{r}\in[0.1\;\;3]\;\text{rad}/\text{s}\\ \beta\in[0\;\;30]\;\text{deg}\\ V\in[0\;\;30]\;\text{m}/\text{s}\end{cases}  \tag{14}\]  
and the state vector \(x=[\theta_{r}\;\theta_{g}\;\omega_{r}\;\omega_{g}\;\beta]^{T}\), and the control input vector \(u=[T_{em}\;\beta_{d}]^{T}\), then the dynamic model represented by Equation (6) takes the form of Equation (9). The matrices \(A_{i}\), \(B_{i}\), \(D_{i}\), and \(C_{i}\) in Equation (9) are obtained by local approximation in fuzzy partition space of the premise variables \(\omega_{r}\), \(\beta\), and \(V\), and is shown below. \[A_{i}=\left[