## 3 Controller Design
### Adaptive Dynamic Surface Controller  
_Step_ 1: Differentiate the trajectory tracking error \(e_{1}=x_{1}-x_{\rm d}\) with respect to time leads to:  
\[\dot{e}_{1}=x_{2}-\dot{x}_{\rm d}. \tag{11}\]  
Consider \(x_{2}\) as the first virtual control input, the virtual control law is designed as follows:  
\[\overline{x}_{\rm 2d}=\dot{x}_{\rm d}-k_{1}e_{1},\qquad k_{1}>0, \tag{12}\]  
where \(k_{1}\) is a positive control gain. Following the dynamic surface control theory [28], the signal \(\overline{x}_{\rm 2d}\) is fed to a low pass filter to obtain a new one \(x_{\rm 2d}\) for the next design step:  
\[\tau_{1}\dot{x}_{\rm 2d}+x_{\rm 2d}=\overline{x}_{\rm 2d},\qquad x_{\rm 2d}(0)= \overline{x}_{\rm 2d}(0),\qquad\tau_{1}>0, \tag{13}\]  
where \(\tau_{1}\) is the filter parameter. _Step_ 2: Define the first surface error as \(s_{1}=x_{2}-x_{\rm 2d}\), its time derivative can be derived as:  
\[\dot{s}_{1}=\dot{x}_{2}-\dot{x}_{\rm 2d}=\overline{A}_{\rm a}x_{3}-\frac{1}{m} \Big{[}p_{\rm b}A_{\rm b}+p_{0}A_{\rm r}+bx_{2}+F_{\rm f}S_{\rm f}(\dot{x})+d_ {\rm f}\Big{]}-\frac{1}{\tau_{1}}(\overline{x}_{\rm 2d}-x_{\rm 2d}), \tag{14}\]where \(\overline{A}_{\rm a}=A_{\rm a}/m\). Define \(\overline{x}_{3}=x_{3}-\hat{x}_{3}\), and let \(\varsigma=\hat{x}_{3}\) be the second virtual control input, the virtual control law is designed as follows:  
\[\overline{\varsigma}_{\rm d}=\frac{1}{A_{\rm a}}\Bigg{\{}\frac{1}{m}\Big{[}p_{ \rm b}A_{\rm b}+p_{0}A_{\rm r}+\hat{b}x_{2}+\hat{F}_{\rm f}S_{\rm f}(\dot{x})+ \hat{d}_{\rm f}\Big{]}+\frac{1}{\tau_{1}}(\overline{x}_{2\rm d}-x_{2\rm d})-k_{ 2}s_{1}-\frac{h_{1}^{2}}{4\eta_{1}}s_{1}\Bigg{\}}, \tag{15}\]  
where \(k_{2}>0\) is a positive control gain, \(\eta_{1}>0\) is a controller parameter, and \(h_{1}\) is a known function that will be determined later, \(\hat{b}\), \(\hat{F}_{\rm f}\),and \(\hat{d}_{\rm f}\) are the estimates of \(b\), \(F_{\rm f}\), and \(d_{\rm f}\), respectively. \(\hat{b}\), \(\hat{F}_{\rm f}\), and \(\hat{d}_{\rm f}\) are updated by:  
\[\dot{\hat{b}}={\rm Proj}_{\hat{b}}(-\frac{\gamma_{1}}{m}x_{2}s_{1}), \tag{16}\]  
\[\dot{\hat{F}}_{\rm f}={\rm Proj}_{\hat{F}_{\rm f}}(-\frac{\gamma_{2}}{m}S_{ \rm f}(x_{2})s_{1}), \tag{17}\]  
\[\dot{\hat{d}}_{\rm f}={\rm Proj}_{\hat{d}_{\rm f}}(-\frac{\gamma_{3}}{m}s_{1}), \tag{18}\]  
where \(\gamma_{1}>0\), \(\gamma_{2}>0\),and \(\gamma_{3}>0\) are the observer gains, and the projection mapping is defined as:  
\[{\rm Proj}_{\hat{\zeta}}(\cdot)=\left\{ \begin{array}{ll}0,&\mbox{if}\quad \dot{\xi}=\xi_{\rm max}\quad\mbox{and}\quad\cdot>0\\ 0,&\mbox{if}\quad\dot{\xi}=\xi_{\rm min}\quad\mbox{and}\quad\cdot<0\\ \cdot,&\mbox{otherwise}\end{array} \right., \tag{19}\]  
where \(\xi\) is a symbol that can be replaced by \(b\), \(F_{\rm f}\), and \(d_{\rm f}\). Similarly, the signal \(\overline{\varsigma}_{\rm d}\) is fed to a low pass filter to obtain a new one \(\varsigma_{\rm d}\) for the next design step:  
\[\tau_{2}\dot{\varsigma}_{\rm d}+\varsigma_{\rm d}=\overline{\varsigma}_{\rm d },\varsigma_{\rm d}(0)=\overline{\varsigma}_{\rm d}(0),\ \tau_{2}>0, \tag{20}\]  
where \(\tau_{2}\) is the filter parameter. _Step_ 3: Define the second surface error as \(s_{2}=\varsigma-\varsigma_{\rm d}\), its time derivative can be derived as:  
\[ \begin{array}{l}\dot{s}_{2}=\dot{\zeta}-\dot{\varsigma}_{\rm d}=\dot{s}_{3} -\dot{\varsigma}_{\rm d}=\frac{RT_{\rm s}}{V_{\rm a}}\hat{\overline{m}}_{\rm a }-\frac{A_{\rm a}x_{2}}{V_{\rm a}}\hat{x}_{3}-\frac{1}{\tau_{2}}(\overline{ \varsigma}_{\rm d}-\varsigma_{\rm d})\\ =-\frac{RT_{\rm s}\beta}{V_{\rm a}}\hat{x}_{4}+(\frac{RT_{\rm s}a}{V_{\rm a}}- \frac{A_{\rm a}x_{2}}{V_{\rm a}})\hat{x}_{3}-\frac{1}{\tau_{2}}(\overline{ \varsigma}_{\rm d}-\varsigma_{\rm d})\end{array}  \tag{21}\]  
where \(a=\frac{p_{\rm A}j_{\rm D}}{3 RT_{\rm s}L_{\rm f}\mu}\).