Robust Discrete-Time Nonlinear Attitude Stabilization of a Quadrotor UAV Subject to Time-Varying Disturbances

A discrete-time improved input/output linearization controller based on a nonlinear disturbance observer is considered to secure the stability of a four-rotor unmanned aerial vehicle under constant and time-varying disturbances, as well as uncertain system parameters for its attitude behaviour. Due to the nature of the quadrotor system, it contains the most extreme high level of nonlinearities, system parameter uncertainties (perturbations), and it has to cope with external disturbances that change over time. In this context, an offset-less tracking for the quadrotor system is provided with the input/output linearization controller together with a discrete-time pre-controller. In addition, the robustness of the system is increased with a discrete-time nonlinear disturbance observer for time-varying disturbances affecting the system. The main contribution of this study is to provide highly nonlinearities cancellation to guarantee the aircraft attitude stability and to propose a robust control structure in discrete-time, considering all uncertainties. Various simulation studies have been carried out to illustrate the robustness and effectiveness of the proposed controller structure.


I. INTRODUCTION
Within the last decade, the Unmanned Aerial Vehicles (UAV) are deployed for tasks where human interaction is dangerous. Today, there are many applications of UAV in sectors, such as military, transportation, and entertainment. Among the UAVs, the multi-rotors are mostly chosen for their agility and ability to hang in the air. Within the literature, many control methods are used to deploy to characterize the attitude and altitude problem of the quadrotors, which is commonly chosen as the multi-rotorframework [1], [2].
When the autonomous flight of the quadrotor is considered, the main effort relies on the attitude and stabilization of the vehicle. For this purpose, the nonlinear control methods applied on the quadrotors are the nonlinear back-stepping [3]- [5], which can be taken into account the matched and unmatched uncertainties, or sliding mode [6], [7], which is robust and able to represent the system with lower-order dynamics suffers from chattering problem, their Manuscript received 29 January, 2021; accepted 12 May, 2021.
Since the real-life flight of these vehicles deploys mainly outdoor, the controllers do not take external disturbances into account and become fragile. Thus, the studies dealing with the disturbances on quadrotor systems have been carried out [15]- [17]. The system control problem is still up-to-date in [18]- [23].
For control of UAV systems, in practice, it requires discrete-time signals, and due to the differences between the design in continuous-time and control signal implementation in discrete-time, the tuning of the design parameters may become a hard work. For this reason, several discrete-time controllers on the quadrotor are directly performed [24]- [27]. The input-output linearization controller can here be emphasized as a nonlinear controller in discrete-time [28]- [30].
To overcome the system perturbations with its undesired consequences, time-varying disturbances, and stabilization of the attitude quadrotor UAV system, a discrete-time robust nonlinear controller with nonlinear disturbance observer is proposed in this study.
Most of the previous works consider all the steps of the controller design in the continuous-time domain and then the discretization of the controller. However, in the particular case, the direct discrete-time controller approach, which is the focus of this paper, much effort is still needed to be put in for the solution of this up-to-date problem. In the light of the previous studies, the differences from the existing results and the significant additions of this study can be summarized as follows.
 The constructed controller assures the offset-less high precision tracking under the effects of system perturbations and subjecting to constant disturbance.  In addition, the discrete-time discretization approximation error is rejected here with the aid of a digital filter compassing the effect of the digital PI. For the attenuation of the time-varying disturbance, which changes over time and is slower than system dynamics, it is considered by the nonlinear disturbance estimation.

Robust Discrete-Time Nonlinear Attitude Stabilization of a Quadrotor UAV Subject to
Time-Varying Disturbances  The solution of all the mentioned problems is implemented in the discrete-time domain. Finally, an improved robust control structure is tested via numerical simulations containing input saturation difficulties and limitations.

II. SYSTEM DYNAMICS AND MODELING
The general quadrotor UAV aircraft, which is used in this study, is presented in Fig. 1. Here, B is the Body frame and E is the Earth frame, and the structure of the system dynamics is fixed and uniformly distributed, also the propellers are static. The gravity centre of the system coincides with the B-frame centre. Moreover, the square of the propeller speed is considered proportional to the forces of thrust and drag.
Since :, is for the lift and d is for the scaling factor for the force moment. Here, j F is for the control signals applied to the quadrotor. After the continuous-time overall quadrotor UAV system dynamics are presented, the approximated system difference equations are needed for the design steps in discrete-time for the attitude behaviour. In this paper, the quadrotor UAV attitude system difference equations are obtained with the linear extrapolation method which is adopted from [23]. Defining and denotes the Euler angles. Utilizing (11) and (12), the attitude dynamics of the quadrotor ((5)- (7)) can be written as in (8) and (9). The mathematical arrangements are given in Appendix A.

