## 3 Path Following Control Strategy
### Guidance System Design
#### 3.2.1 Estimation of Sideslip Angle  
As is illustrated in Figure 4, consider that the desired continuous path \(\left(x_{d}\left(\theta\right),y_{d}\left(\theta\right)\right)\) to be tracked is parameterized by a path variable \(\theta\). Then, the path-tangential angle \(\phi_{p}\) is given by:  
\[\phi_{p}\left(\theta\right)=atan2\left(y^{\prime}_{d}\left(\theta\right),x^{ \prime}_{d}\left(\theta\right)\right) \tag{10}\]  
where \(x^{\prime}_{d}\left(\theta\right)=\partial x_{d}/\partial\theta\) and \(y^{\prime}_{d}\left(\theta\right)=\partial y_{d}/\partial\theta\). For the USV located at \(\left(x,y\right)\), the errors \(x_{e}\) and \(y_{e}\) in \(X_{p}oY_{p}\) are written as:  
\[\left[ \begin{array}{c}x_{e}\\ y_{e}\end{array} \right]=\left[ \begin{array}{cc}\cos\phi_{p}&-\sin\phi_{p}\\ \sin\phi_{p}&\cos\phi_{p}\end{array} \right]^{T}\left[ \begin{array}{c}x-x_{d }\left(\theta\right)\\ y-y_{d}\left(\theta\right)\end{array} \right] \tag{11}\]  
where \(y_{e}\) and \(x_{e}\) denote cross- and along-track errors, respectively. Figure 4: Geometrical illustration of LOS guidance. Calculating the derivative of (11) along (1) yields:  
\[\dot{x}_{e} =u\cos\left(\psi-\phi_{p}\right)-v\sin\left(\psi-\phi_{p}\right)\] \[+\dot{\phi}_{p}\underbrace{\left[-\left(x-x_{d}\right)\sin\phi_{p} +\left(y-y_{d}\right)\cos\phi_{p}\right]}_{y_{e}}\] \[-\dot{\theta}\sqrt{{x^{\prime}}_{d}^{2}+{y^{\prime}}_{d}^{2}}\cos \left(\phi_{p}+\varphi\right)\] \[=U\cos\left(\psi-\phi_{p}\right)\cos\beta-U\sin\left(\psi-\phi_{p }\right)\sin\beta\] \[+\dot{\phi}_{p}y_{e}-u_{p}\] \[\dot{y}_{e} =u\sin\left(\psi-\phi_{p}\right)+v\cos\left(\psi-\phi_{p}\right)\] \[-\dot{\phi}_{p}\underbrace{\left[-\left(x-x_{d}\right)\cos\phi_{p }+\left(y-y_{d}\right)\sin\phi_{p}\right]}_{x_{e}}\] \[=U\sin\left(\psi-\phi_{p}\right)\cos\beta+U\cos\left(\psi-\phi_{ p}\right)\sin\beta\] \[-\dot{\phi}_{p}x_{e} \tag{12}\]  
where \(U=\sqrt{u^{2}+v^{2}}>0\), \(0<U_{\min}\leq U\leq U_{\max}\), and \(\beta=\text{atan2}\left(v,u\right)\) denotes the sideslip angle. \(u_{p}\) is the virtual target speed to stabilize \(x_{e}\), which is selected as:  
\[\dot{x}_{e} =u\cos\left(\psi-\phi_{p}\right)-v\sin\left(\psi-\phi_{p}\right)\]0  
Note that the sideslip angle is relatively small in practice [25], and we have:  
\[\left\{ \begin{array}{l}\dot{x}_{e}=U\cos\left(\psi-\phi_{p}\right)-U\sin \left(\psi-\phi_{p}\right)\beta+\dot{\phi}_{p}y_{e}-u_{p}\\ \dot{y}_{e}=U\sin\left(\psi-\phi_{p}\right)+U\cos\left(\psi-\phi_{p}\right) \beta-\dot{\phi}_{p}x_{e}\end{array} \right. \tag{14}\]  
In order to exactly compensate for the unknown sideslip angle, two predictors are developed as:  
\[\left\{ \begin{array}{l}\dot{x}_{e}=U\cos\left(\psi-\phi_{p}\right)-U\sin \left(\psi-\phi_{p}\right)\beta+\dot{\phi}_{p}\dot{y}_{e}-u_{p}-k_{x}\hat{x}_{ e}\\ \dot{\phi}_{e}=U\sin\left(\psi-\phi_{p}\right)+U\cos\left(\psi-\phi_{p}\right) \beta-\dot{\phi}_{p}x_{e}-k_{y}\hat{y}_{e}\end{array} \right. \tag{15}\]  
where \(k_{x}\) and \(k_{y}\) are the design parameters, \(\hat{x}_{e}=\hat{x}_{e}-x_{e}\), \(\hat{y}_{e}=\hat{y}_{e}-y_{e}\) are the prediction errors, and \(\hat{\beta}\) is the estimation of \(\beta\). The corresponding adaptive updating law is selected as:  
\[\dot{\hat{\beta}}=\gamma\left[U\sin\left(\psi-\phi_{p}\right)\tilde{x}_{e}-U \cos\left(\psi-\phi_{p}\right)\hat{y}_{e}\right] \tag{16}\]  
The,n \(\tilde{x}_{e}\), \(\hat{y}_{e}\), and \(\hat{\beta}\) are written as:  
\[\left\{ \begin{array}{l}\dot{\hat{x}}_{e}=-U\sin\left(\psi-\phi_{p}\right) \tilde{\beta}-k_{x}\tilde{x}_{e}\\ \dot{\hat{y}}_{e}=U\cos\left(\psi-\phi_{p}\right)\tilde{\beta}-k_{y}\tilde{ \beta}\\ \tilde{\beta}=\gamma\left[U\sin\left(\psi-\phi_{p}\right)\tilde{x}_{e}-U\cos \left(\psi-\phi_{p}\right)\tilde{y}_{e}\right]\end{array} \right.