Bounded Attitude Control with Active Disturbance Rejection Capabilities for Multirotor UAVs

This paper addresses an attitude tracking control design applied to multirotor unmanned aerial vehicles (UAVs) based on an ADRC approach. The proposed technique groups the endogenous and exogenous disturbances into a total disturbance, and then this is estimated online via an extended state observer (ESO). Further, a quaternion-based feedback is developed, which is assisted by a feedforward term obtained via the ESO to relieve the total disturbance actively. The control law is bounded; consequently, it takes into account the maximum capabilities of the actuators to reject the disturbances. The stability is analyzed in the ISS framework, guaranteeing that the closed loop (controller-ESO-UAV) is robustly stable. The simulation results allow validation of the theoretical features.


Motivations and Background
Research and development on unmanned aerial vehicles (UAVs) have shown enhancements in both the design and control of smaller and more economical aerial robots, which can be used in large-scale applications. Vertical take-off and landing (VTOL) multirotor vehicles have taken and consolidated their dominance in the market of small aircraft, also becoming a standard platform for aerial robotics research [1][2][3]. The abilities to evade obstacles, maneuver in confined spaces, hover in flight, collect data, and interact with different robots, make multirotors and mainly quadrotors able to solve endless problems, such as in search and rescue operations, temporary communication networks, aerial mapping, natural disaster monitoring, and kit delivery, to name a few [4].
Nowadays, the quadrotor's mathematical model is well known, and many control approaches have been proposed using different attitude representations, e.g., Euler angles, rotation matrices, or quaternions. An excellent overview of these approaches is shown in [5,6] and references therein. However, most of the proposed control techniques are developed assuming slight attitude variations, knowledge of model parameters (to feedforward the nonlinearities), no bounds in the control signal, and the nonexistence of disturbances. In particular, PD, PID, and LQR controllers result in engaging solutions due to their simplicity to real-time implementation [7], and have been applied to the attitude and position control of multirotor UAVs, for instance in [8][9][10][11]. However, it is well known that proportional control cannot eliminate the impacts produced by disturbances (even constant ones), and a higher proportional control gain has to be designed to diminish the disturbance effects. In addition, when PID is used, the integral term could effectively reject the constant disturbance but achieves poor performance in the presence of time-varying disturbances. PID is also often implemented without the D part because of the noise sensitivity [12]. In recent years, the advances in sensing and onboard computing have driven the advancement of exceptionally small, innovative, and capable quadrotors, and so the variety of tasks and applications entrusted to these aircraft has increased. As a consequence, the before-mentioned assumptions are no longer valid. For instance, the disturbances in flight formation applications when quadrotors fly close to each other must be taken into account [13][14][15]. Other examples are the external forces and torques that a quadrotor might encounter within inspection applications, aerial manipulation, and load transportation, where the aircraft interacts physically with and flies near walls, surfaces, and objects in the environment [16][17][18][19]. Furthermore, in many applications like agriculture and utility line inspection, the vehicles are subject to operating in a windy and complex environment, where aggressive attitude maneuvers are required to cope with external disturbances that affect their dynamic behavior [20,21].
Two subsystems can be considered when dealing with mathematical models of underactuated multirotors: rotational and translation dynamics [6]. These subsystems provide a cascade structure where translational motion is based on rotational dynamics [22]. Therefore, attitude control is the main part to fulfill trajectory-tracking in the space. This is not a simple task when considering both structural (parametric) and external disturbances. For these reasons, it is necessary to come back to the low-level control problem, i.e., the attitude control problem, and therefore to take into account explicitly in the control design model uncertainties, external disturbances, and signal control constraints.
The disturbances-observed-based-control (DOBC) framework results are attractive in compensating for external disturbances and model uncertainties [23]. An advantage of DOBC techniques against robust control is determining exogenous torques and forces from the system and canceling them via feedforward actions [24]. Moreover, the estimated information can be used for motion control or environment interaction when there are no available sensors [25]. DOBC and Kalman-filter-based approaches have been used and applied in the last years for successful attitude control of spacecraft and quadrotors, e.g., [26][27][28][29][30][31][32][33].
A particular case of DOBC is the active disturbance rejection control (ADRC), which is based on the extended state observer (ESO) [12]. ESO is a fundamental part of the ADRC because it is charged to estimate the lumped disturbances of both unknown uncertainties and external disturbances [34,35]. Nowadays, ADRC has been applied in almost every domain of automatic control. Therefore, it has gained popularity in fields as diverse as the motion control of humanoid robots [36], an induction motor without a speed sensor [37], electric traction [38], power electronics [39], and many more. ADRC simplifies the plant description; this approach groups all disturbances, endogenous and exogenous, into a single term. Total disturbance can have many characteristics, including unknown, time-varying, and unstructured. The main virtue is to make the disturbances indistinguishable from each other and of the same nature. Using a suitable additional dimension, that disturbance term, which is treated as a fictitious state, is estimated with an ESO. ADRC reduces a complex process to a possibly linear disturbed plant, harassed by a total disturbance term, which becomes easy to regulate using an output feedback control law that can be both linear and non-linear [40].
For UAV control, ADRC algorithms have become a popular choice. Some researchers have proposed inspiring ADRC-based approaches to regulate the attitude in multirotors, e.g., [41][42][43][44][45][46][47][48]. Besides, the method can be extended to the automatic landing or trajectory tracking; for example, in [49,50], where the safe landing of a UAV under wind effects con-ditions is proposed. The work in [45] presents how an ADRC is employed for stabilization and obstacle avoidance of a quadrotor unsettled by external disturbances. The trajectory tracking problem of a quadrotor with disturbances is presented in [51].
Although the ADRC-based attitude controllers mentioned before have shown excellent results, the analysis of stability with the system in a closed-loop (control-observer-plant) is not always established; only a few works have taken this issue into account. The main reason comes from the nonlinearity of the system in a closed loop. Furthermore, none of the reported ADRC approaches considered the physical limits of actuators, which is a crucial topic for real applications.

