Robust Feedback Linearization Based Disturbance Observer Control of Quadrotor UAV

This paper presents a novel Robust Feedback Linearization (RFBL) controller for Quadrotor Unmanned Aerial Vehicle (UAV) when subjected to external disturbances. A Robust Feedback Linearization controller is achieved by augmenting the conventional Feedback Linearization-based control with the Supertwisting Algorithm in the outer loop. To estimate the external disturbances acting on a quadrotor a Nonlinear Harmonic Disturbance Observer (NHDO) is patched with the robust controller. The efficacy and superiority of the results can be seen in terms of tracking error, rise time and robustness to disturbances when comparing it with other three robust controllers i.e. Integral Sliding Mode Controller (ISMC), Terminal Synergetic Controller (TSC) and Finite-Time supertwisting controller. Lyapunov’s stability analysis is performed to prove stability while numerical simulation is carried out using MATLAB/Simulink. The results are also validated by testing the system in a Hardware-In-Loop (HIL) environment on the MicroLabBox dSPACE RTI-1202 platform.


I. INTRODUCTION
The application of drones for delivery purposes has shown an increasing popularity and is believed to be 90 % cheaper than car-based services [1].Big companies such as Amazon and DHL have started delivery of parcels using drones which does not have the adverse effects that internal combustion engine vehicles do; such as congestion, noise and pollutant emissions [2].Other uses of drones include infrastructure inspection, pesticide spraying on crops, army reconnaissance missions and target tracking [3].Among the different types of Unmanned Aerial Vehicles (UAVs), quadrotors are the most popular since it can take off and land vertically compared to a fixed-wing aerial vehicle.Also it has high maneuverability and can lift heavy loads when compared to The associate editor coordinating the review of this manuscript and approving it for publication was Guillermo Valencia-Palomo .a helicopter.With such vast utilization, quadrotors need to be robust to external disturbances such as wind gusts, modelling and parametric uncertainties (due to varying payloads and inaccurate modelling of the quadrotor).Therefore robust control is required to compensate for these negative effects.A comprehensive survey can be found in [4], which discusses the vast types of controllers that have been implemented on a quadrotor-type UAV.It can be seen that sliding mode control has been the most investigated type of controller, however has the adverse effect of chattering.Moreover, a gap in the research literature for attitude based robust feedback linearization control is found.Since feedback linearization makes the system exactly linear, therefore controllers can easily be designed for it.
The literature survey can be split between attitude based and position based control of quadrotors.For the attitude based control, in [5], a nonlinear sliding surface has been chosen to construct a TSMC (Terminal Sliding Mode Controller) based controller along with an enhanced disturbance observer for mismatched disturbances.Only regulation of attitude has been achieved.Even though TSMC is finite time convergent while enhanced DO (Disturbance Observer) has asymptotic convergence still the author has managed to use them together.The same author has managed to achieve an adaptive backstepping sliding mode controller patched with a disturbance observer along with state estimation in [6].For state estimation a high-gain observer has been used.However, a relatively large settling time for the estimation of disturbance is noted.In another paper [7], tracking of attitude and altitude utilizing standard sliding mode control complemented with disturbance estimation for both matched and mismatched uncertainties using Simpson's approximation has been utilized.The disturbances are high order polynomials which are approximated and attenuated using the developed disturbance observer.
Quadcopter control for mismatched uncertainties based on nonlinear DO based on sliding mode control has been achieved in [8].The Nonlinear DO exhibits the salient feature that requires the gains to be larger than the bound of error of the disturbance estimation than that of disturbance.Regulation of attitude has been achieved with the shortcoming of tracking of attitude reference.Moreover, the controller achieves finite-time convergence while the nonlinear DO has asymptotic convergence.A dynamic sliding mode control patched with a nonlinear disturbance observer has been implemented in [9].Attitude regulation has been achieved and matched nonlinear disturbances has been estimated and attenuated.A dual fixed-time attitude control is investigated for a quadrotor unmanned aerial vehicle in [10].To estimate the external disturbances a fixed-time adaptive fast supertwisting disturbance observer is used.For the controller part, a fixed-time controller is designed by using a universal barrier lyapunov function to achieve good tracking error constraints.A tracking differentiator is also used along in the process for appropriate references and its derivative.
A fault-tolerant controller is designed that can simultaneously cater for actuator faults, external disturbances and parametric uncertainties in [11].An adaptive control methodology is employed in both the continuous and discontinuous control to accommodate actuator faults and parametric uncertainty.Then a nonlinear disturbance observer is integrated to reject the external disturbances and thereby keeping magnitude of the discontinuous control part small.The results are demonstrated through numerical simulations and experimental verification.A disturbance observer-based attitude control for aggressive maneuver has been implemented [12].Cascade connection based controller is developed: for the outer attitude control loop a quaternion based controller is developed and disturbance observer based angular velocity control is for the inner loop.
In the following article [13] an optimization based framework for the nonlinear disturbance observer is developed.The optimization is based on infinity-norm minimization of noiseto-output transfer function along with the load disturbance sensitivity function.
Step, square and sinusoidal disturbances are applied in hover and flying modes.The proposed work is verified through simulations and implemented on real-time embedded controller for experimental verification.
For the altitude and attitude control, a state-feedback linearization based controller along with arbitrary order differentiator for estimation and rejection of external disturbances has been implemented [14].The results are verified on an experimental setup.
An enhanced extended state observer (ESO) is implemented to cater for wind gusts and actuator faults along with a supertwisting controller [15].The extended state observer provides finite time stability whereas the supertwisting controller achieves asymptotic convergence.Quadrotor dynamics based on quaternion has been used.Finite time extended state observer along with non-singular fast terminal sliding mode as the controller is implemented to cater modeling uncertainties and external disturbances [16].A tracking differentiator is also designed to obtain smooth references and their derivatives.Simulation and experimental results validate the efficacy of the controller.
As for the position control, [17] a Finite-Time Sliding-Mode Observer which is used for state as well as disturbance estimation is utilized.For the control part PID controller and a continuous sliding mode controller has been designed in combination that achieve exponential convergence.The observer and controller are implemented in real time on an experimental platform.A nonlinear controller based on Euler angles as virtual control inputs is designed in [18].This technique eliminates separation of timescale that is assumed in a hierarchical control system.The controller is based on dynamic surface control method while disturbance observers are designed to estimate disturbances in the translation and rotational dynamics of the quadcopter.The results are validated using numerical simulations.The feedback linearization strategy is patched with a disturbance observer to make it robust [19].The disturbance observer accommodates nonlinearities in the model by considering them as disturbances.Simulation results show good tracking in the presence of unmodelled dynamics, actuator failure and wind disturbances.
Reference [20] develops a finite-time supertwisting controller with a high-order finite time disturbance observer.Lyapunov Analysis is used to study overall system stability and provide finite time convergence.The proposed controller is compared with PID and continuous sliding mode control coupled with a finite time disturbance observer.The results are validated using an experimental setup.In [21] a backstepping-based controller is developed along with incorporating a disturbance observer thus providing tracking of error dynamics exponentially.The errors are proven ultimately bounded for time-varying disturbances.The results are verified through simulations.
A finite time disturbance observer along with a geometric controller has been developed in [22].A simple structure for the geometric controller is chosen which ensure exponentially stable error dynamics after finite time convergence by the disturbance estimator.Simulations are done to show to verification of the results.Finite-time continuous multivariable control algorithm is developed in [23], which is used to develop both controller and observer.The states and disturbances are estimated through the observer whose stability and finite-time convergence is proved using Lyapunov analysis.Numerical simulation is used to verify the results.
In [24] proposes a continuous non-singular terminal sliding mode controller along with a Finite time observer.The sliding motion is independent of the system's initial condition which is achieved by utilizing a full-order homogeneous terminal sliding surface.Stability Analysis is done using bi-limit homogeneous theory, Lyapunov theory and Input-to-State Stability.Both Processor in Loop and experimental results are done to verify the results.A second-order supertwisting controller along with a finite time observer for estimation of states and external disturbances is presented in [25].The efficacy of the results are compared with an adaptive gain controller in both simulations and experimental validation.Among the earlier papers published [26] presents a continuous sliding mode controller along with a sliding mode disturbance observer to cater for modelling uncertainties, lateral wind gusts and actuator damage/failure.The results are verified through simulations.In [27] the nonlinear dynamic inversion controller is robustified using an uncertainty and disturbance estimator to cater for system nonlinearities, input couplings and wind disturbances.The uncertainty and disturbance estimator is based on the time delay disturbance observer concept.The effectiveness of the results is verified through Monte Carlo simulations and verified on experimental hardware.
In this paper, a novel RFBL is designed along with two other robust controllers i.e.ISMC and TSC.RFBL achieves results superior to all other controllers for most of the cases with smaller tracking errors and settling time.The controllers have been compared with the controller and disturbance observer designed in [20] for several different reference trajectories.The controllers used for comparison are considered for their robust qualities and ease of implementation on a real platform.To the best of the author's knowledge, harmonic nonlinear disturbance observer has not been implemented on a quadrotor along with a robust feedback linearization approach.The overall contributions of the paper are enlisted as follows: • A novel RFBL Controller has been designed that achieves superior results to several compared robust controllers (ISMC and TSC).
• Results of RFBL Controller when compared with the existing controller of [20] via multiple performance indices is far more superior.
• Lyapunov stability analysis is assured for all the designed controllers.
• Validation has been done both in simulations and Hardware-In-Loop experiments.The paper has been organized as follows: Section II presents the mathematical modelling of the quadrotor.Section III includes the design of the robust controllers and nonlinear disturbance observer.In Section IV the results of both the simulation and S-HIL are presented.Lastly in Section V the conclusion is given.

