Intelligent Observer-Based Feedback Linearization for Autonomous Quadrotor Control

The presence of disturbances can cause instability to the quadrotor flight and can be dangerous especially when operating near obstacles or other aerial vehicles. In this paper, a hybrid controller called state feedback with intelligent disturbance observer-based control (SF-iDOBC) is developed for trajectory tracking of quadrotor in the presence of time-varying disturbances, e.g. wind. This is achieved by integrating artificial intelligence (AI) technique with disturbance observer-based feedback linearization to achieve a better disturbance rejection capability. Here, the observer estimates the disturbances acting on the quadrotor, while AI technique using the radial basis function neural network (RBFNN) compensates the disturbance estimation error. To improve the error compensation of RBFNN, the k-means clustering method is used to find the optimal centers of the Gaussian activation function. In addition, the weights of the RBFNN are tuned online using the derived adaptation law based on the Lyapunov method, which eliminates the offline training. In the simulation experiment conducted, a total of four input nodes and five hidden neurons are used to compensate for the error. The results obtained demonstrate the effectiveness and merits of the theoretical development.


Introduction
In recent decades, there has been an increase in the applications of autonomous flying robots or popularly known as drones. This includes military and civilian applications such as for inspection, photography, aerial surveillance, delivery, and reconnaissance in unsafe environments. A common type of drone is the quadrotor that basically is a helicopter with four rotors. It has a simple structure and great maneuverability with the ability to take off and land vertically [1]. Nevertheless, the quadrotor is inherently unstable and has a complex dynamic model which brings challenges in the controller design process. In addition, it is also very susceptible to disturbances such as wind gust. Hence, a decent control algorithm is needed for the quadrotor to fly and accomplish the designated missions effectively. A considerable large number of studies have proposed linear control design for quadrotor control, including proportional-integralderivative (PID) [2,3] and linear quadratic regulation (LQR) [4]. To design these controllers, a linearized quadrotor model is required. A common linearization technique to obtain the linear quadrotor model is by using Jacobian linearization about an operating point (i.e. hovering condition). Although several works have shown a satisfactory capability of the controllers that are based on the Jacobian linearized model, the performance is limited to the neighborhood of the equilibrium point. As a result, other operating points may cause the quadrotor to give unsatisfactory performance and robustness. In contrast, nonlinear control based on feedback linearization technique produces a linear model representation of the nonlinear quadrotor model over a large set of operating points [5]. This is achieved by an appropriate coordinate transformation and nonlin-ear feedback law. Various linear control algorithms can then be implemented in the outer-loop to stabilize the transformed linear model. It has been presented in [6][7][8][9] that feedback linearization can be used to simplify the underactuated and nonlinear quadrotor model into decoupled linear systems with the assumption that the exact model is known. However, it is almost impossible in practice to obtain the precise system representation especially when disturbances (e.g. wind) acting on the system exist. Adaptive and robust control are the common techniques used to improve the robustness of feedback linearization, e.g. [10,11]. However, these feedback-based techniques may not react directly and fast enough in the presence of strong disturbances. Furthermore, these approaches cause the closed-loop transient response to be shaped by the adaptive or robust control components instead of the nominal linear model [12]. To overcome these drawbacks, researchers have proposed a control technique so-called active anti-disturbance control (AADC). Unlike the adaptive or robust approaches, AADC directly counteracts the disturbances via feedforward compensation based on the measured or estimated disturbance values by disturbance observer. This has led to the popularity of disturbance observer-based control (DOBC) for disturbance rejection in various systems. In [13], feedback linearization-based controller with a high order sliding mode observer is presented for trajectory tracking of a quadrotor in the presence of sinusoidal disturbances. In [14], a disturbance observer is implemented with feedback linearization for attenuating constant external disturbances. More recently, a simulation study in [15] proposed a linear disturbance observer to improve the robustness of feedback linearization on quadrotor control. The presented disturbance observer can asymptotically estimate constant disturbances but produces a bounded estimation error when estimating time-varying disturbances. Although higher bandwidth can reduce the estimation error, it also makes the system susceptible to noise and has poor transient performance [16]. In recent years, there has been an increasing interest in the artificial neural network (ANN) for control applications due to the proven approximation capabilities, e.g. [17][18][19]. Radial basis function neural network (RBFNN) is a type of ANN that has simple network structure that avoids unnecessary and lengthy calculation of typical multilayer feed-forward network (MLP). In [20], adaptive RBFNN is implemented to estimate mismatched uncertainties. In [21,22], RBFNN is used to approximate the unknown perturbations to improve backstepping control of a quadrotor. In short, these works have demonstrated the good approximation ability of RBFNN. However, a systematic selection of Gaussian centers which has a great influence on RBFNN approximation ability is not described in those studies. The main objective of this paper is to control the quadrotor in the presence of constant and time-varying disturbances. Motivated by the DOBC feedback linearization in [15], this paper proposes an improved disturbance rejection using intelligent disturbance observer based control (iDOBC). Here, the estimation error produced when estimating time-varying disturbances is compensated via RBFNN. The online weight adaptation of RBFNN is obtained using Lyapunov method. In addition, the systematic steps of finding the optimal centers for RBFNN using k-means clustering algorithm is also described. The proposed iDOBC is integrated with state feedback (SF) control forming so-called SF-iDOBC for trajectory tracking control of quadrotor. To the best of our knowledge, this study is the first to improve the disturbance rejection of DOBC using RBFNN compensator. The rest of this paper is organized as follows. In section 2, feedback linearization technique is employed to linearize the nonlinear quadrotor dynamics. Section 3 described the proposed control system design. Firstly, a nominal state feedback controller for the quadrotor trajectory tracking is presented. Then, time-domain disturbance observer for estimating the disturbances affecting the quadrotor is described. RBFNN is then presented to compensate the estimation error. Here, selection of RBFNN centers using kmeans clustering technique is described. In section 4, numerical simulation results and discussion are presented with comparison with the closely related work as a benchmark. Finally, the conclusion of this paper is given in the last section. For the quadrotor configuration shown in Fig. 1, symbols and denote the absolute position with respect to the earth frame and orientation (roll, pitch, yaw) of the quadrotor, respectively. The 6-DOF nonlinear quadrotor dynamics are given as follows [6]:

