# Discrete-Time Position Control for Autonomous Underwater Vehicle under Noisy Conditions
## 4 Simulation
### The Proposed Controller Utilizing Different Ensembles  
In this trial, \(T\) is set to 0.01s and the proposed method is tested for ensembles equal to 50, 100, and 200. Figure 6 presents the related results and demonstrates that in all cases, the AUV tracks the reference positions effectively. Additionally, this trial highlights the position tracking precision of the proposed technique in terms of root-mean-square  
Figure 5: AUV 3D position tracking for noise case 1 under various sampling times (\(N=100\)): (**a**) \(T=0.01\) s, (**b**) \(T=0.02\) s, (**c**) \(T=0.05\) s, and (**d**) \(T=0.1\) s.  
TDC. In particular, the linear controller performs poorly, while the proposed controller outperforms the conventional TDC in RMS error by a percentage range of approximately 72.1-97.4%.  
Then, the proposed controller is compared against an advanced control strategy, i.e., MPC. Running a MPC solver in MATLAB is a huge computational burden for computer, and thus MPC is simulated only for 80 s. Given that the proposed MPC for AUV for trajectory tracking in [26] applies to this work, this method is compared against the proposed one. Table 6 presents the MPC parameters. The type of MPC algorithm is State Feedback Predictive Control (SFPC), and the cost function is defined as follows:  
\[J(k)=\|Y(k)-Y_{d}(k)\|_{Q_{c}}^{2}+\|\triangle U(k)\|_{R_{c}}^{2}\]  
where \(\|x\|_{A}^{2}=x^{T}Ax;Y(k)\) and \(Y_{d}(k)\) denote the predicted position and the desired position, respectively. \(\triangle U(k)\) is the control input increment.  
Figure 8 presents the 3D position tracking results under various noise conditions, and Table 7 illustrates the RMS errors at a steady state for the MPC controller and the proposed controller. It indicates that the MPC controller and the proposed controller both precisely track the truth positions. Given that the suggested method meets the requirement of high tracking accuracy, the performance of the calculation time is examined, in particular. Table 8 presents the average calculation time of the MPC controller and that of the proposed  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**Controller**} & \multicolumn{3}{c}{**Case 1**} & \multicolumn{3}{c}{**Case 2**} & \multicolumn{3}{c}{**Case 3**} \\ \cline{2-10}  & **RMS(\(e_{x}\))** & **RMS(\(e_{y}\))** & **RMS(\(e_{x}\))** & **RMS(\(e_{x}\))** & **RMS(\(e_{y}\))** & **RMS(\(e_{x}\))** & **RMS(\(e_{y}\))** & **RMS(\(e_{z}\))** \\ \hline Linear controller & 1.0787 & 9.1009 & \(\backslash\) & 1.0828 & 9.2346 & \(\backslash\) & 1.0765 & 9.1327 & \(\backslash\) \\ \hline TDC & 0.1902 & 1.1115 & 0.8273 & 0.1958 & 1.2472 & 0.8433 & 0.0329 & 2.7515 & 0.8618 \\ \hline The proposed controller with N = 100 (T = 0.01 s) & 0.0477 & 0.0919 & 0.0442 & 0.0546 & 0.0902 & 0.0442 & 0.0238 & 0.0713 & 0.0443 \\ \hline \hline \end{tabular}
\end{table}
Table 5: RMS errors (m) for various controllers.  
Figure 7: AUV 3D position tracking and tracking errors for various controllers under different noise conditions (\(T\) = 0.01 s): (**a**) noise case 1, (**b**) noise case 2, and (**c**) noise case 3.  
Finally, it is worth noting that the proposed controller is tested only against open-source controllers, namely the conventional linear controller, TDC, and MPC controller, because re-implementing current controllers might lead to a non-optimized solution that inevitably would underestimate the capabilities of the original method.