II. MATHEMATICAL MODEL OF QUADROTOR
This section discusses the mathematical modelling of a quadrotor which can be achieved via several techniques among which Newton-Euler and Euler-Lagrange are the most popular.Considering position control, the mathematical model of quadrotor can be represented as [28]: where m denotes the mass of the quadrotor; g is the acceleration due to gravity; I x , I y , I z are the moment of inertia for each axis; ξ z , ξ φ , ξ θ and ξ ψ are the aerodynamic damping coefficients; I r the inertia of the rotor; ω = ω 4 +ω 3 −ω 2 −ω 1 represents the residual rotor angular disturbance; F z the thrust in z direction; τ φ , τ θ , τ ψ the respective input torques in the roll, pitch and yaw axis.The disturbances acting on the system are d z , d φ , d θ , d ψ , d x and d y .
Converting the above eq. 1 in state-space form yields: As seen from eq. 1, the quadrotor is an under-actuated system.To convert it into a fully actuated system, virtual control inputs F x and F y are introduced to control motion in the x,y axis.
The desired roll and pitch angles can then be represented as: For a quadrotor in X-configuration the matrix relating the thrust force and torques with the speed of the propeller's can be written as: where k F and k M represents the thrust coefficient, l the length of the arm of the quadrotor.
Rearranging the above equation 4, the required propeller's rotational speed can be represented as:

