Advanced UAVs Nonlinear Control Systems and Applications

Recent development of different control systems for UAVs has caught the attention of academic and industry, due to the wide range of their applications such as in surveillance, delivery, work assistant, and photography. In addition, arms, grippers, or tethers could be installed to UAVs so that they can assist in construc-ting, transporting, and carrying payloads. In this book chapter, the control laws of the attitude and position of a quadcopter UAV have been derived basically utilizing three methods including backstepping, sliding mode control, and feedback linearization incorporated with LQI optimal controller. The main contribution of this book chapter would be concluded in the strategy of deriving the control laws of the translational positions of a quadcopter UAV. The control laws for trajectory tracking using the proposed strategies have been validated by simulation using MATLAB ® /Simulink and experimental results obtained from a quadcopter test bench. Simulation results show a comparison between the performances of each of the proposed techniques depending on the nonlinear model of the quadcopter system under investigation; the trajectory tracking has been achieved properly for different types of trajectories, i.e., spiral trajectory, in the presence of unknown disturbances. Moreover, the practical results coincided with the results of the simulation results.


Introduction
Unmanned aerial vehicle (UAV) research has attracted tremendous attention during the last decade. This interest is mainly given due to the low cost of this type of vehicles and its large application range in diverse areas such as surveillance, delivery, maintenance, inspection, transportation, work assistant, and aerial photography. For instance, UAVs could be provided with cameras so as to observe nature and wildlife. In addition, arms, grippers, or tethers might be installed to UAVs, for which UAVs can assist in construction, transportation, and carrying payloads. Different types of UAVs are considered as complex systems since their dynamic models are nonlinear, dynamically coupled, and the difficulty to establish a very accurate mathematical model. The design of UAV control systems has attracted many researchers worldwide, and many control techniques have been proposed for the aim of accomplishing a 6-DoFs dynamic and trajectory tracking control of UAVs. This chapter focuses on advanced nonlinear control approaches in order to enhance the dynamic performance of both dynamic and trajectory tracking control of UAVs. Nonlinear control theories have been developed among other control strategies due to their capacity to deal with the nonlinearity and the coupling components of the UAV state variables.
Quadcopters are one of the very common UAV platforms; in fact, the literature related to control design of quadcopters is extensive, and this type of UAVs is underactuated, nonlinear, and strongly coupled, which is hard to cope properly with conventional control methods. On the other hand, they have many advantages over conventional helicopters, which may be concluded as follows: capability of vertical take-off and landing (VTOL), hovering and maneuverability, and low power consumption, since it has four small-scale propellers for thrust and orientation.
In the area of quadcopter literature, there is a variety of applications as aerial manipulation [1,2], quadcopter pendulum [3], navigation and localization [4,5], obstacle avoidance [6], altitude control [7], and cooperative and formation control [8,9]. Moreover, several control schemes have been proposed including adaptive control [10][11][12][13], fuzzy control [14], neural network control [15], linear parameter varying (LPV) control [16], predictive control [17,18], nonlinear control methods [19][20][21][22][23], and sliding mode control [24,25]. In [4], researchers propose localization, navigation, and mapping methods based on the characteristic map; feature map is selected to localize and navigate the UAV under investigation, while drawing up navigation strategy and avoidance strategy. In [5], PID controllers for the attitude, altitude, and position of a quadrotor are designed, and an outdoor experiment is conducted based on GPS to verify the performance, and desired trajectory's waypoints are determined using Mission Planar software. The application of ultrasonic sensor is used to detect barriers during the flight, so that the position of the quadrotor is adjusted depending on the signal of the ultrasonic sensor in order to avoid collision [6]. Cascaded PID controller with the usage of laser range finder combined with accelerometer in order to determine the height of the vehicle has been presented in [7]; the proposed system is compared with the performance of the system using GPS combined with pressure gauge. However, the results of the proposed system exhibit better performance especially in the range of low altitude. Centralized formation flight control of a leader/follower structure of three quadcopters is proposed in [8] using LQR-PI, the trajectory of the leader defines the desired trajectory for the followers, and a pole placement controller is used for the leader and LQR-PI controllers for the followers. In case of communication loss between leader and any of the followers, the other follower quadcopter provides the leader's states to the affected follower quadcopter in order to keep the formation intact. Whereas a multiagent consensus control incorporated with collision avoidance using model predictive control is presented in [9], the term of achieving formation and the term of repulsive potential are set in the index function to realize the formation control considering collision avoidance. The experiment is carried out using three quadrotor UAVs.
By looking to the quadcopter control systems, dynamic inversion and linear neural-network-based adaptive attitude control of a quadrotor UAV is introduced in [10]. Based on the time-scale separation principle, an attitude dynamic inverse controller and a trajectory dynamic inverse controller are deduced, respectively; the inverse error dynamics is regulated using PD controller, and a sigma-pi neural network is introduced to eliminate the inverse error adaptively to improve the robustness of the controller. Authors of [11] propose a compound adaptive backstepping and sliding mode control subject to unknown external disturbances and parametric uncertainties. A comparison study for the proposed method with and without adaptive control is investigated. An adaptive controller based on backstepping technique is employed for the trajectory tracking of quadrotor incorporating a fuzzy monitoring strategy to compensate the undesired dynamic error caused by lumped disturbances and total thrust input saturation [12]. Reference [13] introduces adaptive sliding mode controller for distributed control systems with mismatched uncertainty that exists in communication channels. A linear sliding surface is adopted to guarantee asymptotic stability of each subsystem, and an adaptive scheme that can update the unknown upper bound of uncertainty is applied. The distributed controller is constructed based on the information from the adaptive scheme and neighboring subsystems, such that each subsystem can keep stable and have good performance.
On the other hand, a tracking control system for the quadrotor UAV based on Takagi-Sugeno (T-S) fuzzy control has been presented in [14]. At first, T-S fuzzy error model has been presented as three independent subsystems for altitude, attitude, and position. Then, T-S fuzzy feedback controller design procedure is applied for altitude, attitude, and position subsystems of the quadcopter. LMI algorithm has been utilized in order to calculate the controller's gains. In [15], a sliding mode underactuated control (SMUC) is designed for the quadrotor UAV model with small uncertainty. In order to enhance the tracking response of the quadrotor UAV, recurrent-neural-network-based sliding-mode underactuated control (RNN-SMUC) with online recurrent neural network modeling and compensation of dynamical uncertainty is designed, and the RNN performs as an approximator. Finally, the combination of SMUC and RNN-SMUC with a transition as so-called hybrid neural-network-based sliding-mode underactuated control (HNN-SMUC) is developed. This development has the advantages of SMUC and RNN-SMUC; e.g., a better transient response of SMUC and an improved tracking performance of RNN-SMUC are accomplished. Furthermore, researchers of [16] compare between LPV controllers and LTI H ∞ controllers with S/KS loop shaping to test the performance of a quadrotor while tracking fast trajectories and aggressive maneuvers. Reference [17] combines nonlinear model predictive control (NMPC) and PID controller for better stabilizing of quadrotor UAV under different noises and disturbance conditions; the proposed controller has been applied for the altitude and attitude control loops, whereas switching model predictive controllers for attitude, altitude, and translational motion are derived based on piecewise affine linearized dynamic model in [18], where the effects induced by wind gusts disturbances are considered as affine outputs. The experimental platform utilizes inertial measurement unit IMU, sonar and an optic-flow sensor to produce feedback to the system for indoor applications. Various flight cases including position hold and altitude set-point, trajectory tracking, hovering, and aggressive attitude control have been performed in order to justify the efficiency of the proposed control system.
Nonlinear control methods cover the majority of the applied approaches in the literature. For instance, [19] proposes nonlinear hybrid controller that utilizes the time response characteristics of the PID and the stability characteristics of the LQR; differential-flatness-based feedforward control is incorporated with the LQR to enhance the performance of the position system, whereas PID controllers are designed to control the attitude of the quadcopter. Authors of [20] utilize LQR, PID, and feedback linearization in order to design position-tracking model. The LQR controller is added to the feedback linearization model to optimize the control algorithm by determining a suitable cost function; the attitude of dynamic control was modeled so as to maintain desired quadcopter's position despite the presence of disturbances. The performance of tracking position is optimized by adding PID loop control for pitch, roll, and yaw movement, and a comparison between the performance of the two nonlinear control techniques, including backstepping and feedback linearization with LQR, has been performed in [21]. The control laws have been derived depending on the nonlinear model with no linearization, and experiments for the attitude have been performed. Whereas in [22], the performance of sliding mode techniques has been verified and sat function has been used in order to obtain a continuous control law instead of sign function [23]. This shows nonlinear control laws applied for optimal trajectory tracking depending on minimum snap theory, and differential flatness method is utilized to derive control laws that link between the system outputs and its inputs. Reference [24] focuses on sliding mode control of the quadcopter; the proposed approach consisted of a sliding mode observer with finite-time process, a hybridization of a PID conventional controller, and a continuous sliding-mode one. The main aim is to estimate the system's state vector based on the measured system's output states and to identify a certain type of the inherited system's disturbances simultaneously. It is also to track a desired timevarying trajectory in spite of the influence of external disturbances and uncertainties. Finally, fractional order sliding mode control is used to derive the attitude control laws of a quadcopter, where PD tracking controllers are used to control the position of the quadcopter in [25].