Feedback Linearization of Nonlinear Quadrotor Model
Here, , and are the control inputs of the system, the mass of quadrotor, and the gravitational acceleration, respectively. Symbols and ( denote, respectively the moment of inertia along each axis and the disturbing forces on the quadrotor due to the wind, and (7) From Eqs. (1) -(6), it can be seen that the quadrotor is an underactuated and nonlinear system. Feedback linearization is one of the common approaches used to simplify the quadrotor dynamics. It involves the transformation of the nonlinear dynamics into the equivalent linear system via nonlinear state feedback and coordinate transformation [5]. Fig. 2 illustrates the linearization of quadrotor dynamics using feedback linearization approach. Several studies have discussed the feedback linearization of quadrotor model (e.g. [7] [15]). Therefore, the linearization technique is discussed briefly in this paper. For feedback linearizing the quadrotor dynamics, the absolute position and the yaw angle ( are chosen as the outputs. Then, the real control signal is replaced by . In this case, has been delayed by the double integrator, while other control signals remain unchanged [7]. (8) By using the control input , dynamics in Eqs. (1) -(6) can be written as (9) where , , and For the nonlinear system (9), the relative degree is given by and and dimension . Thus, the input-output decoupling problem is solvable for the quadrotor dynamics using the following control input [7]: (10) with is the vector of control inputs for the linearized model, and where and .
denotes the -th Lie derivative of along . In the absence of external disturbances (i.e.
), Eq. (10) transforms Eqs. (1) -(6) into four decoupled dynamics given as (13) On the other hand, the presence of disturbances (i.e. ) cause the linearization to be inexact which produce the nominal part and the unknown disturbance part, given as (14) Eq. (14) can be written in the state space equation given as (15) where and , while It is shown in this section that the quadrotor dynamics can be transformed using feedback linearization approach into linear dynamics with unknown disturbance part. A control algorithm that makes the quadrotor track the desired reference trajectory while rejecting external disturbance shall be presented in the next section.

Control System Design
This section presents the nominal control algorithm using statefeedback system that allows the quadrotor to track a given trajectory. Then, disturbance observer is derived to estimate the disturb-ances affecting the quadrotor flight. Finally, RBFNN is proposed in this paper to compensate for the estimation error produced by the disturbance observer. K-means clustering method is presented to find the optimal centers of the RBFNN.

State Feedback Control for Nominal Plant
State-feedback controller is implemented to enable the quadrotor's trajectory tracking given as (16) Here, is the feedback gain matrix, is the feedforward gain, and is the desired output trajectory. The nominal controller in Eq. (16) is derived by considering ideal plant (i.e. . By substituting Eq. (16) as the input of Eq. (15), the closed-loop dynamics is given as (17) Therefore, it can be seen that the closed-loop dynamics using nominal control in Eq. (16) is influenced by the external disturbances . To remove the disturbances, this paper proposed an improved disturbance observer as presented in the next subsections.

Disturbance observer
The following time-domain disturbance observer from [15] is implemented to estimate the disturbances, in Eq. (15): where is the internal variable of the observer, is the estimated disturbance, and is the observer gain matrix to be designed. Define the disturbance estimation error as follows: By differentiating w.r.t. time and substituting with (15) and (18)  -(20) yields (21) The observer gain matrix, is designed as (22) with , and is the pseudo-inverse of the matrix . Then, becomes (23) Hence, the disturbance estimation error in (23) is BIBO stable if the observer gain . The solution of the error dynamics is given as (24) where symbol is the exponential function and is the time variable. For constant disturbances (i.e. ), the estimation error converges to zero asymptotically. Meanwhile for bounded disturbance derivative and bounded initial estimation error , the disturbance estimation error is also bounded for . In this paper, RBFNN compensator is proposed for compensating the bounded estimation error .

RBFNN Compensator
Because of the inability of the nominal controller in Eq. (16) to attenuate disturbances, this paper proposed a new control algorithm for disturbance compensation using disturbance observer and RBFNN described as follows: (25) Here, is the nominal state feedback controller in Eq. (16), is the estimated disturbance in Eq. (19), and is the compensation of the bounded disturbance estimation error using RBFNN which is derived in this section. By substituting the proposed controller in Eq. (25) as the input of the linearized quadrotor model in Eq. (15), the closed-loop dynamics is given as (26) A reference model representing the ideal closed-loop dynamics is introduced as follows: (27) where is the state of the reference model. An error between the closed-loop plant and the reference model is formed when both dynamics are fed with the same reference signal, . This error is defined as Since is chosen such that matrix is Hurwitz, there exists a real symmetric positive definite matrix satisfying (30) where is a positive definite matrix chosen by the designer. In this paper, RBFNN is implemented to compensate for the unknown bounded disturbance estimation error, . The structure of a typical RBFNN is shown in Fig. 3 with three layers given as follows [21]: 1. Input layer: In this layer, which is the error between the closed-loop plant and the reference model, is selected as the input.

Hidden neuron:
The hidden layer consists of number of neurons with the nonlinear Gaussian activation function given as where and are the width and centers of Gaussian functions, respectively. 3. Output layer: Output of RBFNN is the approximated disturbance estimation error, calculated using the weighted sum method given as follows: with is the weight vector. As other AI techniques, RBFNN requires learning algorithm to achieve the designated tasks which is to find the optimal selection of the center , and weights , . The k-means clustering algorithm was used in this paper to find the optimal center . Meanwhile, Lyapunov based approach was proposed for the online weight update. These algorithms are presented in the next subsections. Based on the universal approximation ability of RBFNN [23], there exists an optimal RBFNN to learn the unknown disturbance estimation error, over a compact region such that (33) where is the RBFNN approximation error. Here, the optimal weight vector is defined as (34) Assumption 1: RBFNN approximation error is zero. This assumption will hold for comparatively less complex functions with a sufficiently large number of adjustable weight [24].
By substituting (32) and (33) into (29) yields (35) where . The adaptation law for updating the RBFNN estimation weight vector is given as is an adaptation gain to be designed. Block diagram of the proposed control scheme is shown in Fig. 4.

K-Means Clustering for Centers Selection
To use RBFNN as a compensator, the required parameters are the weight vector, and also the centers and width of the Gaussian function in Eq. (31). In this paper, the weight vector is updated online via adaptation law in Eq. (36). The Gaussian activation function in Eq. (31) depends on the center vector and the width value . These two parameters are important in determining the effectiveness of the neural network. Generally, the Gaussian function is more sensitive when the center is close to the RBFNN input . Meanwhile, the width of the Gaussian function represents the covering scope for the input [25]. In this paper, k-means clustering algorithm is used to find the optimal centers and width of the Gaussian which more accurately reflect the distribution of the dataset (input ). Proposed by MacQueen [26], k-means clustering algorithm is a technique commonly used to automatically partition a dataset into groups. The following steps describe the algorithm to find the RBFNN centers and widths offline: Step 1) Error between the closed-loop plant and the reference model, is selected as the input data (referred to as the dataset) for clustering. The dataset is obtained by simulating the plant in Fig. 4 using the nominal controller for a period of time.
Step 2) Initialize cluster centers from the randomly selected dataset obtained in step 1.
Step 3) Calculate the Euclidean distances between each of the datasets with the centers. Assign each of the datasets to the nearest cluster center.
Step 4) Once all of the datasets are assigned, calculate the mean (average) position of the datasets that are assigned to the cluster. These are the new cluster centers.
Step 5) Repeat step 3 and step 4. Stop when none of the cluster center assignment in step 3 change.
Step 6) The width of each center is obtained by averaging the distance between all dataset in the cluster and the cluster center.