III. ROBUST CONTROL AND DISTURBANCE OBSERVER DESIGN A. CONTROLLER DESIGN
To facilitate control system design, it will be divided into Altitude/Attitude Control and Position X-Y control.

1) ALTITUDE AND ATTITUDE CONTROL
The mathematical model for the Altitude and Attitude control of a quadrotor without considering the disturbances can be written as: representing the above eq.6 in the form ẋ = f (x)+g(x)u+ d, where f (x), g(x), u and d can be written as: Inorder to implement input-to-state feedback linearization, the control action can be calculated as: where dz , dφ , dθ and d ψ are the estimated disturbances.
Considering tracking problem, the inputs a proportional derivative controller can be designed as v 1 , v 2 , v 3 and v 4 , which are the control inputs to the feedback linearized plant: where e i = x i − x d i , where i = 1, . . ., 8 and x d i is the desired state trajectory.
In-order to add robustness to the existing controller, a supertwisting controller will be added in the outerloop of the feedback linearized controller.Addition of the supertwisting control action modifies the control inputs v 1 , v 2 , v 3 and v 4 as: where k 1 and k 2 are the gains of the supertwisting controller for the z-direction, roll, pitch and yaw-axis.The sliding surface for the supertwisting controller can be represented as: where c 1 , c 2 , c 3 , c 4 are the design constants.

