Adaptive Control for Quadrotor Trajectory Tracking With Accurate Parametrization

In this paper, a novel adaptive controller for quadrotor position and orientation trajectory tracking is introduced. By taking into account the coupling between the position and the orientation dynamics, an adaptive scheme based on an accurate parameterization of the model-based feedforward compensation is presented. The adaptation update laws for the adaptation parameters are designed on Lyapunov’s theory so that the stability of the state space origin of the error dynamics is guaranteed. Barbalat’s lemma ensures convergence of the tracking errors and bounding of the adaptation parameters. The extensive real-time experimental results show the practical viability of the proposed scheme. More specifically, the performance of the proposed controller is compared with an adaptive controller taken from the literature and the non-adaptive version of the proposed controller. Better results are obtained with the novel adaptive approach.


I. INTRODUCTION
Nowadays, quadrotors are used in a wide range of activities including surveillance, transport and entertainment. The utility of quadrotors has increased by their low cost in comparison to other unmanned aerial vehicles and by their important flight characteristics. However, efficient motion control of quadrotors is still an important scientific challenge because the quadrotors are underactuated systems [1] with highly nonlinear and coupled dynamics. Furthermore, the development of effective quadrotor controllers is essential.
Classical control techniques have been used for quadrotor trajectory tracking control. In [2], an optimal PID controller based on integral of time multiplied by absolute error indexes was presented. The authors added a Kalman filter to predict the change of error and get better performance. A modified version of the PID controller was presented in [3]. The control algorithm was developed to reject wind disturbances, and its performance was validated experimentally. In [4], a PID-type motion controller was introduced. The robustness of this controller was validated theoretically and experimentally when a fault is presented in one of the actuators. The position The associate editor coordinating the review of this manuscript and approving it for publication was Halil Ersin Soken. control performance of a V-tail quadrotor was compared using PD, PID, and sliding-mode control schemes in [5].
Model-based controllers have been used for quadrotors tracking task [6], [7]. However, the parametric inaccuracies and the system disturbances have motivated the development of robust control schemes in closed-loop. Sliding mode controllers have been used in several studies. In [8], a backstepping control approach was combined with sliding mode control for the quadrotor trajectory tracking problem under the presence of several types of disturbances. Similarly, in [9], the sliding-mode control and the backstepping methodology were combined to achieve position and yaw angle trajectory tracking. In particular, Lyapunov's theory was used in the stability analysis of the overall system. In [10], a robust sliding mode controller was introduced for trajectory tracking of a quadrotor. This controller uses a nonlinear disturbance observer to improve the error performed.
Neural networks have also been used for quadrotor trajectory tracking. In [11], an intelligent adaptive backstepping controller was presented. This controller was designed using a radial basis function neural network and a fuzzy compensator. In the same way, an adaptive radial basis function neural network and an integral sliding mode control were combined in [12]. The controller was theoretically analyzed proving convergence of the states to desired values in finite time. A nonlinear resilient trajectory controller for a quadrotor was presented in [13]. External disturbances were estimated with a nonlinear observer. In [14], the path following problem was addressed using an integral predictive and robust nonlinear H ∞ controller. The theory of systems in cascade was used in [15] to design a hierarchical control scheme which guarantees accurate quadrotor positioning while eliminating the payload swing.
Adaptive schemes have also been widely employed in the control of mechanical systems [16]. The quadrotors are not the exception. A general review of adaptive control applied to quadrotors was presented in [17]. In [18], the trajectory tracking control problem was addressed using direct and indirect model reference adaptive control. In that work, a simplified linear model was considered during the controller design. Decentralized control has been combined with adaptive nonlinear control techniques for quadrotor trajectory tracking. In [19], the quadrotor dynamic was separated into two subsystems, and decentralized adaptive controls were applied to solve the trajectory tracking problem. Similarly, a decentralized adaptive controller was proposed in [20] to stabilize the altitude and attitude of the quadrotor when model uncertainties are present. The given theoretical analysis guarantees global asymptotical stability. In [21], the modeling errors and the disturbances are managed by a PD controller plus an adaptation control term. The tracking convergence of the closed-loop system was validated by using Lyapunov's theory. An intelligent decentralized controller was presented for quadrotor attitude tracking in [22]. The system was decomposed into three sub-systems, and the chattering was reduced with a fuzzy logic component. In [23], the tracking quadrotor control was addressed using a decentralized PID neural network control scheme for the attitude dynamics when external wind disturbances affect the system. In [24], a robust controller based on the integral of the error signum and the immersion and invariance methodology was presented. Hardware in the loop simulation was used to validate the controller. In [25], the tracking problem was addressed using an adaptive sliding mode approach. The adaptive scheme was designed grouping the uncertainties in one single vector for position dynamics and another for attitude dynamics. The results obtained with numerical simulation were presented and discussed. In [26], [27], an adaptive control approach was proposed. The assumption that the center of mass coincides with the body reference frame was removed in the design. However, the assumption that the attitude dynamics is faster than the position dynamics was kept. In [28], an adaptive controller was designed combining fuzzy and backstepping control techniques with a mass observer for the quadrotor trajectory tracking. In [29], the authors presented an adaptive L 1 controller for a quadrotor when actuator faults and parametric uncertainties are presented. In [30], an immersion and invariance-based adaptive controller for quadrotor systems was proposed to deal with uncertain inertial parameters.
Let us notice that many of the adaptive control schemes in literature present significant disadvantages. For example, the parameterization is based on simplified versions of the dynamic model [26], [27], [31], the control design results in an over-parameterization problem [32], or the control implementation is complex [33], [34]. It should be noticed that the adaptive control of quadrotors taking into account a precise parameterization of the model-based feedforward compensation is still open. We provide a successful solution to this problem when the six parameters of the inertia tensor are considered, which is theoretically and experimentally supported.
The main contribution of this work is a novel adaptive control scheme designed to guarantee trajectory tracking of quadrotors. In our controller, the dynamic parameters are updated on-line in contrast to others that rely in fixed estimates of the parameters [4], [35]. A parameterization of the model-based feedforward compensation is introduced, which simplifies the regressor computation. Specifically, the regressor matrix is obtained by means of three vectors and a transformation matrix, resulting in a compact representation and a viable implementation. Besides, the given parameterization is also more precise than others found in the literature, in the sense that the body is assumed asymmetric and the six parameters of the inertial tensor are considered. To the best of our knowledge, this method has not been reported for quadrotor adaptive control. The closed-loop system resulting from the proposed adaptive scheme and the quadrotor dynamics is studied by Lyapunov's theory showing local stability of the state space origin. Besides, Barbalat's lemma is invoked to show the convergence of the tracking errors and the bounding of the adaptation parameters. In the stability analysis, no assumptions are made on the time-scale separation between the quadrotor position and attitude dynamics. Additionally, the experimental evaluation of the novel controller is presented and compared with a known scheme already reported in the literature and the non-adaptive version of the proposed scheme. This paper is organized as follows. In Section II the quadrotor dynamic model is given. The novel nonlinear adaptive controller is presented in Section III. The stability analysis for the resulting closed-loop system is given in Section IV. Experimental results of a quadrotor trajectory tracking are presented in Section V. Finally, we present some conclusions in Section VI.
Notation: Throughout this paper, the following notation is used. The norm of vector x ∈ R n is denoted as x = √ x T x, I 3 ∈ R 3×3 is the identity matrix, while the minimum and maximum eigenvalues of a symmetric positive definite matrix A ∈ R n×n are represented by λ min {A} and λ max {A}, respectively. The trigonometric functions sin(x), cos(x) and tan(x) for all x ∈ R are denoted by s x , c x and t x , respectively.