Nonlinear control approaches
Nonlinear control theory is the area of control theory that deals with nonlinear systems, time variant systems, or both. Different engineering applications motivate researchers to develop powerful nonlinear control methods, since a majority of these systems are considered to be nonlinear. The key reason behind the use of nonlinear control techniques is their capability to deal with the nonlinear characteristics of nonlinear systems such as underactuations, models uncertainty, and dynamic coupling. This chapter focuses on the following nonlinear control approaches: 1. Backstepping 2. Sliding mode control 3. Feedback linearization

Backstepping
It is a widely used nonlinear control technique, due to its significant inherited characteristics including: being a recursive controller approach, which depends on a proposed Lyapunov function for deriving the system control law; higher flexibility, to some extent, in avoiding key nonlinearity cancellation; and verifying the desired objective of stabilization and tracking [26,27]. The procedure of deriving control laws depending on backstepping technique is concluded in, at first, determining the error function between the desired input and the system actual output, then outlining a Lyapunov function and determining virtual controls to make the derivative of the proposed Lyapunov function with a negative definite. Finally, these steps are repeated until obtaining the control law. Consider the following system: Let us define the following error function as and Lyapunov function as In order to obtain the derivative of the proposed Lyapunov function with a negative definite, where k is a positive constant, so that the control law will be as follows: Note: it is remarkable to mention that the parameters of a system would appear in the derived control law when using backstepping, so that an integral action is added to each virtual control during the procedure of deriving the control law, which is termed integral backstepping, and more details about backstepping method are described in [27].