2) STABILITY ANALYSIS OF ALTITUDE AND ATTITUDE CONTROLLER
First analyzing the stability of the feedback linearization based controller part, the system can be written in the following standard form, ė = A cl e, where A cl is the closed loop error dynamics matrix represented as: (15), as shown at the bottom of the next page.
The stability of the closed-loop system is ensured by selecting values of K p , K d > 0, which yields eig|A cl | < 0. This ensures that the errors e i → 0 as t → ∞, where i = 1, . . ., 8.
As for the supertwisting controller, the stability can be derived from [29] as: where z 1 , z 2 ∈ R and the disturbance ρ is bounded by Consider a lyapunov function which can be written in quadratic form as V 1 = ζ T P ζ where ζ T = |z 1 | 0.5 sign(z 1 ) z 2 and P is positive definite matrix.V 1 is continuously differentiable except for when z 1 = 0. V1 exists and is negative differentiable ∀z 1 ̸ = 0.
The Lyapunov function V 1 is both positive definite and radially unbounded: The Euclidean norm of ζ can be written as ∥ζ ∥ 2 2 = |z 1 |+z 2 2 .The following algebraic equation can be constructed: where 5 sign(z 1 ) z 2 , eq. 16 can be written as: Using the assumption that the perturbation is uniformly bounded satisfying 2 |ρ| ≤ δ, the transformed perturbation Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply. ≤ From the eq.17 the following inequality can be deduced: (P) .This concludes that V1 satisfies V1 ≤ −αV 0. 5  1 , where α = ϵλ 0.5 min P.This guarantees finite time convergence where time is bounded by , where ζ (0) is the initial value of ζ .
For the LMI equation in eq.18 to be satisfied, the transfer function δ .Using this inequality the following conditions on the gains can be achieved max Then the conditions on k 1 and k 2 can be deduced as: k 2 > δ and k 2  1 > 4k 2 .

3) POSITION X-Y CONTROLLER
The remaining part of the quadrotor dynamics can be represented as: The control action similar to the fully actuated system can be designed as: ξ y m x 12 − K py e 11 − K dy e 12 −k 1y s y 0.5 sign(s y ) − k 2y sign(s y ) − dy ) where K p , K d > 0 and k 1 , k 2 are the controller design gains of the supertwisting controller, e i = x i − x d i , where i = 9, . . ., 12 and x d i is the desired state trajectory.The sliding surfaces are chosen as: s x = c 5 e 9 + e 10 s y = c 6 e 11 + e 12 (23) where c 5 , c 6 are design constants of the sliding surface.The stability analysis for the X-Y position control can be performed similarly to the Altitude and Attitude Control stability analysis; by analyzing the proportional derivative controller and supertwisting controller separately assuming the thrust, F z to be bounded.

B. NONLINEAR HARMONIC DISTURBANCE OBSERVER
A nonlinear harmonic disturbance observer can be implemented where the frequency of the disturbance in known but with unknown amplitude and phase.An enhanced formulation is presented where the requirement of the derivative of the state can be eluded.
The enhanced formulation of this harmonic disturbance observer is defined as [30]: The error dynamics of the disturbance and its estimation is represented as: From eq. 27 if l(x) is selected such that ξ approaches ξ exponentially and ėξ is globally exponentially stable.
VOLUME 12, 2024 The block diagram of this harmonic nonlinear disturbance observer is depicted in the figure below: Considering the quadrotor mathematical model with disturbances included as in eq. 2, the controller already designed can be patched with the estimates of the unmatched disturbances d z , d φ , d θ , d ψ , d x and d y .
The control action after the addition of estimated disturbance for the Altitude and Attitude system can be written as: while for the position X-Y system can be written as:

C. INTEGRAL SLIDING MODE CONTROL
Integral Sliding Mode Control defers from the regular sliding mode controller by designing its sliding surface which includes the integral terms of all the errors [31].