Simulation Results and Discussion
In this section, the performance analysis of the proposed SF-iDOBC is presented. Parameters from [6] are adopted for the quadrotor model where , and The gains for the state feedback control law and disturbance observer are , , , and . To simulate the effect of disturbances on the quadrotor, Dryden wind gust model [27] is used in the simulation environment. The generated disturbance forces are shown in Fig. 5.
To compensate for the disturbance estimation error and , RBFNN with four inputs, five hidden neurons, and one output (4-5-1) are used respectively. Meanwhile, RBFNN with two inputs, five hidden neurons, and one output (2-5-1) is used for compensating the disturbance estimation error . Adaptation gain of the RBFNN is , and matrix is obtained using (30) by setting and . The centers of the Gaussian functions obtained using the k-means clustering method are given as follows: and the corresponding widths are given as Two simulation experiments have been carried out to verify the effectiveness of the proposed controller. The performance of the controller is compared with the controller proposed in [15] using state feedback with disturbance observer (SF-DOBC). Quantitative performances are measured using integral absolute error (IAE) given as (42) where is the period of the simulation, and is the error between the desired and actual value.

Simulation Experiment 1: Quadrotor Hovering
Hover is one of the basic maneuvers for a quadrotor. In this simulation experiment, the quadrotor is required to maintain a fixed position in the presence of time-varying wind disturbances generated by using Dryden wind gust model as shown in Fig. 5. To achieve this objective, the proposed controller in Eq. (25) is implemented on the quadrotor model. As a benchmark, performance of the quadrotor using the controller is compared with the results obtained by using SF-DOBC. The desired hovering position is set at and . Results of the simulation experiments are shown in Fig. 6 -Fig. 7. In Fig. 6, the trajectories of the quadrotor using SF-DOBC and SF-iDOBC are shown. Clearly, the quadrotor can maintain the desired position using SF-DOBC and SF-iDOBC. However, quadrotor with SF-DOBC shows a larger deviation from the hovering position as it cannot reject the wind disturbances quite well. On the other hand, quadrotor with SF-iDOBC shows only a slight deviation from the desired position. This indicates the capability of the proposed controller to reject the disturbances as verified by quantitative analysis using IAE tabulated in Table 1. Notice that the performance of both controllers for heading control was identical as shown in Fig. 7. This is because of no aerodynamic moment disturbance is considered.

