Comparative Results on 3D Navigation of Quadrotor using two Nonlinear Model based Controllers

Recently the quadrotors are being increasingly employed in both military and civilian areas where a broad range of nonlinear flight control techniques are successfully implemented. With this advancement, it has become necessary to investigate the efficiency of these flight controllers by studying theirs features and compare their performance. In this paper, the control of Unmanned Aerial Vehicle (UAV) quadrotor, using two different approaches, is presented. The first controller is Nonlinear PID (NLPID) whilst the second one is Nonlinear Internal Model Control (NLIMC) that are used for the stabilization as well as for the 3D trajectory tracking. The numerical simulations have shown satisfactory results using nominal system model or disturbed model for both of them. The obtained results are analyzed with respect to several criteria for the sake of comparison.


Introduction
Due to its structural simplicity and understandable flight principle, the quadrotor UAV is considered as a good case study to analyze and to design flight control tools. This has attracted the interest of many researchers in aeronautics and robotics and many studies have led to the development of sophisticate nonlinear control laws [1][2]. Thus, several control techniques have been proposed in the literature as for instance linear ones based on a simplified model (LQR and PID) [3][4]. Unfortunately, they are used for limited operation point (hovering, attitude stabilization…). Also, strong disturbances are poorly rejected by this type of controllers. Some nonlinear controls (sliding mode, feedback linearization, etc.) have been employed where the ability of robustness against the model uncertainties is improved (see [5]). However, this type of controllers presents a number of drawbacks and may be inappropriate in some cases of operation (dynamic not sustained by the actuators, high energy at the start-up, complex implementation…).
The control design has to take in consideration some issues of practical implementation as the computational complexity, power limitation, robustness to parameter uncertainties, sensor noise, external disturbances… In this paper, an improvement has been brought in order to simplify the existing controllers, and thus overcome some issues poorly tackled by the classic linear or nonlinear techniques, thanks to Nonlinear PID (NLPID) and Nonlinear Internal Model Control (NLIMC).
Usually the kind of control called "NLPID control" stands for the regulator for which the coefficients are not assumed to be constant. Unlike this latter, our control law is defined in a novel way. It consists of a nonlinear controller, which is derived from a method based upon sliding mode theory and combined with a PID structure. Thus, this structure is achieved using sliding surface instead of the tracking error between the reference and the measured signal.
Among, the large variety of control techniques available in the literatures [6][7][8], the well-known reference model based technique called IMC, is popular in industrial process control applications due to its good tradeoff between the control performance and disturbance rejection capability [9]. The controller employs the flatness property instead the classic dynamic inversion technique to overcome some of the feedback linearization limitations.
The aim of this research work is to stabilize the vehicle while ensuring the tracking of prescribed 3D trajectories with good performance and to ensure a given level of robustness with respect to disturbances. Therefore, two approaches are compared in order to check out the features of each of them with respect to the environment disturbance (noise, wind...) and to the type of prescribed reference trajectories (constant, time varying) using several criteria and scenarios.
This paper is organized as follows: Section 2 introduces the design of the proposed nonlinear approaches. Section 3 presents the application of these techniques to the quadrotor and the control architecture used in this stage. In Section 4, we investigate the features and the characteristics of each technique with respect to some scenarios that confirm the effectiveness of the proposed approach where a comparison study is presented. The final section gives some conclusions.

NLPID controller design
This section deals with the design of the NLPID controller, which may be summarized in two steps: First one, we apply the classic sliding mode approach and then the obtained controller is, in a second step, combined with the PID structure. Consider a class of nonlinear SISO system for given by: (1) where is an -dimentional state vector, is a scalar input, is a scalar output, and are -dimentional vector functions sufficiently smooth on a domain and the output scalar function.

