## 3 Design of Controller and Nonlinear Disturbance Observer
### Design of the Heading Controller  
Let us define the state variable for the yaw axis from (11) as \(x_{7}=\psi\) and \(x_{8}=\dot{\psi}\). Hence, the state-space model can be represented as follows:  
\[\dot{x}_{7}=x_{8},\dot{x}_{8}=\dot{\phi}\dot{\theta}\frac{\dot{f}_{x}-J_{y}}{J_ {z}}+\frac{l}{J_{z}}\tau_{\psi}-\rho_{\psi}=f_{8}+g_{8}u_{4}-\rho_{8}, \tag{65}\]  
where \(f_{8}=\dot{\phi}\dot{\theta}\frac{l_{x}-l_{y}}{l_{z}},g_{8}=\frac{l}{l_{z}}\), and \(\rho_{8}=\rho_{\psi}\). The tracking error and new states are defined as follows:  
\[s_{7}=x_{7}-x_{7d}-\xi_{71}, \tag{66}\]  
\[s_{8}=x_{8}-\chi_{71}-\xi_{72}. \tag{67}\]  
The compensating signals included in (66) and (67) are obtained from the following dynamics:  
\[ \begin{array}{l}\dot{\xi}_{71}=-k_{71}\xi_{71}+\xi_{72}+\chi_{71}-\alpha_{7} -\beta_{\zeta,71}sig^{1/2}(\xi_{71}),\\ \dot{\xi}_{72}=-k_{72}\xi_{72}-\xi_{71}-\beta_{\zeta,72}sig^{1/2}(\xi_{72}). \end{array}  \tag{68}\]where \(\beta_{\zeta,\gamma j}>0\), \(j=1,2\) are constants. In (67), \(\chi_{71}\) denotes the output of the tracking differentiator expressed as follows:  
\[\dot{\chi}_{71}=\chi_{72}, \tag{69}\] \[\dot{\chi}_{72}=-R_{7}^{2}[r_{71}\sinh(\alpha_{71}\varphi_{71}( \chi_{71},\alpha_{7}))+r_{72}\sinh(\alpha_{72}R_{7}^{-1}\varphi_{72}(\chi_{72}) )],\]  
where \(\varphi_{717}(\varsigma_{71},\alpha_{7})=\kappa\gamma sig^{1/2}(\chi_{71}- \alpha_{7})+(1-\kappa_{7})sig^{(2+\gamma_{7})/2}(\chi_{71}-\alpha_{7})\), \(\varphi_{72}(\chi_{72})=sig^{1/2}(\chi_{72})\), \(\kappa_{7}>1\) and \(0<\gamma_{7}<1\) are constants. The super-twisting state variable vectors are defined as  
\[\zeta_{7}=[\zeta_{71}\ \ \zeta_{72}]^{T}=\left[ \begin{array}{c}k_{7}\varsigma_{7 }+sig^{1/2}(s_{7})\\ -k_{72}\int_{0}^{t}[k_{7}^{2}s_{7}+\frac{3\varsigma_{7}}{2}sig^{1/2}(s_{7})+ \frac{1}{2}sign(s_{7})]d\tau\end{array} \right], \tag{70}\]  
\[\zeta_{8}=[\zeta_{81}\ \ \zeta_{82}]^{T},=\left[ \begin{array}{c}k_{8}s_{8}+ sig^{1/2}(s_{8})\\ -k_{82}\int_{0}^{t}[k_{8}^{2}s_{8}+\frac{3\varsigma_{8}}{2}sig^{1/2}(s_{8})+ \frac{1}{2}sign(s_{8})]d\tau\end{array} \right], \tag{71}\]  
Next, the time derivatives of the state vector to design the controllers are given by  
\[\dot{\zeta}_{7}=[\dot{\zeta}_{71}\ \ \ \dot{\zeta}_{72}]^{T}=\left[ \begin{array}{c }\mu_{7}(x_{8}-\dot{x}_{74}-\dot{\dot{\xi}}_{71})\\ -\mu_{7}\kappa_{72}\zeta_{71}\end{array} \right], \tag{72}\]  
\[\dot{\zeta}_{8}=[\dot{\zeta}_{81}\ \ \dot{\zeta}_{82}]^{T}=\left[ \begin{array}{c }\mu_{8}(f_{8}+g_{8}u_{8}-\rho_{8}-\chi_{72}-\dot{\xi}_{72})\\ -\mu_{8}k_{82}\zeta_{81}\end{array} \right], \tag{73}\]  
where \(\mu_{7}=k_{7}+\frac{1}{2}|s_{7}|^{-1/2}\) and \(\mu_{8}=k_{8}+\frac{1}{2}|s_{8}|^{-1/2}\). We can select the virtual control \(\alpha_{7}\) for recursive input and control input \(u_{4}\) as follows:  
\[\alpha_{7}=-k_{71}\zeta_{71}-k_{71}\xi_{71}-\beta_{\xi,71}sig^{1/2}(\xi_{71})+ \dot{x}_{74}+\zeta_{72}, \tag{74}\]  
\[u_{4}=u_{\psi}=\frac{1}{g_{8}}(-k_{81}\zeta_{81}-k_{81}\zeta_{81}-f_{8}+\rho_{ 8}+\chi_{72}-\xi_{71}-\beta_{\xi,81}sig^{1/2}(\xi_{82})-\frac{\varsigma\gamma \eta_{7}}{\xi s\eta_{8}}s_{8}+\zeta_{82}). \tag{75}\]  
We define the Lyapunov function candidate as follows:  
\[V_{3}=\frac{1}{2}\zeta_{7}^{T}P_{7}\zeta_{7}+\frac{1}{2}\zeta_{8}^{T}P_{8} \zeta_{8}, \tag{76}\]  
where \(P_{k}\) denotes positive definite matrices defined with \(c_{k}>0\) and \(\varepsilon_{k}>0\) as follows:  
\[P_{k}=\left[ \begin{array}{cc}c_{k}+4\epsilon_{k}^{2}&-2\varepsilon_{k}\\ -2\varepsilon_{k}&1\end{array}