II. DYNAMIC MODEL
In this Section, the quadrotor motion equations and their properties are presented. In the literature, several works have VOLUME 7, 2019 introduced accurate quadrotor dynamic models considering that this vehicle is a rigid body which moves freely in space [14], [19], [36], [39], [40], [40], [41]. Figure 1 shows a quadrotor scheme in which the reference frames, the quadrotor motions, and the rotors positions are presented.
Considering p = [x y z] T ∈ R 3 and η = [φ θ ψ] T ∈ R 3 as the position and attitude vectors of the quadrotor, respectively. It is possible to obtain the quadrotor dynamics with Lagrange properties, which is expressed as follows where m is the constant vehicle mass, g represents the gravitational constant, e z = [0 0 1] T ∈ R 3 is the unit vector expressed in the inertial frame, R(η) ∈ SO(3) is an orthogonal rotation matrix defined as u T ∈ R is the total thrust produced by the rotors, where I ∈ R 3×3 is the constant symmetric matrix defined as which represents the inertia tensor, ω is the angular velocity and S(ω) is the skew symmetric matrix defined as the transformation matrix W (η) ∈ R 3×3 and its inverse W (η) −1 ∈ R 3×3 given by respectively, and τ ∈ R 3 represents the torque vector expressed in the inertial reference frame. Note that the matrix W (η) is singular at θ = ±π/2. Therefore, the matrix C(η,η) is well defined only for pitch angles different from these values. Besides, the total thrust and the torque vector, are related to the thrust of each rotor u i as follows where l is the distance from the quadrotor center of mass to the rotor axis and k d is a coefficient associated with the drag force. Our design relies in the assumption that u T and τ are the control inputs. The quadrotor dynamic model (1)-(2) exhibits some properties useful in the coming analysis.