Assumption 1:
There exists a diffeomorphism such that contains the origin and is a change of variables that transforms the nonlinear system into an equivalent system: (2) . Where denote continuous nonlinear functions and is nonsingular for all . Now, let us consider a general sliding surface form where represents the tracking error between a reference trajectory and the output of a system and a positive constant. By expansion, equation (3) is written as (4) where are positive tuning parameters provided that they are chosen in order to render the equilibrium, , asymptotically stable. The first time derivative of is (5) The objective of control tracking is to design a control law such that the output can track the desired trajectory . In this regard, where Assumption 1 holds, using the last component of system (2), equation (5) becomes (6) Given a positive definite Lyapunov function candidate (7) So, the first time derivative leads to (8)  Note that the reachability condition of sliding mode control ensures the asymptotic stability ( must be negative definite). Thus (9) Assume that (10) with being a strictly positive constant and is a function defined by (11) In fact, may take different forms as for instance: saturation function, tangent function, etc. Thus, the discontinuous function represents the ideal sliding mode regime.
From (6) and (10), it immediately follows that (12) The discontinuous term gives the controller a good level of robustness. However, the fast variation of the sliding surface gives rise of vibration in the system during the flight phase consequently affecting the control accuracy. So, in order to improve the performance of the controller and limiting the effect of the chattering phenomena, involved through the term , we combine a PID structure and the controller determined above, namely (13) and denote the proportional gain, the derivative and integral time constants respectively.

NLIMC controller design
The IMC controllers are used to be devoted to the linearized models and then implemented on the real plants [10]. The difference between the model and the real process gives rise to the poor performance of the closed-loop system. Therefore, the linear IMC scheme has been extended to non-linear versions by different approaches [11]. Moreover, due to the complexity of nonlinear systems, the development of a general IMC nonlinear strategy has serious difficulties. To accomplish IMC control, it requires the inverse of the plant. this inversion is more involved and analytical solutions are too much complex to obtain. Motivated by these gaps and requirements (inversion, open loop structure, linear model, computational complexity…), we develop in the following, a novel and simple analytic formulation for the design of NLIMC synthesized for nonlinear Single-Input, Single-Output (SISO) systems that involves a closed loop control structure.
The direct mission is to investigate the controller that implies the dynamic model inverse and occurs in closed loop control architecture. Thus, our procedure split into two steps in order to accomplish the controller design. The first step is to formulate a direct relationship between the output and the tracking error. In other words (14) where are scalar smooth functions. For this purpose, we consider a surface defined in the statespace as (15) where is a positive time tuning parameter providing a compromise between performance and robustness. with initial term verifying with and For more detail, the reader may refer to [12].
The inversion of the nonlinear model requires the relationship between the input and the output . A broad range of techniques already published investigating this classic problem. So that in this second step, we exploit the flatness property. The flat output and its time derivatives describe the system dynamics, since their knowledge is sufficient to compute all the variables and their time derivatives. Then, the state-space model may be summarized by the following differential equation.
(18) where and are two nonlinear multi-variable functions and denotes the relative degree of the system ( ). Our objective is to design controller that drives the system output to track a desired trajectory. Let us write again equation (18) in terms of the tracking error by using first relationship (17).

(19)
The controller then is obtained by (20) By integration, the control effort is computed.

Discussion and properties
In this section, we discuss the main features, the advantages and the limitations of the proposed controllers. Controller (13) exhibits several benefits, and can be split up into three parts: The first part is designed in order to compensate the system dynamics (2) (feedback linearization). The second part consists of a linear combination of the tracking error dynamics, , and the derivative of the reference trajectory that allows the linearization of the closed loop system after the act of the first part. The remaining part includes the PID structure, which represents the additional control needed for control accuracy and disturbance rejection. From equation (13), we observe the absence of discontinuities associated to jumps in the control action, which clearly eliminates the chattering problem. In addition, plant-model mismatch and the steady state errors are canceled by adding the integral action that penalizes the deviations between the output and its set point. However, the derivative term of the proposed controller induces a higher order derivative one with respect to that needed for classical "feedback linearization". Unfortunately, this is a drawback because of the additional noise and derivative estimation inaccuracy.
The classic dynamic inversion (feedback linearization) technique involves the cancelation of the nonlinearities. Moreover, it is applied for a specific class of systems especially the canonical one (2). However, if the model is inaccurate or contains some varying variables that are highly influenced by the environment changes (temperature, pressure …), this cancelation may be not exact and engenders another equilibrium points of the closed loop system or causes the instability. This drawback is tackled by the NLIMC controller where the plant-model mismatch is canceled by using the tracking error in the inversion process. Therefore, the controller presents a good level of robustness, especially, with respect to the model uncertainties. Moreover, using the flatness property allowing the system behaves in the original coordinates where the characteristic can be specified naturally. NLIMC approach uses only the considered outputs and their dynamics , while the dynamic inversion in the NLPID involves beside the outputs all the states of the system. In this last case and for real implementation purpose, the control loop requires a broad range of sensors or estimators that affect the accuracy of the control because of the noise and the uncertainties especially that the feedback linearization is well-known by its lack of robustness. The NLPID uses the inversion of the system dynamics and this leads to numerical problem nearby the singularities. The NLIMC uses tunable gains that allows to overcome such issue. Unfortunately, for high order systems, NLIMC suffers form the problem of numerical noise and derivative estimation inaccuracy. In addition, as the NLIMC is designed for piecewise reference trajectories, the steady state errors are poorly canceled for time varying reference trajectories. These properties are shown down through a series of numerical simulations.

