# Control Methods Comparison for the Real Quadrotor on an Innovative Test Stand
## 3 Experimental Setup and Results
### Evaluation of Controllers
#### 3.4.1 The Sequence of Required Setpoints  
The sequence of required setpoints using Euler angles representation of orientation is shown in Figure 9. Quaternion representation of the same sequence is shown in in Figure 10. The sequence is divided into 18 sections, which is also the number of setpoints in the sequence.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Output** & \(\mathbf{K_{P}}\) & \(\mathbf{K_{D}}\) \\ \hline \(\tau_{xd}\) & 1.34 & 0.3 \\ \(\tau_{yd}\) & 1.34 & 0.3 \\ \(\tau_{zd}\) & 0.6 & 0.3 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Components of the attitude PD controller (\(\mathrm{K_{P}}\)—the proportional part of the PD controller, \(\mathrm{K_{D}}\)—the derivative part of the PD controller, \(\tau_{id}\)—the desired torque of the quadrotor around all axes, \(i=x,y,z\)).  
Quaternion represents the rotation of the object with the respect to initial orientation. The rotation can be executed in two ways (i.e., clockwise rotation or counter-clockwise rotation). The rotation of \(360^{\circ}\) around any axis is represented by the following quaternion \(q=\left[\begin{array}{cccc}-1&0&0&0\end{array}\right]\). Because of abovementioned reasons, Figure 10 contains two sequences (blue and green line) representing the same orientation of the quadrotor. The point of sequence parting is when quadrotor is ordered to rotate back from the rotation of \(180^{\circ}\) around \(z\) axis. The direction of the rotation from this orientation depends on the variation of the setpoint orientation, because the quadrotor will rotate in the direction that requires smaller rotation.  
The performances of designed controllers (i.e., PD, LQR and backstepping controller) are outlined in the following figures: Figures 11, 14 and 17, respectively. Figures show the actual quaternion represented by blue line, quaternion error represented by green line and the desired quaternion represented by red and magenta line. Change in setpoint around \(z\) axis also influences the rest of the axes. This is given by the computation of the quaternion error. The change in the orientation around \(z\) axis causes also the changes of the quaternion error in the remaining axes.  
but the trajectory around \(x\) and \(y\) axis shows the permanent deviation and oscillation. This behavior is caused by the lack of the rigidness of the test stand in both \(x\) and \(y\) axis. The rotation in both problematic axes is provided by carbon tubes of almost 1 m length. Moreover, the ends of the tubes are flexible. Therefore, the performance of the controller is affected by the mechanical oscillation of the designed test stand. The movement in \(z\) axis is not affected because rotation point around \(z\) axis of the test stand coincides with the rotation point of the quadrotor.  
The settling time of the desired orientation in \(x\) and \(y\) axis is mostly less than 1 s when permanent deviation is neglected. The slower dynamics of the \(z\) axis is required because the control of the orientation around this axis has lower importance.  
Figure 12 shows the actual angular velocity in \(\mathrm{E_{B}}\) (the body-fixed frame) of the quadrotor that belongs to the performance of PD attitude controller. The angular velocity r is smooth in contrast with the oscillation of angular velocity p and q. This oscillation is caused by the oscillation of the desired torque around abovementioned axes depicted in Figure 13.  
Figure 11: Performance of the sequence using the PD controller expressed by various quaternions, such as actual quaternion (blue line), quaternion error (green line) and desired quaternion (red and magenta line).  
Figure 12: Angular velocity in \(\mathrm{E_{B}}\) (the body-fixed frame) of the quadrotor when using the PD controller.