## 2 Materials and Methods
### Mathematical Model  
SHAWT's mathematical model is developed by three blocks, the rotor aerodynamics, the mechanical system, and the PMSG.  
\begin{table}
\begin{tabular}{c c c c} \hline Power & 14 kW & Apparent power & 14.3 kVA \\ Phases & 3 & Frequency & 20.3 Hz \\ Volts AC & 385 V & Power factor & 0.945 \\ Amps AC & 22.2 A & Insulation class & H \\ Revolutions per minute & 135 & Service & Continuous \\ Frame & TC5V & Maximum temperature & 80 \({}^{\circ}\)C \\ IP Class & IP32 & Weight (kg) & 650 \\ \hline \end{tabular}
\end{table}
Table 1: PMSG specifications.  
In the aerodynamic model, the wind energy that turns the rotor is calculated. The wind power is described in Equation (1) [21]. (The symbols used in each of the equations are defined in the nomenclature at the end of the paper.)  
\[P_{rotor}=\frac{1}{2}\rho\ A\ V^{3}\ Cp \tag{1}\]  
\(Cp\) is obtained experimentally for values \(3<\lambda<15\), presented in Equation (2) [22].  
\[Cp=\left(\sum_{i=0}^{4}\sum_{j=0}^{4}\alpha_{i,j}\beta^{j}\lambda^{i}\right) \tag{2}\]  
\(\lambda\) is obtained by Equation (3) [22] and values of \(\alpha_{i,j}\) are presented in Table 2.  
\[\lambda=\frac{w_{rotor}R}{V} \tag{3}\]  
Figure 1: Three-blade wind turbine.  
The torque of the rotor is determined by Equation (4) [23].  
\[T_{rotor}=\frac{1}{2}\rho\ \pi\ R^{3}V^{2}\frac{C_{p}}{\lambda} \tag{4}\]  
The mechanical system is modeled as a system of two opposing masses, the rotor and the generator, and the rotational speeds are the resulting variables. The mathematical model is determined by Equations (4)-(6) [24].  
\[\frac{dw_{gen}}{dt}=\frac{1}{2H_{gen}}\bigg{[}\frac{P_{dec}}{w_{gen}+w_{0}}-d_{ rg}\big{(}w_{gen}-w_{rot}\big{)}-k_{rg}\Delta\theta_{m}\bigg{]} \tag{5}\]  
\[\frac{dw_{rot}}{dt}=\frac{1}{2H_{rot}}\bigg{[}-\frac{P_{rotor}}{w_{rot}+w_{0}} +d_{rg}\big{(}w_{gen}-w_{rot}\big{)}+k_{rg}\Delta\theta_{m}\bigg{]} \tag{6}\]  
\[\frac{d(\Delta\theta_{m})}{dt}=w_{ref}\big{(}w_{gen}-w_{rot}\big{)} \tag{7}\]  
In a two-mass system, the rotor and generator relate to an equivalent shaft stiffness \(k_{rg}\), which can be determined from the parallel shaft stiffness as in (8) [24]. The generator and gearbox damping must be added together in \(d_{rg}\), and the mutual damping of the gearbox and generator is neglected in the two-mass shaft model.  
\[\frac{1}{k_{rg}}=\frac{1}{\bigg{(}\frac{k_{rg}}{\pi_{gb}^{2}}\bigg{)}}+\frac{1 }{k_{gbg}} \tag{8}\]  
Inertial moments are calculated according to (9) and (10) [22].  
\[H_{rotor}=\frac{J_{rotor}}{2\ P_{nom}} \tag{9}\]  
\[H_{gen}=\frac{J_{gen}}{2\ P_{nom}} \tag{10}\]  
The inertia of the rotor is approximated with (11) [22]. The rotor mass \(m_{r}\) includes all blades. Generator inertia \(J_{gen}\) is regularly provided by the manufacturer.  
\[J_{rotor}=\frac{1}{8}m_{r}R^{2} \tag{11}\]  
A PMSG is modeled with two axes (\(d\)) and (\(q\)), out of phase by 90 electrical degrees in a synchronous rotation. The \(d\)-\(q\) stator voltages are given in (12) and (13) [23].  
\[V_{d}=R_{d}I_{d}+L_{d}\frac{dI_{d}}{dt}-\omega_{gen}L_{q}I_{q} \tag{12}\]  
\[V_{q}=R_{q}I_{q}+L_{q}\frac{dI_{q}}{dt}+\omega_{gen}\Big{(}L_{d}I_{d}+\varphi_ {f}\Big{)} \tag{13}\]  
The rotational speed of the generator and the reference speed calculated for power levels below 46% are described with (14) and (15), respectively [21]. Finally, the electromechanical torque is expressed as (16) [21].  
\[\omega_{gen}=P_{p}\omega_{ref} \tag{14}\]  
\[w_{ref}=-0.75P_{dec}^{2}+1.59P_{dec}+0.63 \tag{15}\]  
\[T_{gen}=\frac{3}{2}P_{p}\omega_{ref}\Big{(}(L_{q}-L_{d})i_{d}i_{q}+\varphi_{f}i _{q}\Big{)} \tag{16}\]