1) CONTROLLER DESIGN
For Tracking of desired states, the sliding surface for the roll axis is defined as: The derivative of the sliding surface can be defined as: Inserting the time derivatives of the errors in eq. 31 yields: In order to make Lyapunov function negative-definite, we equate ṡ φ = −k s φ 0.5 sign(s φ ).
The control action for the roll-axis then yields: where k φ is the gain of the integral sliding mode and dφ is the estimated disturbance in the roll-axis.The Integral Sliding Mode Controller for the x-axis can be designed as: where k x is the gain of the integral sliding mode and dx is the estimated disturbance in the x-axis.The sliding surface is chosen as s x = c 1x e 1 x +e 2 x +c 2x e 3 x + e 4 x ,where c 1x and c 2x are the design parameter.The errors e 1 x = x 9 − x 9d , e 2 x = x 10 − x 10d , e 3 x = e 1 x dt and e 4 x = e 2 x dt.
The Integral Sliding Mode Control patched with harmonic disturbance observer for the complete quadrotor system for tracking of states is defined as: while the control action for x and y axis can be defined as: 2) STABILITY ANALYSIS Considering the Lyapunov candidate function as: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
For simplification sign(s) can also be written as sign(s) = |s| s .Substituting this in V gives: Since k is a positive number, V will always be negative definite, which ensures asymptotic stability.

D. TERMINAL SYNERGETIC CONTROLLER
Synergetic control achieves convergence of state variables as time goes to infinity [32].To achieve finite time convergence Terminal Synergetic Control is used which combines synergetic control theory with terminal attractor to achieve finite time convergence.

1) CONTROLLER DESIGN
A controller for the roll-axis is developed, similarly controllers for the remaining axis can also be designed.We start by introducing a macro-variable ζ , which is expressed as: where w 1φ and w 2φ are positive constants chosen by the designer, while p 1 ,q 1 ,p 2 and q 2 are odd positive numbers such that 1 < p 1 q 1 < 2 and 1 < p 2 q 2 < 2. The errors are defined as e 1φ = x 3 − x d 3 and e 2φ = x 4 − x d 4 .Taking the time derivative of ζ we attain: After placing the values of ė1 and ė2 we get: Considering the following relation between ζ and ζ : where T φ is a positive constant and is the convergence rate of the terminal attractor.By putting eq.41 in eq.42 we get: Solving eq.43 for the control input τ φ : The Terminal Synergetic Controller for the x-axis position control is as follows: where the macro-variable 9 , e 2x = x 10 − x d 10 .w 1x , w 2x and T x are the design constants.TSC patched with harmonic disturbance observer for the complete quadrotor system for tracking of states is defined as: while the control action for x and y axis can be defined as: q 1 )e 1y ( t 0 e 1y dt) p 1 /q 1 −1 −w 2y ( p 2 q 2 )e 2y ( t 0 e 2y dt) p 2 /q 2 −1 − dy ) 2) STABILITY ANALYSIS The Lyapunov function can be considered as: Taking the time derivative of eq.45:

B. CONTROLLER IMPLEMENTATION ON MULTIPLE TYPE OF TRAJECTORIES
In this section RFBL Controller designed will be compared with the controller implemented in [20] along with ISMC and TSC.The controllers are implemented for various reference   trajectories to ensure the efficacy of the control system designed.The results are depicted in the figures below: While the control action for the multi-step input is shown in the following figure 10 and 11.     compared.Even though TSC seems to outperform RFBL Controller in ISE and ITSE metrics as seen in table 1, however, there is a high spike in contents in the control effort of TSC as shown in figure 10 and 11.

2) CIRCULAR TRAJECTORY
To achieve a circular trajectory, an altitude of 1m to track the z − axis is given, while the yaw angle ψ is kept at 0 rad.The desired trajectory to track for the x and y axis are: x d = cos(0.5t)and y d = cos(0.5t).Figure 12 below shows the plot of circular trajectory.The control action required to achieve the circular trajectory is depicted by the following figure 4 and 14: All the tables 5, 6 and 7 show that RFBL Controller is far superior.The TSC once again shows high spikes therefore negating its effectiveness.The performance index depicts the RFBL Controller outperforming all the other controllers including that designed in [20].

