## 2 Motion Model for Underactuated Ships  
The ship movement has six degrees of freedom (DOF), which denote position and direction. In the inertial frame, \((x,y,z)\) denotes the position, and first-order differentiation of \((x,y,z)\) denotes translational motion along x, y and z. Surge, sway and heave are the first three DOFs, \((\varphi,\theta,\psi)\) denotes the directions of ship, and first-order differentiation of \((\varphi,\theta,\psi)\) denotes rotation of the ship. Roll, pitch and yaw are the last three DOF. The ship motion description is shown in Figure 1.  
For most control problems of ships, only sway, surge, and yaw are discussed. Therefore, the ship's motion is regarded as a plane motion with three degrees of freedom. The maneuvering model of the ship [6] can be shown as:  
\[\left\{\begin{array}{l}\dot{x}=u\cos\psi-v\sin\psi\\ \dot{y}=u\sin\psi+v\cos\psi\\ \dot{\psi}=r\\ \end{array}\right. \tag{1}\]  
\[\left\{\begin{array}{l}\dot{u}=\frac{m_{22}}{m_{11}}vr-\frac{d_{11}}{m_{11}} u+\frac{1}{m_{11}}\tau_{u}\\ \dot{v}=-\frac{m_{11}}{m_{22}}ur-\frac{d_{22}}{m_{22}}v\\ \dot{r}=\frac{m_{11}-m_{22}}{m_{33}}uv-\frac{d_{33}}{m_{33}}r+\frac{1}{m_{33}} \tau_{r}\\ \end{array}\right. \tag{2}\]  
where \(x\)-surge, \(y\)-sway, \(\psi\)-course angle, \(u\)-surge velocity, \(v\)-sway velocity. \(r\)-yaw velocity; \(\tau_{u}\)-longitudinal force of propeller, \(\tau_{r}\)-the torque of propeller; \(m_{11},\;m_{22},\;m_{33},\;d_{11},\;d_{22}\) and \(d_{33}\) are uncertainty parameters.  
For course control of ships, the nonlinear model is a dynamic system. The responding nonlinear ship model is shown in Figure 2. Input is rudder angle \(\delta\), output is course angle \(\psi\). By capturing the ship dynamics from \(\delta\rightarrow\dot{\psi}\rightarrow\psi\), the differential equation retains nonlinear influences and allows wind and wave disturbances to be converted into a disturbing rudder angle \(\delta_{D}\) as an input signal that enters the ship model with the actual rudder angle \(\delta\).  
The [PERSON] nonlinear model [57] for course control of underactuated ships can be expressed as  
\[\ddot{\psi}=-a_{1}\dot{\psi}-a_{2}\dot{\psi}^{3}+b\delta \tag{3}\]  
where \(\psi\) and \(\delta\) are the course angle and the control rudder angle respectively. \(a_{1}=\alpha b\), \(a_{2}=\beta b\), \(b=K/T\) are model parameters, \(K\) and \(T\) are ship indices, \(\alpha\) and \(\beta\) are nonlinear coefficients, parameter \(K\) is proportional to speed \(V\), while parameter \(T\) is inversely proportional to speed \(V\).  
Figure 1: Ship motion model.  
The model uncertainty conditions discussed in this section refer to the problem of uncertainty in the four parameters \(K\), \(T\), \(\alpha\), \(\beta\) mentioned above that vary with the speed \(V\), thus causing a time-varying uncertainty in the modeling parameters.  
Based on the NARX model [60], without considering the noise, Equation (3) can be discretized and transformed as follows,  
\[\begin{array}{c}\psi(k+1)=c_{1}\psi(k)+c_{2}\psi(k-1)+c_{3}\psi(k-2)+\\ c_{4}[\psi(k-1)-\psi(k-2)]^{3}+c_{5}\delta(k-2)\end{array} \tag{4}\]  
where \(c_{1}=2\), \(c_{2}=-(1+a_{1}h)\), \(c_{3}=a_{1}h\), \(c_{4}=-a_{2}/h\), \(c_{5}=bh^{2}\), \(h\) is the sampling period and \(k\) is the sampling moment. Obviously, the variation of parameters \(K\), \(T\), \(\alpha\), \(\beta\) lead to the variation of parameter \(c_{i}(i=1,\cdots,5)\), which makes the mathematical model of ship course control uncertain.  
By deforming Equation (4) and simplifying the problem, the inverse model of the ship's motion can be deduced as  
\[\delta(k+1)=d_{1}\psi(k)+d_{2}\psi(k-1)+d_{3}\psi(k-2)+d_{4}[\psi(k)-\psi(k-1) ]^{3} \tag{5}\]  
where \(d_{1}=(1+a_{1}h)/bh^{2}\), \(d_{2}=-(2+a_{1}h)/bh^{2}\), \(d_{3}=1/bh^{2}\), \(d_{4}=a_{2}/bh^{3}\).