## 2 Dynamic Model of Wind Turbine
### Discrete-Time Linear Model  
Most modern control systems are controlled by digital devices. One of the well-established procedures to develop controllers is based on discretization of the system model. In this subsection, we first linearize the wind turbine system (2) with \(T_{a}\) given by (3) around a point of the rated power operation and then discretize under the assumption that ZOH at the actuator side and simple sampler (SS) at the sensor side are used. It is emphasized that this discrete linear model containing unstable zeros can be used to generate an undetectable cyberattack, which will be discussed in the later part of this paper. It is observed that the aerodynamic torque \(T_{a}\) given in (3) is a nonlinear function of \(\omega_{r}\) and \(V\), and it can be linearized around an operating point (\(\bar{\omega}_{r},V\)) (the rated power point) [30; 34] as  
\[\hat{T}_{a}=k_{\omega_{r}}(\bar{\omega}_{r},\bar{V})\hat{\omega}_{r}+k_{V}( \bar{\omega}_{r},\bar{V})\hat{V}, \tag{5}\]  
where \(\bar{\omega}_{r}\) and \(\bar{V}\) are the values of \(\omega_{r}\) and \(V\) at the operating point, \(\hat{\omega}_{r}=\omega_{r}-\bar{\omega}_{r}\), \(\hat{V}=V-\bar{V}\), and \(\hat{T}_{a}=T_{a}-\hat{T}_{a}\) (\(\hat{T}_{a}\) is the aerodynamic torque at the operating point). The gains \(k_{\omega_{r}}\) and \(k_{V}\) are given by  
\[ \begin{split} k_{\omega_{r}}(\bar{\omega}_{r},\bar{V})& =\left.\frac{\partial T_{a}}{\partial\omega_{r}}\right|_{(\bar{ \omega}_{r},\bar{V})}&=\left.\frac{1}{2}\rho\pi R^{4}\bar{V} \frac{\partial C_{q}}{\partial\lambda}\right|_{(\bar{\omega}_{r},\bar{V})}\\ k_{V}(\bar{\omega}_{r},\bar{V})&=\left.\frac{ \partial T_{a}}{\partial V}\right|_{(\bar{\omega}_{r},\bar{V})}& =\left.\frac{1}{2}\rho\pi R^{3}\bar{V}\left(2C_{q}-\lambda\frac{ \partial C_{q}}{\partial\lambda}\right)\right|_{(\bar{\omega}_{r},\bar{V})}. \end{split} \]  
Substituting (5) to the dynamics (2), a linearized state-space model is obtained as  
\[ \begin{split}\dot{\hat{x}}&=\hat{A}_{s}\hat{x}+\hat{B }_{s}\hat{u}+\hat{B}_{V}\bar{V}\\ \hat{y}&=C_{s}\hat{x},\end{split}  \tag{6}\]where \(\hat{x}=[\hat{\omega}_{r},\hat{\omega}_{g},\hat{Q}_{s}]\); \(\hat{u}=\hat{T}_{g}\); and the matrices \(\hat{A}_{s}\), \(\hat{B}_{s}\), \(\hat{B}_{V}\), and \(C_{s}\) are given by  
\[\hat{A}_{s} = \begin{bmatrix}(k_{\omega_{r}}-D_{sh})/J_{r}&D_{sh}/J_{r}&-1/J_{ r}\\ D_{sh}/J_{g}&-D_{sh}/J_{g}&1/J_{g}\\ K_{sh}&-K_{sh}&0\end{bmatrix} ,\hat{B}_{s}= \begin{bmatrix}0\\ -1/J_{g}\\ 0\end{bmatrix} \] \[\hat{B}_{V} = \begin{bmatrix}k_{V}/J_{r}\\ 0\\ 0\end{bmatrix} ,\,C_{s}= \begin{bmatrix}0&1&0\end{bmatrix} .\]  
From this linear model, the transfer function from \(\hat{T}_{g}\) to \(\hat{\omega}_{g}\) is computed as  
\[G(s)=\frac{\hat{\omega}_{g}(s)}{\hat{T}_{g}(s)}=-\frac{b_{2}s^{2}+b_{1}s+b_{0} }{a_{3}s^{3}+a_{2}s^{2}+a_{1}s+a_{0}}, \tag{7}\]  
where  
\[ \begin{array}{l}a_{3}=J_{r}J_{g},\quad a_{2}=D_{sh}(J_{r}+J_{g})-k_{\omega_{ r}}(\bar{\omega}_{r},\bar{V})J_{g}\\ a_{1}=K_{sh}(J_{r}+J_{g})-k_{\omega_{r}}(\bar{\omega}_{r},\bar{V})D_{sh}, \quad a_{0}=-k_{\omega_{r}}(\bar{\omega}_{r},\bar{V})K_{sh}\\ b_{2}=J_{r},\quad b_{1}=D_{sh}-k_{\omega_{r}}(\bar{\omega}_{r},\bar{V}),\quad b _{0}=K_{sh}.\end{array} \]  
From the linearized model (6), we derive a discrete-time model for the purpose of controller design. Let \(T_{s}\) be the sampling time and suppose that the control input \(u_{k}\) is determined by a digital controller and the actual control input \(\hat{u}(t)\) is generated via ZOH so that \(\hat{u}(t)=\hat{u}_{k}\) for \(kT_{s}\leq t<(k+1)T_{s}\), where \(k\) is a non-negative integer. The measured output that is transmitted to the controller is sampled at each sampling time \(kT_{s}\), we call this sampling device a simple sampler, and this sampled output is denoted by \(\hat{y}_{k}\).