III. ADAPTIVE CONTROL DESIGN
Control schemes can be developed using the quadrotor dynamics presented in the previous Section. However, the dynamic parameters are frequently inaccessible, they change when a payload is added, or the estimates are inaccurate. Therefore, adaptive schemes provide better performance in a real-time implementation [41], [42]. In this Section, a novel controller for quadrotor trajectory tracking is presented. This controller is developed based on a new parameterization of the model-based feedforward compensation where no simplifications are required. It is worth mentioning that in this work, the dynamic parameters of the quadrotor model in (1)-(2) are constant for all flying time, although they could be different between one flying mission and another. Besides, aggressive maneuvers are not considered, and consequently, the roll φ(t) and pitch θ(t) angles are assumed to be bounded as follows: The quadrotor is an underactuated system because only has four actuators to control their six degrees of freedom [1]. These four actuators produce the total thrust u T (t) and the torque vector τ (t), which are used as control input for the quadrotor dynamic model. Using these inputs, the altitude and orientation of the quadrotor are directly controlled; however, the displacements in the horizontal plane are not controlled directly. The proposed controller for the position trajectory tracking task is structured as shown in Figure 2.
In this scheme, the position controller calculates in real-time the desired roll φ d (t) and pitch θ d (t) angles and then uses them as references for the attitude controller.
Being the desired position p d (t) and desired yaw angle ψ d (t) established by the user as at least four times differentiable and bounded signals, the position error vector respectively. Thus, the control problem is to design the total thrust u T (t), the torque vector τ (t), and the desired angles φ d (t) and θ d (t) so that the limit is satisfied.

B. POSITION CONTROLLER
The position trajectory tracking of the quadrotor is achieved by establishing the total thrust u T (t) and the desired angles φ d (t) and θ d (t). Then, the proposed position controller is given by where (3),m is a dynamic estimate for the mass of the quadrotor m, and K p ∈ R 3×3 and K d ∈ R 3×3 are diagonal positive definite matrices. The control law is complemented with the following adaptation law for the estimated massṁ where γ p and are positive constants, and Y p (p d ) ∈ R 3×1 is the position regression matrix explicitly given by In order to obtain the closed-loop position error dynamics, the right-hand side of (1) can be expressed as Besides, considering the following relationship we obtain Note that the control inputs in (13)- (15) are the solution of the equation system presented in (21). Then, the position error dynamics are given as with the mass estimation error defined as The following facts are important for the future analysis.

Fact 2:
The auxiliary control signal f z in (13) is upper bounded by with the set with the vectorη r ∈ R 3 defined aṡ and ∈ R 3×3 a diagonal positive definite matrix. Besides, the filtered attitude error is defined as Therefore, the open-loop filtered attitude error dynamics are expressed as follows The first two elements of the right-hand side of the attitude error dynamics in (31) can be linearly parameterized as follows where χ η = [I xx I xy I xz I yy I yz I zz ] T ∈ R 6 is the parameters vector of the attitude dynamics, and Y η (η, ω, ω r ,ω r ) ∈ R 3×6 is the regression matrix, which is explicitly expressed as and Now, we are in position to introduce the attitude controller as τ = Y η (η, ω, ω r ,ω r )χ η + K s s, (37) whereχ η ∈ R 6 is the vector of estimated parameters and K s ∈ R 3×3 is a diagonal positive definite matrix. Besides, the update law for the vector of estimated parametersχ η is defined as followṡ where η ∈ R 6×6 is a positive definite matrix. Thus, from (31), (32) and (37), the closed-loop filtered attitude error dynamics can be written as (39) whereχ η = χ η −χ η ∈ R 6 is the parameter estimation error.