Feedback linearization
Feedback linearization is also one of the major nonlinear design tools. It is used to cancel the nonlinear terms in a system's model; this cancellation resulting in a linear system allows designing and incorporating linear controllers for a nonlinear system with the feedback linearization laws. To introduce the procedure of this strategy, we first introduce the notions of full-state linearization, where the state equation is completely linearized, and input-output linearization, where the input-output map is linearized, while the state equation may be only partially linearized [26].
In this chapter, we will pay attention to input-output linearization method. To obtain the input-output feedback linearization law, we simply repeat the calculation of the derivative of the system output along the state variables. Let us consider the system in (1) as, The input-output linearization law would become:

Sliding mode control
Sliding mode control is considered one of the control tools of the variable structure systems (VSS), since it produces a discontinuous controller. It has the advantage of stabilizing and achieving robustness criteria against model uncertainty and disturbances. Sliding mode control theory depends on a sliding surface s, where the sliding mode controller constrains a system to it. The motion toward the sliding surface consists of a reaching phase during which trajectories starting off the surface s = 0 move toward it and reach it in finite time, followed by a sliding phase during which the motion is confined to the surface s [26,28].
Equivalent control law is one of the sliding mode control strategies; it consists of two terms, the first is produced by equaling the derivative of sliding surface s to 0. The other term is called reaching law that has some common formulas such as [28]: Constant rate reaching law, i.e., _ s ¼ ÀK sgn s ð Þ, and constant plus proportional rate reaching law, i.e., _ s ¼ ÀQs À K sgn s ð Þ.
where Q and K are positive constants and sign(s) is illustrated in Figure 1.
With V ¼ 1 2 s 2 as a Lyapunov function candidate, hence the condition of the stability is _ V to be negative definite. In order to ensure that error e converges to zero, the sliding surface might be supposed as a function of the error as follows [26]: where ρ is the relative degree. The procedure for designing a sliding mode controller can be summarized by the following steps:

