Discontinuous High-Gain Observer in a Robust Control UAV Quadrotor: Real-Time Application for Watershed Monitoring

A control algorithm that is robust with respect to wind disturbances for a quadrotor UAV attitude dynamics is presented. The proposed approach consists of a high-gain observer based on a discontinuous technique. Such an algorithm is embedded on board the quadrotor. The high-gain observer estimates external disturbances such as wind and parameter uncertainties, and a control algorithm is designed to compensate these undesired effects.The observer design is based on Lyapunov stability theory; simulation results and experiments validate the nonlinear observer performance and robustness of the approach under windy conditions. Also, a photogrammetry survey was carried out to develop Digital Elevation Models in order to experimentally demonstrate the effectiveness of our approach.The accuracy of such models was compared and the performance improvement is demonstrated.


Introduction
The research area of Unmanned Aerial Vehicles (UAVs or drones) has observed a rapid growth in the last decade. This is due to the ability of UAVs to effectively perform a wide range of applications at low cost and safely manage human resources. Nowadays, drones are being used in several outdoors missions including monitoring, agricultural services, mapping and photographing, battle damage assessment, border interdiction prevention, among others [1,2]. In order to accomplish the aforementioned applications, it is required to guarantee a stable flight of the UAV by means of control algorithms.

State of the Art of Robust Controllers for UAVs.
Several works propose control algorithms for UAVs to counteract wind effects within the limits of the UAV flight envelope. In [3], the authors employ an extended state observer to estimate aerodynamic disturbances for an UAV coaxial-rotor; such an approach was only tested in simulations. In [4], the authors propose a Terminal Sliding Mode Control for position stabilization of a quadrotor. Such a controller does not estimate any disturbance; however the robustness of the controller relies on the properties of sliding mode closedloop system. Reference [5] presents a robust adaptive altitude control on (3); the authors present some experimental results of a test bench where a quadrotor is attached to a bar limiting their movements. In [6], a controller with a disturbance observer is designed to stabilize the rotational error dynamics of a fixed-wing morphing UAV. Reference [7] solved the problem of guidance of a fixed-wing UAV under wind disturbances using a kinematic model based on Serret-Frenet framework. The authors assume that wind disturbances are quasiconstant; simulation results demonstrate the effectiveness of their results. On the other hand, control schemes are proposed with an accurate system model where the uncertainties of the system are not considered. For instance, in [8] a nonlinear disturbance observer is designed to solve the problem of disturbance estimation for dynamical systems based on the relationship between disturbance and 2 Mathematical Problems in Engineering output. Several works have demonstrated that the use of robust high-gain observers interconnected with controllers ameliorates the system robustness [9]. As one can see in some of the aforementioned works, under certain conditions and assumptions, observers are capable of estimating certain system disturbances such as wind gusts effects. Such an approach is investigated in this paper.

State of the Art of Observers and Control.
From control theory perspective, some authors have shown that the use of state observers interconnected with controllers provides robustness to the closed-loop system [9,10]. In this regard, sliding mode and high-gain observers have been an effective approach in handling disturbances and modeling uncertainties in different types of systems. More recent research of nonlinear systems based on dynamical transformations to obtain an unknown parameter canonical representation are presented in [11,12]. Adaptive observers for linear systems with a parameter adaptation algorithm has been presented in [13,14]. Both state and disturbances are estimated for MIMO linear systems assuming that detectability and persistently exciting (PE) hold in [15][16][17][18]. As an alternative to the adaptive approach, various robust techniques have been considered. The most relevant are the sliding mode technique investigated in [15,19,20]. Regarding the use of some of the abovementioned theoretic schemes in UAVs, we can cite [21], where a PID control technique to maintain a UAV in hover under intense turbulent environments is presented. Also, [22] proposes a design and implementation of a simple but effective feed-forward controller for wind gust compensation. Such an approach provides a stable and accurate flight under windy conditions. In [23,24] some robust altitude controllers have been proposed for miniature quadrotors; however such studies are carried out in controlled environments.

State of the Art of Environmental Studies Using Drones.
One of the drone applications is in the area of photography applied to environmental studies of rivers and watersheds, which allow the estimation of the main morphometric features of these environmental systems such as volume, surface, length, depth, among others [25,26]. Environmental factors such as wind gusts affect the quality of data acquisition (photographs) during the construction of high resolution Digital Elevation Models (DEM). These models are used to study the terrain elevations and to model the hydrodynamics and water quality of waterbodies [27]. From this point of view, it is important to obtain reliable data to ensure the accuracy of such models. During a photogrammetry survey, DEMs accuracy can be affected by drone angle movements produced by wind, causing a distortion in the photographs. By the aforementioned discussion it is required to compensate wind gust by an intelligent control algorithm. This work deals with such a problem.

