# Automatic Docking Trajectory Design-Based Time-Varying-Radius Dubins for Unmanned Surface Vessel
## 2 Preliminaries and System Description
### Dynamics Model of USV  
The dynamics of the USV in different coordinate systems in Figure 2 are described as follows. The standard nonlinear motion model of a well-known 3-DoF USV on the horizontal plane is described as follows. Let \(\eta=[x,y,\psi]^{T}\in\Re^{3}\) denote the current position \((x,y)\) and attitude \(\psi\) in the earth-fixed frame (inertia frame), \(\omega=[\iota,\upsilon,r]^{T}\in\Re^{3}\) denote the surge velocity \(u\), sway velocity \(v\) and yaw rate \(r\) in the body-fixed frame (Body frame). Then, we can establish the controlled USV dynamic system under unknown dynamics and disturbances. \[\left\{ \begin{array}{l}\dot{\eta}=J(\psi)\omega\\ M\dot{\omega}+\mathrm{C}(\omega)\omega+D(\omega)\omega=\tau+\delta_{d}\end{array} \right. \tag{1}\]  
where \(\delta_{d}=[\delta_{d_{u}},\delta_{d_{v}},\delta_{d_{v}}]^{T}\in\Re^{3}\) denotes the unknown external disturbances generated by the environment, and \(\tau=[\tau_{u},\tau_{v},\tau_{v}]^{T}\in\Re^{3}\) denotes the control input vector. \(M\) denotes the inertial matrix, \(J(\phi)\) denotes the kinematic transformation matrix satisfying the property \(J^{-1}(\psi)=J^{T}(\psi)\), \(C(\omega)\in\Re^{3\times 3}\) denotes an inertial matrix, \(C(\omega)\in\Re^{3\times 3}\) denotes the skew-symmetric matrix of Coriolis and centripetal terms, \(D(\omega)\in\Re^{3\times 3}\) denotes the damping matrix. In this paper, the \(\eta\) and \(\omega\) are measurable and external disturbances \(\delta_{d}\) are bound. In this paper, the used matrices \(M\), \(D(\omega)\), \(C(\omega)\) and \(B\) are defined as follows [24]. \[M=\left[ \begin{array}{ccc}m_{11}&0&0\\ 0&m_{22}&m_{23}\\ 0&m_{32}&m_{33}\end{array} \right] \tag{2}\]  
\[D(\omega)=\left[ \begin{array}{ccc}d_{11}&0&0\\ 0&d_{22}&d_{23}\\ 0&d_{32}&d_{33}\end{array} \right] \tag{3}\]  
\[C(\omega)=\left[ \begin{array}{ccc}0&0&-m_{22}\upsilon-m_{23}r\\ 0&0&m_{11}u\\ m_{22}\upsilon+m_{23}r&-m_{11}u&0\end{array} \right] \tag{4}\]  
Figure 2: The dynamics and kinematics of the USV. \[J(\psi)=\left[ \begin{array}{ccc}\cos\psi&-\sin\psi&0\\ \sin\psi&\cos\psi&0\\ 0&0&1\end{array} \right] \tag{5}\]  
The asymmetry of the USV model causes non-zero elements in the mass inertia matrix \(M\) and damping coefficient matrix \(D(\omega)\). The origin of the USV's body coordinate system is converted from the center of gravity position to the pivot point position to avoid the steering moment directly affecting the lateral speed [24]. At this stage, we transform the investigated USV model into the Formula (6) by the coordinate transformation. \[\left\{ \begin{array}{l}\dot{x}=u\cos\psi-v\sin\psi\\ \dot{y}=u\sin\psi+v\cos\psi\\ \dot{\psi}=r\\ \dot{u}=F_{u}(u,v,r)+T_{u}(b_{11}/m_{11})\\ \dot{v}=X(u)r+Y(u)v\\ \dot{r}=F_{r}(u,v,r)+T_{r}(b_{32}m_{22}-b_{32}m_{23})/\left(m_{22}m_{33}-m_{23} ^{2}\right)\end{array} \right. \tag{6}\]  
The specific meanings of the parameters in the above equation are given in [24]. Furthermore, the state of the unmanned surface vessel \(\eta\) denotes the configuration \((x,y,\psi)\). The dynamics of the USV depend on the forward speed and curvature of the trajectory \(\kappa\). The curvature \(\kappa=\frac{x^{\prime}y^{\prime\prime}-y^{\prime}x^{\prime}}{(x^{\prime 2}+y^{ \prime 2})^{\frac{1}{2}}}\) denotes a scalar value, and its sign determines whether to turn left or right in the plane. The magnitude of \(\kappa\) denotes constrained by the minimum turning radius \(R_{min}\) of the unmanned surface vessel. The USV's status can be expressed, as follows, by the forward speed and curvature. Therefore, under the direction, we should find the optimal path between the starting position and the ending position. \[\dot{\eta}=\left[ \begin{array}{c}\dot{x}\\ \dot{y}\\ \dot{\psi}\end{array} \right]=V_{usv}\left[ \begin{array}{c}\cos\psi\\ \sin\psi\\ \kappa\end{array} \right] \tag{7}\]  
where \(V_{usv}\) and \(\kappa\) denote the forward speed and trajectory curvature of USV, respectively. Similar to the USV, \(V_{dock}\) and \(\kappa_{dock}\) denote the state related to the dockyard.