## 3. Mathematic Model of CDR on the Ground and Water Surface
### CDR Kinematic Model in Frenet-Secret Frame  
In [15; 17], the kinematic model in the body frame can be expressed as:  
\[\dot{q}=R\eta \tag{1}\]  
In Formula (1), \(q=[x,y,\psi]\) is the position and orientation of the robot in earth coordinates, and \(\eta=[u,v,r]\) is the longitudinal velocity, lateral velocity, and yaw angular velocity of the CDR. \(R\) matrix is the transformation matrix of the robot from the body frame to the earth frame, where \(R\) is  
\[R=\begin{bmatrix}\cos\psi&-\sin\psi&0\\ \sin\psi&\cos\psi&0\\ 0&0&1\end{bmatrix}\]  
The robot in Frenet-Serret coordinate system is as shown in Figure 4.  
In Figure 4, \(E\) is the inertial coordinate frame. \(P\) presents the Frenet-Serret coordinate frame. \(b\) is the body coordinate frame. \(\phi_{p}\) is the angle between \(X_{p}\) axis and \(Y_{E}\) axis. \(\Delta\) is the forward-looking distance. \(\psi\) is the yaw angle of the robot. \(r\) is the yaw angular velocity. \(\beta\) is the side-slip angle. \(u\) is the longitudinal velocity. \(v\) is the lateral velocity. \(U\) is the actual linear velocity of the robot motion. \(x_{e}\) and \(y_{e}\) are errors between current position of the robot and the desired position converted into \(P\) coordinate.  
According to [34], the mathematical model of position error in the Frenet-Serret coordinate frame can be expressed as:  
\[\left[\begin{array}{c}x_{e}\\ y_{e}\end{array}\right]=\begin{bmatrix}\cos\phi_{p}&\sin\phi_{p}\\ -\sin\phi_{p}&\cos\phi_{p}\end{bmatrix}\left[\begin{array}{c}x-x_{k}(\omega )\\ y-y_{k}(\omega)\end{array}\right] \tag{2}\]  
\(x_{k}(\omega)\) and \(y_{k}(\omega)\) are the parametrized desired trajectory. Formula (2) takes the derivative of time \(t\) and substitutes it into Formula (1) to obtain  
\[\dot{x}_{e}=u\cos(\psi-\phi_{p})-v\sin(\psi-\phi_{p})+\dot{\phi}_{p}y_{e}-\dot {\omega}\sqrt{x^{\prime}{}_{k}^{2}(\omega)+y^{\prime}{}_{k}^{2}(\omega)}\cos (\phi+\alpha) \tag{3}\]  
Figure 4: CDR in Frenet-Secret frame. \(x_{e}\) and \(y_{e}\) are error between current position of the robot and the desired position.  
because \(\alpha=\text{atan2}(-{y^{\prime}}_{k}^{2}(\omega),{x^{\prime}}_{k}^{2}(\omega))=-\phi\), Formula (3) can be expressed as:  
\[\dot{x}_{e}=u\cos(\psi-\phi)-v\sin(\psi-\phi)+\dot{\phi}y_{e}-u_{p} \tag{4}\]  
\[u_{p}=\dot{\omega}\sqrt{{x^{\prime}}_{k}^{2}(\omega)+{y^{\prime}}_{k}^{2}( \omega)}\text{ is a virtual variable which is designed to stabilize the }x_{e}.\]  
\[y_{e}=u\sin(\psi-\phi_{p})+v\cos(\psi-\phi_{p})-\dot{\phi}x_{e} \tag{5}\]  
\(\beta=\arctan(v/u)\) can be considered as the angle of robot deflection caused by lateral velocity due to cross-winds and currents on the water surface and skidding on the ground.  
The position error derivative can be expressed as:  
\[\left\{\begin{array}{l}\dot{x}_{e}=u\cos(\psi-\phi)-u\sin(\psi-\phi)\tan\beta +\dot{\phi}y_{e}-u_{p}\\ \dot{y}_{e}=u\sin(\psi-\phi)+u\cos(\psi-\phi)\tan\beta-\dot{\phi}x_{e}\end{array}\right. \tag{6}\]  
**Remark 1**.: _In [35; 36], assume \(\beta\leq 5^{\circ}\), so \(\sin\beta\approx\beta\), \(\cos\beta\approx 1\). However, this assumption is conservative and does not conform to the actual situation, especially for small USVs and multi-habitat robots, which are more likely to be disturbed by the environment._