## 3. Mathematic Model of CDR on the Ground and Water Surface
### Dynamic Model of CDR on the Ground and the Water Surface  
The lateral velocity constraint is considered in the WMR model. However, to unify the mathematical model of the robot on the ground and the water surface, the lateral velocity constraint is no longer considered. According to ref. [17], the Lagrange dynamic equation for the CDR on the ground is  
\[M(q)\bar{q}+C_{m}(q,\dot{q})q+F(\dot{q})+\tau_{d}=B(q)\tau \tag{7}\]  
where \(M\) is the symmetric and positive definite inertia matrix, \(C_{m}\) is the centripetal and Coriolis matrix, \(F(\dot{q})\) is the drag force, \(B_{(q)}\) is the input transformation matrix, and \(\tau\) is the torque generated by the robot drive motor, and \(\tau_{d}\) is the unknown disturbance. These matrices can be expressed as  
\[M(q)= \begin{bmatrix}m&0&md\sin\psi\\ 0&m&-md\cos\psi&I\end{bmatrix} ,\;B(q)=\frac{1}{r} \begin{bmatrix}\cos\psi&\cos \psi\\ \sin\psi&\sin\psi\\ L&-L\end{bmatrix} ,\;\tau=\left[ \begin{array}{c}\tau_{l}\\ \tau_{r}\end{array} \right]\]  
\[C_{m}(q,\dot{q})= \begin{bmatrix}md\dot{\psi}^{2}\cos\psi&md\dot{\psi}^{2}\sin \psi&0\end{bmatrix} ^{T}\text{, where }m\text{ is the mass of the robot and }I\text{ is the rotational inertia, and }L\text{ is the length of the axle. }\psi\text{ is the yaw angle. }r\text{ is the radius of the wheel. }d\text{ is the distance from the center of gravity of the robot to the geometric center of the robot. }\tau_{l}\text{ and }\tau_{r}\text{ are the torques output by the left and right motors. According to Assumption 2, \(C_{m}=0\), and \(M\) matrix can be rewritten as \(M(q)= \begin{bmatrix}m&0&0\\ 0&m&0\\ 0&0&I\end{bmatrix} \). Take the time derivative of Formula (1), substitute it into Formula (7) and left multiply \(R^{-1}\), which yields:  
\[\overline{C}\eta+\overline{M}\dot{\eta}+\overline{F}(\dot{q})+\overline{\tau} _{d}=\overline{B}\tau \tag{8}\]  
where \(\overline{C}=R^{-1}M\dot{R}\), \(\overline{M}=R^{-1}MR\), \(\overline{B}=R^{-1}B\). \(\overline{F}(\dot{q})= \begin{bmatrix}f_{u}&f_{v}&f_{r}\end{bmatrix} ^{T}\), \(\overline{\tau}_{d}= \begin{bmatrix}d_{u}&d_{v}&d_{r}\end{bmatrix} ^{T}\). Formula (8) can be expressed in algebraic form as:  
\[\left\{ \begin{array}{l}\dot{u}=(F_{u}-f_{u}-d_{u})/m+vr\\ \dot{v}=-ur-(f_{v}+d_{v})/m\\ \dot{r}=(T_{r}-f_{r}-d_{r})/I\end{array} \right. \tag{9}\]where \(F_{u}\)\(=\)\((\tau_{l}+\tau_{r})/\tau\), \(T_{r}\)\(=\)\((\tau_{l}-\tau_{r})\)\(*L/\tau\). According to ref. [15], the dynamics of the robot on the water surface can be modeled as:  
\[M\dot{\eta}+C(\eta)+D(\eta)\eta=F(t)+d(\eta,t) \tag{10}\]  
\(F=\left[F_{u}\quad 0\quad T_{r}\right]^{T}\) is the control input. The unknown lumped disturbances includes unmodeled dynamic disturbances, uncertainties and external disturbances can be expressed as: \(d=\)\(\left[d_{u}\quad d_{v}\quad d_{r}\right]^{T}\),  
\[M=\left[ \begin{matrix}m_{11}&0&0\\ 0&m_{22}&m_{23}\\ 0&m_{32}&m_{33}\end{matrix} \right],\ C(\eta)=\left[ \begin{matrix}0&0&C_{13}( \eta)\\ 0&0&C_{23}(\eta)\\ -C_{13}(\eta)&-C_{23}(\eta)&0\end{matrix} \right],\ D=\left[ \begin{matrix}d_{11 }&0&0\\ 0&d_{22}&d_{23}\\ 0&d_{32}&d_{33}\end{matrix} \right]\)  
According to Assumption 4, the non-diagonal parameters of internal matrix \(M\) are small enough to be neglected. This approach is also used in [15; 41]. The CDR dynamic model on the water surface can be expressed as:  
\[\left\{ \begin{array}{l}\dot{u}=\frac{m_{22}}{m_{11}}v\omega-\frac{X_{u}}{m_ {11}}u-\frac{X_{u|u|}}{m_{11}}|u|u+\frac{F_{u}}{m_{11}}+\frac{d_{u}}{m_{11}}\\ \dot{v}=-\frac{m_{11}}{m_{22}}u\omega-\frac{Y_{u}}{m_{22}}v-\frac{Y_{u|v|}}{m_ {22}}|v|+\frac{d_{v}}{m_{11}}\\ \dot{\omega}=\frac{m_{11}-m_{22}}{m_{33}}u\omega-\frac{N_{u|v|}}{m_{33}}\omega -\frac{N_{u|v|}}{m_{33}}\omega|\omega+\frac{T_{r}}{m_{33}}+\frac{d_{r}}{m_{33 }}\end{array} \right. \tag{11}\]  
\(m_{11}=m-X_{u}\), \(m_{22}=m-Y_{\dot{v}}\), \(m_{33}=l_{z}-N_{\dot{v}}\), are inertia mass parameters. \(X_{u}Y_{\dot{v}}N_{\dot{r}}\) is extended inertia mass parameters. \(I_{z}\) is the rotational inertia of the robot rotates around the \(Z\)-axis.