Contribution.
We present a control and estimation algorithm to estimate and compensate uncertainties and external disturbances in a quadrotor attitude control. This algorithm is based on a sliding mode high-gain observer. Once we obtain Figure 1: Quadrotor: body and inertial coordinates used for modeling.
a disturbance estimate, it is used to compensate the effects caused by the original disturbance. The main goal of the algorithm consists of maintaining the quadrotor aircraft in hovering flight through a disturbance compensation generated by wind gusts. The performance of the overall system is evaluated at simulation level and with real-time experiments.

Paper
Organization. The remainder of this paper is organized as follows: Section 2 describes the quadrotor dynamical model; also in such section the problem formulation is presented. Section 3 shows the controller design process and describes how the nonlinear observer is developed; also the overall closed-loop system stability is shown. Section 4 presents simulations results obtained with the presented approach, and also the effectiveness of this technique is evaluated through real-time experiments with a quadrotor UAV. Finally, Section 5 gives a brief conclusion of the nonlinear disturbance observer algorithm.

Modeling and Problem Statement
Consider the quadrotor system depicted at Figure 1. The quadrotor is modeled as a rigid body where its full dynamics is represented in terms of rotational and translational dynamics as follows [28]: where the position and attitude dynamics of the quadrotor are given by subsystem Σ 1 and Σ 2 , respectively; = ( , , ) ⊤ anḋ = (V , V , V ) ⊤ are the position and velocity of the aircraft relative to the inertial frame I = ( , , ). ∈ (3) is the rotational matrix representing the quadrotor attitude in the body coordinate frame B = ( , , ) with respect to I; the matrix is a function of the Euler angles given by the vector = ( , , ) ⊤ ; ∈ R 3 and ∈ R 3 are the force and torque vectors applied at the center of mass of the MAV; ∈ R 3 is the inertia matrix in the body frame B; is the mass of the body; and is the gravitational force, where = (0, 0, 1) ⊤ is a unit vector; ( ,) is the Coriolis matrix which contains the gyroscopic and centrifugal terms associated with the Euler angles dependence; J acts as the inertia matrix for the aircraft rotational kinetic energy expressed in terms of the Euler angles and is given by [29] where is defined as Let us consider system Σ 2 . Based on the results of [28], we propose the following perturbed attitude model: where , is the vector of unknown disturbances caused by wind gusts and unmodeled dynamics including Coriolis terms and ( ) is the control input. Equation (5) can be written in a scalar form aṡ1 where 1 = and 2 =̇1.
This model can be seen as a sum of a linear and a nonlinear part (given by disturbance , ( )). This characteristic allows us to propose a control with active disturbance rejection by means of sliding mode observers. This will be discussed in the next section. Now let = ( 1, , 2, ) ∈ R 2 , = 1, . Also denote , ( ) = , then system (8) can be expressed in a strict triangular form (i.e., the canonical observability form) as follows : Then, the problem is to design a controller to stabilize system (9) based on the following assumptions.
Assumption 1. The inverse of J exists.

Assumption 2. Disturbance is bounded.
Assumption 3. Angular position and velocity (̇, ) are supposed to be known, since those variables can be measured by available quadrotor sensors.

Control Design Based on a Robust Discontinuous Observer
In this section, a nonlinear control for the quadrotor attitude, particularly of system (9), is designed. This control scheme makes use of the residual sliding mode high-gain observer. A scheme of the observed-based control is depicted in Figure 2.

Control
Let be a reference vector which can be the zero vector in the case of hover and define the following tracking control error: Then the following robust control law is proposed:

Theorem 10. Let (27) be a robust control for (25). The tracking error will converge to zero if is a Hurwitz matrix.
Proof. By substituting the control law (27) on derivative of (26)̇= sincê= + ∀‖ ‖ ≫ ‖ ‖ when ℎ ≫ 4 max (Γ) where Γ is an diagonal positive matrix. is Hurwitz by hypotheses and design, then ( ) = , where + = − holds such thaṫ≤ The matrix is chosen such thaṫ(⋅) < 0 for max ( ) ≫ sup( ( )) and system (28) is ultimately bounded in a ball given by A complete algorithm was developed based on the disturbance observer and the control law designed above. The closed-loop system together with disturbance observer is given bẏ=̂+

Experiments
In this section simulation results of the theoretical development are given. Also, the control law proposed in (31) was applied in a photogrammetry survey. Such results are reported in this section.

Numerical
Results. The quadrotor mathematical model is simulated taken into account the following parameters The function is generated by a Dryden wind model [33]) with high gain ℎ = 30 as follows: where and are selected randomly and V 0 is a wind static vector. Such a signal and its estimate are shown at Figure 3.