Simulation Experiment 2: Quadrotor Trajectory Tracking
To further verify the proposed controller capability, a timevarying trajectory tracking of the quadrotor is presented. Here, the practical ability of the quadrotor to track the desired time-varying trajectory while rejecting wind disturbances is emphasized. The wind disturbances are generated using Dryden wind model in Fig.   5. From the initial position at , the quadrotor needs to track a trajectory given as follows: Fig. 8 -Fig. 9 show the simulation results of the quadrotor trajectory tracking in the presence of wind disturbances using SF-DOBC and SF-iDOBC, respectively. In Fig. 8, the quadrotor trajectory using SF-DOBC has some deviation from the desired trajectory caused by the wind disturbances. In contrast, quadrotor trajectory using SF-iDOBC is smoother and has less deviation from the desired trajectory as shown in Fig. 9. This result further verifies the capability of the proposed controller over the closely related controller (SF-DOBC) as supported by quantitative performance analysis using IAE index tabulated in Table 2.

Conclusion
The aim of this paper is to control the quadrotor in the presence of time-varying disturbances, e.g. wind. An improved iDOBC is developed, where the RBFNN is proposed to compensate the bounded estimation error produced by the standard disturbance observer. The optimal centers for RBFNN's Gaussian function are found offline using the k-means clustering algorithm. Meanwhile, the weight vector of the RBFNN is tuned online using the derived adaptation law. It has been proven via a Lyapunov function that the developed control strategy guarantees the stability of the system. Finally, the effectiveness of the proposed SF-iDOBC is verified by some simulation results. It is found that the quadrotor with SF-iDOBC performs better in the presence of wind disturbances as compared with the benchmark. The possibility of a real-time implementation of the designed controller will be further investigated in the future.