Trajectory Tracking with Adaptive Robust Control for Quadrotor

: This work proposes three robust mechanisms based on the MIT rule and the sliding-mode techniques. These robust mechanisms have to tune the gains of an adaptive Proportional-Derivative controller to steer a quadrotor in a predeﬁned trajectory. The adaptive structure is a model reference adaptive control (MRAC). The robust mechanisms proposed to achieve the control objective (trajectory tracking) are MIT rule, MIT rule with sliding mode (MIT-SM), MIT rule with twisting (MIT-Twisting), and MIT rule with high order sliding mode (MIT-HOSM).


Introduction
Unmanned aerial vehicles (UAVs) have a lot of acceptance in the control theory research due to the challenge of getting a stable flight and finding some application to solve some science and engineering problems. Some applications with these unmanned aerial vehicles are: forest fire detection, in civil engineering (topography, analysis structural and others) [1], photogrammetry, and military applications [2], car detection [3] or for landing [4]. We can find different strategies to resolve the trajectory tracking with a quadrotor; for example, ref. [5] was proposed a flight controller with a hierarchical structure designed to control the altitude and the position. The controllers used in [5] are proportional-derivative (PD) and proportional-integral-derivative (PID) with a genetic algorithm method. In [6], a nonlinear system error was proposed for trajectory tracking of a six-degree of freedom quadrotor, and to stabilize the quadrotor attitude a backstepping approach and a nonlinear disturbance observer/sliding mode control approach are used. Likewise, a nonlinear adaptive state feedback technique as presented in [7,8] was applied to an adaptive algorithm for steering a quadrotor in a trajectory with parametric uncertainty. Then, trajectory tracking with a quadrotor is a problem of accuracy in the position, and in [9] a solution based on trajectory planning algorithm with a genetic algorithm (GA) and A * algorithm is presented. On the other hand, in [10] a novel 3D path planning technique to steer a sinusoidal path for a quadrotor is presented.
Some scientific research, before resolving the problem of trajectory tracking with a quadrotor, first resolves the problem of the disturbances acting in unmanned aerial vehicles such as in [11], where an estimator considers the sliding mode techniques to attenuate the translational disturbance. In [12], an optimal controller in a quadrotor is applied considering external perturbations in the system and a quadrotor linear mathematical model is considered; that is, the control law is working in some quadrotor operating pue with input constraints to avoid the external disturbances and even is demonstrated finitetime convergence. In [13], a backstepping control and integral sliding mode is proposed to eliminate external perturbations. A novel multivariable super-twisting algorithm to avoid the chattering effect generated by the integral sliding mode is presented in [13]. On the other hand, in [14], a robust controller to stabilize a quadrotor is proposed; the control law was based on the proportional-derivative control, and to obtain a better flight performance a disturbance compensation was introduced. The mathematical model that defines the UAV in [14] is rotation in SO (3). It is worth mentioning that in [11][12][13][14][15] do not applying any adaptive controller.
Other authors suggest that adaptable techniques are better to stabilize a quadrotor. For instance, in [16] an adaptive controller applied to attitude tracking is presented for an unmanned aerial vehicle to eliminate the adverse effect of measurement noises. Even in [17], a robust adaptive neural network controller is proposed, and is applied to a quadrotor UAV. This control law is not necessary for the prior information of disturbances to stabilize the quadrotor. Meanwhile, in [18] an adaptive backstepping is presented with an extended state observer applied to a quadrotor to follow and maintain trajectory, even if it is subject to external disturbances. The perturbations in [16][17][18] are considered as a noise in the measurement from the sensors that feedback the control law. On the other hand, Ref [19] presented the adaptive tracking control for a quadrotor in different or multiple operating conditions. These conditions are when the quadrotor deals with system uncertainties or unknown parameters; the control objective is to obtain a uniform update law for the controller parameters based on the Model Reference Adaptive Control (MRAC). Otherwise, MRAC modification in [20] is used to catch possibly dangerous UAVs mid-air using a net carried by two drones. The modification proposed in [20] is adding a compensation with a proportional-derivative-integral action to avoid instability of the system due to abrupt changes in altitude. Besides, a comparative between Proportional-Integral-Derivative and MRAC control for a quadrotor to stabilize the Euler angles roll, pitch, and yaw was analyzed in [21]. On the other hand, in [22] neural networks were employed to design an indirect MRAC to work for any quadrotor system. The neural networks have to learn the system parameters online (during the flight), and the challenge is to keep the quadrotor stable during online learning. In [23], it is shown how to apply the sliding mode control theory, MRAC, and the adaptive sliding mode control to design flight controllers for quadrotors; these proposals are evaluated and compared in numerical simulations. In [24], a study of multivariable output feedback MRAC applied to a quadrotor with parameter uncertainties is presented. The feedback solution requires one-third the number of measurements as full state feedback. In [25], a baseline MRAC controller applied to a quadrotor is shown with parameter changes or uncertainty parameters during the quadrotor flight, and the recursive least squares method is used with a forgetting factor to identify or estimate the unknown parameters. Otherwise, to solve the problem of parametric and nonparametric uncertainties in quadrotors, a decentralized adaptive controller with the methodology of Lyapunov and with an MRAC structure is presented in [26]. The controller is applied to achieve the desired angles (yaw, pitch, roll) and the desired altitude. Even in [27], the MRAC is used to try with the uncertainties, but it involves the adaptive control only in the Euler angles defined by the approximation of the quadrotor dynamics.
Then the general problem is the trajectory tracking with a quadrotor, and this implies, based on the research presented before, that a controller is necessary for attitude, position, and with enough robustness for the quadrotor to achieve the desired trajectory for some applications as mentioned at the beginning of this introduction. Thus, we proposed resolving this problem with a robust mechanism for an adaptive control law to steer a quadrotor UAV in a predefined trajectory by equations to obtain an adequate trajectory and avoid some physics singularity of the system in the position and the quadrotor attitude.
Then, the controller in this work is an adaptive proportional-derivative control, starting from the methodologies MIT rule and sliding modes. The MIT rule is the original approach to model-reference adaptive control; the name is from the Instrumentation Laboratory (now the Draper Laboratory) at MIT [28].
Specifically, the main contribution of this work is the robustness in the design of the adjustment mechanism that has to adjust the adaptive gains. With this, we can obtain better results in time convergence, reduce the oscillations in the steering trajectory, and obtain a stable flight during some applications. Several simulations are presented to show that the adaptive control law with a robust adjustment mechanism is effective. Other contributions of this work are

