## 3 Controller Synthesis
### Control Strategy
 \tag{30}\]  
Using the previous Equations, we obtain:  
\[ \begin{array}{l}\dot{V}_{2z}\ =\ -C_{z1}\ e_{z1}^{2}\ +\ e_{z2}\ (\dot{z_{2}}\ -\ \dot{z_{2}}^{*})\\ \dot{V}_{2\psi}\ =\ -C_{\varphi 1}\ e_{\varphi 1}^{2}\ +\ e_{\varphi 2}\ (\dot{\psi}_{2}\ -\ \dot{\psi}_{2}^{*})\end{array}  \tag{31}\]Combining (4), (7), and (31), we have:  
\[ \begin{split}&\dot{V}_{2z}=-C_{z1}e_{z1}{}^{2}+e_{z2}\Big{(}\frac{u_ {1}}{m}cos(\theta_{1})cos(\varphi_{1})-\frac{C_{zz}}{m}z_{2}-g+C_{z1}\dot{e}_{z1 }-\dot{z_{1}}^{*}\Big{)}\\ &\dot{V}_{2\varphi}=-C_{\varphi 1}e_{\varphi 1}{}^{2}+e_{\varphi 2} \Big{(}\frac{u_{1}}{z_{2}}-\frac{C_{zz}}{l_{z}}\ \dot{\varphi_{2}}^{2}-\frac{\left(l_{y}-l_{z} \right)}{l_{z}}\varphi_{2}\theta_{2}+C_{\varphi 1}\dot{e}_{\varphi 1}-\ddot{ \psi_{1}}^{*}\Big{)}\end{split}  \tag{32}\]  
Our objective is to make \(\dot{V}_{2i}\) negative by the next choice with \(i=\{z;\psi\}\):  
\[ \begin{array}{l}\frac{u_{1}}{m}cos(\theta_{1})cos(\varphi_{1})-\frac{C_{zz} }{m}z_{2}-g+C_{z1}\dot{e}_{z1}-\dot{z_{1}}^{*}=-C_{z2}e_{z2}\\ \frac{u_{1}}{l_{z}}-\frac{C_{zz}}{l_{z}}\dot{\varphi_{2}}^{2}-\frac{\left(l_{ y}-l_{x}\right)}{l_{z}}\varphi_{2}\theta_{2}+C_{\varphi 1}\dot{e}_{\varphi 1}- \ddot{\psi_{1}}^{*}=-C_{\varphi 2}e_{\varphi 2}\end{array}  \tag{33}\]  
where \(C_{i2}\) is a positive regulator parameter. The combination of Equation (33) leads to the control laws, given by:  
\[ \begin{split}& u_{1}=\frac{m}{\cos(\theta_{1})\cos(\varphi_{1})} \Big{(}-C_{z2}e_{z2}-\frac{C_{zz}}{m}z_{2}+g-C_{z1}\dot{e}_{z1}+\ddot{z_{1}}^{ *}\Big{)}\\ & u_{4}=I_{z}\bigg{(}-C_{\varphi 2}e_{\varphi 2}+\frac{C_{zz}}{l_{z}} \dot{\psi_{2}}^{2}+\frac{\left(l_{y}-l_{x}\right)}{l_{z}}\varphi_{2}\theta_{ 2}-C_{\varphi 1}\dot{e}_{\varphi 1}+\ddot{\psi_{1}}^{*}\Big{)}\end{split}  \tag{34}\]  
_C2 block_  
1. Inner Loop: Nonlinear Backstepping Control According to the instantaneous mathematical model describing the Parrot Mambo (1) and similarly to C1, let the tracking errors defined as: \[\left\{ \begin{array}{l}e_{\varphi 1}=\varphi_{1}-\varphi_{1}^{*};\ e_{ \varphi 2}=\varphi_{2}-\dot{\varphi_{1}}^{*}-C_{\varphi 1}\ e_{\varphi 1}\\ e_{\theta 1}=\theta_{1}-\theta_{1}^{*};\ e_{\theta 2}=\theta_{2}-\dot{ \theta_{1}}-C_{\theta 1}\ e_{\theta 1}\end{array} \right.\] (35)  
where:  
\(e_{\varphi 1},e_{\theta 1}\), are, respectively, roll, and pitch tracking errors. \(e_{\varphi 2},e_{\theta 2}\), are the derivatives of the tacking errors introduced before. \(\varphi_{1}{}^{*},\theta_{1}{}^{*}\) are the desired orientation specified by a reference model. Control inputs \(u_{2}\) and \(u_{3}\), which are responsible for generating the roll and pitch controls, can be calculated as:  
\[ \begin{split}& u_{2}=I_{x}\bigg{(}-C_{\varphi 2}e_{\varphi 2}+\frac{C_{zz} }{l_{x}}\varphi_{2}{}^{2}+\frac{l_{z}\Omega_{z}}{l_{x}}\theta_{2}+\frac{\left( l_{z}-l_{y}\right)}{l_{x}}\theta_{2}\psi_{2}-C_{\varphi 1}\dot{e}_{\varphi 1}+\ddot{ \varphi_{1}}^{*}\bigg{)}\\ & u_{3}=I_{y}\bigg{(}-C_{\varphi 2}e_{\theta 2}+\frac{C_{zz} }{l_{y}}\dot{\theta_{2}}^{2}-\frac{l_{z}\Omega_{z}}{l_{y}}\varphi_{2}+\frac{ \left(l_{z}-l_{z}\right)}{l_{y}}\varphi_{2}\psi_{2}-C_{\varphi 1}\dot{e}_{\theta 1}+ \ddot{\theta_{1}}^{*}\bigg{)}\end{split}  \tag{36}\]  
where \(C_{\varphi 1},C_{\varphi 2},C_{\varphi 1},\) and \(C_{\varphi 2}\) are positive regulator parameters. Other loop: PID  
A quadcopter can only achieve a translational movement in the \(x\)-\(y\) axes through roll and pitch angle movement, which technically represents the coupling dynamics in the quadcopter.