III. DISTURBANCE OBSERVER DESIGN
In this section, the time-varying disturbances that affect the quadrotor UAV system are estimated by nonlinear disturbance observer (NDO) in the discrete-time setting. The NDO is designed with the assumption that the timevarying disturbances are supposed to be unknown constant or time-varying disturbances that vary much slower than the quadrotor UAV dynamics. The advantage of the considered observer design in the discrete-time domain is that the measurements of the data of the systems are achieved via the digital sensor devices.
Proposition: Consider the discretized attitude dynamics (8), (9). The estimation dynamics of the external disturbance asymptotically stable under the designed discrete-time NDO structure given by: if satisfying the condition stand for an augmented state variable, the estimation of the external disturbance, an auxiliary nonlinear function depend on the state variables and NDO design gain, respectively. (9) and the observer dynamics (13), (14), In this point, regarding the natural motion of the external disturbance ( , and if observer design gain 2 L  is designed with an appropriate assignment value such that remaining within the unit circle, then the observer error asymptomatically fast converges to zero which completes the proof.

IV. PRELIMINARIES
Before the design procedure of the input-output linearization controller is directly given, some preconditions must be emphasized, such as relative degree, zero dynamics, and minimum phase [28]. The relative degree calculation is summarised as follows mathematical formulation ; .
The formulation means that the relative degree is the integer r for the quadrotor attitude dynamics given by (8) and (9). Thus, , and , gg   information of the pitch and the yaw Euler angle can easily be obtained with the equations given in Appendix A. The relative degree of the discretized system (8), (9) Another critical issue is the zero dynamics so that if the zero dynamics of the considered system is local asymptotically stable (LAS), then a control law   i uk exists and can be designed. Checking the LAS of the (8), (9), it can be easily determined according to whether the Jacobian matrix's eigenvalues remain within the interior of the unit circle Hence, the Jacobian matrix eigenvalues locally remain within the unit circle considering . s T As a result, an input-output linearized control law   i uk that has to stabilize local asymptotically of the system (8), (9) exists.

V. CONTROLLER STRUCTURE
In this section, a discrete-time nonlinear input-output linearization controller is presented for stabilization of the attitude quadrotor. After controller design, the quadrotor attitude subsystem transformed into a linearized system with cancellation of highly nonlinearity effects.
However, the linearized attitude system is still affected by the parametric uncertainties, external disturbances, and discretization errors. To attenuate the mentioned errors, the digital PI-like filter is used. Thus, in Fig. 2, the closed loop attitude control structure can be seen. As previous section taking into account discretized quadrotor dynamics, the input-output linearization controller is and herewith the linear closed-loop input-output dynamics with relative degree 2 can be given as follows where 12

 
Hereby, the transfer function characteristic equation by shaping 12 , ,  and 3  can be remodeled as locally asymptotically stable. Note that stability, performance, and robustness depend on the roots of the characteristic equations for each   ,i  . However, it is unlikely to directly design the location of the roots in the proposed input-output controller structure for a nonlinear system subject to unmodeled dynamics, uncertainties, external disturbances, and discretization errors. To obtain offset-less output trajectory tracking, another controller, which is called "pre-controller", in this paper is needed.
is obtained. The minimal order pre-controller structure is possible via its degree being 2, so the proposed precontroller is casual. The denominator of the


Note that, although the proposed controller rejects many aforementioned undesired effects, the dynamics are still detorted by the time-varying disturbances. In this paper, an NDO designed in Section II for this problem solution is proposed. Clearly, considering   0 d ek given by (18) under the assumption of changing much slower than the quadrotor UAV dynamics of the time-varying disturbances, the application of the controller (24) to the dynamics of (8),

VI. SIMULATION RESULTS
To examine the effectiveness and robustness of the designed controller structure for the stabilization problem on the nonlinear uncertain quadrotor UAV, several numerical simulation results are presented. The results are carried out in MATLAB with a fixed sampling time 1 ms [24]. The step size of the solver of the quadrotor UAV dynamics is set as 1 .
s  The maximum input signal to each Euler angle of the system dynamics is saturated with 24 .
N The values of the parameters utilized in the simulation are given in Table I. All parameters of the quadrotor are considered as uncertain and the simulation results are obtained assuming that the controller is known 80 % of the actual values of all the parameters. The initial states of the quadrotor UAV are set  

Nms
The discrete nonlinear proposed controller matches the discretized quadrotor dynamics UAV to a second order linear system. In this paper, the linear model is designed as 2 0.99 0.0098, zz  and 0 0.0198   is selected, which means that unity static gain is 1. Then the denominator of the pre-controller is designed as 2 0.9 0.02.
zz  However, the quadrotor dynamics is affected by the time-varying disturbances. For robustifying on this problem, the NDO with the two mentioned controller parts is combined. The observer design gain 2 L  in the auxiliary nonlinear function is set to 0.35 regarding the speed of the quadrotor UAV.
In the uncertain quadrotor system, the matched and unmatched uncertainties directly deform the performance of the system, i.e., transient and steady-state responses. The input-output linearization controller with the designed prefilter in the discrete-time domain has been performed under all constant system parameter uncertainties, discretized errors, and constant/time-varying disturbances. Note that the aforesaid constant uncertainties and constant disturbance occur the steady-state error throughout the system output. The devised pre-filter is activated with the simulation run time. Thus, the effect of the parameter uncertainties is not observed from the simulation results in 0 s-5 s (see (a) in Figs. [3][4][5]. However, it can be understood from the simulation results in 5 s-8 s (see (b) in Figs. [3][4][5] which effect is completely rejected. When applied the constant disturbances to each Euler angle at the fifth second, the disturbance influences have been suppressed without the disturbance estimation.
The simulation studies have been carried out under fixed and random disturbances, considering the full uncertain attitude quadrotor dynamics. In this context, the results for each Euler angle can be seen in Fig. 3, Fig. 4, and Fig. 5. These figures are given for three different scenarios: disturbance observer within the control structure, the control structure without disturbance observer, and the assumption in which the controller estimates the disturbance signal exactly. The results for each scenario are presented in the order of Euler angle positions (see a(1), b(1), c(1) in Figs. [3][4][5], Euler angle velocities (see a(2), b(2), c(2) in Figs. [3][4][5], real disturbance and the estimated disturbance values (see a(3), b(3), c(3) in Figs. [3][4][5], and the control signal for each angle (see a(4), b(4), c(4) in Figs. [3][4][5]. In Fig. 3(a), the uncertain attitude quadrotor dynamics guarantees the asymptotic stability. At the end of the fifth second, it is seen that the effect of the given constant disturbance is successfully suppressed for all three scenarios (see Fig.  3(b)). It is understood from this point that without NDO the system is already asymptotically stable and performs a robust behaviour. On the other hand, when a time-varying arbitrary disturbance at the eighth second is presented to the system, the results do not execute the same performance anymore (see Fig. 3(c)). Here, without NDO, it is easy to see that the peak value of the disturbance behaviour of the closed-loop system is roughly four times bigger than the response value of the system with NDO. Besides, there is almost no difference between the controller which utilizes the estimated disturbance signal and the used assumption in which the controller estimates precisely the disturbance signal in the control loop. This result illustrates the superior performance of the NDO, which can be seen in Fig. 4(a), Fig. 4(b), and Fig. 4(c) and in Fig. 5(a), Fig. 5(b), and Fig.  5(c), respectively. All aforementioned comments for Fig. 3 are also valid for the other two figures. As a result, the proposed control structure solves asymptotically the stability and tracking problem in the quadrotor attitude subsystem local in discrete-time. Moreover, the effects of the timevarying disturbance signal like wind-gust is suppressed as well as it is aimed.  To better express the contribution of the proposed control structure, some comparisons from studies in the literature have been added to this section. In [21], a robust attitude controller based on a nonlinear disturbance observer (NDOB) is presented. In the cited paper, the peak-to-peak value for the attitude disturbance response of the quadrotor system without NDOB is approximately 20 deg. This value is 4 deg when including the NDO. d Namely, the method proposed in [21] has the capability of suppressing the amplitude of a sinusoidal disturbance to be approximately 0.2. In this paper, the proposed attitude controller with NDO has suppressed with the 0.1923 capacity the amplitude of the considered time-varying disturbance signal. On the other hand, a nonlinear feedback controller with a nonlinear extended state observer is proposed for the attitude control of a quadrotor [22]. Besides, a robust sliding mode controller is given in [23] which was added as a comparison paper to [22]. In these papers, the time durations of the rejection of the constant disturbance are approximately attained as 1 s and 2.5 s, respectively. In this paper, the duration is approximately 1.5 s. Note that these striking points are changeable according to case-by-case operation points. Consequently, the proposed control method in this paper successfully achieved its aim considering comparison values.

VII. DISCUSSION
The comprehensive simulation studies have been carried out to evaluate the different type uncertainties (constant system parameter, constant and time-varying disturbances) on attitude control of a quadrotor UAV under robust discrete-time I & O feedback linearizing controller with NDO. It can be clearly seen that the stabilization problem is overcome by an I & O feedback linearizing controller, which transforms the nonlinear attitude dynamics into a second-order linear system, and a pre-controller, which indicates the response of a PI-like digital filter, under constant any uncertainties. Hence, a linear and nonlinear combined robust controller is constructed with an offset-less response, but still taking effect time-varying disturbances, such as wind-gust. The NDO in the discrete-time setting is proposed to reduce the time-varying external disturbance effects. The estimated time-varying disturbance values are directly utilized in the controller input. Applying the proposed controller without any time-varying disturbances, the attitude tracking error asymptotically stabilized, however, this is not the case when there is such a disturbances effect. It can be clearly shown that the capability of attenuating the external time-varying disturbance of the proposed controller with NDO has a rate of roughly four times. The applicability of the established controller structure is successfully validated through simulation studies.

VIII. CONCLUSIONS
A discrete-time robust controller with an NDO is proposed for attitude stabilization of the nonlinear quadrotor UAV. The main conclusions are summarized as follows.
 In the discrete-time setting, the attitude stabilization of a quadrotor system is performed considering system internal and external uncertainties and linearization errors.  The attitude performance is strengthened with an NDO design by employing the stability analysis in discretetime.
 The stability of the attitude closed-loop system is evaluated in the sense of by the Jury criterion.  To test the performances of the devised controller structure, the simulation works are executed in detail. The effectiveness and robustness of the discrete-time proposed control structure have been demonstrated, and the presented results with comparisons have been promising in control of attitude tracking and stabilization for the aircraft systems.