•
The obtention of robust adaptive controller considering a Proportional-Derivative structure. • Design only two adjustment mechanisms for two gains and achieve the control objective. • The obtention of a robust adjustment mechanism with the use of the sliding mode theory. • Achieve the desired trajectory with a reduced aerodynamic model. • The modification of the MIT rule is different that that presented in .
This work is organized as follows: Section 2 shows the equations that define the dynamical model of the quadrotor; Section 3 presents the equation to obtain the desired trajectory and Section 4 presents the adaptive controller and robust mechanisms design. In Section 4.1, the simulation results and an analysis of the error signals and the efforts of the control inputs are shown. Section 5 presents the discussion of this work. Finally, in the Appendix A the stability proof of the adaptive PD controller is presented.

Mathematical Model
The mathematical model to describe the quadrotor UAV is in three sets of vectors; the first defines the accelerations, the second defines the Euler rates, and the last vector represents the angular accelerations [29]. Then, the accelerations in the body frame (BF) [30] of the unmanned MAV are given by: where g is the gravitational constant, θ is the rotation in the axis-Y, ψ rotation in axis-Z, and φ rotation in the axis-X, such rotations correspond to pitch, yaw, and roll, respectively, [29].
The angular velocities are defined as w x , w y , w z and the linear velocity is given by v x , v y , v z about the axis-X, Y and Z, respectively, (see Figure 1). The constant b represents the reaction torque gain coefficient in the Z axis direction, m corresponds to the mass of the vehicle, and m w is the mass of propellers and rotors is equal to m w . Thus, the second vector defines the Euler rates; these are used to determine the changes in the quadrotor BF, and local system orientation relative to the auxiliary system is SF:˙ The last vector represents the angular accelerations in the unmanned MAV; this vector is given by:˙ where I w is the inertia moment in the rotor. I x , I y , and I z represent the inertia for the x-axis, y-axis, and z-axis, respectively. l is the length of the unmanned aerial vehicle arm [29]. Figure 2 is presented the 4 thrust forces that act in the unmanned aerial vehicle or quadrotor.

