# Passivity-Based Control for a Micro Air Vehicle Using Unit Quaternions
## 6 Flight Tests  
Our proposed strategy was validated with real time indoor experiments using one of our laboratory's Parrot AR Drone 2 vehicles (Vedio S1). This UAV's firmware was modified to work under a software framework which runs a Linux-based operating system, capable of implementing a wide range of conceived control schemes. An OptiTrack motion capture system was used to estimate the vehicle's position and translational velocity, which was communicated to the drone using a Wi-Fi LAN, while its internal Inertial Measurement Unit (IMU) was used to measure its attitude quaternion and angular velocity, this configuration was chosen to maintain a minimal bandwidth usage in the wireless communications.  
A Sony DualShock 3 controller was used to input a 3-dimensional position and velocity trajectory, which was controlled by one of our team members using joysticks. The generated trajectory was set as the desired position for the drone. Figure 7 illustrates the UAV's real trajectory and its reference in a real time experiment.  
The trajectory given by the joystick is considerably fast, making strong movements to prove robustness. Notice the delay between the quad-rotor's position and its reference when it is moving, and the convergence to the desired position when the reference is held static.  
A desired control force is then computed using the position error, which is represented in Figure 8. The \(z\) component maintains a negative offset due to a compensation of the gravitational effects.  
Since our framework is compatible with three different UAV configurations and models, the thrust force was set to be dimensionless. This means a force with norm 1 makes the motors output a maximum thrust, while norm 0 translates in no thrust force.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Strategy** & \multicolumn{3}{c}{**Quality Indicator IAE 1**} \\ \hline  & \(I_{AEX}\) & \(I_{AEV}\) & \(I_{AEF}\) \\ PD 1 & 12.98 & 12.96 & 12.31 \\ LQR 1 & 13.35 & 13.26 & 13.15 \\ Backstepping & 13.30 & 13.38 & 12.07 \\ PBC 1 & 13.08 & 13.08 & 11.98 \\ \hline \hline \end{tabular} 1  
\end{table}
Table 2: Comparison of control strategies applied to a quad-rotor.  
Figure 6: Quad-rotor’s translation responses.  
An attitude trajectory is now used to rotate the thrust force into the translational control law's direction. The orientation controller then, assures the vehicle's convergence to this reference. For a better visualization of the attitude dynamics, the equivalent Euler angles of the orientation error are illustrated in Figures 9a-11a, note the stabilization of around zero.  
Finally, Figures 9b-11b represent the stabilization of the position error. Note the proposed control strategy well stabilizes the quad-rotor, even if the desired trajectories include strong displacements.  
Figure 8: Quad-rotor’s control forces in dimensionless units.  
Figure 7: Quad-rotor’s position in 3D space.  
Figure 11: Quad-rotor’s yaw and \(z\) axis error stabilization. (**a**) Quad-rotor’s yaw error stabilization; (**b**) Position error in the \(z\) axis.  
Figure 10: Quad-rotor’s pitch and \(y\) axis error stabilization. (**a**) Quad-rotor’s pitch error stabilization; (**b**) Position error in the \(y\) axis.  
Figure 9: Quad-rotor’s roll and \(x\) axis error stabilization. (**a**) Quad-rotor’s roll error stabilization; (**b**) Position error in the \(x\) axis.