# Enhancing Unmanned Marine Vehicle Security: A Periodic Watermark-Based Detection of Replay Attacks
## 4 Numerical Simulation  
This section validates the efficacy of replay attack detection. The UMVs model selected for this study, borrowed from [PERSON] et al. [30] and [PERSON] et al. [33], is presented below:  
\[\mathbb{M}=\left[ \begin{array}{cccc}1.0852&0&0\\ 0&2.0575&-0.4087\\ 0&-0.4087&0.2153\end{array} \right],\mathbb{N}=\left[ \begin{array}{cccc}0.0865 &0&0\\ 0&0.0762&0.1510\\ 0&0.1510&0.0031\end{array} \right],\mathbb{O}=\left[ \begin{array}{cccc}1.0389& 0&0\\ 0&0.0266&0\\ 0&0&0\end{array} \right].\]  
For the UMVs to effectively track the reference system's output through the yaw angle, consider the following matrix \(C=\left[ \begin{array}{cccc}0&0&1&0&0&0\end{array} \right]\). The disturbance \(\theta(k)\) is presented as:  
\[\left\{ \begin{array}{l}\theta_{1}(k)=0.27F_{1}(s)\mathbb{N}_{1}(k)\mathbb{N }_{2}(k)\\ \theta_{2}(k)=-0.6\cos(1.6k)e^{-0.12k}\\ \theta_{3}(k)=0.58F_{2}(s)\mathbb{N}_{3}(k)\mathbb{N}_{4}(s)\end{array} \right.\]  
where \(F_{1}(s)\triangleq[K_{\theta 1}s/(s^{2}+2h_{1}\zeta_{1}s+\zeta_{1}^{2})]\) and \(F_{2}(s)\triangleq[K_{\theta 2}s/(s^{2}+2h_{2}\zeta_{2}s+\zeta_{2}^{2})]\). Designated wave strength coefficients are \(K_{\theta 1}=0.26\) and \(K_{\theta 2}=0.8\). The damping factors, \(h_{1}=0.2\) and \(h_{2}=1.7\). The frequencies of the waves are \(\zeta_{1}=1.3\) and \(\zeta_{2}=0.9\). Levels of white noise power are \(\mathbb{N}_{1}(k)=2.69\) and \(\mathbb{N}_{3}(k)=1.56\). Where  
\[\mathbb{N}_{2}(\text{t})=\!\left\{ \begin{array}{c}1,t\in[0s,20s]\\ 0,t>20s\end{array} \right.\quad,\ \mathbb{N}_{4}(\text{t})=\!\left\{ \begin{array}{c}1,t \in[0s,15s]\\ 0,t>15s\end{array} \right.\]  
At \(t_{0}=50\) s, assuming the injected watermark signal has a periodicity of \(T=10\) s with \(\Sigma_{o}=0.5763\), there exist \(A_{dp}^{10T}\approx 0\). After 10 periods of watermark signal injection, the injected watermark and compensation signals are illustrated in Figure 7. As depicted in the following figures, both the compensation and watermark signals exhibit periodic behavior with distinct values within each period. In the following, an evaluation of watermark signal periods is conducted, detailing detection rates and false alarm rates under two types of replay attacks at various watermark intervals, as shown in Table 2. For the same watermark signal value, \(\Sigma_{o}=0.5763\), \(\beta\) values for both continuous and discontinuous replay attacks exhibit an increase for \(T<10\). Conversely, \(\beta\) values decrease as the watermark period increases beyond \(T>10\). Based on these observations, a period of \(T=10\) has been selected. In scenarios devoid of process and measurement noise interference, with \(\Sigma_{o}=0.015\) and \(\Sigma_{o}=0.4353\), the detection results under normal system operation are as illustrated in Figure 8. The values of the discriminant function are consistently zero, indicating the absence of false positives. With noise interference present in the system, the watermark signal variances are set to \(\Sigma_{o}=0.015\) and \(\Sigma_{o}=0.4353\), with the corresponding normal  
Figure 7: The periodic watermarking signal and the periodic compensation signal with a period of \(T=10\). operational detection results displayed in Figure 9, respectively. The state noise and measurement noise in the system can lead to false negatives and false positives. As the variance \(\Sigma_{o}\) of the watermark signal increases, the incidence of false positives decreases. **Case 1: The UMVs system is subjected to continuous replay attacks. ** Setting the watermark signal at \(\Sigma_{o}=0.5763\), data are recorded by the attacker from 30 to 40 s. As illustrated in Figure 10 (left figure), the UMVs undergo replay attacks from 650 to 950 s. Similarly, as shown in Figure 10 (right figure), replay attacks occur from 750 to 1000 s. This case study aims to test the strategy's effectiveness in detecting prolonged continuous replay attacks. **Case 2: The UMVs system is subjected to discontinuous replay attacks.