Control Methods Comparison for the Real Quadrotor on an Innovative Test Stand

: This article is a continuation of our previously published work that presented a comparison of nine attitude quaternion-based controllers of the quadrotor in simulation environment. In this article, the best three controllers were implemented into the real quadrotor. Namely proportional derivative (PD), linear quadratic regulator (LQR) and backstepping quaternion-based control techniques were evaluated. As a suitable test stand was not available on the basis of literature analysis, the article also outlines the requirements and the development of a new innovative test stand. In order to provide a comprehensive overview, the hardware and software that was used is also presented in the article. The main contribution of this article is a performance comparison of the controllers, which was based on absolute quaternion (positioning) error and energy consumption.


Introduction
In the last decades interest in unmanned aerial vehicles (UAVs) has increased. These vehicles consist of various flying platforms such as airships, fixed-wing or vertical take-off and landing (VTOL) vehicles. This article is focused on a quadrotor, which belongs to VTOL UAVs.
The main advantage of VTOL UAVs is the ability to hover allowing them to operate in a small and cluttered environment [1]. Comparing a multirotor VTOL platform to a helicopter, several advantages can be identified, such as a greater trust-weight ratio and better maneuverability. The variable number of rotors provide the possibility to use smaller propellers instead of large ones to produce a particular thrust. This leads to less structural and dynamical problems and, in the case of an accident, the resulting injury is usually less heavy [2][3][4]. Moreover, the formation of various quadrotors can perform a complex task such as the transport of items heavier than the maximum permissible load weight of one quadrotor. Multirotor platforms are usually controlled by changing an angular speed of rotors, so there is no need of a swashplate. This simplifies not only the mechanics but also the maintenance of the system [2,3,5]. Multirotor platforms can also continue in flight after occurrence of an actuator failure as long as they are equipped with a failsafe controller. Although the failsafe controller is more straightforward to design for multirotor drones with six or eight rotors, some controllers were also designed to manage an actuator failure of quadrotor. Examples of failsafe controllers for a quadrotor can be found in [6][7][8]. Multirotor platforms have become very popular and their usage has spread over all fields. Some requested tasks can be complicated, and they can require the control algorithms, which are faster, more efficient and reliable also under windy, uncertain and changing conditions. A disturbance observer (DO) is usually designed to compensate such uncertainties.
The quadrotor is coupled and underactuated system (i.e., six degrees of freedom are controlled only by four actuators). The translational motion of the quadrotor depends on the attitude of the quadrotor as can be seen from the equations in [9]. By this means, the quadrotor is a cascade system [10]. Therefore, a cascade structure of a controller is usually applied to control position and attitude of the quadrotor. Various controllers based on classic or modern control theory were already designed and verified. The non-linear or linear model of a quadrotor is used depending on the chosen control method [11].
The linear model of a quadrotor is achieved by linearization of the non-linear model around a hovering point. Controllers using the linearized model generally perform well around this hovering point. When the quadrotor goes away from the linearized point, the performance may worsen. Furthermore, the input saturation can cause control failure when large rapid maneuvers are required [3,5,12,13]. The main advantages of linear controllers are simplicity and ease of implementation to a real platform. The disadvantage of this approach is the use of the linearized model of the quadrotor during the process of designing a controller. Commonly used linear controllers are a linear quadratic regulator (LQR) and a proportional derivative (PD) controller [14][15][16].
Another group of controllers consists of a wide variety of non-linear controllers. The serious disadvantage of these controllers is the complexity that prevents the wide adoption of non-linear controllers in real applications. Among non-linear methods, the backstepping control technique based on the Lyapunov function is widely adopted due to its systematic design and an intuitive approach [17]. The proposed control law is based on the compensation of non-linear forces or torques depending on whether an attitude or position controller is being designed. Applying Lyapunov stability analysis proves that the closed-loop system is asymptotically stable. This approach was used to stabilize the quadrotor in [3,5,12,[18][19][20][21].
A backstepping-based inverse optimal attitude controller (BIOAC) was derived in [3] taking into account the input saturation. In [12], command filters are used to avoid a difficult analytic computation of required command derivatives in each step. The double-integral observer was developed in [18] to design a control law based on the Lyapunov function to track a reference trajectory. A decoupling attitude parameterization was presented in [19]. It allows the design of an independent and straightforward position heading tracking control using the backstepping control technique.
Some works try to overcome uncertainties (e.g., sensor noise, parametric uncertainties and external disturbance) by designing adaptive controllers [22,23]. In another recent work [24] a flight controller based on a Neural Network model has been presented for stabilization and trajectory control. Using an AI-based controller seems promising. Several works using these control techniques can be found in [25][26][27].
Quaternion describing dynamics of a quadrotor instead of Euler angles is becoming very popular nowadays. A feedback signal in the form of a quaternion can be used to design linear and also non-linear attitude and position controllers [28,29].
In [13], a cascade attitude controller was proposed. Both an inner and an outer control loop were formed by proportional controllers. The angular velocity and the quaternion were used as feedback signals. From this combination an attitude P2-controller arose. However, the final control law of the P2-controller corresponds to the standard PD controller designed in [2,30].
The problem of disturbance rejection of the attitude subsystem of a quadrotor was addressed in [1]. An acceleration-based disturbance observer was applied to a quaternion-based integral sliding mode attitude controller. This combination shows a significant improvement of the performance in position control as well as the compensation of large external forces.
Generally, many studies where a review of control techniques can be found. Such studies are addressed in [31,22,23]. Most of them are pointing out their advantages and disadvantages, but the experiments with the same UAV model and various control techniques are missing in the literature. Authors and scientists usually improve one technique and compare it with the technique from which the proposal originated. For example, authors in [32] improved backstepping controller by own proposed method called robust and saturated backstepping controller (RAS-BSC). Consequently, objective information expressed in the exact control quality indicators is missing and various control techniques cannot be compared in the more objective manner.
From this reason, our previous work [9] compared various quaternion-based control methods applied to quadrotor with disturbance observer and position estimator. The comparison was based on simulation results and the results brought qualitative new knowledge, because the objective quality indicators were chosen in order to compare the performance of all controllers. In total, nine control techniques (controllers) were compared.
In this article we present a logical outcome of our work. Based on the results in [9], three of the most promising control techniques were chosen (PD, LQR and backstepping) and they were implemented and evaluated on the real quadrotor. However, from the reasons specified in the Section 2.2 a test stand suitable for the complex evaluation of these controllers was not available. We designed an innovative test stand, which is registered as a utility model no. 7766 in Slovak Republic [33]. The control techniques were evaluated by 15 quality indicators and as far as we know, such complex comparison of PD, LQR and backstepping control techniques were not published yet. Moreover, all these techniques are quaternion-based, which is also significant contribution of this paper.
The article is structured as follows: Two test stands are presented in Section 2. First stand was used for an identification of static and dynamic characteristics of the actuator used in the real quadrotor. This test stand is a standard one and its description provides only basic information about the used platform. Second stand is an innovative stand mentioned above. Our goal was to suppress the momentum of inertia when designing this stand as much as possible. Moreover, this stand allows to test the quadrotor in 3 DOF (roll, pitch, yaw) in real-time. In analysis provided in Section 2.2, available test stands are investigated. Due to several disadvantages, we decided to design a completely new test, which is described in Section 2.2. The Section 3 presents a performance comparison of the controllers implemented in the real quadrotor. Finally, the conclusion is included in the end of this article.

Test Stand for Identification of Static and Dynamic Characteristics of the Actuator
Parameters used in the derived mathematical model in our previous work [9] were obtained from the static and dynamic characteristics of the real actuators. In this work [9] several controllers were tested in simulation environment. The next logical step was to evaluate selected controllers on the real quadrotor platform. That is why this section will present the first stand, which was used to identify static and dynamic characteristics of the actuators. The main contribution of this stand is significantly lower price compared to standard test stands, without loss of the identification quality.
In order to identify coefficients of the actuators, namely the thrust coefficient and the drag coefficient, the relation between the force/torque and rotor speed or PWM (pulse width modulation) sent to ESC (electronic speed controller) must be measured. Test stands used by other researchers normally consist of a six-axes torque/force sensor or load cell, a pivot arm, tachometer and actuator. In [34], the identification was focused only on a motor itself without considering an ESC. In [35], the dynamics of an actuator was concerned when the propeller or ESC was changed. The price range of the used sensors varied from 400 to 1300 € [36][37][38][39][40][41].
A low-cost measuring test stand was designed to measure force, torque, battery voltage and current, so that complete identification including motor dynamics could be established. Mechanical construction of the test stand ( Figure 1) consists of a large wooden board, an arm of the quadrotor frame, a binocular beam load cell, an optical sensor and the actuator. The wooden board is used to fix the whole construction to the ground or another base during the measurement. The arm of a DJI Flame Wheel F450 is used to ensure that the measurement will be under the same aerodynamic conditions as during the flight. The load cell, which can be found in most kitchen scales, is attached to the arm. Maximum load capacity of the load cell is 5 kg. Its output transfer sensitivity is 1 mV per 1 V of excitation voltage at full load. The binocular beam load cell incorporates a full-bridge configuration of strain gauges. Because of the two holes in the middle of the load cell, it can measure only vertical deformation and the length of the arm is not taken into account during the measurement. The usage of four strain gauges ensures compensation of the unwanted temperature effect on the output signal and increases measuring sensitivity. The approximated price of this test stand is 60 €. For the experiments, the DJI BLDC motor was used and it was firmly attached to the load cell. The BLDCM belongs to the 2212 power class. The power class determines the power of a motor and its diameter (28 mm). The voltage constant of the motor is 920 Kv and nominal current ranges from 15 to 25 A. The use of a 3-or 4-cell lithium polymer battery (LiPo) is recommended. A DJI clockwise propeller 10" × 4.5" was mounted to the motor and a 3-cell LiPo battery with the nominal voltage of 11.1 V was used. The motor is powered by the 30 A ESC from DJI. The input signal for the ESC is a PWM with refresh rate range from 30 to 450 Hz. Power supply and the control signal are obtained from the DAQCB (data acquisition and control board).
If a propeller with two blades is used, there are only two increments per revolution when using a tachometer. In order to obtain higher resolution an encoder was used to measure the motor speed. For this purpose, the outer side of the motor was covered with a sequence of 22 black and white stripes.
The input-output DAQCB was developed to amplify the output signal from the load cell and to gather other signals. The board connects the object of measurement (ESC, BLDCM, battery) with the I/O board MF624 from Humusoft. MF624 consists of an ADC (analog-to-digital converter) and a DAC (digital-to-analog converter) with 14 bit resolution and a timer/counter gate, which is suitable for counting pulses from the reflective optical sensor. The real advantage of MF624 is its support of the MATLAB Simulink environment. A created Simulink model uses the Real-Time Toolbox to collect data from the board and to create a setpoint for the ESC. Figure 2 shows the block diagram of the created DAQCB. The design of the board allows its use without an external DAQ board in a PC. The heart of the board is an Atmel ATmega16A microcontroller. Using the USB interface, which creates a virtual serial line, the board is able to receive control commands and send measured data. The ATmega16A contains only a 10 bit converter compared to the 14 bit one in the MF624 board, but for the purpose of the identification this resolution is sufficient.
An instrumental amplifier is used to process the signal from the full-bridge configuration of strain gauges. The amplifier gain can be changed using one of three positions of a jumper, thus required sensibility can be reached. The output of the instrumental amplifier is processed by a second-order filter with Butterworth response and unity gain. The filter is comprised of an operational amplifier with the cut-off frequency calculated using the Nyquist-Shannon theorem.
Choosing the sampling frequency equal to 100 Hz, the cut-off frequency is set to 50 Hz. The excitation voltage of the full-bridge configuration of strain gauges is created by amplifying the 1.2 V reference voltage using the non-inverting mode of the operational amplifier. This configuration is chosen to stabilize the excitation voltage at 6.12 V. Measurement of the current consumed by the motor was performed using a Hall effect-based linear current sensor IC ACS712. Because of the small resistance (1.2 mΩ), voltage drop and power loss is minimized. The sensor can measure current up to 30 A and can be used in combination with a filter capacitor. The output voltage of the ACS712 is proportional to the current. It contains an offset to measure negative current, although this should never occur under normal conditions. Another function of the microcontroller is the conversion of the control voltage from the MF624 to a PWM signal sent to the ESC using the following equation: UPWM is the control voltage and p [μs] is the pulse width sent to the ESC. Zero power is represented by the value of 1 ms and full power by the value of 2 ms. The PWM signal is calculated with a resolution of 8 bits and sent to the ESC with a refresh rate of 250 Hz.
A safety button was also implemented into the DAQCB. Its function is to block the control signal for the ESC, so if something unexpected happens, the motor can be stopped by pushing this button. When the button is pushed the ESC receives a zero-power signal.
Before measuring thrust, the calibration of the load cell with amplifiers must be done. Therefore, the frame arm with the load cell and the actuator was turned upside down. Precise weights of different mass were hung on the actuator to identify the relationship between measured voltage and weight ( Figure 3). The offset of the measured weight is caused by the mounted actuator and should be removed before the measurement.

Test Stand for Verification of Control Techniques
The second test stand was used to verify and evaluate the control technique applied to a real quadrotor. Before the design of an own test stand, several already existing test stands were analyzed. Table 1 lists the comparison of test stands focusing on DOFs and testing range. The innovative design of a new test stand taken into account the following requirements: increased safety (protect quadrotor and its surroundings), 6 DOF and minimal momentum of inertia. Designed test stand provides absolute information about orientation of the quadrotor during verifying designed attitude controllers. The designed test stand was comprised of two parts-an unmoving metal part which holds a rotary part which can rotate around all three axes. It can be used to mount and; therefore, to test any VTOL platform whereby the maximum dimension is not greater than 0.75 m, including the length of propellers. The rotary part was comprised of carbon tubes and polymer parts including the ball bearings (Figure 4/ Figure 5 part 1, 2 and 3). Magnetic rotary sensors are mounted on these polymer parts and provide the following measurements: pitch, roll, yaw and their corresponding angular velocities. VTOL platform can be mounted on a plate with dimension 0.1 × 0.1 m in the center of the test stand. The quadrotor can be adjusted in z axis so that the plane of the propellers contains the x and y axis of rotation of the test stand. The module 1 measures roll, module 2 measures pitch and module 3 measures yaw angle (Figures 4 and 5). All modules are powered from external power supply via cables which are laid inside the carbon tubes. The transition between moving parts is provided through the rotary contacts. Figure 4 shows a test stand designed in CAD software and the real prototype is shown in Figure 5.  The communication scheme is shown in Figure 6. The stand was comprised of four modules, from which three are slaves used to measure orientation represented by blocks 1, 2 and 3 in Figures  4 and 5. The function of the fourth master module is to collect data from slave modules and send it to the superior system represented by block 5 in Figure 6. Modules communicate between each other via one wire interface represented by the element 6 in Figure 6. The communication between the superior system and the stand is established via USB interface represented by the element 7 in Figure  6. One wire serial communication interface was used to send and receive measured data between all units. A cyclic redundancy check (CRC) was used to ensure that the received data are valid. This new and innovative stand has various advantages in comparison with the stand currently on the market. The main advantage of the stand is that the tested VTOL can rotate in all three axes without restriction. An absolute rotary position sensor was used for the measurement of the orientation. This type of the sensor does not suffer from the drift and provide the absolute orientation of the tested VTOL. This means that the stand can also be used to calibrate the IMU sensor mounted on the VTOL. Even though the lightweight materials were used to build out the stand, the moment of inertia around the x axis still have impact on the dynamics of the tested VTOL. The moments of inertia around all axes of the stand were calculated using CAD software CATIA and they are revealed in Table 2.

The Quadrotor Platform
The chosen platform for the verification of control techniques was quadrotor DJI F450. The platform by DJI company consists of a main frame, 30A OPTO ESCs and 2212/920 KV motors. This class of motors was chosen because the total produced thrust of all four motors will be twice as much as final weight of the quadrotor (expected to be around 1000 g). The voltage and type of propellers for these motors are recommended by the manufacturer. As power source, the LiPo battery pack was chosen because of its good weight to power ratio. Manufacturer of BLDC motor advise to use 3 or 4 LiPo cells. With 3 LiPo cells, the 2212/920 KV motor was powered with nominal voltage of 11.1 V. Its maximum rotation speed is about 10,000 rpm. Recommended propeller 10" × 45" with 25.4 cm in diameter lowers this rotation speed to about 7000 rpm with maximum thrust about 800 g. Motor manufacturers usually mention maximum current consumption at this rotational speed, in this case around 10 A. When this value is multiplied by 4, maximum current consumption of the flying platform can be estimated. Current consumption of other electronics could be in this case neglected. With calculated maximum current battery with higher current loading and capacity to maintain required flying time can be chosen. Battery with capacity of 2.2 Ah was chosen, which provides hover time of about 5 min. The battery has 26C current loading, which is about 57 A, and it was enough for evaluation of the proposed controllers. Maximum current consumed by motor also determines the selection of ESC. A 30 A ESC with 30 to 450 Hz frequency response was chosen, which enables to refresh rotation speed of motor more often than conventional 50 Hz ESCs. Figure 7 shows all abovementioned components and their interconnections. The control unit should maintain control, mathematical and other important operations. There are many usable development platforms, but something more powerful than the standard ARDUINO platform and more real-time than the Raspberry Pi platform with a basic operating system was needed. Therefore, the Discovery platform with powerful microcontroller ST32F4 was chosen. This platform runs at 168 MHz rate, it is relatively cheap, easy to program and offers lots of analogue and digital IO pins and communication interfaces as USART, SPI, I2C and so on. The control unit was powered by the LiPo battery via 5 V step-down converter, that transforms battery voltage to necessary voltage of 5 V. The battery is also connected to the ESCs to power all motors. In order to avoid damage to the battery due to an over-discharge, the analogue input (AIn) was wired to read the actual value of the voltage of connected battery. The IMU MPU9150 was used to measure angular speed in the body-fixed frame. The IMU is able to measure all angular speeds and linear acceleration every 1 ms. The orientation from magnetometer is possible to read every 7 ms. The I2C serial bus is used for communication between the control unit and the IMU. Several commercial IMU chips were compared in parameters as noise rejection, low gyroscope drift, measurement ranges, resolution, refresh, etc., and finally the mentioned MPU9150 unit was chosen. The Bluetooth device RN-42 was used to exchange data between the control unit and an external device such as computer. Module RN-42 offers high-speed full-duplex wireless communication link between PC and STM32F4 on the control board. The USART (Universal Synchronous/Asynchronous Receiver and Transmitter) was used to exchange data between the Bluetooth device and the control unit. The ESCs acquires PWM from the digital outputs (DOut) of the control unit, and transforms this signal into 3-phase power waveform that makes the motor rotate at a specific angular speed.

The Software
An application shown in Figure 8 was created using C# language and it serves as the interface between operator and the flying platform (Figure 8 Section A). This application also performs the function of being the interface to the test stand used to verify the proposed control algorithms ( Figure  8 Section B). This application was also used to tune all designed attitude controllers (Figure 8 Section C). The main purpose of the application is to control and monitor the behavior of the real platform. The application is divided into two parts, namely the part dedicated to the real platform and the part dedicated to the test stand. The following commands can be sent to the real platform if the connection is established:


To enable/disable motors via checkbox "Control ON".  To enable/disable logging data via checkbox "Data reading".  To define the desired quaternion.  To define the desired thrust that is used to compute desired torques of the quadrotor.  To select one of the three controller types, namely PD, LQR and backstepping controller via corresponding checkboxes (i.e., "PD controller Enabled", "LQR controller Enabled" and "Backstepping controller Enabled").  To change each parameter of selected type of the controller several buttons are used that are located next to writable textboxes. If all parameters of the selected controller should be sent to real platform then the "Par to QR" button should be used.
When the connection to the real platform is established and the data logging is enabled, the following variables are obtained via Bluetooth from the real platform:  The application is updated every 500 ms, while the change of every parameter is logged each 10 ms and it is recorded into the text file "QR_data.txt". Furthermore, the application contains the button "Par to File" that is used to store actual parameters of the all controllers to the text file "Control_param.txt". If this file exists during the start of the application, the last-stored controller values are used to automatically prefill controller parameters. The part dedicated to the test is used to establish and terminate connection between the test stand and a computer. Further, there is checkbox "Data reading" used to start reading and logging data from the test stand to the text file "Stand_data.txt". The data monitored from the test stand are all Euler angles that are displayed every 100 ms but, as in the previous case, the data is logged with finer sampling (i.e., every 10 ms).
Because the test stand is equipped with absolute rotary sensors, the option to calculate offset was added to the application via button "Null act. values". The corresponding offset is displayed next to recalculated actual values of Euler angles. The offset can be reset any time using the button "Null offset".

Tuning of Controllers
The controller parameters derived in our previous work [9] had to be newly tuned because the quadrotor showed unstable behavior. This was caused because the dynamics of the test stand and its lack of rigidness had considerable impact on the quadrotor performance. Moreover, some parameters used in the mathematical model was not accurately computed. The example of such parameters can be the motor constants, because bearings of the motors are probably worn in the moment of the data reading. In addition, the dynamics only of one motor were identified. Further when the identification was made only with one motor connected to the battery at that time, this was completely different situation compared to four motors connected. Therefore, the used battery cannot supply stable power to all motors.
The implemented attitude controllers were evaluated by tracking desired sequence of orientation. Parameters for each axis were tuned separately. The first tuned parameters were parameters related to z axis, followed by the parameters of x axis. The last tuned parameters were those of y axis.
Firstly, proportional parameters of the PD controller were identified. The derivative parameter was set to 0 and the proportional part of the controller was increased step by step until the quadrotor starts to oscillate around the particular axis. Then the 80% of the value was set to be the proportional part of the PD controller. The derivative part of the PD controller was increased until the settling time of the quadrotor was around 1-2 s. Table 3 shows the list of the chosen corresponding gains for proportional and derivative components of the attitude PD controller. The LQR controller was tuned in the similar way as the PD controller. Firstly, the elements of gain matrix KA that correspond to the quaternion were tuned. Subsequently, the elements of the gain matrix KA corresponding to angular velocity of the quadrotor were identified. The regulator gain matrix KA of LQR controller is given by equation: The parameters of the backstepping controller were tuned as followed: The value of the parameter c1A is 10 and c2A is a diagonal matrix with vector [11 11 3] on the main diagonal. The parameters of backstepping controllers were obtained in the similar way as the parameters of the PD and LQR controller. That means the first tuned parameter was c1A, which corresponds to the attitude of the system. Then the vector c2A related to angular velocity of quadrotor was identified.

Evaluation of Controllers
Firstly, the desired sequence of the required setpoints of the orientation will be outlined. Secondly the performance of all controllers will be evaluated. Finally, some of quality indicators will be used to make comparison between implemented control techniques.

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.
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° around any axis is represented by the following quaternion = [−1 0 0 0]. 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° 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.

PD Controller
The performance of the PD attitude controller is shown in the following figures: Figures 11-13. Figure 11 highlights the change of the orientation of the quadrotor during the performance of the desired sequence (Section 3.4.1.). The trajectory around z axis coincides with the desired trajectory, 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 EB (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.

LQR Controller
The performance of the LQR attitude controller is shown in the following figures: Figures 14-16. Figure 14 highlights the change of the orientation of the quadrotor during the performance of the desired sequence (Section 3.4.1.). The trajectory around z axis coincides with the desired trajectory, but the trajectory around the x and y axes shows the permanent deviation and oscillation. The cause of these phenomes is the non-rigidness of the test stand. This was explained in a previous subsection when evaluating the performance of PD controller.
The settling time of the desired orientation in the x and y axes is mostly less than 1 s when permanent deviation is neglected. The slower performance of the z axis is required because of the lower importance of control around this axis. Figure 15 depicts the actual angular velocity in EB of the quadrotor that belongs to the performance of LQR 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 16.

Backstepping Controller
The performance of the backstepping attitude controller is shown in the following figures: Figures 17-19. Figure 17 highlights the change of the orientation of the quadrotor during the performance of the desired sequence (Section 3.4.1.). The trajectory around z axis coincides with the desired trajectory, but the trajectory around the x and y axes suffers from the permanent deviation and oscillation. The cause of this phenomenon is the non-rigidness of the test stand. This effect was explained in previous subsections. Performances of all implemented controllers contain very similar oscillation and deviation around the x and y axes, which supports presented theory about the source of the oscillation and also deviation.
The settling time of the desired orientation in the x and y axes is mostly less than 1 s when permanent deviation is neglected. The slower performance of the z axis is required because of the lower importance of control around this axis. Figure 18 shows the actual angular velocity in EB (the body-fixed frame) of the quadrotor that belongs to the performance of backstepping 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 19.

Controllers Comparison
Various quality indicators were chosen to discuss the efficiency of the control algorithms, such as the integral of absolute error IAE, integral of absolute desired torque IAM and maximum absolute variation of the quaternion Oq.
The performance of all attitude controllers is summarized in tables that can be found in Appendix A. Chosen quality indicators are identified separately for each section of the desired sequence. Table 4 shows the total number of the best and also the worst performances related to the particular quality indicator. The best value of each quality indicator for entire sequence is indicated by green color and the worst value is indicated by red color.
in this approach. The backstepping controller indicates the smallest value of the sum of all parts of the quaternion error and it also shows the best control around z axis. However, when it comes to control around the x and y axes this controller exhibits the worst results. The best attitude control around the x and y axes was achieved by LQR controller. The PD controller shows average performance when only the integral of total absolute quaternion error and maximal absolute quaternion variation as quality indicators is considered. To sum up, the LQR attitude controller is considered to be the best option when taking into account only the importance of reaching the desired quaternion as fast as possible.
The second approach is focused not only on reaching the desired orientation, but it also takes into account the efficiency of the power supply. The second approach expands the quality indicators from the first approach with the total absolute desired torque. The most energy efficient controller was the LQR controller, which consumed the least energy during the whole sequence. When the movement is divided into various rotations related to the particular axis, the LQR controller is the most efficient controller around the x and y axes, while around z axis the most efficient controller is the PD controller. The backstepping controller consumes the most from power supply among implemented controllers. When taking into account the energy consumption and also the quaternion error, the best performance exhibits the LQR controller and the worst performance shows the backstepping controller. As in the previous case, the PD controller exhibits average performance.
As it can be seen in Table 4, the best performance with respect to chosen quality indicators is exhibited by the LQR controller. The worst performance with respect to chosen quality indicators is demonstrated by the backstepping controller. The PD controller shows average performance.

Conclusions
In this article, different control techniques were implemented into the real quadrotor, namely the PD, the LQR and the backstepping control techniques. All controllers used the quaternion representation of the attitude. The output of position controllers is the desired quaternion and the desired thrust of quadrotor. The controllers were designed to use calculated quaternion error for the computation of the desired torques. In our previous work [35], the designed attitude controllers were tested in simulation environment. In this article the selected controllers were tested and evaluated on the real quadrotor. These controllers were verified using the innovative test stand, which was designed especially for this purpose. Appropriate test stand properties (safety and orientation measuring) were confirmed by several measurements. However, the measurements were influenced not only with additional moment of inertia but with the oscillations caused by low rigidness of used materials. The performance of controllers was evaluated using various quality indicators, such as the integral of absolute quaternion error, integral of absolute desired torque and the maximal absolute variation of the quaternion.
The best performance with respect to chosen quality indicators was shown by the LQR controller. The worst performance with respect to chosen quality indicators was demonstrated by the backstepping controller. The limitation of this study is that only three selected controllers were evaluated. As it was mentioned in the Section 3.3, the parameters of the real quadrotor were slightly different from the ones identified in our previous work. Therefore, the selected three controllers from the simulations may not have been the best. However, the suitability of creating a new stand for quadrotor testing as well as a comprehensive evaluation methodology was demonstrated.  Acknowledgments: This work was supported by VEGA 1/0752/17 and APVV-16-0006.

Conflicts of Interest:
The authors declare no conflicts of interest.

Appendix A
Various quality indicators were chosen to discuss the good working ability and the efficiency of the proposed algorithms, such as the integral of absolute error IAE, integral of absolute desired torque IAM and maximum overshoots Oq.
The performance of all attitude controllers is summarized in the following tables, where integral of total absolute quaternion error and total absolute desired torque is reported in Table A1. Tables A2 and A3 list integral of absolute quaternion error. Tables A4 and A5 show integral of absolute desired torque. Tables A6 and A7 list maximal absolute quaternion variation.
The best value of each quality indicator is indicated by green color and the worst value is indicated by red color.  Table A4. Quality indicators of controllers' performance: Integral of absolute desired torque around x axis (IAMx) and y axis (IAMy) (PD-PD controller, LQR-LQR controller, BS-backstepping controller).  Table A7. Quality indicators of controllers' performance: Maximal absolute variation of the vector part of quaternion related to y axis (OQy) and z axis (OQz) (PD-PD controller, LQR-LQR controller, BS-backstepping controller).