Dynamics background and control architecture
The quadrotor has four rotors with twin-bladed propellers. The system operates in two coordinate frames: the inertial fixed frame and the body frame. Let describes the orientation of the aerial vehicle (Roll, Pitch, Yaw) and denotes its absolute position. We use a simplified model that is derived by Bouzid et al. in [12] and describes the quadrotor in-flight behavior. It may decompose into translational subsystem and rotational subsystem as and are abbreviations for and respectively. denotes the mass, the gravity acceleration, is the diagonal inertia matrix, is the total thrust of four rotors and is the control torque. The system parameters are depicted in Table 1. ) ) These proposed techniques are herein applied to the quadrotor by taking care of having an adequate control structure (see Figure 1). The system has two dynamics, such that the first (slow outer loop) relates to the position control and generates the reference angles to the second one (fast inner loop) via attitude planner (24). This inner loop is related to the orientation control. and are controlled through two virtual drives ( to allow the system to reach the prescribed references and respectively. The roll, pitch and yaw angles are controlled by respectively, whereas the altitude is controlled by This control structure shown in Figure 1 is designed to ensure the tracking of any reference trajectory described by the absolute position with a given yaw angle. In fact, we will consider six inputs and six outputs . Notice that this control architecture allows applying the developed approaches that concern the single input single

Autopilot design
The tracking errors are defined as: , , and . Translation dynamics (21) can be divided into three other sub-systems along the three axis (X, Y, Z). Each sub-system has one input ( and one output ( ) respectively. We first start with for the altitude motion. Once this command is calculated we then proceed in the same way for and by considering as time varying parameter, with Then, the required reference angles of the roll and pitch rotations are given by (24) where the function is defined as Similarly, system (22) can be divided into three sub-systems for the roll, pitch and yaw rotations. Each one of them has one input ( and one output ( ) respectively. For the NLIPID, we make the choice of the surfaces as

Comparison study
For the sake of significant comparison, this study is done considering the same conditions and following the same protocol by investigating the performance of the controllers for several scenarios and trajectories. Thus, the parameters of NLIPID and NLIMC are obtained through the optimization of the Integral Square Error (ISE) criterion. (26) where is the output vector, its reference trajectory. and denotes the final and the initial optimization instances respectively. For more efficient optimization, the parameters are optimized independently for each basic mode of flight. Thus, we consider a rotation of radian around Z-axis, vertical flight, longitudinal flight and lateral flight of one meter along the Z, X and Y-axes respectively. The process of optimization holds during a flight of 20 seconds. The obtained control parameters for both NLPID and NLIMC are depicted in Table 2. Before studying the features of the controllers, we investigate their computational complexity via the number of additions and multiplications.
In this case, a quick view in the Table 3, allows checking out that the NLPID is more gourmand in terms of computation because of the considered number of derivations and the integrations compared to the NLIMC.
In order to compare, investigate and evaluate the control laws, various simulations have been performed and numerous scenarios have been proposed on the complete closed loop system (ideal case, parameters uncertainties, extra payload, noisy measurements and wing gust). The main metrics used for the comparison are:

Ideal case without disturbance
In this section, we investigate the efficiency of the controllers in the ideal case and the performance of the time responses of the closed loop system. Therefore, the quadrotor is supposed to flight in ideal environment (without disturbances) and has a perfect model. The proposed trajectories are composed of successive straight-line segments and circular trajectory.  Successive straight line segments trajectory The first proposed scenario allows us to test, independently, all the flight modes of the quadrotor. It is composed of successive straight-lines along the three axes X, Y, and Z and a rotation around Z-axis (yaw). This trajectory is used to overview the performance of the controllers for each type of flights: vertical flight ( ), longitudinal flight , lateral flight and yaw rotation . Moreover, we will test the behavior of the vehicle at the inter-connection points.
The control gains used herein are the same depicted in Table 2 and the obtained results are summarized in Table 4. The time responses of the tracking errors are presented in Figure 2.  From Table 4, one can observe that the NLIMC ensures more accurate control compared to the NLPID. However, the consumed energy is of course greater. NLIMC has slower responses in the longitudinal and lateral motions compared to the NLPID and faster responses for the altitude and the yaw controls. It can be clearly seen in Figure 2 that a small overshoot appears when using the NLIMC especially for Z, which is reasonable because of the rapidity of convergence.
 Trajectory tracking We consider a helix trajectory to check the efficiency of the controller in the tracking of time-varying reference trajectory especially that the NILIMC makes the assumption of piecewise constant trajectories. The obtained results are tabulated in Table 5. The time responses of the tracking errors are presented in Figure 3.   Table 5, a remarkable degradation of accuracy for the NLIMC compared to the NLPID is reported where a steady state appears along the entire trajectory. The results are not strange because the NLIMC considers constant reference trajectories. However, in this stage, the controller consumes less energy compared to the NLPID.

With disturbance
 Parameters uncertainties: It is so hard to express, exactly and explicitly, all the forces and moments due to the complexity of the aerodynamic effects. Naturally, there is a notable mismatch between the real dynamics and the model exploited for the control design. Moreover, due to the limit of the onboard electronic computational capacities, some forces and terms are simplified or neglected. The derived dynamic model of the quadrotor contains a number of parameters that are identified according to the real system. The inertia matrix can be influenced by the environment changes and lead to some uncertainties. Therefore, the controller should be able to ensure good performance even in presence of these uncertainties.
In this test all these parameters are underestimated: where denotes the parameters employed in the controllers.  Additional Payload: Another test of robustness is proposed considering additional payload that represents 75% of the global mass. The payload is supposed added in the centre of mass.  Sensors noise: In general, the signals provided by the sensors are noisy. The noise may be cause the vibration and oscillation of the vehicle and in certain cases the instability of the overall system. We consider thus an additive noise with all the outputs using the function rand of Matlab to generate stochastic values uniformly distributed between 0-1. The additive noise is selected equals to for the position and for the attitude.
Where denote the mean wind velocities. The terms , and stand for the deviations from the mean velocity. The mean wind speed is set according to the daily-use situation. Then turbulence gust models are superimposed on this mean wind where the data are collected from statistical properties (spectra, scale length, turbulence intensity…). The wind velocities along the inertial axes are generated via Dryden linear filters as , and are zero-mean white Gaussian noise. is the Laplace variable. In order to generate a turbulence signal, a band-limited white noise signal passes through an appropriate filter. For more details, the reader may refer to [13].
The obtained results through the previous scenarios are summarized by Table 6    The controllers exhibit good level of robustness with respect to all the disturbances mentioned above. They consume more energy to keep the same performance compared to the ideal case except the parameters uncertainties where the consumed energy still the same. An overview of Table 6, we observe that the NLPID controller exhibits superior performance compared to the NLIMC controller. This superiority relevant to the poor capability of NLIMC to track time varying reference trajectories, which leads to a persistent steady state error along the entire trajectory (see Figure 4). However, also from Table 6, the NLPID exhibits poor capabilities to tackle the noise.  Through our analyze, we have concluded that the NLIMC is more robust than the NLPID that has better performance. From Figure 4 and for the altitude and the yaw angle, the NLIMC behaves better contrary to the longitudinal and lateral motion. We have concluded also that the attitude control subsystem is more sensitive to noise for both of them.

Conclusion
Two nonlinear approaches have been described namely Nonlinear Internal Model Control and Nonlinear PID. Numerical simulations were carried out in order to evaluate their effectiveness. The performance of the proposed approaches is demonstrated in multiple test scenarios. The settling time is shown to be quite fast and a good level of robustness is ensured with respect to parameters uncertainties, extra payload, wind gust and the noise. The NLIMC have superior performance for piecewise constant reference trajectories while NLPID is better for time varying reference trajectories. It is shown that the NLIMC guarantees better level of robustness compared to the NLPID with less computational complexity. To guarantee good performance, expect the case of parameter uncertainties, it was observed that the required energy increases where NLIMC consumes more than the NLPID. A rigorous proof of the stability of the whole system (translational and rotational) will be reported in the future works. Some issues also still open, among them is to reduce the consumed energy in presence of the disturbance where the controller is supposed to request more energy in order to keep the same performance as the ideal case.