## 3 Flight Controller Design
### Position Integral Backstepping Controller Design
\right\|-\varepsilon_{xz}\right) \tag{83}\]  
where \(\varepsilon_{xz}\) is shown as (62). Equation (83) shows that the system \((\mathbf{e}_{x},z_{1})\) is stable in the sense of BIBO. As a result, the error vector will approach a region \(\varepsilon_{xz}\) eventually. As mentioned earlier, \(\dot{\theta}\) is the system state, not a control input that can be directly assigned. Thus, define the error variable  
\[z_{2}=\dot{\theta}-\varphi_{2}. \tag{84}\]  
Then, the system \((\mathbf{e}_{x},z_{1},\dot{\theta})\) described in (74) and (75) can be transformed into the domain of \((\mathbf{e}_{x},z_{1},z_{2})\):  
\[\dot{\mathbf{e}}_{x} =\mathbf{f}_{x}+\mathbf{g}_{x}\varphi_{1}+\mathbf{g}_{x}z_{1}+ \mathbf{D}_{x} \tag{85}\] \[\dot{z}_{1} =\mathbf{c}_{\theta}(\varphi_{2}+z_{2})-\dot{\varphi}_{1}\] (86) \[\dot{z}_{2} =\frac{M}{J}+\frac{d_{\theta}}{J}-\dot{\varphi}_{2} \tag{87}\]  
The objective is to seek the control torque \(M\) so that the overall error systems (85)-(87) are stable. Consider the composite Lyapunov function candidate as  
\[V=V_{1}+\frac{1}{2}z_{2}^{2}=\mathbf{e}_{x}^{T}\mathbf{P}_{x}\mathbf{e}_{x}+ \frac{1}{2}z_{1}^{2}+\frac{1}{2}z_{2}^{2} \tag{88}\]  
Taking the time derivative of (88) along the system trajectories (85)-(87) and introducing (80) and (83), it follows that  
\[\dot{V} =2\mathbf{e}_{x}^{T}\mathbf{P}_{x}\dot{\mathbf{e}}_{x}+z_{1}\dot {z}_{1}+z_{2}\dot{z}_{2}\] \[=2\mathbf{e}_{x}^{T}\mathbf{P}_{x}(\mathbf{f}_{x}+\mathbf{g}_{x} \varphi_{1}+\mathbf{g}_{x}z_{1}+\mathbf{D}_{x})+z_{1}(\mathbf{c}_{\theta} \varphi_{2}-\dot{\varphi}_{1}+2\mathbf{e}_{x}^{T}\mathbf{P}_{x}\mathbf{g}_{x} )+z_{2}(\dot{z}_{2}+\mathbf{c}_{\theta}z_{1})\] \[=\underbrace{2\mathbf{e}_{x}^{T}\mathbf{P}_{x}(\mathbf{A}_{x} \mathbf{e}_{x}+\mathbf{v}_{x})+z_{1}\Big{(}\mathbf{c}_{\theta}\varphi_{2}- \dot{\varphi}_{1}+2\mathbf{e}_{x}^{T}\mathbf{P}_{x}\mathbf{g}_{x}\Big{)}}_{ \leq-\lambda_{min}(\mathbf{Q}_{xz})}\bigg{\|} \begin{bmatrix}\mathbf{e}_{x}\\ z_{1}\end{bmatrix} \bigg{\|}\bigg{(} \begin{bmatrix}\mathbf{e}_{x}\\ z_{1}\end{bmatrix} \bigg{\|}_{-\varepsilon_{xz}}\bigg{)}\] \[\leq-\lambda_{min}(\mathbf{Q}_{xz})\bigg{\|} \begin{bmatrix} \mathbf{e}_{x}\\ z_{1}\end{bmatrix} \bigg{\|}\bigg{(}\bigg{\|} \begin{bmatrix}\mathbf{e}_{x}\\ z_{1}\end{bmatrix} \bigg{\|}-\varepsilon_{xz}\bigg{)}-k_{z1}z_{1}^{2}+z_{2} \bigg{(}\frac{M}{J}+\frac{d_{\theta}}{J}-\dot{\varphi}_{2}+\mathbf{c}_{\theta} z_{1}\bigg{)} \tag{89}\]  
Designing the control torque \(M\) like (54), substituting (54) into (89) yields\[\dot{V}\leq -\lambda_{min}(\mathbf{Q}_{xz})\Big{\|} \begin{bmatrix}\mathbf{e}_{x }\\ z_{1}\end{bmatrix} \Big{\|}\Big{(}\Big{\|} \begin{bmatrix}\mathbf{e}_{x}\\ z_{1}\end{bmatrix} \Big{\|}-\varepsilon_{xz}\Big{)}\] \[-k_{z1}z_{1}^{2}+z_{2}\Big{(}\frac{J(\phi_{2}-\mathrm{c}_{\theta }z_{1}-k_{z2}z_{2}-w\,\mathrm{sign}(z_{2}))}{J}+\frac{d_{\theta}}{J}-\phi_{2}+ \mathrm{c}_{\theta}z_{1}\Big{)}\] \[\leq -\lambda_{min}(\mathbf{Q}_{xz})\Big{\|} \begin{bmatrix}\mathbf{e}_ {x}\\ z_{1}\end{bmatrix} \Big{\|}\Big{(}\Big{\|} \begin{bmatrix}\mathbf{e}_{x}\\ z_{1}\end{bmatrix} \Big{\|}-\varepsilon_{xz}\Big{)}\] \[-k_{z1}z_{1}^{2}+z_{2}\Big{(}\phi_{2}-\mathrm{c}_{\theta}z_{1}- k_{z2}z_{2}-w\,\mathrm{sign}(z_{2})+\frac{d_{\theta}}{J}-\phi_{2}+\mathrm{c}_{ \theta}z_{1}\Big{)}\] \[\leq -\lambda_{min}(\mathbf{Q}_{xz})\Big{\|} \begin{bmatrix}\mathbf{e} _{x}\\ z_{1}\end{bmatrix} \Big{\|}\Big{(}\Big{\|} \begin{bmatrix}\mathbf{e}_{x}\\ z_{1}\end{bmatrix} \Big{\|}-\varepsilon_{xz}\Big{)}-k_{z1}z_{1}^{2}-k_{z2}z_{2}^ {2}-wz_{2}\,\mathrm{sign}(z_{2})+z_{2}\frac{d_{\theta}}{J}\] \[\leq -\lambda_{min}(\mathbf{Q}_{xz})\Big{\|} \begin{bmatrix}\mathbf{e} _{x}\\ z_{1}\end{bmatrix} \Big{\|}\Big{(}\Big{\|} \begin{bmatrix}\mathbf{e}_{x}\\ z_{1}\end{bmatrix} \Big{\|}-\varepsilon_{xz}\Big{)}-k_{z1}z_{1}^{2}-k_{z2}z_{2}^ {2}-wz_{2}\,\mathrm{sign}(z_{2})+z_{2}\frac{d_{\theta}}{J}\] \[\leq -\lambda_{min}(\mathbf{Q}_{xz})\Big{\|} \begin{bmatrix}\mathbf{e} _{x}\\ z_{1}\end{bmatrix} \Big{\|}\Big{(}\Big{\|} \begin{bmatrix}\mathbf{e}_{x}\\ z_{1}\end{bmatrix}