Quadcopter modeling
The dynamic model of the quadcopter is delivered in this section; the details of the model can be seen in the literature [29][30][31]. The state variables of the quadcopter are defined as, The equations of motion can be written as follows (10): where m is the mass of the quadcopter given in kilograms. With, where f i ¼ bω 2 i is the thrust force produced by propeller i with thrust coefficient b in NÁs 2 /m and ω i is the angular speed of motor i. T i ¼ dω 2 i is the drag torque produced by propeller i in NÁm with corresponding drag coefficient d in N 2 s, l is the distance between center of the quadcopter and center of propeller in m, I is the inertia matrix, and I xx , I yy , and I zz are moments of inertia about x, y, and z axes, respectively, in kgÁm 2 .
where J r is the moment of inertia of the propeller and Ω r is the sum of the four motors' angular speed. Based on the above derivation and discussion,

Quadcopter control
The control scheme of the quadcopter can be represented as in Figure 2, it consists of two loops: the attitude control loop and the inner loop, which produces the control commands for the quadcopter to move. Moreover, the position control loop and the outer loop produce the references for the inner loop.
In this section, the control laws of the quadcopter will be derived using the aforementioned nonlinear control methods.

Quadcopter control using integral backstepping
Control laws of the attitude and position of the quadcopter are derived using integral backstepping approach.

Altitude control
We will start deriving the control law of the attitude by defining the altitude error and the Lyapunov function as follows: If the term k 1 e 1 is added and subtracted to the _ V 1 function, where k 1 > 0, it yields The term _ z d À v z þ k 1 e 1 of the Lyapunov function must vanish for a negative definite derivative, which can be achieved by choosing the virtual control v z such that Similar steps are repeated here to derive the control law, Using a similar strategy as for v z d results

Figure 2.
The block diagram of the position control system of the quadcopter.

Attitude control
The control laws of the attitude of the quadcopter were derived in this section depending on integral backstepping method as follows:

Position control
The Cartesian motion of a quadcopter in the x-y coordinate relies on θ and ϕ angles with respect to x and y axes, respectively. Hence, θ and ϕ angles have been considered as the outputs of x and y control laws. In this chapter, exact Euler angles, but not small Euler angles, have been considered to obtain the position control laws on x and y axes. However, this is an important criterion for high dynamic performance trajectory tracking control. The position control laws are derived from the quadcopter's model directly by applying the procedure of the control approaches. By applying the procedure of integral backstepping on the position equations of the quadcopter, one can obtain the following control laws:

Quadcopter control using feedback linearization with LQI
The feedback linearization method is used in order to decouple the state variables of the quadcopter. This will enable us to derive the LQ-based control laws for the attitude, altitude, and position of the quadcopter.

Altitude control
The feedback linearization law of the attitude is given as follows: where V 1 is a virtual input, which is computed using LQI controller that will be presented in section 4.2.4.

Attitude control
The feedback linearization laws of the attitude are derived as follows: The previous control laws linearize the mapping between the derivatives of the flat outputs Y 4 ¼ φ, Y 5 ¼ θ, Y 6 ¼ ψ, and the virtual controls V 2 , V 3 , V 4. The latter are again computed using an LQI optimal controller, where a 1 ¼

Position control
Here, ϕ and θ angles are computed by the control laws of x and y motion, as it is done in the integral backstepping approach. The control laws are obtained as follows: where V 5 and V 6 are the proposed linear quadratic integral optimal controller.