Remark 1.
The vector a as well as the vector˙ Ω describe the relationship that exist in the local coordinate system BF. Euler rates vector˙ Ω describes the relationship between systems BF and SF.

Trajectory Planner
Before designing the controller is necessary to generate the desired trajectory that must follow the UAV (Unmanned Aerial Vehicle). Then, we have defined a model that represents the acceleration of a particle or solid in the x − y axis given bÿ Thus, Equations (6) and (7) can be seen as the reference trajectory that the UAV must achieve. To generate the desired trajectory, it is necessary to define two other equations: with k p1,2 , k d1,2 > 0. Finally, with Equations (8) and (9), it is possible to obtain the Euler angles that will be the reference inputs for the control law to move the unmanned aerial vehicle toward the desired trajectory. The equations to obtain desired angles are: with φ c as roll angle reference, θ c and ψ c are the pitch and yaw angle references, respectively.

Adaptive Controller and Robust Mechanisms Design
To achieve the desired trajectory by the quadrotor, we have reduced the mathematical model; this can help demonstrate the effectiveness of the robust mechanisms to achieve the control objective despite the reduced mathematical model. The design of the adjustment mechanisms is with the gradient method used by the MIT rule with sliding mode control theory to give robustness to the adjustment mechanisms. The controller is a PD with adaptive gains, and the critical part of this adaptive law is the adjustment mechanism. Then, the control law is given by Then, u Θ = u θ , u φ , u ψ are the adaptive controllers defined to achieve the desired angles and in consequence attain the desired trajectory. The adaptive proportional gain is given ask al pΘ and the adaptive derivative gain isk al dΘ . The acronym "al" is used to indicate the adjustment mechanism that schedules the controller gains (l ∈ 1, ..., 4): The adaptive controller (13) is applied at a reduced model (pure motion Euler angles) obtained fromf Equations (3) and (4). Then, based on the MIT methodology presented in [28], the mathematical model that represents the unmanned aerial vehicle and the adaptive law is defined in a close-loop transfer function and is given by In order to avoid redundancy in the definition of (14), let us define, C 2 = 1 I y · l · b when is applied the closed-loop transfer for the pitch angle C 2 = 1 Ix · l · b for the roll angle, and C 2 = 1 I z · d for the yaw angle. Furthermore, C 1 is considered such an aerodynamic damping coefficient. Thus, the reference model is: The adjustment mechanism should minimize a cost function that was defined as (14) with (15) and calculating the partial derivatives with respect tok al pΘ andk al dΘ it is obtained In general, the expressions (17) and (18) cannot be used due to the unknown parameters k al pΘ and k al dΘ , but let us defined an optimal case given by After this approximation, the differential equations for the adaptive control law obtained are˙k From this, we propose a robust adjustment mechanism with the MIT rule and firstorder sliding-mode (MIT-SM) [28,31]. Thus, the sliding manifold is defined as , that is, the sliding-manifold is denoted for the three angle of movement of the unmanned aerial vehicle, thus, w x corresponds to angular rate in x-axis, w y corresponds to angular rate in y-axis, and w x that corresponds to angular rate in z-axis.k a2 pΘ = −γ 1l where the gains β pΘ , β vΘ are defined as positive. The first-order sliding mode generates the undesired chattering effect. Thus, we propose an MIT rule with twisting (MIT-Twisting) to reduce the chattering effect [31]. The twisting technique needs to know the values of σ Θ andσ Θ , to calculate such variables [32]. It is necessary to define a first-order robust differentiator which is given by: where x 0 → σ Θ and x 1 →σ Θ . The values of λ 1 , λ 2 > 0. Then, the differential equations obtained by the MIT rule [28] with twisting technique [31] to obtain a robust adaptive law, are defined as:˙k where and with α x and S x are design parameters, and β x > 0. Finally, we propose the MIT rule with high order sliding mode (MIT-HOSM), we need a second-order robust differentiator to calculate σ Θ ,σ Θ andσ Θ , such differentiation is given by [32]: Thus, the differential equations in the adaptive law MIT-HOSM are defined by: where the gains are α pΘ , α vΘ > 0. Thus, with the MIT-HOSM, a robust adjustment mechanism is obtained and is reduced or almost eliminates the undesired chattering effect. In Figure 3, the block diagram of the adaptive robust system is shown.

