## 3 Controller Design
### Position Controller Design
#### 3.1.2 Disturbance Observer Design  
A disturbance observer is designed to compensate for lumped uncertainties.  
For a classical second-order nonlinear disturbed system,  
\[\left\{\begin{array}{ll}\dot{x}_{1}=x_{2}\\ \dot{x}_{2}=f+u+d\end{array}\right. \tag{37}\]  
where \(f\), \(u\), and \(d\) are, respectively, model-related nonlinear functions, control inputs, and uncertainty disturbances.  
By introducing the research results of [37], the following disturbance observer can be designed to obtain the observed estimate of uncertainty.  
\[\left\{\begin{array}{ll}\dot{d}=-\kappa_{1}(\vartheta-x_{2})\\ \hat{v}=f+u+\hat{d}-\kappa_{2}(\vartheta-x_{2})\end{array}\right. \tag{38}\]  
where \(\hat{d}\) is the estimate of \(d\) and \(\vartheta\) is the estimate of \(x_{2}\); \(\kappa_{1}>0\) and \(\kappa_{2}>0\) represent observer gain.  
The Lyapunov function for stability analysis is selected as follows:  
\[V=\frac{1}{2\kappa_{1}}\vec{d}_{p}^{2}+\frac{1}{2}\widetilde{v}^{2} \tag{39}\]  
where \(\widetilde{d}=d-\hat{d},\widetilde{v}=v-\vartheta\).  
By taking the derivative of the designed Lyapunov function and considering Assumption 2,  
\[\begin{array}{ll}\dot{V}&=\frac{1}{\kappa_{1}}\widetilde{d}_{p}\dot{\widetilde {d}}_{p}+\widehat{v}\widehat{v}=\frac{1}{\kappa_{1}}\widetilde{d}_{p}\bigg{(} \dot{d}_{p}-\dot{d}_{p}\bigg{)}+\widehat{v}\bigg{(}\widetilde{p}-\dot{\hat{v}} \bigg{)}\\ &=-\frac{1}{\kappa_{1}}\widetilde{d}_{p}\dot{d}_{p}+\widehat{v}\bigg{(} \widetilde{p}-\dot{\hat{v}}\bigg{)}\end{array} \tag{40}\]  
Substituting Equation (38) into Equation (41) yields  
\[\begin{array}{ll}\dot{V}&=-\frac{1}{\kappa_{1}}\widetilde{d}_{p}\big{(}- \kappa_{1}\big{(}\hat{v}-\dot{p}\big{)}\big{)}+\widehat{v}\Big{(}\big{(}v_{p}+ f_{p}+d_{p}\big{)}-\Big{(}v_{p}+f_{p}+\dot{d}_{p}-\kappa_{2}\big{(}\hat{v}-\dot{p} \big{)}\Big{)}\Big{)}\\ &=\widetilde{d}_{p}\big{(}\hat{v}-\dot{p}\big{)}+\widehat{v}\Big{(}d_{p}- \hat{d}_{p}+\kappa_{2}\big{(}\hat{v}-\dot{p}\big{)}\Big{)}\\ &=-\widetilde{d}_{p}\widehat{v}+\widetilde{d}_{p}\widetilde{v}-\kappa_{2} \widehat{v}^{2}\\ &=-\kappa_{2}\widehat{v}^{2}\leq 0\end{array} \tag{41}\]  
When \(\dot{V}\equiv 0\), the following relationship holds: \(\widehat{v}\equiv 0\), \(\dot{\widehat{v}}\equiv 0\), \(\widetilde{d}_{p}\equiv 0\). According to [PERSON]'s invariance theorem, \(t\rightarrow\infty\), \(\widetilde{d}_{p}\to 0\). The above derivation proves that the \(d_{p}\) term can be effectively observed by the disturbance observer.  
Through the above analysis, the disturbance observer designed for the position subsystem of Equation (25) is as follows:  
\[\left\{\begin{array}{ll}\dot{\hat{\overline{d}}}_{p}=-\kappa_{1}\big{(} \hat{v}_{1I}-v_{1I}\big{)}\\ \dot{v}_{1I}=\tau_{p}+f_{p}+\dot{\overline{d}}_{p}-\kappa_{2}\big{(}\hat{v}_{ 1I}-v_{1I}\big{)}\end{array}\right. \tag{42}\]  
where \(\dot{\overline{d}}_{p}\) is the estimate of the \(\overline{d}_{p}\) items, and \(\hat{v}_{1I}\) is the estimate of \(v_{1I}\). It is worth noting that the observation \(\dot{\overline{d}}_{p}\) obtained by the observer above is the observation value of uncertainty \(\overline{d}_{p}\) under the inertial frame. According to the relation \(\overline{d}_{p}=M_{\eta 11}^{-1}I_{1}^{-T}d_{p}\) in Equation (25), \(\dot{d}_{p}=\int_{1}^{T}M_{\eta 11}\dot{\overline{d}}_{p}\) should be obtained via mathematical transformation.  
Similarly, the disturbance observer designed for the attitude subsystem of Equation (29) is as follows:  
\[\left\{\begin{array}{ll}\dot{d}_{\Theta}=-\kappa_{1}I_{w}(\hat{\omega}- \omega)\\ \dot{\omega}=I_{w}^{-1}\Big{(}f_{\Theta}+\tau_{\Theta}+\hat{d}_{\Theta}\Big{)} -\kappa_{2}\big{(}\hat{\omega}-\omega\big{)}\end{array}\right. \tag{43}\]  
where \(\hat{d}_{\Theta}\) is the estimate of the \(d_{\Theta}\) items, and \(\hat{\omega}\) is the estimate of \(\omega\).