IV. STABILITY ANALYSIS
The overall closed-loop system obtained with the quadrotor dynamics in (1)-(2), the controller in (13)-(15) and (37) and the adaptation laws (17) and (38) Note that the an equilibrium point of the closed-loop system (40) is given by Proposition 1: Suppose that control and adaptation gains are selected such that γ p > 0, η is a 6 × 6 positive definite matrix, and K p , K d , and K s are diagonal positive definite matrices. Then, the equilibrium point x = 0 of the closed-loop system (40) is locally stable. In addition, the limit is satisfied.
Proof: Consider the following Lyapunov function candidate where with α 1 , α 2 , α 3 strictly positive constants. Note that is a positive definite function if is selected such that (41) is satisfied. From the Property 1 and condition (41), we can conclude that V in (43) is locally positive definite.
The time derivative of V in (43) is obtained in two steps, which consist in computing the time derivative of V 1 and V 2 separately.
Firstly,V 1 is computed and upper bounded: where Facts 1 and 2 were used to define where k r is related to the inequality (25), and k f z is defined in (26). Additionally, by grouping terms, the upper bound of the derivative of V 1 can be written aṡ Note that Q 1 is a positive definite matrix if is selected as in the condition (41). Secondly, the function V 2 is differentiated with respect to time and upper bounded as follows: which is a positive definite matrix when Finally, the time derivative of V is obtained and upper bounded aṡ By defining the upper bound ofV can be rewritten aṡ Thus, we can conclude thatV is a locally negative definite function if Q is a positive definite matrix, which is always satisfied for In agreement with Lyapunov's direct method [43], x = 0 is a stable equilibrium point of the closed-loop (40). This at the same time implies that x(t) ∈ L 19 ∞ . Also, from (14) and (15) and the assumption that p d (t) and ψ d (t) are at least four times differentiable and bounded, we can show that ∞ . Therefore, the above facts and the quadrotor closed-loop dynamics in (40) can be used to prove thatẋ(t) ∈ L 19 ∞ , and the solutions of the closed-loop system x(t) are uniformly bounded. Integrating both sides of (44), the following inequality is given Therefore, there are sufficient conditions to invoke Barbalat's lemma [43] to conclude that the limit in (42) is satisfied.

V. EXPERIMENTAL RESULTS
In this Section, we present a set of real-time experiments in order to assess the performance of the proposed scheme. The Quanser QBall 2 was used as experimental platform. This quadrotor is equipped with four 10-inch propellers attached to brushless motors. The Qball 2 is provided with a wireless Gumstix DuoVero embedded computer which executes the programmed controllers. Besides, this quadrotor utilizes an onboard data acquisition card (DAQ) with a high-resolution inertial measurement unit (IMU) used to obtain the attitude and angular velocity vectors η(t) and ω(t), respectively. On the other hand, the position is estimated with the vision system Optitrack which is integrated by six Flex 3 cameras and the optical motion capture software Motive. The controllers are implemented using QUARC, which is the Quanser's real-time control software, and the Matlab-Simulink interface on the host ground station computer. These controllers are automatically compiled into executable files and downloaded in the Gumstix embedded computer using QUARC software. Figure 3 shows the set-up of the experimental platform. Two control schemes are used to compare the performance of the proposed controller. The collected results in two realtime experimental case studies, which consist to the tracking of circular and lemniscate path, are analyzed.

A. ACAGCF ADAPTIVE CONTROLLER
The controller presented by Antonelli et al. [26], [27], is used to compare the performance of the novel controller. This controller is a recent adaptive scheme in which the parameterization is necessary. However, the reported experiments were carried out with a simplified model compensation. Hereafter, this controller will be denoted as ACAGCF by the names of its authors. Specifically, the ACAGCF controller is given by whereγ z ∈ R approximates the combined contribution of gravity and the effects of vertical wind, the signal s z = z + λ zz ∈ R is the filtered altitude error, and k sz , k γ z and λ z are positive constants. The reference signals for the roll angle φ d (t) and pitch angle θ d (t) for this controller are obtained by solving the following equation where x andỹ are tracking errors defined in (10), andγ xy ∈ R 2 represents the estimated wind effects, which is updated as follows d dtγ xy = k γ xy s xy .
Finally, the vector of applied moments τ is defined as where K pη ∈ R 3×3 and K dη ∈ R 3×3 are diagonal positive definite matrices,r cm ∈ R 3 represents the estimate of the position of the center of mass of the vehicle and K rc = diag{k rcφ , k rcθ , 0} ∈ R 3×3 with k rcφ and k rcθ being positive constants.
The gains for the ACAGCF controller in equations (45)-(52) were selected by using a trial and error process resulting in the following values: λ x = 3.66, λ y = 3.66, λ z = 1.50, k sx = 3.00, k sy = 3.00, k sz = 6.00, k γ x = 0.04, k γ y = 0.04, k γ z = 6.2, Additionally to the ACAGCF controller, a non-adaptive version of the proposed controller in (13)- (15) and (37) was used for the performance comparison. Therefore, the controller is structured as a model-based scheme which uses fixed estimates of the dynamic parameters. In the remaining of this document, this controller will be denoted by CWA (controller without adaptation). The implementation gains for this controller were established as follows k px = 11.00, k py = 11.00, k pz = 14.00,

