# A Comparative Study for Control of Quadrotor UAVs
## 2 Materials and Methods
### System Control
#### 2.2.3 Inner Loop--Feedback Linearization Control  
This follows the attitude dynamical system exploited for the design of the feedback linearization-based attitude controller, with \(\mathrm{x}=\big{(}\phi,\theta,\psi,\phi^{\prime},\ \theta^{\prime},\ \psi^{\prime}\big{)}\) and \(\mathrm{u}=(\mathrm{U}_{2},\mathrm{U}_{3},\mathrm{U}_{4})\). \[\dot{\mathrm{x}}_{\mathrm{p}}=\mathrm{x}_{\mathrm{p}+3}\,\ \mathrm{p}=1,2,3 \tag{32}\]  
\[\dot{\mathrm{x}}_{4}=\frac{\mathrm{I}_{\mathrm{Y}}-\mathrm{I}_{\mathrm{z}}}{ \mathrm{I}_{\mathrm{x}}}x_{5}\mathrm{x}_{6}-\frac{\mathrm{I}_{\mathrm{R}}}{ \mathrm{I}_{\mathrm{x}}}\mathrm{x}_{5}\mathrm{f}(\mathrm{u})-\frac{1}{ \mathrm{I}_{\mathrm{x}}}\mathrm{K}_{\mathrm{d}}^{\mathrm{R}}\mathrm{x}_{4}+ \frac{1}{\mathrm{I}_{\mathrm{x}}}\mathrm{Lu}_{1} \tag{33}\]  
\[\dot{\mathrm{x}}_{5}=\frac{\mathrm{I}_{\mathrm{z}}-\mathrm{I}_{\mathrm{y}}}{ \mathrm{I}_{\mathrm{y}}}\mathrm{x}_{4}\mathrm{x}_{6}-\frac{\mathrm{I}_{\mathrm{ R}}}{\mathrm{I}_{\mathrm{y}}}\mathrm{x}_{4}\mathrm{f}(\mathrm{u})-\frac{1}{ \mathrm{I}_{\mathrm{y}}}\mathrm{K}_{\mathrm{d}}^{\mathrm{R}}\mathrm{x}_{5}+ \frac{1}{\mathrm{I}_{\mathrm{y}}}\mathrm{Lu}_{2} \tag{34}\]  
\[\dot{\mathrm{x}}_{6}=\frac{\mathrm{I}_{\mathrm{x}}-\mathrm{I}_{\mathrm{y}}}{ \mathrm{I}_{\mathrm{z}}}\mathrm{x}_{4}\mathrm{x}_{5}-\frac{1}{\mathrm{I}_{ \mathrm{z}}}\mathrm{K}_{\mathrm{d}}^{\mathrm{R}}\mathrm{x}_{6}+\frac{1}{ \mathrm{I}_{\mathrm{z}}}\mathrm{u}_{3} \tag{35}\]  
Coincidence between Euler rates and angular velocities is assumed for the attitude controller's design. The FL control law aims at linearizing the system with the term \(\mathrm{f}_{\mathrm{L}}^{\mathrm{f}}\) and controlling it with a new control input term, \(\mathrm{u}_{i}^{*}\), which is intended as the sum of a proportional gain with respect to the Euler angles' errors and a derivative term, proportional to the Euler rates. Refer to [27] for the theoretical foundations of FL control and further details. Each control input is defined as follows. \[\mathrm{u}_{1}=\mathrm{f}_{\mathrm{L}}^{\mathrm{f}}+\mathrm{u}_{1}^{*}=\frac{ \mathrm{I}_{\mathrm{x}}}{\mathrm{L}}\bigg{[}-\frac{\mathrm{I}_{\mathrm{Y}}- \mathrm{I}_{\mathrm{z}}}{\mathrm{I}_{\mathrm{x}}}x_{5}\mathrm{x}_{6}+\frac{ \mathrm{I}_{\mathrm{R}}}{\mathrm{I}_{\mathrm{x}}}x_{5}\mathrm{f}(\mathrm{u})+ \frac{1}{\mathrm{I}_{\mathrm{x}}}\mathrm{K}_{\mathrm{d}}^{\mathrm{R}}\mathrm{x}_{4}+ \mathrm{D}_{1}\mathrm{x}_{4}+\mathrm{P}_{1}(\mathrm{x}_{1\mathrm{ref}}-\mathrm{ x}_{1})\bigg{]} \tag{36}\]  
\[\mathrm{u}_{2}=\hat{\mathrm{\mathrm{P}}}_{\mathrm{L}}^{2}+\mathrm{u}_{2}^{*}= \frac{\mathrm{I}_{\mathrm{Y}}}{\mathrm{L}}\bigg{[}-\frac{\mathrm{I}_{\mathrm{Z}}- \mathrm{I}_{\mathrm{y}}}{\mathrm{I}_{\mathrm{y}}}\mathrm{x}_{4}\mathrm{x}_{6}+ \frac{\mathrm{I}_{\mathrm{R}}}{\mathrm{I}_{\mathrm{y}}}\mathrm{x}_{4}\mathrm{f}( \mathrm{u})+\frac{1}{\mathrm{I}_{\mathrm{y}}}\mathrm{K}_{\mathrm{d}}^{\mathrm{R}} \mathrm{x}_{5}+\mathrm{D}_{2}\mathrm{x}_{5}+\mathrm{P}_{2}(\mathrm{x}_{2 \mathrm{ref}}-\mathrm{x}_{2})\bigg{]} \tag{37}\]\[\mathrm{u}_{3}=\hat{t}_{\mathrm{L}}^{3}+\mathrm{u}_{3}^{*}=\mathrm{I}_{\mathrm{z}} \biggl{[}-\frac{\mathrm{I}_{\mathrm{x}}-\mathrm{I}_{\mathrm{y}}}{\mathrm{I}_{ \mathrm{z}}}\mathrm{x}_{4}\mathrm{x}_{5}+\frac{1}{\mathrm{I}_{\mathrm{z}}} \mathrm{K}_{\mathrm{d}}^{\mathrm{R}}\mathrm{x}_{6}+\mathrm{D}_{3}\mathrm{x}_{6 }+\mathrm{P}_{3}(\mathrm{x}_{3\mathrm{ref}}-\mathrm{x}_{3})\biggr{]} \tag{38}\]  
The closed-loop attitude dynamical subsystem becomes linear and decoupled, the dynamics of the system can be adjusted by tuning the pairs (\(\mathrm{D}_{i}\),\(\mathrm{P}_{\mathrm{i}}\)). This follows the closed-loop attitude dynamics of the controlled system.