# Digital-Twin-Based System for Foam Cleaning Robots in Spent Fuel Pools
## 3 Implementation of the Digital Twin System for the Foam Cleaning Robot in Spent Fuel Pools
### Establishment of the Robot Motion Model  
The motion model of the robot serves as the fundamental basis and core concern for implementing robot motion control. In this paper, the robot adopted the form of a catamaran, and the MMG model was utilized to establish a motion model of the catamaran, employing mathematical equations to describe its motion process. To determine the position and orientation of the robot during surface movement, it was necessary to establish a coordinate system suitable for its motion control. Cartesian coordinates are widely used in the study of robot motion, including both fixed coordinate systems and moving coordinate systems. This paper neglected the robot's heaving, pitching, and rolling motions. The six degrees of freedom were simplified into a plane motion state with only three degrees of freedom. Based on the above, a coordinate system for the planar motion of the surface robot was established. A schematic diagram of the planar motion of the surface robot is shown in Figure 6. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Serial Number** & **Assembly Unit** & **Amount** \\ \hline \multirow{3}{*}{1} & Ultrasonic sensor & 4 \\  & depth camera & 1 \\  & lidar & 1 \\  & blow-off line & 1 \\  & storage box & 1 \\  & electrical machinery & 2 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Inventory of robot components. Figure 4: Robot physical representation diagram. Figure 5: Controller circuit diagram. \[ \begin{cases}X_{0}=X\cos\psi-Y\sin\psi\\ Y_{0}=X\sin\psi+Y\cos\psi\\ N_{0}=N-Yx_{d}\end{cases}  \tag{2}\] \[ \begin{cases}\dot{x}_{G}=u\cos\psi-v\sin\psi\\ \dot{y}_{G}=u\sin\psi+v\cos\psi\\ \dot{\psi}=r\end{cases}  \tag{3}\]  
In Equations (2) and (3), \(u\) and \(v\) represent the longitudinal and lateral velocities of the robot, respectively, while \(r\) is the rate of change of the robot's heading angle \(\psi\) concerning time. \(X_{0}\), \(Y_{0}\), and \(N_{0}\) denote the external forces and moments acting on the robot in the inertial coordinate system. \(X\), \(Y\), and \(N\) represent the external forces and moments acting on the robot in the body-fixed coordinate system. \(x_{G}\) and \(y_{G}\) are the coordinates of the robot's center of gravity \(G\), \(x_{d}\) is the coordinate value of the robot's center in the body-fixed coordinate axis, and \(Yx_{d}\) is a correction term. The actual motion equations of the robot can be expressed as follows:  
\[ \begin{cases}X_{0}=m\ddot{x}_{G}\\ Y_{0}=m\ddot{y}_{G}\\ N_{0}=I_{2}\ddot{\psi}\end{cases}  \tag{4}\]  
In Equation (4), \(m\) represents the mass of the robot, and \(I_{2}\) represents the mass moment of inertia of the robot body about the vertical axis passing through the center of gravity. Taking the time derivative of Equation (3), we obtain  
\[ \begin{cases}\dot{x}_{G}=\dot{u}\cos\psi-\dot{v}\sin\psi-(u\sin\psi+v\cos\psi) \dot{\psi}\\ \dot{y}_{G}=\dot{u}\sin\psi+\dot{v}\cos\psi+(u\cos\psi-v\sin\psi)\dot{\psi}\\ \ddot{\psi}=\dot{r}\end{cases}  \tag{5}\]  
Substituting Equation (4) into Equation (5), we obtain  
\[ \begin{cases}X_{0}=m(\dot{u}-v\dot{\psi})\cos\psi-m(\dot{v}+u\dot{\psi})\sin \psi\\ Y_{0}=m(\dot{u}-v\psi)\sin\psi+m(\dot{v}+u\dot{\psi})\cos\psi\\ N_{0}=I_{2}\dot{r}\end{cases}  \tag{6}\]  
Figure 6: Planar Motion schematic for robot. Combining and simplifying Equations (2) and (6), the motion model of the robot in the body-fixed coordinate system is obtained as follows:  
\[ \begin{cases}X=m(\dot{u}-vr)\\ Y=m(\hat{v}+ur)\\ I_{\hat{z}}\hat{r}=N-Yx_{d}\end{cases}  \tag{7}\]  
Following the modeling concept of the MMG separation model [19], the external forces and moments acting on the robot are represented as follows:  
\[ \begin{cases}X=X_{H}+X_{P}+X_{W}+X_{C}\\ Y=Y_{H}+Y_{P}+Y_{W}+Y_{C}\\ N=N_{H}+N_{P}+N_{W}+N_{C}\end{cases}  \tag{8}\]  
In these Equations, \(H\) represents the robot body, \(P\) represents the propeller, \(W\) represents the wind, and \(C\) represents the current.