Real Experiments.
In order to evaluate the performance of the control technique provided by the algorithm shown in (31), a photogrammetric survey was carried out in the Tamazula River basin, a river of great importance in the northeastern region of Mexico. Given that the central region of Sinaloa in Mexico is characterized by a very strong agricultural activity, an effective water resource management is vital to achieve good agricultural yields. In this region, the use of satellite images to calculate and estimate the water volumes, total mass flows, and waterbodies quality prediction is common. Photogrammetry survey was carried out at an altitude of 80 m and 32 C, with an average humidity of 35% and wind velocity average of 22 km/hr. During the data collection, different flight campaigns were carried out in the same area and route with the objective of evaluating the effect of the controller on the quality of Digital Elevation Models (DEM) of the basin. A comparison between the DEMs obtained with and without algorithm (31) was carried out, considering scenarios with real wind gusts average of 20 km/hr. A small quadrotor aircraft was used with a Futaba 2.4GHz FASST radio system for transmitting the control signals. A picture of the quadrotor is depicted in Figure 4. The quadrotor position ( , , ) and the attitude ( , , ) were measured in real time. 224 Sample points were used for the construction of a Digital Elevation Model of a river basin as part of a strategy for an efficiency water resource management. A Pixhawk autopilot with a GPS module sensor was programmed with the control and estimation algorithms. The benefits of the Pixhawk system include integrated multithreading and a Unix/Linux-like programming environment for real-time applications.
The disturbance generated due to the wind gust was estimated in the roll and pitch angles, during a real-time flight and taking the location of the photographs as the reference points (see Figures 5 and 6). Note that the disturbance estimation is achieved in real-time flight.
In Figure 7, the position error in the -axis and -axis is shown in real wind conditions. It can be observed that the maximum error without disturbance compensation was approximately 5 m. Then, when the observer is activated, the position error is around ±1 , which is reasonable due to the   error of the GPS sensor which is around 1 m. It can be seen at Figures 8 and 9 that, by reducing the unknown effect of wind and other distortions in attitude dynamics, it is also considering indirectly disturbances in position. This is due to the fact that the quadrotor is an underactuated system. Figure 8 shows the position in the -plane of the quadrotor without compensation. This signal is obtained from a GPS sensor. The reference is at the point (0, 0) for a hover-flight mode. Note that the quadrotor is moving around the reference point, due to wind gusts of 20 m/s approximately. The quadrotor is shifted from the reference. Figure 9 shows the position with disturbance compensation. The attitude control law keeps the quadrotor around the reference. If Figures 10 and 11 are compared, the error is about 7 m in the first case and the error is about 1.3 m in the second case.   Once the data was collected, the process of building the DEM was carried out using the free-Software Open-Dronemap and Quantum GIS. Control points were obtained by using a fixed GNSS reference with a LEICAGR10 receiver and LEIAR10 NONE antenna on the coordinates Latitude 24 47' 42.30742" N and Longitude 107 24' 45.34764" W. These control points were used to measure the accuracy of the DEM. Photographic distortions can be observed due to the effect of the wind gusts. This situation generated an inaccuracy in the elevation of the river area and the DEM obtained was distorted. The robust control with disturbance rejection allowed better estimation of basin elevations. This algorithm improved the DEM in an average of 53% with respect to control points. The application of this control law supports the development of DEMs for water resources management and may be applied to other photogrammetric surveys. The proposed tool would also increase the quality of photographs and decrease flight surveys in further Digital Elevation Models.

Conclusions
In this paper a new algorithm for disturbance rejection and control of a quadrotor system is presented. This algorithm is easy tunable and programmable on a Pixhawk autopilot. The control is composed by a residual observer based on sliding modes plus a control that uses the observer solution to compensate for unknown disturbances. This approach is mathematical proved through Lyapunov stability analysis and in numerical and real-time experiments. In such experiments the use of the proposed controller improved the accuracy of the DEM of a river basin located in Sinaloa Mexico, with respect to the classic PID controller. In particular, this work obtained a higher resolution DEM, which it is used for water resources management.
As future work it remains to investigate (i) robust controllers for position and attitude disturbances in which every disturbance in uncoupled one of each other; (ii) application of this approach to fixed-wing aircraft.

Data Availability
The data related to Pixhawk support for Embedded Coder and Matlab and Simulink used to support the findings of this study were supplied by Instituto Tecnologico de Culiacán under license and so cannot be made freely available. Request for access to these data should be made to PhD. Rodríguez Mata by arodriguez@itculiacan.edu.mxst.

Conflicts of Interest
The authors declare no conflicts of interest.  Figure 10: Digital elevation model of Tamazula River basin using a common PID controller.