## 3 Controller Design  
### USV Modeling  
**Assumption 1**. : The reference trajectories of the USV are smooth and have first and second derivatives. **Assumption 2**. : The position information and velocity information of the USV can be measured directly. **Assumption 3**. : The external disturbances \(\mathbf{d}=[d_{1},d_{2},d_{3}]\) acting on the USV are unknown and vary slowly but are still bounded. There exists an unknown constant, \(d_{i}^{\max}\in\Re^{+}\) such that every element in \(\mathbf{d}\) satisfies \(d_{i}\leq d_{i}^{\max},i=1,2,3\). The standard three-degrees-of-freedom (surge, sway, and yaw) USV model is used, which is characterized by uniform mass distribution and left-right symmetry, and the center of gravity of the USV is located at the origin of the coordinate system. Then, the three-degrees-of-freedom mathematical model of the USV can be obtained as follows. \[\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}=\frac{1}{m_{11}}(m_{22}vr-d_{11}u+\tau_{u}+d_{1})\\ \dot{v}=\frac{1}{m_{2}}(-m_{11}ur-d_{22}v+d_{2})\\ \dot{r}=\frac{1}{m_{32}}[(m_{11}-m_{22})uv-d_{33}r+\tau_{r}+d_{3}]\end{array} \right. \tag{5}\]  
where \(x\) and \(y\) denote the surge displacement and sway displacement, and \(\psi\) is the heading angle. In addition, \(u\) and \(v\) denote the surge velocity and sway velocity; \(r\) is the angular velocity; \(\tau_{u}\) and \(\tau_{r}\) denote the surge force and yaw moment; \(d_{1}\), \(d_{2}\) and \(d_{3}\), are the environment disturbances induced by waves, wind, and ocean currents, respectively. Furthermore, \(m_{11}=m-X_{\dot{u}}\), \(m_{22}=m-Y_{\dot{v}}\), \(m_{33}=I_{z}-N_{\dot{r}}\), \(d_{11}=-X_{\dot{u}}\), \(d_{22}=-Y_{\dot{v}}\), and \(d_{33}=-N_{\dot{r}}\)where \(m\) is the mass of the USV; \(I_{z}\) is the ship's moment of inertia about the \(Z-\)axis of the body-fixed frame; \(X_{u}\), \(Y_{v}\), \(N_{r}\) are the linear hydrodynamic damping coefficients; and \(X_{i}\), \(Y_{\dot{\
u}}\), \(N_{r}\) are the additional mass coefficients [39]. In order to better reflect the relationship between kinematics and kinetics, this relationship is described in a matrix form, to facilitate the subsequent design of the disturbance observer. The kinematic equation is  
\[\dot{\eta}=\mathbf{R}(\psi)\mathbf{V} \tag{6}\]  
and the dynamic equation is  
\[\mathbf{M}\dot{\mathbf{V}}=-\mathbf{C}\mathbf{V}-\mathbf{D}\mathbf{V}+\mathbf{ \tau}+\mathbf{d} \tag{7}\]  
where \(\mathbf{\eta}=\left[ \begin{array}{cc}x&y&\psi\end{array} \right]^{\mathrm{T}}\) denotes the position and orientation vector of the USV in the earth-fixed inertial frame; and \(\mathbf{V}=\left[ \begin{array}{cc}u&v&r\end{array} \right]^{\mathrm{T}}\) denotes the velocity vector of the USV in the body-fixed frame. The earth-fixed inertia frame \(O-X_{o}Y_{o}\) and body-fixed frame \(A-XY\) are depicted in Figure 1. In addition, \(\mathbf{\tau}=\left[ \begin{array}{cc}\tau_{u}&0&\tau_{r}\end{array} \right]^{ \mathrm{T}}\) is the control vector of the USV; and \(\mathbf{d}=\left[ \begin{array}{cc}d_{1}&d_{2}&d_{3}\end{array} \right]^{ \mathrm{T}}\) are the environment disturbances. \(\mathbf{R}(\psi)\) is a rotation matrix that satisfies \(\mathbf{R}(\psi)\mathbf{R}^{\mathrm{T}}(\psi)=\mathrm{I}_{3\times 3}\), where \(\mathrm{I}_{3\times 3}\) represents the third-order unit matrix. \(\mathbf{M}\) is the inertia matrix of the system, which satisfies \(\mathbf{M}=\mathbf{M}^{\mathrm{T}}>0\) and \(\dot{\mathbf{M}}=0_{3\times 3}\). \(\mathbf{C}\) is the Coriolis and centripetal matrix, which satisfies \(\mathbf{C}=-\mathbf{C}^{\mathrm{T}}\). \(\mathbf{D}\) is the hydrodynamic damping matrix, which satisfies \(\mathbf{D}>0\). They are, respectively,  
\[\mathbf{R}(\psi)=\left[ \begin{array}{ccc}\cos(\psi)&-\sin(\psi)&0\\ \sin(\psi)&\cos(\psi)&0\\ 0&0&1\end{array} \right]\mathbf{M}=\left[ \begin{array}{ccc}m_{11}&0&0\\ 0&m_{22}&0\\ 0&0&m_{33}\end{array} \right] \tag{8}\] \[\mathbf{C}=\left[ \begin{array}{ccc}0&0&-m_{22}v\\ 0&0&m_{11}u\\ m_{22}v&-m_{11}u&0\end{array}