Contributions
The development of an ADRC for attitude tracking of quadrotor aerial vehicles with bounded inputs is the central proposal. It is assumed that the aerial robot is subject to unknown external perturbations. Then an ESO, designed to estimate the disturbances, is employed. Further, a control law is designed for attitude tracking, which takes these estimated disturbances into account. The proposed controller uses quaternions to parameterize the attitude, thus avoiding singularities and being computationally efficient. Besides, the control strategy uses nested saturation functions, considering the constraints/capacity of the actuators to reject the disturbances. The stability analysis is studied for the nonlinear closed-loop system in the input-to-state stability (ISS) sense, concluding a robust stability [52]. The proposed strategy is validated through simulation results using the model of a small quadrotor. The proposed strategy is validated through simulation results using a small quadrotor model and physical parameters, namely, the Crazyflie 2.0 [53]. Although this quadrotor is considered in this work, the approach can be applied to spacecraft and aerial robots with VTOL capacities, e.g., ducted-fan tail-sitters and helicopters.
The rest of the paper is structured as follows. The mathematical background is introduced in Section 2. The multirotor and disturbance models are presented in Section 3. Section 4 details the design of the extended state observer (ESO) and the attitude control law. Section 5 describes the simulations carried out, as well as their results, where the effectiveness of the proposed algorithm is highlighted. In Section 6, some conclusions are shown and some future work is mentioned. An appendix with the stability proofs is attached.

