## 4 Computer Simulation Examples  
In this section, to verify the effectiveness of our work, two examples are implemented using the MATLAB R2023b Toolbox. To the best of our knowledge, this paper is novel in addressing robust \(H_{\infty}\) controls that consider time-varying delays, cyber-attacks, and randomly occurring uncertainties for AUV systems. Using computer simulations, we compare the performance of our robust \(H_{\infty}\) control with controls in [19,20], and demonstrate the outperformance of the proposed \(H_{\infty}\) control. **Example 1**. : _The simulations are conducted on a model of an autonomous underwater vehicle [19]. The system matrices are converted from discrete-time to continuous-time using the MATLAB command \"d2c\". The AUV system matrices are listed in Table 1, and the matrices \(A_{d}= \begin{bmatrix}0&0&0\\ 0&0&0\\ 0&0.0017&0.0035\end{bmatrix} \), \(B_{w}=B\). The initial states are \(x(0)=[0.1\ \text{m}\ -0.1\ \text{m}\ \ 0^{\circ}]^{\mathsf{T}}\), external disturbance \(w(t)=0.01 sin(t)+0.005 sin(u(t))\), and time-varying delay \(\tau(t)=0.98+0.95 sin(t)\). In order to describe the uncertain measurements:_  
\[M_{1}=M_{2}= \begin{bmatrix}0&0\\ 0&0\\ 0.0086&0.0069\end{bmatrix} ,\ N_{1}=N_{2}= \begin{bmatrix}1&0&0.4\\ 0&1&0\end{bmatrix} ,\ \Delta(t)= \begin{bmatrix}cos(t)&0\\ 0&sin(t)\end{bmatrix} .\]  
The first four cases present the simulation results for Theorem 1, and the last case presents the simulation results for Theorem 3. 1. (AUV system I with time-varying delay) For the simulation of Theorem 1, using the following parameter values: time \(t=0.01s\), \(H_{\infty}\) performance level minimum \(\gamma=0.02\), lower bound \(\tau_{m}=0.01\), upper bound \(\tau_{M}=1.96\), \(\delta=\tau_{M}-\tau_{m}\), the probability of an random event occurs \(\bar{\mathtt{x}}=0.7\), the possibility of an actuator attack \(\bar{\beta}=0.9\), the possibility of a sensor attack \(\bar{\gamma}=0.01\), the probability of an actuator attack \(\bar{\chi}_{\bar{x}}=0.2\), the probability of a sensor attack \(\bar{\chi}_{\bar{x}}=0.2\), \(\mu=0.1\), \(\rho=3.1\), and \(\kappa=0.1\). We obtained the control gain matrix \(K=[80.3706\ -142.5412\ -11.4617]\) for the AUV system (4). Thus, the state trajectories simulation result is shown in Figure 2.
2. (Randomly occurring uncertainties) When uncertainty occurring randomly occur with \(\bar{\alpha}=0.1,0.2,0.4,0.5,0.7,0.8\) in system (4), the simulation results of these randomly occurring uncertainties are shown in Figure 3a. 3. (Actuator attack and controller comparison) The performance of controller (2), compared with previous work [19], is presented in Figure 3b. Moreover, the comparison of the controller with an actuator attack is shown in Figure 3b. 4. (Sensor attack and measured output) The simulation comparison of the measured output \(y(t)\) with a sensor attack is shown in Figure 4a. Additionally, the disturbance graph is presented in Figure 4b. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Matrix** & **Continuous-Time [Proposed Method]** & **Discrete-Time [19]** \\ \hline \(A\) & \(\begin{bmatrix}-0.000404&1.787\ 10^{-15}&-0.0757\\ -0.1&4.608\ 10^{-15}&-0.0003796\\ 0.1585&-3.001\ 10^{-15}&-0.1841\end{bmatrix}\) & \(\begin{bmatrix}0.9999&0&-0.0075\\ -0.0100&1.0000&0\\ 0.0157&0&0.9817\end{bmatrix}\) \\ \(B\) & \(\begin{bmatrix}0.0006568\\ 4.385\ 10^{-06}\\ 0.1746\end{bmatrix}\) & & \(\begin{bmatrix}0\\ 0\\ 0.0173\end{bmatrix}\) \\ \(C\) & \(\begin{bmatrix}0\\ 1\\ 0\end{bmatrix}\) & & \(\begin{bmatrix}0\\ 1\\ 0\end{bmatrix}\) \\ \(A_{r}\) & \(\begin{bmatrix}5.55\ 10^{-06}&0.2004\\ -0.2004&-0.04008\end{bmatrix}\) & \(\begin{bmatrix}0.9998&0.0200\\ -0.0200&0.9958\end{bmatrix}\) \\ \(C_{r}\) & \(\begin{bmatrix}0.01\\ 0.4\end{bmatrix}\) & & \(\begin{bmatrix}0.01\\ 0.4\end{bmatrix}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Continuous-time and discrete-time system matrices. A comparative analysis of the surge and sway positions, as well as the yaw angle, is presented in Table 2.  
Figure 4: Simulation results for Theorem 1.