Trajectory Following
The control objective is for the quadrotor to follow a predefined trajectory generated by a trajectory planner to develop an adequate flight plan for the quadrotor. In Section 3, the trajectory to follow and the trajectory planner are described mathematically. The angles with more dynamics to follow the desired trajectory are the pitch and roll angles, these angles change between ±10 • , and the yaw angle is 5 • during the trajectory. Figure 4 presents the response of the adaptive controller with the different adjustment mechanisms proposed in this work; significant oscillations over the desired position are appreciated in axis-x by the adaptive controller based on the MIT, MIT with sliding modes (MIT-SM), and MIT with twisting (MIT-Twisting). The adjustment mechanism MIT with high order sliding mode (MIT-HOSM) presented smaller oscillations, and the convergence time to the desired reference is less than the adjustment mechanism MIT, MIT-SM, and MIT-Twisting; see Figure 4.  On the other hand, the adjustment mechanism MIT with high order sliding mode presented a better response with minor oscillations and convergence to the desired position in less time over the y axis. In Figure 6, a top perspective or top 3D view is presented to appreciate the oscillations mentioned before the desired trajectory (reference) that is followed by the quadrotor; in this figure, the PD adaptive control with the four different adjustment mechanisms proposed in this work is represented. Figure 7 presents a 3D image that represents the flight of the quadrotor with the PD adaptive controller with the different adjustment mechanisms proposed in this work.   In this work, the L 2 -norm [33] is used to know the error and control signal response in a numerical form. Thus, the definition of the L 2 [ e Θ c m ] correspond to analyze error signals and the L 2 [u Θ ] correspond to controller output signals: Figure 8 presents the results obtained with the PD adaptive controller with the adjustment mechanism based on the methodology MIT rule and the theory by sliding modes (MIT-SM), twisting (MIT-Twisting), and high order sliding mode (MIT-HOSM). Considering the analysis with the L 2 [ e Θ c m ] to know the error presented in the pitch angle, the adjustment mechanism with MIT rule the error in pitch angle is bigger than MIT with sliding mode (MIT-SM), MIT with twisting (MIT-Twisting), and MIT with high order sliding modes (MIT-HOSM). Then, the adaptive controller based on the MIT with high order sliding mode (MIT-HOSM) presented a more minor error than MIT, MIT-SM, and MIT-Twisting (see Table 1).  On the other hand, for pitch angle, the PD adaptive controller, which applied a bigger control response to achieve the control objective, is the adjustment mechanism based on the MIT rule. The controller that applied smaller effort to achieve the control objective is MIT's adjustment mechanism with high order sliding mode. This is verified by the analysis results obtained with L 2 [u Θ ] in Table 1.
On the other hand, for pitch angle, the PD adaptive controller, which applied a bigger control response to achieve the control objective, is the adjustment mechanism based on the MIT rule. The smaller effort to achieve the control objective is MIT's adjustment mechanism with high order sliding mode. It is verified by the analysis results obtained with L 2 [u Θ ] in Table 1.
Thus, the adjustment mechanism based on the MIT rule of the control effort L 2 [u Θ ] to achieve the control objective is bigger than the MIT-SM, MIT-Twisting, and MIT-HOSM. On the other hand, the adjustment mechanism based on the MIT-HOSM presented a smaller effort to achieve the desired roll angle than the based on MIT, MIT-SM, and MIT-Twisting. The results obtained are present in Table 2, and in Figure 9 the response of the roll angle is presented with the PD adaptive controller with the different adjustment mechanism proposed in this work. Analyzing the yaw angle with (30) and (31), the PD adaptive controller which presented a smaller error is the adjustment mechanism based on the MIT with sliding modes (MIT-SM) than the MIT, MIT-Twisting, and MIT-HOSM; see Table 3. Furthermore, the adaptive control based on the adjustment mechanism for the yaw angle with a bigger error is the MIT with Twisting (MIT-Twisting). On the other hand, the adaptive controller's adjustment mechanism, which presented a greater control effort to achieve the control objective, is based on the MIT with high order sliding mode (MIT-HOSM). The MIT rule showed a smaller control effort than the MIT-SM, MIT-Twisting, and MIT-HOSM. In Figure 10 the response of the yaw angle is presented with the PD adaptive controller with the different adjustment mechanism proposed in this work.

