# Investigation into the Yaw Control of a Twin-Rotor 10 MW Wind Turbine
## 3 WT Yaw Mechanism
### Sliding Mode Control  
Due to the significant nonlinearity of the yaw mechanism of this work, SMC was used to address the nonlinear tracking problem and maintain the system's state within the control limits. Two steps were carried out to obtain SMC. The first step was to create the sliding surface on which the system's behavior was restricted, to obtain the desired response. Hence, the system's state dynamic variables were constrained to satisfy a set of differential equations with lower degrees of freedom, defining the so-called switching surface. The second step was to obtain switch feedback gains to help the system's state follow the sliding surface [41].  
The sliding surface for the SMC is defined as follows:  
\[s=\left(\frac{de(t)}{dt}+C\cdot e(t)\right)^{n-1} \tag{24}\]  
where C is a strictly positive constant that represents the bandwidth of the motor's system, \(e\) is the error signal, and \(n\) is the system's TF degree order. This work used a DC motor with a second-degree TF, so by substituting the angle error and \(n\) = 2 into Equation (24), the sliding surface is given as follows:  
\[s=\frac{d\theta_{e}(t)}{dt}+C\cdot\theta_{e} \tag{25}\]  
The control signal that the system can maintain and which can reach the sliding surface is subject to the following:  
\[s\cdot\dot{s}>0 \tag{26}\]  
\[u=K\cdot sgn(s) \tag{27}\]  
where the discontinuous controller output signal is obtained using a sign function, and the variable is the value of the instantaneous sliding surface, while \(K\) is a positive constant. The sign function is defined as follows:  
\[s=\begin{cases}-1,&s<0\\ +1,&s\geq 0\end{cases} \tag{28}\]  
However, the sign function leads to the chattering phenomenon, which may harm the motor's system. Using a pseudo function instead of the sign function can solve this chattering problem, as follows:  
\[u=K\cdot\frac{s}{|s|+\delta} \tag{29}\]  
where \(\delta\) is a positive tuning parameter to reduce the chattering around the sliding surface. Selecting the proper value for \(\delta\) is crucial; if it is too small, the chattering problem will not be solved, and if it is too big, it will be difficult to reach the reference value.  
PID controllers are known to be a robust solution for controlling motor speeds, and they are also easy to implement. Thus, to ensure the motor's performance, a comparison was made between a PID controller and the SMC algorithm for controlling the DC motor system, and their performances were tested. The PID parameters were automatically  
\begin{table}
\begin{tabular}{l c} \hline \hline
**Parameter** & **Value** \\ \hline DC Supply Voltage (V) & 220 V \\ DC Motor Capacity (P) & 3 HP \\ Armature Resistance (R) & 0.6 \(\Omega\) \\ Armature Inductance (L) & 0.008 H \\ Inertia Constant (J) & 0.011 Kg.m\({}^{2}\) \\ Viscous Damping Constant (B) & 0.004 Nm/rad/s \\ Torque Constant (K\({}_{\mathrm{t}}\)) & 0.55 \\ Back EMF Constant (K\({}_{\mathrm{v}}\)) & 0.55 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Separately excited DC motor specs. [39].  
tuned via the parameter tuner in the Simulink PID controller block. Figure 5 shows the applications of both SMC and PID to the DC motor system with a constant input signal.  
The simulation results of the WT's system model and sliding mode control model are presented and discussed in detail in the Results and Discussion section.