# Wind Turbines Optimal Operation at Time Variable Wind Speeds
## 6 Case Study
### PI-Based Control of the PMSG's Optimal Power  
For the case study in this paragraph, the same experimental data are used as those used for the previous case study. Therefore, the system of differential equations in Equation (27) becomes  
\[\left\{ \begin{array}{l}1.15\times 10^{5}\frac{d\omega(t)}{dt}\omega(t)=2.2566 \times 10^{6}\Big{(}\frac{S_{w}(t)}{\omega(t)}-2.6247\times 10^{-2}\Big{)}e^{-58.6 17\frac{S_{w}(t)}{\omega(t)}}S_{w}^{3}(t)-P_{PMSG_{e}PI}(t)\\ \frac{dP_{PMSG_{e}PI}(t)}{dt}=k_{p}\frac{d\omega(t)}{dt}-23.091k_{p}\frac{dS_ {w}(t)}{dt}+k_{i}(\omega(t)-23.091S_{w}(t))\end{array} \right. \tag{58}\]  
and by replacing the wind speed time-varying curve, \(S_{w}(t)\), and its first order derivative, \(\frac{dS_{w}(t)}{dt}\), from Equations (44) and (45), respectively, the system of differential equations is obtained as \[\left\{ \begin{array}{l}1.15\times 10^{5}\frac{d\omega(t)}{dt}\alpha(t)=2.2566\times 10^{6 }\Big{(}\frac{\left(-1.5724\times 10^{-6}t^{2}+7.2086\times 10^{-4}t+6.24\right)}{ \omega(t)}-2.6247\times 10^{-2}\Big{)}\\ -58.617\frac{\left(-1.5724\times 10^{-6}t^{2}+7.2086\times 10^{-4}t+6.24 \right)}{\omega(t)}\\ \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\times e(-1.5724\times 10^{-4}t^{2}+7.2 086\times 10^{-4}t+6.24)^{3}-P_{PMSC\_PI(t)}\\ \frac{dP_{PMSC\_PI(t)}}{dt}=k_{p}\frac{d\omega(t)}{dt}-23.091k_{p}\Big{(}-3.14 48\times 10^{-6}t+7.2086\times 10^{-4}\Big{)}+\\ +k_{q}\Big{(}\omega(t)-23.091\Big{(}-1.5724\times 10^{-6}t^{2}+7.2086\times 10^{-4 }t+6.24\Big{)}\Big{)}\end{array} \right. \tag{59}\]  
The initial conditions of the differential equations system are calculated from Equations (3), (26) and (45), and from Table 1, considering \(t=0\) (s). Their expressions are the following ones:  
\[\left\{ \begin{array}{l}\omega(0)=\omega_{optim}(0)=23.091\times S_{w}(0)=23.091\times 6.24=144.09\\ \frac{d\omega(0)}{dt}=23.091\frac{d\omega_{S_{w}}(0)}{dt}=23.091\times\left(-3.1448\times 10^{-6}\times 0+7.2086\times 10^{-4}\right)=1.6645\times 10^{-2} \\ P_{PMSG\_PI}(0)=2.2566\times 10^{6}\Big{(}\frac{6.24}{144.09}-2.6247\times 10^{-2} \Big{)}e^{-58.617}\frac{6.24}{14.09}\left(6.24\right)^{3}-1.15\times 10^{5}1.6645 \times 10^{-2}144.09\\ =4.6297\times 10^{5}\end{array} \right. \tag{60}\]  
The final conditions of the differential equations system are calculated from Equations (3), (26) and (45), and from Table 1, considering \(t=570\) (s). Their expressions are the following ones:  
\[\left\{ \begin{array}{l}\omega(570)=\omega_{optim}(570)=23.091\times S_{w}(57 0)=23.091\times 6.14=141.78\\ \frac{d\omega(570)}{dt}=23.091\frac{d\omega_{S_{w}}(570)}{dt}=23.091\times\left( -3.1448\times 10^{-6}\times 570+7.2086\times 10^{-4}\right)-5.3879\times 10^{-2} \\ P_{PMSG\_PI}(570)=2.2566\times 10^{6}\Big{(}\frac{6.14}{141.78}-2.6247\times 10^{-2} \Big{)}e^{-58.617}\frac{6.14}{141.78}\left(6.24\right)^{3}-1.15\times 10^{5}1.6645 \times 10^{-2}141.78\\ =1.5823\times 10^{6}\end{array} \right. \tag{61}\]  
The values of the proportional constant, \(k_{p}\), and of the integral constant one, \(k_{i}\), are determined by successive simulations using the trial and error tuning method, so that the power oscillations are as small as possible, and the PMSG's angular speed value, \(\omega\), is made to be approximatively equal to the optimal value of the PMSG's angular speed, \(\omega_{optim}\). The method is now presented. The I and D terms are set to zero first, and the proportional gain is increased until the output of the loop oscillates; once P has been set to obtain a desired fast response, the integral term is increased to stop the oscillations. The integral term reduces the steady state error, but increases overshoot. Once the P and I have been set to get a fast system's response, the derivative term is then increased until the loop is acceptably quick.