Linear quadratic integral optimal control
The goal of the optimal control is to determine the control feedback, for which the optimal controller minimizes a proposed cost function J to desired minimum value. The cost function of the linear quadratic regulator is given as follows [32]: where Q and R represent the weighting matrices for the state vector x and control law vector u, respectively. LQR is conveniently applied to linear control systems or linearized nonlinear control systems. The state space model of a linear control system is given as follows: The control law u, which minimizes the cost function J, can be derived as follows: where P is a covariance matrix. It is the solution of the algebraic Riccati Eq. (36), in which _ P ¼ 0 LQR controller is capable to provide a high dynamic performance when used with linear or linearized control systems. However, LQR is not capable to ensure fast tracking of time varying command signals [33,34]. Different types of LQRs are demonstrated in literatures [32]. Figure 3 shows an LQI regulator, with an integral action.
If the model of the linear system is extended by an error vector _ z such as where r is a reference signal, which may represent the desired trajectory for tracking. The extended state space model of the LQI regulator is as follows: Hence, the control law u with an integral action is as follows:

Quadcopter control using sliding mode
In order to obtain the attitude and position control laws of the quadcopter using sliding mode control, the steps followed are discussed below.

Altitude control
In order to obtain the control laws of the quadcopter using sliding mode control, at first, the sliding surface should be determined as follows: where so that the derivative of the sliding surface becomes LQI optimal controller structure.

Position control
Same strategy will be followed to derive the control laws of the position as in integral backstepping and feedback linearization. The control laws of both x, y will command the attitude loop with the references to accomplish the desired trajectory with

Results
The discussed nonlinear approaches have been tested in MATLAB/Simulink based on the nonlinear quadcopter model of Eq. (10), as well as experimental verification is also conducted. For modeling and simulation of the proposed approaches, the simulation sample time was Ts = 100 μs and the solver used was Runge-Kutta with a fixed integration. Figures 4 and 5 show the system's trajectory tracking response. Figure 4a depicts the system response when implementing the proposed integral backstepping approach. Figure 4b shows the system response using feedback linearization with LQI approach. Figure 4c represents the system response using sliding mode control. Figure 4a-c demonstrates the system trajectory tracking to a desired trajectory command signal, with the existing external disturbances. These disturbances are being added with the command signals at different time instances. The initial position of the desired trajectory was (2, 0, 0), but the quadcopter was initiated with a different initial position as (0, 0, 0). As seen from Figure 4a-c, for the three investigated control approaches, the actual trajectory at the start was a bit diverged from the desired trajectory. However, the actual trajectory was then converged to the desired one fast. Figure 5 exhibits the reference signals and the responses for x-, y-, and z axes of the quadcopter in the 3D space. These references on x and y axes were selected to be sinusoidal signals with 2 m of magnitude and 0.05 Hz of frequency. The command along z axis was a ramp signal with 0.2 m.s À1 velocity rate. Figure 6 shows the tracking errors of the     quadcopter motion on x, y and z. However, as seen, the tracking error of the motion on the three axes converged to zero. But, a little divergence was observed, which were due to the existence of disturbance with the command signals.
The practical implementation, of the proposed control strategies of the attitude control of the quadcopter, has been validated using Arduino MEGA board with an inertial measurement unit (IMU). Figure 7 exhibits the practical UAV control system. Figure 8 shows the practical implementation results and response of pitch angle using integral backstepping controller. As noticed earlier, there is a static error with oscillating response. Figure 9a and b demonstrates the practical result and response of the roll angle when implementing integral backstepping and feedback linearization with LQI controllers, respectively.
As noticed from Figure 9a, there was an oscillating response for pitch angle control during transient state, of almost undesired of AE20°of overshoot and downshoot when implementing the proposed backstepping controller. But, high dynamic performance and fast tracking control were obtained for pitch angle control when implementing the proposed LQI controller with feedback linearization approach as seen in Figure 9b.

Conclusion
This chapter has discussed different advanced control techniques for UAV control. Nonlinear control theories have been reviewed among other control strategies due to their capacity to deal with the nonlinearity and the coupling components of the UAV state variables. This includes backstepping, feedback linearization, and sliding mode control. UAV nonlinear model has been derived and modeled in MATLAB ® , and the proposed control strategies have been implemented. Simulation results obtained from the developed model with the control strategies were presented and discussed. Different path tracking and trajectories have been examined with successful and high dynamic performance. The developed control strategies have exhibited robustness against the UAV parameter mismatch and dynamic uncertainties.