Roll Angle (MIT-HOSM)
Reference Actual Angle Figure 9. Roll angle responses.  In Figure 11, the control response of the PD adaptive controller is presented with the adjustment mechanism based on the MIT rule, and Figure 12 shows the minimization of the cost function with the adaptive control law and the adjustment mechanism based on the MIT rule. Figures 13 and 14 present the convergence of the adaptive gains with the adjustment mechanism based on the MIT rule.  The control response to achieve the desired trajectory with the adaptive control law with MIT rule with twisting (MIT-Twisting) is presented in Figure 19. The minimization of the cost function with MIT-Twisting illustrates in Figure 20. Figures 21 and 22 present the convergence of the adaptive gains with the adjustment mechanism MIT-Twisting.

Discussion
The problem of trajectory tracking with a quadrotor after several simulations is that the PD adaptive controller with the adjustment mechanism based on the MIT rule methodology, and the model reference adaptive control for MRAC, is not enough to resolve the problem due to the oscillations at the beginning of the desired trajectory. This implies that the quadrotor flight is so far from the desired trajectory and the convergence time is too slow (see Figures 6 and 7); for that reason, it is necessary to design a robust adjustment mechanism with a robust theory like that based on sliding modes.
Then, the adjustment mechanism MIT rule with sliding mode (MIT-SM) reduced the oscillations in the trajectory tracking with the quadrotor and a better convergence time. Besides, the MIT rule with the twisting (MIT-Twisting) adjustment mechanism presents a better response in convergence time and oscillation reduction. To obtain the best response in this work to reduce the oscillations (almost eliminate), a short convergence time to the desired trajectory was obtained with the adjustment mechanism based on the MIT rule with high order sliding modes (MIT-HOSM) (see Figures 6 and 7).
Even analyzing the pitch and roll angles, the MIT rule with high order sliding modes (MIT-HOSM) has better error correction. An exception occurs in the yaw angle where the MIT rule with sliding mode (MIT-SM) has a better response in error. On the other hand, we took into account the control effort response with the four proposed adjustment mechanisms. The MIT rule with high order sliding mode (MIT-HOSM) presents the smallest control effort compared to the adjustment mechanisms MIT rule, MIT-Twisting and MIT-HOSM proposed for the pitch and roll angle, except for the yaw angle where the MIT-HOSM applies the biggest control effort to steer the quadrotor for the desired trajectory (see Tables 1-3).
Thus, for future work, we have to develop a construction and electronic embedded system for a quadrotor to do real flight tests with the PD adaptive control law with the different robust adjustment mechanisms proposed in this work. Equation (A7) is locally semidefinite-negative in the following regioṅ V(e, x 2 ) ≤ 0 ∀ x 2 ∈ R, e ∈ [σ 2 − σ1, σ2 + σ1] (A10) with This guarantees a local asymptotic stability around the origin. Increasing the value of k p increases the range of values fork d , including negative values. The parameter c 1 is a coefficient with uncertainty because is measured by experimental tests. So, assume a upper bound c 1m (i.e., c 1m ≥ c 1 ) the inequality (A9) is rewritten like The same tuning guaranteed stability for higher values of c 1 ; therefore, robustness to uncertainties in c 1 is demonstrated.