Preliminaries
In the following, · denotes the Euclidean norm for vectors and the induced 2-norm for matrices. A scalar continuous function γ(r) defined for r ∈ [0, a[ is said to belong to class K if it is strictly increasing and γ(0) = 0, and it is said to belong to class K ∞ if it is defined for all r ≥ 0 and γ(r) −→ ∞ as r −→ ∞. A scalar continuous function β(r, s) defined for r ∈ [0, a[, s ∈ [0, ∞[ is said to belong to class KL if for each fixed s it belongs to class K and for each fixed r it is decreasing in s and β(r, s) −→ 0 as s −→ ∞. A dynamical system with state x and input w is called input-to-state stable (ISS) if there exist a class KL function β and a class K function γ such that · ∞ denotes the L ∞ -norm: for a signal w, w |0.s| ∞ =sup 0≤t≤s w(t) . For linear systems, ISS is equivalent to global asymptotic stability of the unforced system [54].
, and K-functions α 3 and χ, such that for all x ∈ R n and where q v = q 1 q 2 q 3 T ∈ R 3 and q 0 ∈ R are defined as the vector part and scalar part of the quaternion, respectively. Furthermore, q represents an element of SO(3) through the map R f b : S 3 → SO(3) defined as: [r × ] is the well known skew-symmetric matrix associated to vector r.
Let ω = ω 1 ω 2 ω 3 T ∈ R 3 be the angular velocity vector of the body coordinate frame E b relative to the inertial coordinate frame E f expressed in E b . Then, the kinematics equation is given by:q The attitude error is used to quantify the mismatch between two attitudes. If q defines the current attitude quaternion and q d the desired quaternion, i.e., the desired orientation, then the quaternion that represents the attitude error between the current orientation and the desired one is given by: where q −1 is the complementary rotation of the quaternion q, which is given by q −1 = q 0 −q T v T and denotes the quaternion multiplication [55]. When the current quaternion q reaches the desired one q d , the quaternion error becomesq = ±1 0 T T , i.e., there exist two equilibria which have to be considered in the stability analysis [56].

Motion Equations of the Multirotor UAVs
The study of UAV motion has two main concepts: rotational and translational motions. According to the aforementioned references and to [3], the six degrees of freedom model of the system (position and attitude) can be separated into translational and rotational motions, represented, respectively, by Σ T and Σ R in Equations (7) and (8): where m is the mass of the VTOL-UAV and J is the inertial matrix expressed in E b . The gravity acceleration is g and e is the position of the center of gravity of the aircraft, which point coincides with the origin of frame E b with respect to frame E f , v ∈ R 3 is its linear velocity in E f , and ω ∈ R 3 denotes the angular velocity vector of the body coordinate frame E b relative to the inertial coordinate frame 3 T is the total thrust, expressed in E b . Γ ∈ R 3 depends on the couples generated by the actuators and as a consequence, it represents the control signal. Furthermore, several disturbance forces and torques acting on the aircraft are being considered, which are grouped together in vectors F d and Γ d , respectively. Note that the models (7) and (8) give rise to two cascaded subsystems: rotational and translational ones. The longitudinal and lateral movements cannot be performed without a coupling to the rotational degrees of freedom. Therefore, efficient attitude control is crucial to maintaining the desired attitude in order to reach a desired position despite external disturbances.

Problem Statement
The main purpose of the present paper is to design a robust control for attitude tracking that would be able to ensure the position control of a multirotor UAV, and specifically of a very small quadrotor helicopter. Then, one has the following objectives to accomplish: Let us consider the error variablesq = (q d ) As a result, the dynamics and kinematics errors are calculated using: In this work, an active disturbance rejection control (ADRC) to track a desired attitude despite external disturbances will be designed. For that, an extended state observer (ESO) is applied to estimate online the unknown disturbances and cancel them by injecting the output of the ESO into the feedback loop. Furthermore, the proposed feedback controls have to take into account the physical constraints and limitations of the body's structure and actuation. This is ensured by a saturation of the control torque to avoid unwanted damage and maximize the effectiveness of the system's actuators. This can be formulated as: whereΓ j represents the bounds of the jth control torque component.

ADRC Design for Attitude Tracking
An attitude trajectory tracking for a UAV-VTOL is discussed in this section. To address this problem, let us consider first the attitude dynamics error equatioṅ where i.e., ξ(·) is constituted by the sum of the endogenous perturbation and the exogenous one. Then, a control strategy based on the active disturbance rejection control (ADRC) technique is proposed. The function, ξ, will be estimated through the extended state observer (ESO), which is based on the system's dynamics (11). For this purpose, one makes the following assumptions: • ω and q are measured, such that ω e is always available;

ESO Design for the Attitude Dynamics
Letē = ω e −ω e be the estimation error, through (11), and we propose the following extended state observer: (13) whereω e , η 1 = J −1ξ and η 2 are the angular velocity error estimation, the disturbance estimation, and its time derivative, respectively, and Γ is the control input. The set of matrices L 2 = diag(l 2 , l 2 , l 2 ), L 1 = diag(l 1 , l 1 , l 1 ), L 0 = diag(l 0 , l 0 , l 0 ) is selected with the assistance of a desired closed-loop Hurwitz polynomial of the third order. Then, the following result is obtained. Proposition 1. Consider the ESO (13) and the angular dynamics error (11). Then, the estimation error behavior satisfies the ISO property (input-to-output stability) [54], i.e., the solutions for the error dynamics converge to a sphere centered at the origin of the estimation error phase space with radius where λ M depends on the selection of the set of coefficients of the matrices {L 2 , L 1 , L 0 }. Furthermore, the error dynamics exhibit asymptotic stability toē = 0 for ξ = 0.
The proof is given in Appendix A.

Active Disturbance Rejection Bounded Attitude Control
In this subsection a control law is proposed that stabilizes the system; this law is described by (8). The objective is to design a control torque that is restricted.
Let us remember that the disturbance vector ξ is assumed to be bounded, i.e., sup t |ξ i (·)| ≤ K 0 i . Furthermore, let K 0 i denote the bound for the disturbance function about the i th axis. Assuming that after a sufficiently long time ξ is estimated via the observer (13), that is, ξ = Jη 1 , then one has the following result.

Proposition 2.
Consider the attitude dynamics error described by (11) with the following bounded control inputs Γ = (Γ 1 Γ 2 Γ 3 ) T such that with i ∈ {1, 2, 3} and where σ M i1 and σ M i2 are saturation functions such that K 0 i < M i2 − M i1 and M 1i ≥ 3λ i ρ i .λ i and ρ i are positive parameters.ξ = Jη 1 with η 1 the estimation of the unknown disturbance J −1 ξ. Then the inputs (16) stabilize robustly (11) to the origin of the error space (1 0 T 0 T ) T (i.e.,q 0 = 1,q v = 0 and ω e = 0) with a domain of attraction equal to The proof is given in Appendix B. However, we would like to present the idea behind the construction of feedback (16). The proposed control law is composed of a feedforward term represented byξ i and the feedback term σ M i1 (·). Furthermore, both terms represent the argument for the function σ M i2 , which at the same time represents the bound of the control torque Γ i . The objective is to design a control law that assures that physically, the system has the capability to track a desired attitude while it rejects the total disturbance ξ. Since disturbance ξ i about the i th axis is assumed uniformly bounded by K 0 i , the closedloop stability will be guaranteed if the following constraint is satisfied K 0 i + M i1 < M i2 , i.e., Γ i must be authoritative enough to reject the disturbance. Actually, M i2 plays the role of an explicit reference governor [57], which ensures constraint satisfaction by suitably manipulating the feedforward and the feedback terms.
Consider the active disturbance rejection controller (ADRC) composed of the extended state observer (ESO) (13) and the trajectory-tracking bounded control (16) working together to drive the attitude dynamics (10) in order to follow a desired angular trajectory (see Figure 1). In view of the Propositions 1 and 2, the observer dynamics error and the tracking dynamics error can be viewed as two ISS systems in cascade (see Figure 2). Then, the following and main result for the ADRC-based attitude tracking stands.   (16) is ISS when the unknown total disturbance ξ ∈ R 3 is viewed as the input and the tracking error z = (ω T eq T v ) T as the output.
Proof. The claim follows from the properties for the interconnection of nonlinear systems that are input-to-state stable (ISS) [52,54]. Consider the estimation error dynamics (A2) and the tracking error dynamics (10). These systems can be viewed as a cascade system as shown in Figure 2. Since each system is ISS as was proven in Propositions 1 and 2, then the overall system is ISS. That is, the ADRC is ISS when the unknown total disturbance ξ is the input and the tracking error z = (ω T eq T v ) T the output.

Simulation Results
This section is devoted to evaluating the effectiveness of the proposed control schema where a nonlinear tracking controller is used for comparison purposes. The simulation conditions are set up, where the disturbance function and the desired attitude are defined. Furthermore, the vehicle's parameters are specified; namely, maximum allowed control torque and inertia matrix. For simulation purposes, the inertia matrix considered is the one for the Crazyflie 2.0 [53], which is a tiny quadrotor. Due to the small size and low weight, this vehicle is very susceptible to external disturbances, allowing assessment of the approach. Particular interest is put in the evolution of the desired and current angular velocity and quaternion. The error evolution is analyzed in terms of ISE index.

Quaternion and Angular Velocity Evolution
In this subsection, a comparison between the proposed control law (16) and control law (17) is highlighted. It is worth mentioning that the error quaternion is computed using (6), which is depicted here for clarity; that is, Figure 3 depicts the evolution of the quadrotor attitude when the two control laws are applied. In the left column, the results for the proposed control law are shown, whereas the right column portrays the results using (17). In both cases, the first subplot of each column shows the time evolution for the scalar component of the desired and current quaternion. Moreover, the vector component of the quaternion error corresponding to each control law is shown in the second subplot of each column. Note that when the current quaternion q reaches the desired one q d , the vector components ofq have to becomeq v = (0 0 0) T due to the norm constraint of the unit quaternions. In contrast with the compared control law, with the proposed control, the vector component of the quaternion error converges to zero and its magnitude at 0.5 s is approximately 4.1 × 10 −3 , which is a desirable response time behavior for this kind of quadrotor. Figure 4 illustrates the first component of the angular velocity and the angular velocity tracking error vector of the proposed (left column) and the compared control (right column). Note that with the proposed control law, the angular velocity of the micro UAV achieves the desired value in approximately 0.5 s and the angular velocity error remains in the zero neighborhood despite the external disturbances (except at t = 7.5 s, when enough control conditions are violated).     Figure 5 depicts the torque disturbances applied to the micro UAV in addition to the estimation of these disturbances obtained through the ESO (13). If a sufficient control condition is accomplished, the proposed control law rejects these disturbances via the feedforward termξ. This condition is accomplished for all time except at t = 7.5 s when the magnitude of the external disturbance exceeds the capabilities of the control to reject it. At this moment, the control loop is open, and as a consequence, the attitude and angular velocity error become large. Once the disturbance vanishes, the control loop is closed, and the aircraft performs as desired. Finally, the control (torque) signal is shown in Figure 6 for both approaches (16) and (17). Note that the constraints on the control magnitude are respected.

Performance Analysis
To analyze the performance of the ADR-based attitude tracking Controller and the quaternion tracking controller, the ISE index defined in (19) was used [58]: (19) wherex(t) represents a signal error and T the time horizon. One uses the axis-angle representation to analyze the attitude error, representing a rotation of angleβ about a unit axisẽ of the body-fixed reference frame E b relative to the desired reference frame E d . Note that the integration of (18) drives E d . Then, given a quaternion error,q, one can obtain the angle-axis representation corresponding toq, as follows (see Equation (3)):β = 2 arccos(q 0 ) e = 1 sin(β 2 )q v ifβ = 0 0 otherwise, Therefore, the ISE criterion was applied to the rotation angleβ and components of the angular velocity error vector obtained employing both controllers. That is, (20) and The results are depicted and compared graphically in Figures 7 and 8. They clearly show a better performance achievement with the proposal controller and enhance the interest in estimating and rejecting the disturbances actively.

Conclusions
In this work, an attitude tracking robust control for VTOL-UAVs was presented. The control approach shows robustness to endogenous and exogenous disturbances, in addition to displaying a response free of oscillations, which makes it attractive for solving the problem of attitude tracking and stabilization even with mechanisms for aerial manipulation such as grippers. The observer tuning is vital to estimating the disturbances. The performance was compared in simulation with an existing quaternion tracking controller.
Due to its simplicity, the proposed control schema can be implemented into an embedded system with limited computational resources. Then, as future work, the ADRC will be implemented in real-time together with a position control loop. The implementation will be carried out on the Crazyflie to ease the performance and the robustness towards external disturbances. Furthermore, the tests will consider the kinds of mechanisms for aerial manipulation, such as grippers, cables, and a load delivery and retrieving application. An event-based extension, in the spirit of [59,60], will also be considered with the aim of reducing the computing and communication costs.
We are going to implement the ADRC in real-time together with a position control loop. The implementation will be carried out on the Crazyflie to ease the performance and the robustness towards external disturbances. Proof. Consider the estimation errorē = ω e −ω e and its successive derivatives together with the observer dynamics (13) and the dynamics (11). Then, estimation error e satisfies the following linear differential equation: The space state realization of (A1) is the following: The variation of parameters formula gives the following solution: If the set of coefficients {l 2 , l 1 , l 0 } is selected such that the matrix A is Hurwitz, the following inequality is obtained: Since there exist β ∈ KL and γ ∈ K ∞ the error dynamics is ISO [54], i.e., the solutions for the error dynamics are ultimately bounded by γ( ξ ∞ ) and the system exhibits asymptotic stability toē(t) = 0 for ξ = 0. Furthermore, if the set of coefficients of the matrix {L 2 , L 1 , L 0 } are selected such that the matrix A is Hurwitz, then one has the following bound [61] e At ≤ e −λ M t , ∀t ∈ R ≥0 where λ M = λ max (Sym(A)) is the maximum eigenvalue of Sym(A) with Sym(A) = (1/2)(A + A T ). Using this fact in (A5), one obtains: Consequently ē(t) converges exponentially to a sphere with radius ρ = K 0

Appendix B. Proof of Proposition 2
Proof. Consider the candidate Lyapunov function V : where J is defined as before, and κ > 0 must be determined. The derivative of (A7) after using (10) is given bẏ + ω e 2 (Γ 2 + ξ 2 ) + κq 2 ω e 2 V 2 V is the sum of the three terms (V 1 ,V 2 ,V 3 ).