4) SQUARE TRAJECTORY
The commanded trajectory for this case is achieved by setting z d = 1.5, ψ d = 0.While x d and y d are set as: Only for the square trajectory tracking does the TSC achieve slightly better results compared to the RFBL Controller as shown in table 11 and 12 i.e. for the X and Y axis.However, RFBL Controller is way more superior in the Z axis as shown in table 13.The superiority of the TSC achieved in X and Y axis seems to be negated by the fact that    high spike content in its control effort can be seen in figure 8 and 20.

5) SPIRAL TRAJECTORY
To achieve a spiral trajectory, the yaw angle ψ is kept at 0 rad.The desired trajectory to track for the x, y and z axis are: x d = cos(0.5t),y d = cos(0.5t)and z d = t.Figure 21 shows the plot of the spiral trajectory.

C. HARDWARE IN LOOP VALIDATION
To emulate our controller and plant in a real setting, a Hardware-in-Loop (HIL) experiment is carried out.Although implementation on real hardware provides a better validation, due to limited resources S-HIL was implemented.S-HIL approximates the controller in a real-time setting and provides a cost-effective solution by implementing both the plant and controller on a microprocessor field-programmable gate array (FPGA).
S-HIL (Single Hardware in Loop) is implemented by discretization of the continuous time blocks in Simulink/Matlab with appropriate sample time [33].The implementation for S-HIL is carried out on MicroLabBox dSPACE RTI-1202 platform.The results shown in Fig. 24 show good tracking of S-HIL results in comparison with simulation.A low computational burden was seen during implementation in S-HIL environment since both each disturbance observer is a two-state ordinary differential equation and can be easily solved using a discrete-time solver.
The control efforts seen in Fig. 25 vary slightly initially during the transient phase.After the transition phase, the control efforts for both the S-HIL and simulation seem to be tracked closely.Hardware in Loop (HIL) provides results that are safe for future practical implementation.

V. CONCLUSION
The results verify that the RFBL Controller achieves superior performance compared to the other implemented controllers.The TSC may seem to outperform RFBL Controller in a few cases, however, the high spikes in control action observed in the control effort negate the response it achieves by causing actuator saturation.Lower error tracking and fast settling times are noticeable for RFBL Controller in addition to robustness to external disturbances.Also, the nonlinear harmonic disturbance observer achieves a better estimation of disturbances and tracks the reference disturbances much more precisely as compared to the finite time disturbance observer.Hardware-in-Loop provides validation of the controller for practical implementation.
In the future, the controllers will be implemented on the experimental drone platform for further validation of results in real-time.Moreover, various other published controllers and their associated disturbance observers will be included for the comparison analysis, benefiting the readers.Additionally, controller parameters can be selected by using meta-heuristics algorithms by having an appropriate objective function.Another area that needs to be explored is disturbance observer for mismatched disturbances.

FIGURE 2 .
FIGURE 2. Block diagram of harmonic nonlinear disturbance observer.

FIGURE 10 .
FIGURE 10.Control Input for multi-step input trajectory, a) Thrust Force, b) Roll Torque.

FIGURE 13 .
FIGURE 13.Control action for circular trajectory, a) Thrust Force, b) Roll Torque.

FIGURE 19 .
FIGURE 19.Control action for square shaped trajectory, a) Thrust Force, b) Roll Torque.

FIGURE 20 .
FIGURE 20.Control action for square shaped trajectory, c) Pitch Torque.

FIGURE 22 .
FIGURE 22.Control action for spiral trajectory, a) Thrust Force, b) Roll Torque.

FIGURE 24 .
FIGURE 24.Comparison of S-HIL and simulation of RFBL controller for the circular trajectory.

FIGURE 25 .
FIGURE 25.Comparison of S-HIL and simulation of RFBL control efforts a) Thrust Control Force, b) Roll Control Torque, c) Pitch Control Torque.

TABLE 3 .
Specification for Z-axis (multi-input trajectory).results achieved by RFBL Controller as shown in table 1, 2, 3 and 4 outweigh all other controllers that have been
Results of tracking the infinity-shaped trajectory shown in

table 8 ,
10 and 9 highlights the efficacy and superiority of the RFBL Controller over the compared controllers designed.All performance indices highlighted in bold show that the best results are achieved by the RFBL Controller.