# Nonlinear Trajectory Tracking Controller for Underwater Vehicles with Shifted Center of Mass Model
## Appendix B
Taking (13) into account, the time derivative of (102) is of the form \(\dot{S}_{D3}=\dot{\zeta}_{5\epsilon}+\lambda_{3}\zeta_{5\epsilon}\) (where \(\dot{\zeta}_{5\epsilon}=\dot{\zeta}_{5}-\dot{\zeta}_{5\epsilon}\)):  
\[\mu_{dr} =(r_{d}/c\theta_{d}-u_{d}y_{e}c\theta_{d}-k_{\psi}s\psi_{e})c\theta, \tag{109}\]7  
_Control input \(\tau_{r}\)_. The yaw input \(\tau_{r}\) is assumed as follows:  
\[\mu_{dr} =(r_{d}/c\theta_{d}-u_{d}y_{e}c\theta_{d}-k_{\psi}s\psi_{e})c\theta, \tag{109}\]8  
where the final component resulting from Assumption 4 refers to the function of uncertain parameters. Moreover, \(\hat{f}_{\zeta_{5}}\) means the estimated value of external disturbance \(f_{\zeta_{5}}\). The LFC is proposed in the following form:  
\[\mu_{dr} =(r_{d}/c\theta_{d}-u_{d}y_{e}c\theta_{d}-k_{\psi}s\psi_{e})c\theta, \tag{109}\]9  
where \(\dot{f}_{\zeta_{5}}=f_{\zeta_{5}}-\hat{f}_{\zeta_{5}}\) means the disturbance force estimated error while \(\beta_{3}>0\) is a constant gain. Determining the derivative \(V_{D3}\) with respect to time and applying (103)-(104), one obtains  
\[\dot{V}_{K}=-k_{x}x_{e}^{2}-k_{\theta}\,s^{2}\theta_{e}-k_{\psi}\,s^{2}\psi_{ e}+vy_{e}+z_{e}\big{(}w+u_{d}(1-c\psi_{e})c\theta s\theta_{d}\big{)}. \tag{110}\]0 \[\dot{V}_{K}=-k_{x}x_{e}^{2}-k_{\theta}\,s^{2}\theta_{e}-k_{\psi}\,s^{2}\psi_{ e}+vy_{e}+z_{e}\big{(}w+u_{d}(1-c\psi_{e})c\theta s\theta_{d}\big{)}. \tag{110}\]1  
where  
\[\dot{V}_{K}=-k_{x}x_{e}^{2}-k_{\theta}\,s^{2}\theta_{e}-k_{\psi}\,s^{2}\psi_{ e}+vy_{e}+z_{e}\big{(}w+u_{d}(1-c\psi_{e})c\theta s\theta_{d}\big{)}. \tag{110}\]2with  
\[\dot{V}_{K}=-k_{x}x_{e}^{2}-k_{\theta}\,s^{2}\theta_{e}-k_{\psi}\,s^{2}\psi_{ e}+vy_{e}+z_{e}\big{(}w+u_{d}(1-c\psi_{e})c\theta s\theta_{d}\big{)}. \tag{110}\]3 \[\dot{V}_{K}=-k_{x}x_{e}^{2}-k_{\theta}\,s^{2}\theta_{e}-k_{\psi}\,s^{2}\psi_{ e}+vy_{e}+z_{e}\big{(}w+u_{d}(1-c\psi_{e})c\theta s\theta_{d}\big{)}. \tag{110}\]4 \[\dot{V}_{K}=-k_{x}x_{e}^{2}-k_{\theta}\,s^{2}\theta_{e}-k_{\psi}\,s^{2}\psi_{ e}+vy_{e}+z_{e}\big{(}w+u_{d}(1-c\psi_{e})c\theta s\theta_{d}\big{)}. \tag{110}\]5  
In order to guarantee the control system's stability under the parameter perturbations and taking into account Assumption 2, the proposed gain function is  
\[\dot{V}_{K}=-k_{x}x_{e}^{2}-k_{\theta}\,s^{2}\theta_{e}-k_{\psi}\,s^{2}\psi_{ e}+vy_{e}+z_{e}\big{(}w+u_{d}(1-c\psi_{e})c\theta s\theta_{d}\big{)}. \tag{110}\]6  
where  
\[\dot{V}_{K}=-k_{x}x_{e}^{2}-k_{\theta}\,s^{2}\theta_{e}-k_{\psi}\,s^{2}\psi_{ e}+vy_{e}+z_{e}\big{(}w+u_{d}(1-c\psi_{e})c\theta s\theta_{d}\big{)}. \tag{110}\]7 \[\dot{V}_{K}=-k_{x}x_{e}^{2}-k_{\theta}\,s^{2}\theta_{e}-k_{\psi}\,s^{2}\psi_{ e}+vy_{e}+z_{e}\big{(}w+u_{d}(1-c\psi_{e})c\theta s\theta_{d}\big{)}. \tag{110}\]8  
Recalling Assumption 3 and \(\hat{f}_{\xi_{5}}\) close to zero or \(\hat{f}_{\zeta_{5}}\
eq 0\) (which means that at least \(\hat{f}_{v}\) and \(\hat{f}_{r}\) are different from zero), the function \(\dot{V}_{\text{D4}}\) (100) can be written in the following form:  
\[\dot{V}_{K}=-k_{x}x_{e}^{2}-k_{\theta}\,s^{2}\theta_{e}-k_{\psi}\,s^{2}\psi_{ e}+vy_{e}+z_{e}\big{(}w+u_{d}(1-c\psi_{e})c\theta s\theta_{d}\big{)}. \tag{110}\]9  
The adaptive term is assumed as \(\dot{f}_{\zeta_{5}}=\beta_{3}^{-1}S_{D3}\). Thus, one obtains  
\[\dot{V}_{K}\leq-k_{x}x_{e}^{2}-k_{\theta}\,s^{2}\theta_{e}-k_{\psi}\,s^{2}\psi_ {e}+|vy_{e}|+|z_{e}w|+2|z_{e}u_{d}|. \tag{111}\]0  
where \(\epsilon_{3}\geq|\beta_{3}\dot{f}_{\zeta_{5}}\dot{f}_{\zeta_{5}}|\) is a positive scalar that can be found if \(\dot{f}_{r}\) (Assumption 3) is limited and the controller is well designed. Moreover, the condition \(|\beta_{3}\dot{f}_{\zeta_{5}}\dot{f}_{\zeta_{5}}|<\rho_{3}|S_{D3}|\) must be fulfilled to guarantee uniformly ultimate boundedness. Hence, if \(\zeta_{5e}\) tends to zero along the sliding surface \(S_{D3}\), then \(\dot{V}_{D3}=\epsilon_{3}\). Because \(\zeta_{5e}=r_{e}\), \(r_{e}\) tends to zero. Consequently, if \(\tau_{r}\) (101) is applied, the velocity error \(r_{e}\) will converge to zero.