# Adaptive Recursive Sliding Mode Control (ARSMC)-Based UAV Control for Future Smart Cities
## 4 Recursive Control Design
The adaptive control technique is used to adjust the controller parameters in real time based on estimation of the system states and model parameters. Overall, the ARSMC strategy, represented in Figure 5, provides better control performance, robustness, and adaptability to complex nonlinear systems compared to traditional control strategies. It has been applied in various fields, such as robotics, aerospace, and industrial automation. This section implements an adaptive backstepping for position trajectory tracking control, taking the output vector for the UAV position as \([x_{1},x_{2}]\). The variables used in the design procedure for the MIMO system are:  
\[ \begin{bmatrix}\theta=x_{1}&\text{and}&e_{\xi_{\theta}}=x_{1}-x_{1d},&e_{\xi_ {\theta}}\in e_{\xi_{1}},e_{\xi_{2}},e_{\xi_{3}}\\ \phi=x_{3}&\text{and}&e_{\xi_{\phi}}=x_{3}-x_{2d},&e_{\xi_{\phi}}\in e_{\xi_{ \phi}},e_{\xi_{\phi}},e_{\xi_{\phi}}.\end{bmatrix}  \tag{43}\]  
Defining the position tracking errors as:  
\[ \begin{bmatrix}e_{\xi_{z}}=\begin{bmatrix}e_{\xi_{\phi}}\\ e_{\xi_{\phi}}\end{bmatrix}=>\begin{bmatrix}x_{1}-x_{1d}\\ x_{3}-x_{2}\end{bmatrix}=>\begin{bmatrix}\begin{matrix}Tracking\text{ \emph{error of pitch position }(angle)}\\ \text{Tracking error of yaw position }(angle)\end{bmatrix}\end{bmatrix}  \tag{44}\]  
\[\begin{bmatrix}e_{\xi_{\phi}}= \begin{bmatrix}e_{\xi_{1}}\\ e_{\xi_{2}}\\ e_{\xi_{3}}\end{bmatrix} => \begin{bmatrix}\begin{matrix}x_{1}-x_{1d}\\ x_{2}-\alpha_{1}\\ x_{5}-\alpha_{2}\end{matrix}\end{bmatrix}  \tag{45}\]  
\[\begin{bmatrix}e_{\xi_{\phi}}= \begin{bmatrix}e_{\xi_{1}}^{*}\\ e_{\xi_{2}}\\ e_{\xi_{3}}\end{bmatrix} => \begin{bmatrix}\begin{matrix}\dot{x}_{1}-\dot{x}_{1d} \\ \dot{x}_{2}-\dot{\alpha}_{1}\\ \dot{x}_{5}-\dot{\alpha}_{2}\end{matrix}\end{bmatrix}  \tag{46}\]  
Figure 5: Block diagram of UAV for ARSMC. \[\left[V_{\xi_{\theta}}\right]= \begin{bmatrix}V_{\xi_{1}}\\ V_{\xi_{2}}\\ V_{\xi_{3}}\end{bmatrix} => \begin{bmatrix}1/2\varepsilon_{\xi_{1}}^{2}\\ 1/2\varepsilon_{\xi_{2}}^{2}\\ 1/2\varepsilon_{\xi_{3}}^{2}\end{bmatrix}  \tag{47}\]  
\[\left[\dot{V}_{\xi_{\theta}}\right]= \begin{bmatrix}\dot{V}_{\xi_{1}}\\ V_{\xi_{2}}\\ V_{\xi_{3}}\end{bmatrix} = \begin{bmatrix}e_{\xi_{1}}\dot{e}_{\xi_{1}}\\ e_{\xi_{2}}\dot{e}_{\xi_{2}}\\ e_{\xi_{3}}\dot{e}_{\xi_{3}}\end{bmatrix} => \begin{bmatrix}e_{\xi_{1}}(\dot{x} _{1}-\dot{x}_{1})\\ e_{\xi_{2}}(\dot{x}_{2}-\dot{x}_{1})\\ e_{\xi_{3}}(\dot{x}_{5}-\dot{x}_{2})\end{bmatrix}  \tag{48}\]  
The required condition for the Lyapunov function to fulfill the asymptotic stability as:  
\[\dot{V}=-V_{\xi_{1}}^{2}-V_{\xi_{2}}^{2}-V_{\xi_{3}}^{2} \tag{49}\]  
\[\left[e_{\xi_{\theta}}\right]= \begin{bmatrix}e_{\xi_{4}}\\ e_{\xi_{5}}\\ e_{\xi_{6}}\end{bmatrix} => \begin{bmatrix}x_{3}-x_{2_{d}}\\ x_{4}-\alpha_{3}\\ x_{6}-\alpha_{4}\end{bmatrix}  \tag{50}\]  
\[\left[e_{\xi_{\theta}}\right]= \begin{bmatrix}\dot{e}_{\xi_{3}}\\ \dot{e}_{\xi_{4}}\\ e_{\xi_{6}}\end{bmatrix} => \begin{bmatrix}\dot{x}_{3}-\dot{x}_{2}d\\ \dot{x}_{4}-\dot{x}_{3}\\ \dot{x}_{6}-\dot{x}_{4}\end{bmatrix}  \tag{51}\]  
\[\left[V_{\xi_{\theta}}\right]= \begin{bmatrix}V_{\xi_{4}}\\ V_{\xi_{5}}\\ V_{\xi_{5}}\end{bmatrix} => \begin{bmatrix}1/2\varepsilon_{\xi_{4}}^{2}\\ 1/2\varepsilon_{\xi_{2}}^{2}\\ 1/2\varepsilon_{\xi_{6}}^{2}\end{bmatrix}  \tag{52}\]  
\[\left[\dot{V}_{\xi_{\theta}}\right]= \begin{bmatrix}\dot{V}_{\xi_{4}}\\ \dot{V}_{\xi_{5}}\\ \dot{V}_{\xi_{6}}\end{bmatrix} = \begin{bmatrix}e_{\xi_{4}}\dot{e}_{\xi_{4}}\\ e_{\xi_{5}}\dot{e}_{\xi_{5}}\\ e_{\xi_{6}}\dot{e}_{\xi_{6}}\end{bmatrix} => \begin{bmatrix}e_{\xi_{4}}(\dot{x} _{3}-\dot{x}_{2}d)\\ e_{\xi_{5}}(\dot{x}_{4}-\dot{x}_{3})\\ e_{\xi_{6}}(\dot{x}_{6}-\dot{x}_{4})\end{bmatrix}  \tag{53}\]  
The arbitrary control laws for the pitch and yaw position are formulated as follows:  
\[\left\{