## 4 Verification and Analysis
On the basis of verifying the efficiency performance indicators of different optimization allocation algorithms and the energy consumption of underwater robots, further statistical analysis of data is used to reflect the performance of underwater robot optimization control in terms of dynamic performance. Trajectory tracking error and attitude control error are selected as indicators to characterize the dynamic performance of underwater robots. At the same time, in the process of calculating dynamic performance errors, the error suppression effect is comprehensively reflected by obtaining the average error value and root mean square error of the corresponding variables. The calculation formula [36] can be expressed as  
\[ \begin{split} e_{AVE}&=\frac{1}{N}\sum\limits_{i=1} ^{N}(\hat{x}_{i}-x_{i})\\ e_{RMSE}&=\sqrt{\frac{1}{N}\sum\limits_{i=1}^{N} \left(\hat{x}_{i}-x_{i}\right)^{2}},\end{split}  \tag{26}\]  
where \(e_{AVE}\) is the error average value, \(e_{RMSE}\) is the error root mean square, \(N\) is the sampling amount, \(x_{i}\) is the referenced value, and \(\hat{x}_{i}\) is the estimated value. The \(e_{AVE}\) and \(e_{RMSE}\) results of the calculated trajectory tracking error and attitude control error are shown in Tables 3 and 4, respectively. According to Table 3, in terms of trajectory tracking error, under the CVP algorithm, the average tracking error obtained in the projected trajectories of OXY, OXZ, and OYZ planes is relatively larger. On the contrary, the average trajectory tracking error under the AGPM algorithm is relatively small. Similarly, in terms of attitude control error of underwater robots, the average error of attitude tracking control obtained by using the AGPM algorithm is significantly smaller. The results in Table 3 further demonstrate through quantitative data comparison that the proposed AGPM algorithm can effectively improve the trajectory tracking and attitude control performance of underwater robots. Then, by comparing the root mean square \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Method** & **Collocation Points** & **NLP Solution Method** & **Discrete Method** & **Solution Time** & **Energy Consumption** \\ \hline CVP & 30 & Interior point method & Unified grid & 19.83 s & 206.79 J \\ GPM & 38 & Interior point method & LG collocation & 11.65 s & 186.34 J \\ AGPM & 17 & Interior point method & Adaptive LG collocation & 5.33 s & 173.61 J \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of performance indicators of different control algorithms. values of trajectory error and attitude control error in Table 4, it can be further found that under the AGPM algorithm, the \(e_{RMSE}\) of trajectory tracking control and attitude control errors are relatively smaller. This indicates that the proposed AGPM algorithm can achieve smoother and more stable motion control effects, reducing the attitude fluctuations of underwater robots during maneuvering, which also helps to achieve comprehensive optimization of navigation stability and energy-saving effects. Based on the above data, it can be concluded that compared to the CVP and the GPM algorithms, the trajectory tracking accuracy of the AGPM algorithm has improved by 15.76% and 8.13%, respectively, and the attitude control accuracy of the AGPM algorithm has improved by 17.29% and 8.62%, respectively.