## 5 Evaluation of Countermeasures against ZDA  
In this section, we apply the theory given in Section 4 and demonstrate that the two countermeasures that can shift the zeros into the stable region effectively reveal the presence of ZDA. Although both approaches work well in ideal situations, they also face challenges arising from practical issues such as nonlinearities and measurement noise. These issues are also discussed through intensive numerical simulations. Following the procedure described in Section 4, a GH is designed so that the discrete-time system has zeros at \(z_{d,1}=0.1\) and \(z_{d,1}=0.9\). We use a piecewise constant hold function with three subintervals (\(N=3\)) and the hold gain is \(h=[2.155,-0.577,1.422]^{\top}\). The sampling time is given by \(T_{\rm s}=0.1\) s. Figure 8 shows the behavior of the system under the ZDA (11) that has been designed using the system parameters \(S_{\rm d},S_{\rm d}\), and \(\psi_{\rm d}\) assuming that ZOH and SS are used to interface analog and digital signals. The attack is injected when the system is at a steady state (rated power point). It is seen that the generator angular velocity \(\omega_{g}(t)\) starts oscillating with increasing magnitude and this is captured by the sampled output \(\omega_{g}(kT_{\rm s})\) (denoted as \(\omega_{g,\rm GH}\) in the figure) when GH is used, while the sampled output under ZOH remains almost unchanged. It is noted that the signal \(\omega_{g,\rm ZOH}\) also diverges as time goes to infinity but very slowly compared to \(\omega_{g,\rm ZOH}\), which means that it is practically meaningless to use \(\omega_{g,\rm ZOH}\) as a monitoring signal for the purpose of attack detection. This comes from the nonlinearity of the wind turbine; the diverging attack signal makes the state variables escape the region where the linear approximation is valid. It is well known that even though a GH can shift the zeros to desired locations, it may induce a violent transient between sampling instants [20]. Typically, this can happen when the pattern associated to the GH has a large transition. For example, consider the GH designed above and suppose that the control input generated by the GH using \(u_{k}=T_{g}\), shown in Figure 9a, is applied to the wind turbine. Then, as can be seen in Figure 9b, the sampled output \(\omega_{g,\rm GH}\) seems to converge to a constant, but its continuous-time counterpart oscillates severely, and this can happen even if no attack is injected. The possibly undesirable intersample behavior can be avoided by using GS instead of SS at the output side and using ZOH at the input side. To demonstrate this, we follow the  
Figure 8: Response of the wind turbine under ZDA, generalized hold (GH) with desired zeros 0.1 and 0.9. (**a**) Response of system output (generator angular velocity), continuous-time signal \(\omega_{g,\text{GH}}(t)\) and its sampled signal \(\omega_{g,\text{GH}}\). For comparison, \(\omega_{g,\text{ZOH}}\) (identical to Figure 7a) is also drawn. (**b**) Response of internal variable, \(\omega_{r}\). (**c**) Response of internal variable, \(\mathcal{Q}_{i}\). Figure 9: (**a**) Control input generated by a GH; (**b**) generator angular velocity \(\omega_{g}(t)\) and its sampled signal \(\omega_{g,\text{GH}}\). design described in Section 4 to obtain a GS with \(N=4\) and \(w=[-28.252,58.5731,-70.906,41.5846]\) so that the zeros are placed at \(z_{d,1}=0.1\), \(z_{d,2}=0.9\), and \(z_{d,3}=0\). Figure 10 shows that the presence of ZDA can be detected by monitoring the signal \(\omega_{g,\text{GS}}\), which is the output of the GS. In the simulation, the same ZDA injected in the case of GH is used. It is emphasized that the behavior of the internal states are the same as the case with ZOH and SS shown in Figure 7, and it is free of violent intersample behavior possibly induced by a GH. In practice, the noise of measurements is always present and if the weights of GS are very large, then the noise will be amplified, leading to a false alarm.