## 2 Dynamics Model of a Robot  
This section investigates the dynamic model of an ROV for offshore underwater structure marine growth cleaning and structural inspection independently developed by the Hadal Science and Technology Center of Shanghai Ocean University. The robot is equipped with eight thrusters, allowing it to execute three-dimensional spatial maneuvers. Figure 1 shows the coordinate system of the robot and defines the inertial coordinate system \((x_{0},\ y_{0},z_{0})\) and the motion coordinate system \((x,\ y,z)\). The state variables relative to the motion coordinate system are represented as \(V=\left[u,v,w,p,q,r\right]^{T},\) where \(u,v,w\) represent linear velocity, and \(p,q,r\) represent angular velocity. The state variables relative to the inertial coordinate system are represented as \([x,y,z,\phi,\theta,\psi]^{T},\) where \(x,y,z\) indicate the position of the ROV, and \(\phi,\theta,\psi\) represent the attitude of the ROV. The kinematic equations of the ROV can be expressed as \(\dot{\eta}=J(\eta)\
u\)[25]. The roll and pitch are passively stabilized by the buoyancy system, requiring no active control, so \(\phi=\theta=0\). Therefore, the six degrees of freedom motion of the ROV can be simplified to four degrees of freedom motion. The dynamic equations in the Remotely Operated Vehicle (ROV) motion coordinate system are presented below [25]:  
\[M\dot{v}+C(v)v+D(v)v+g(\eta)=\tau+\Delta f \tag{1}\]  
In the dynamics Equation (1) of the ROV, \(M\) represents the inertia matrix of the ROV, \(v\) represents the linear velocities and angular velocities of the ROV, \(\dot{v}\) represents the linear and angular accelerations of the ROV, \(C(v)\) represents the Coriolis-centrifugal matrix, \(D(v)\) represents the hydrodynamic damping matrix, \(g(\eta)\) represents the restoring force vector, \(\tau\) is the control input provided by the main thrust and torque from the ROV's thrusters, and \(\Delta f\) represents external water flow disturbances and uncertainties such as unmodeled dynamics. The movement of an ROV can be conceptualized as the general motion of  
Figure 1: Remotely operated vehicle coordinate system. a rigid body influenced by gravity and hydrodynamics in a water flow. Usually, the fluid dynamics parameters are derived from experiments or fluid simulations. However, due to the complexity of real-world ocean conditions, ensuring the accuracy of these parameters is a significant challenge. Consequently, the parameters \(M\), \(C(v)\), and \(D(v)\) in the equation remain indeterminate. The \(M,C(v),D(v)\) in Equation (1) can be represented as the combination of the nominal parameters \(M_{0},C_{0}(v),D_{0}(v)\) and the dynamic uncertainties \(\Delta M_{0},\ \Delta C_{0}(v),\ \Delta D_{0}(v)\), as follows:  
\[\left\{ \begin{array}{l}M=M_{0}+\Delta M\\ C(v)=C_{0}(v)+\Delta C(v)\\ D(v)=D_{0}(v)+\Delta D(v)\end{array} \right. \tag{2}\]  
Then, Equation (1) can be rewritten as:  
\[M_{0}\dot{v}+C_{0}(v)v+D_{0}(v)v+g(\eta)=\tau+\Delta f+\tau_{\Delta} \tag{3}\]  
\[M_{RB}= \begin{bmatrix}m&0&0&-my_{G}\\ 0&m&0&mx_{G}\\ 0&0&m&0\\ -my_{G}&mx_{G}&0&l_{z}\end{bmatrix} \qquad\qquad M_{A}=- \begin{bmatrix}X_{\dot {u}}&X_{\dot{v}}&X_{\dot{w}}&X_{\dot{r}}\\ Y_{\dot{u}}&Y_{\dot{v}}&Y_{\dot{w}}&Y_{\dot{r}}\\ Z_{\dot{u}}&Z_{\dot{v}}&Z_{\dot{w}}&Z_{\dot{r}}\\ N_{\dot{u}}&N_{\dot{v}}&N_{\dot{w}}&N_{\dot{r}}\end{bmatrix}  \tag{4}\]  
By assuming that the origin \(O\) of the dynamic system coincides with the centroid \(G\) and that the coordinate axes coincide with the three principal inertia axes, and ignoring the off-diagonal elements in the \(M_{RB}\) and \(M_{A}\) matrices [25], we can obtain the \(M_{0}\) matrix:  
\[M_{0}=M_{RB}+M_{A}= \begin{bmatrix}m-X_{\dot{u}}&0&0&0\\ 0&m-Y_{\dot{v}}&0&0\\ 0&0&m-Z_{\dot{w}}&0\\ 0&0&0&I_{Z}-N_{r}\end{bmatrix}  \tag{5}\]  
In Formula (5), \(M_{0}\in R^{4\times 4}\) represents the inertia matrix, which is composed of the sum of the rigid body mass matrix \(M_{RB}\) and the added mass matrix, \(M_{A}\).