C. PROPOSED ADAPTIVE CONTROLLER
The proposed adaptive controller in (13)- (15) and (37), and the parameter update laws in (17) and (38) were implemented using the same gains that were established for CWA controller. Besides, adaptation gains were selected as Note that the nominal values of the dynamic parameters differ from those used in both the CWA and the proposed adaptive controller. These values are estimates provided by the manufacturer that are not necessarily accurate. Therefore, it is reasonable to consider that all the elements of the inertial matrix are not null. Besides, the discrepancy was intentionally introduced with the objective of evaluating the benefits of the proposed adaptive controller when parametric inaccuracies are presented.
D. REAL-TIME EXPERIMENTS 1) CASE I: CIRCULAR PATH TRACKING The first set of real-time experiments concerns to the tracking of an inclined elliptical path. The desired yaw angle ψ d (t) was defined to be null. The reference signals which describe this motion task are given by where  The resulting paths described by the quadrotor as result of using the three controllers tested are depicted in Figure 4. The black line shows the desired path. The obtained paths with the ACAGCF controller and the CWA controller are depicted by the blue and green lines, respectively. In addition, the resulting from implementing the proposed controller is given by the red line. As can be seen, the quadrotor remains the closest to the reference path when using the proposed scheme. Figure 5 shows the time evolution of the position signals x(t), y(t), z(t), and the yaw angle signal ψ(t).  The respective desired signals are also shown there. Note that the CWA algorithm performs with a considerable error in altitude z(t) caused by the underestimation of thrust which is obtained with a smaller value of the mass than the nominal. On the other hand the proposed controller presents a good tracking performance.
Finally, for each implemented algorithm, Figure 6 shows the time history of the thrust forces generated by each rotor of the quadrotor. The control inputs computed by the controllers tested are similar to each other.
The RMS (root mean square) values for the position and attitude error signals are presented in Table 1. These values were computed in the time interval 15 [s] ≤ t ≤ 40 [s], after the steady state was reached. These results show congruence with the behavior observed in Figure 4. In other words, the RMS values of the tracking errors when using the new adaptive scheme are the smallest.

2) CASE II: LEMNISCATE PATH TRACKING
In the second set of real-time experiments, a lemniscate curve in the space was defined for the tracking task, while the yaw angle remained null throughout the experiment. The lemniscate period is equal to 20 [s]. Thus, the references where the frequency ω n and the coefficients a 1 , a 2 and a 3 were set equal to those used in the circular path (53). The path described by the quadrotor with each one of the controllers is depicted in Figure 7. Similarly to the circle experiment, it is possible to observe that the path described by the quadrotor with the proposed controller is closer to the reference than the resulting ones with the other controllers. Using the proposed and the ACAGCF controller, the quadrotor altitude is close to the reference signal. However, for the  non-adaptive scheme CWA, the quadrotor does not reach the desired value. Figure 8 shows the position and yaw angle signals by using the three controllers evaluated. It can be observed that the  results obtained with the proposed controller are closer to the reference signals than the other schemes. The control action computed by each controller is shown in Figure 9. After the transient period, the magnitude of the control inputs generated by the controllers tested is similar to each other.
The RMS values of the tracking errors obtained when the lemniscate tracking is specified are presented in Table 2. As in the case of the circular path, the lowest RMS value for each one of the error signals is obtained with the proposed adaptive controller.

VI. CONCLUSIONS
In this paper, we presented an adaptive controller for quadrotor trajectory tracking in presence of parametric inaccuracies, which can be caused by the uncertainty of the nominal values or changes in the system during the flight. We introduced an accurate parameterization of the model-based feedforward compensation without simplifications. The closed loop system was analyzed by using Lyapunov's theory and local stability was proven. Converge of the tracking errors and boundedness of the adaption parameters errors were also shown. Two real-time experimental case studies were carried out to validate the novel controller. Furthermore, the performance of the proposed controller was compared with an existing controller in the literature and with the nonadaptive version of the novel scheme. The proposed adaptive controller showed the best tracking performance.