## 4 Wind System Control at Variable Wind Speeds from \(V_{max}\) [m/s] up to 21 [m/s]
### A Model Predictive Adaptive Controller  
A model predictive adaptive controller (MPAC) is next designed [53; 54; 55; 56; 57; 58; 59], starting from the linearized model \(P_{TV}(s)=k_{\beta}\beta(s)+k_{V}V(s)\). The design is carried out with respect to the input channel \(\beta\), thus ignoring the effect of \(V\) directly; however, for model uncertainty and disturbance rejections, we augment the control input channel with an integrator. Hence, the augmented model for MPAC design becomes \(P_{TV}(s)=\frac{k_{\beta}}{s}\ \beta^{\prime}(s)\), with \(\beta^{\prime}\) the control input derivative. We discretize the model using the zero-order hold method and arrive at  
\[P_{TV,k}=P_{TV,k-1}+k_{\beta}T_{s}\beta^{\prime}_{k}=P_{TV,k-1}+k_{d}\beta^{ \prime}_{k}, \tag{24}\]  
which incorporates the sampling period \(T_{s}\). Let the output predictors \(\hat{P}_{TV,k+i},i=1,\ldots,N\) be unfolded over time as  
\[\begin{pmatrix}\hat{P}_{TV,k+1}\\ \hat{P}_{TV,k+2}\\ \vdots\\ \hat{P}_{TV,k+N}\end{pmatrix}=\begin{pmatrix}P_{TV,k}\\ P_{TV,k}\\ \vdots\\ P_{TV,k}\end{pmatrix}+\begin{pmatrix}k_{d}&0&\ldots&0\\ k_{d}&k_{d}&\ldots&0\\ \vdots&\vdots&\ddots&\vdots\\ k_{d}&k_{d}&\ldots&k_{d}\end{pmatrix}\begin{pmatrix}\beta^{\prime}_{k}\\ \beta^{\prime}_{k+1}\\ \vdots\\ \beta^{\prime}_{k+N-1}\end{pmatrix}\leftrightarrow\hat{\mathbb{P}}_{\text{TV} }=\Psi+PB, \tag{25}\]  
where the \(\hat{P}_{TV}\) vector stacks the future outputs, the \(\Psi\) vector is the current state context and \(B=\left[\beta^{\prime}_{k},\ldots,\beta_{k+N-1}\right]^{T}\) stacks the present and future control input derivatives, \(P\) is the input predictor matrix. Define the receding horizon cost  
\[J(k)=\sum_{i=1}^{N}\big{(}r_{k+i}-\hat{P}_{TV,k+i}\big{)}^{2}+\lambda\big{(} \beta^{\prime}_{k+i-1}\big{)}^{2}=\big{(}R-\hat{P}_{TV}\big{)}^{T}\big{(}R- \hat{P}_{TV}\big{)}+\lambda B^{T}B, \tag{26}\]where \(R=[r_{k+1},\ldots,r_{k+N}]^{T}\) stacks the future reference inputs and \(\lambda\) is a control energy/effort penalty. The cost is written as \(J(k)=B^{T}\big{(}P^{T}P+\lambda I\big{)}B-2M^{T}PB+M^{T}M\) with \(M=R-\Psi\) and \(I\) the identity matrix of appropriate size. Define the inequality type constraints \(\beta_{min}\leq\beta_{k+i}^{\prime}<\beta_{max},i=1,\ldots\ N-1\) and rewrite in matrix form as  
\[\begin{pmatrix}I\\ -I\end{pmatrix}B\leq\begin{pmatrix}B_{max}\\ -B_{min}\end{pmatrix}, \tag{27}\]  
where \(B_{max}=[\beta_{max},\ldots,\beta_{max}]^{T}\in\mathbb{R}^{N},B_{min}=[\beta_ {min},\ldots,\beta_{min}]^{T}\in\mathbb{R}^{N}\) capture the upper and lower bound constraints on the control input derivative, in linear form. A more compact form of the linear constraints in the input is \(AB\leq N,\ A=\begin{pmatrix}I\\ -I\end{pmatrix},\ N=\begin{pmatrix}B_{max}\\ -B_{min}\end{pmatrix}\). The MPAC control algorithm is finally expressed as  
\[B^{*}=\arg\!\min_{B}\!J(k),\ \ s.t.\ AB\leq N, \tag{28}\]  
and it is solved as a convex quadratic optimizer, benefiting the inherent favorable structure of the problem. In general, in MPAC for nonlinear systems where the problem structure cannot be exploited, other numerical-based search algorithms must be used [60; 61]. Based on the receding horizon principle, only the first component of \(B\) is extracted and next sent to the plant for actuation, i.e., \(\beta_{k}^{\prime}=B(1)\), and that implies numerical integration through the artificial integrator augmenting the plant model in the first place.  
Notice that in the MPAC, the parameter \(k_{\beta}\) adapts online with the current linearization point, and hence, it triggers the online update of \(k_{d}\) and of the matrix \(P\). The matrix \(\Psi\) is updated online based on the last controlled output. Parameter \(\lambda\) acts as a regularizer that trades off fast response time and robustness against uncertainty and disturbances. The input control constraints also act as regularizers with a similar effect; hence, more hyperparameters lead to more flexibility in the design. The artificial integrator augmenting the base dynamics adds another level of robustness.