**Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed**

Youmin Zhang and Abbas Chamseddine *Department of Mechanical and Industrial Engineering, Concordia University Canada*

## **1. Introduction**

24 Will-be-set-by-IN-TECH

118 Automatic Flight Control Systems – Latest Developments

Heuberger, P. S. C., Van Den Hof, P. M. J. & Bosgra, O. H. (1995). A generalized

Karpel, M. (1992). Size reduction techniques for the determination of efficient aeroservoelastic

Leibst, B. S., Garrard, W. L. & Farm, J. A. (1988). Design of a multivariable fluter

Ljung, L. (1999). *System Identification: Theory for the User*, Prentice-Hall, Englewood Cliffs, NJ. Mahesh, J. K., Stone, C. R., Garrard, W. L. & Dunn, H. J. (1981). Control law synthesis for

Morelli, E. A. (1995). Global nonlinear aerodynamic modeling using multivariate orthogonal

Morelli, E. A. & Klein, V. (1997). Accuracy of aerodynamic model parameters estimated from

Newsom, J. R. (1979). Control law synthesis for active flutter suppresion using optimal control

Ninness, B. & Gustafsson, F. (1997). A unifying construction of orthonormal bases for system

Park, D. J. (1991). Fast tracking RLS algorithm using novel variable forgetting factor with

Schmidt, D. & Chen, T. (1986). Frequency domain synthesis of a robust flutter suppression

Schmitt, N. P. Amd Rehm, W., Pistner, T., Zeller, P., Diehl, H. & Navé, P. (2007). The AWAITOR airborne LIDAR turbulence sensor, *Aerospace Science and Technology* 11: 546–552. Schmitt, N., Rehm, W., Pistner, T., Diehl, H. Navé, P., Jenaro-Rabadan, G., Mirand, P. &

Wildschek, A., Maier, R., Hoffmann, F., Jeanneau, M. & Baier, H. (2006). Active wing

Zeng, J. & de Callafon, R. A. (2006). Model matching and filter design using orthonormal basis functions, *45th IEEE Conference on Decision and Control*, San Diego, pp. 5347–5352. Zeng, J. & de Callafon, R. A. (2008). Adaptive Feedforward/Feedback control framework,

*Technical Report SBIR Phase I NNX08CB12P*, ZONA Technology Inc.

Reymond, M. (2007). Flight test of the AWAITOR airborne LIDAR turbulence sensor,

load alleviation with an adaptive feedforward control algorithm, *AIAA Guidance, Navigation, and Control Conference and Exhibit*, Keyston, Colorado. AIAA-2006-6054. Woods-Vedeler, J. A., Pototzky, A. & Hoadley, S. T. (1995). Rolling maneuver load alleviation

flight test data, *Journal Guidance, Control, and Dynamics* 20(1): 74–80.

identification, *IEEE Transactions on Automatic Control* 42(4): 515–521.

control law, *Journal of Guidance, Control, and Dynamics* 9(3): 346–351.

theory, *Journal of Guidance, Control, and Dynamics* 2(5): 388–394.

models, *Control and Dynamic Systems* 54: 263–295.

functions, *Journal of Aircraft* 32(2): 270–277.

unity ZONE, *Electronic Letter* 27: 2150–2151.

*14th Coherent Laser Radar Conference*, Colorado.

using active controls, *Journal of Aircraft* 32(1): 68–76.

*Control* 40(3): 451–465.

*and Dynamics* 4(4): 415–422.

11(3): 220–229.

orthonormal basis for linear dynamical systems, *IEEE Transactions on Automatic*

suppression/gust load alleviation system, *Journal of Guidance, Control, and Dynamics*

flutter suppression using linear quadratic control theory, *Journal of Guidance, Control,*

Unmanned Aerial Vehicles (UAVs) are gaining more and more attention during the last few years due to their important contributions and cost-effective applications in several tasks such as surveillance, search and rescue missions, geographic studies, as well as various military and security applications. Due to the requirements of autonomous flight under different flight conditions without a pilot onboard, control of UAV flight is much more challenging compared with manned aerial vehicles since all operations have to be carried out by the automated flight control, navigation and guidance algorithms embedded on the onboard flight microcomputer/microcontroller or with limited interference by a ground pilot if needed.

As an example of UAV systems, the quadrotor helicopter is relatively a simple, affordable and easy to fly system and thus it has been widely used to develop, implement and test-fly methods in control, fault diagnosis, fault tolerant control as well as multi-agent based technologies in formation flight, cooperative control, distributed control, mobile wireless networks and communications. Some theoretical works consider the problems of control (Dierks & Jagannathan, 2008), formation flight (Dierks & Jagannathan, 2009) and fault diagnosis (Nguyen et al., 2009; Rafaralahy et al., 2008) of the quadrotor UAV. However, few research laboratories are carrying out advanced theoretical and experimental works on the system. Among others, one may cite for example, the UAV SWARM health management project of the Aerospace Controls Laboratory at MIT (SWARM, 2011), the Stanford Testbed of Autonomous Rotorcraft for Multi-Agent Control (STARMAC) project (STARMAC, 2011) and the Micro Autonomous Systems Technologies (MAST) project (MAST, 2011).

A team of researchers at the Department of Mechanical and Industrial Engineering of Concordia University, with the financial support from NSERC (Natural Sciences and Engineering Research Council of Canada) through a Strategic Project Grant and a Discovery Project Grant and three Canadian-based industrial partners (Quanser Inc., Opal-RT Technologies Inc., and Numerica Technologies Inc.) as well as Defence Research and Development Canada (DRDC) and Laval University, have been working on a research and development project on fault-tolerant and cooperative control of multiple UAVs since 2007 (see the Networked Autonomous Vehicles laboratory (NAV, 2011)). In addition to the work that has been carried out for the multi-vehicles case, many fault-tolerant control (FTC) strategies have been developed and applied to the single vehicle quadrotor helicopter UAV system. The objective is to consider actuator faults and to propose FTC methods to

four 10-inch propellers and standard RC motors and speed controllers. It is equipped with the Quanser Embedded Control Module (QECM), which is comprised of a Quanser HiQ aero data acquisition card and a QuaRC-powered Gumstix embedded computer where QuaRC is Quanser's Real-time Control software. The Quanser HiQ provides high-resolution accelerometer, gyroscope, and magnetometer IMU sensors as well as servo outputs to drive four motors. The on-board Gumstix computer runs QuaRC, which allows to rapidly develop and deploy controllers designed in MATLAB/Simulink environment to real-time control the Qball-X4. The controllers run on-board the vehicle itself and runtime sensors measurement, data logging and parameter tuning is supported between the host PC and the target vehicle

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 121

*y*

*x*

2

IJ2

Roll

**L**

IJ3

3 4

o

yaw

Tail

Pitch

IJ4

*<sup>T</sup>* which are Pulse

*T*

1

(b) Qball-X4 schematic representation

IJ1

(Quanser, 2010).

main parts:

blocks of Figure 2.

**2.1 Qball-X4 dynamics**

(a) The Quanser Qball-X4 quadrotor UAV

Fig. 1. The Quanser Qball-X4 quadrotor UAV and its schematic representation.

propellers in a set of four. The input to this part is *u* = [*u*<sup>1</sup> *u*<sup>2</sup> *u*<sup>3</sup> *u*4]

generated by four individually-controlled motor-driven propellers.

propellers with respect to the system's center of mass.

velocity (V) and acceleration (A) of the Qball-X4.

The block diagram of the entire UAV system is illustrated in Figure 2. It is composed of three

• The first part represents the Electronic Speed Controllers (ESCs) + the motors + the

Width Modulation (PWM) signals. The output is the thrust vector *T* = [*T*<sup>1</sup> *T*<sup>2</sup> *T*<sup>3</sup> *T*4]

• The second part is the geometry that relates the generated thrusts to the applied lift and torques to the system. This geometry corresponds to the position and orientation of the

• The third part is the dynamics that relate the applied lift and torques to the position (P),

The subsequent sections describe the corresponding mathematical model for each of the

The Qball-X4 dynamics in a hybrid coordinate system are given hereafter where the position dynamics are expressed in the inertial frame and the angular dynamics are expressed in the

accommodate as much as possible the fault effects on the system performance. The proposed methods have been tested either in simulation, experimental or both frameworks where the experimental implementation has been carried out using a cutting-edge quadrotor UAV testbed known also as Qball-X4. The developed approaches include the Gain-Scheduled PID (GS-PID), Model Reference Adaptive Control (MRAC), Sliding Mode Control (SMC), Backstepping Control (BSC), Model Predictive Control (MPC) and Flatness-based Trajectory Planning/Re-planning (FTPR), etc. Some of these methods require an information about the time of occurrence, the location and the amplitude of faults whereas others do not. In the former case, a fault detection and diagnosis (FDD) module is needed to detect, isolate and identify the faults which occurred.

Table 1 summarizes the main fault-tolerant control methodologies that have been developed and applied to the quadrotor helicopter UAV. The table shows which methods require an FDD scheme and whether they have been tested in simulation or experimentally. In the case of experimental application, one can also distinguish between two categories of faults: a simulated fault and a real damage. In the first case, a fault has been generated in an actuator by multiplying its control input by a gain smaller than one, thus simulating a loss in the control effectiveness. In the second case, the fault/damage has been introduced by breaking the tip of a propeller of the Qball-X4 UAV during flight.


Table 1. Fault-tolerant control methods (Note: () Yes/Done; (X) No/Not done yet).

These methods will be discussed in the subsequent sections. The remainder of this chapter is then organized as follows. Section 2 introduces the quadrotor UAV system that is used as a testbed for the proposed methods. Section 3 presents the FTC methods summarized in Table 1. The simulation as well as the experimental flight results are given and discussed in Section 4. Some concluding remarks together with future work are finally given. Note that due to space consideration, only some of the developed control methods will be included in this chapter. Interested readers can refer to the website of the NAV Lab on 'http://users. encs.concordia.ca/~ymzhang/UAVs.htm' for more information.

## **2. Description and dynamics of the quadrotor UAV system**

The quadrotor UAV of the Department of Mechanical and Industrial Engineering of Concordia University is the Qball-X4 testbed (Figure 1(a)) developed by Quanser Consulting Inc. The quadrotor UAV is enclosed within a protective carbon fiber round cage (therefore a name of Qball-X4) to ensure safe operation of the vehicle and protection to the personnel who is working with the vehicle in an indoor research and development environment. It uses four 10-inch propellers and standard RC motors and speed controllers. It is equipped with the Quanser Embedded Control Module (QECM), which is comprised of a Quanser HiQ aero data acquisition card and a QuaRC-powered Gumstix embedded computer where QuaRC is Quanser's Real-time Control software. The Quanser HiQ provides high-resolution accelerometer, gyroscope, and magnetometer IMU sensors as well as servo outputs to drive four motors. The on-board Gumstix computer runs QuaRC, which allows to rapidly develop and deploy controllers designed in MATLAB/Simulink environment to real-time control the Qball-X4. The controllers run on-board the vehicle itself and runtime sensors measurement, data logging and parameter tuning is supported between the host PC and the target vehicle (Quanser, 2010).

(a) The Quanser Qball-X4 quadrotor UAV

(b) Qball-X4 schematic representation

Fig. 1. The Quanser Qball-X4 quadrotor UAV and its schematic representation.

The block diagram of the entire UAV system is illustrated in Figure 2. It is composed of three main parts:


The subsequent sections describe the corresponding mathematical model for each of the blocks of Figure 2.

## **2.1 Qball-X4 dynamics**

2 Will-be-set-by-IN-TECH

accommodate as much as possible the fault effects on the system performance. The proposed methods have been tested either in simulation, experimental or both frameworks where the experimental implementation has been carried out using a cutting-edge quadrotor UAV testbed known also as Qball-X4. The developed approaches include the Gain-Scheduled PID (GS-PID), Model Reference Adaptive Control (MRAC), Sliding Mode Control (SMC), Backstepping Control (BSC), Model Predictive Control (MPC) and Flatness-based Trajectory Planning/Re-planning (FTPR), etc. Some of these methods require an information about the time of occurrence, the location and the amplitude of faults whereas others do not. In the former case, a fault detection and diagnosis (FDD) module is needed to detect, isolate and

Table 1 summarizes the main fault-tolerant control methodologies that have been developed and applied to the quadrotor helicopter UAV. The table shows which methods require an FDD scheme and whether they have been tested in simulation or experimentally. In the case of experimental application, one can also distinguish between two categories of faults: a simulated fault and a real damage. In the first case, a fault has been generated in an actuator by multiplying its control input by a gain smaller than one, thus simulating a loss in the control effectiveness. In the second case, the fault/damage has been introduced by breaking the tip

Strategy Passive/Active Need for FDD Simulation Experiment Real damage

GS-PID Active X MRAC Active X X SMC Passive X BSC Passive X X X MPC Active X X FTPR Active X

Table 1. Fault-tolerant control methods (Note: () Yes/Done; (X) No/Not done yet).

encs.concordia.ca/~ymzhang/UAVs.htm' for more information.

**2. Description and dynamics of the quadrotor UAV system**

These methods will be discussed in the subsequent sections. The remainder of this chapter is then organized as follows. Section 2 introduces the quadrotor UAV system that is used as a testbed for the proposed methods. Section 3 presents the FTC methods summarized in Table 1. The simulation as well as the experimental flight results are given and discussed in Section 4. Some concluding remarks together with future work are finally given. Note that due to space consideration, only some of the developed control methods will be included in this chapter. Interested readers can refer to the website of the NAV Lab on 'http://users.

The quadrotor UAV of the Department of Mechanical and Industrial Engineering of Concordia University is the Qball-X4 testbed (Figure 1(a)) developed by Quanser Consulting Inc. The quadrotor UAV is enclosed within a protective carbon fiber round cage (therefore a name of Qball-X4) to ensure safe operation of the vehicle and protection to the personnel who is working with the vehicle in an indoor research and development environment. It uses

identify the faults which occurred.

of a propeller of the Qball-X4 UAV during flight.

The Qball-X4 dynamics in a hybrid coordinate system are given hereafter where the position dynamics are expressed in the inertial frame and the angular dynamics are expressed in the

where *up*, *uq*, *ur*, *kp*, *kq* and *kr* have been respectively changed to *u<sup>θ</sup>* , *uφ*, *uψ*, *k<sup>θ</sup>* , *kφ*, *k<sup>ψ</sup>* for notation convenience. At low speeds, one can obtain a simplified nonlinear model of (4) by

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 123

*mx*¨ = *uz* (*cosφ sinθ cosψ* + *sinφ sinψ*)

*my*¨ = *uz* (*cosφ sinθ sinψ* − *sinφ cosψ*)

A further simplified linear model can be obtained by assuming hovering conditions (*uz* ≈ *mg* in the *x* and *y* directions) with no yawing (*ψ* = 0) and small roll and pitch angles as follows:

*<sup>z</sup>*¨ <sup>=</sup> *uz*/*<sup>m</sup>* <sup>−</sup> *<sup>g</sup>*; *Jzψ*¨ <sup>=</sup> *<sup>u</sup><sup>ψ</sup>*

The nonlinear model (4) will be used later on in the design of fault-tolerant control strategies such as the BSC, the MPC and the SMC. The simplified model (6) will be used for the MRAC

The motors of the Qball-X4 are outrunner brushless motors. The generated thrust *Ti* of the *i*

where *K* is a positive gain and *ω* is the motor bandwidth. *K* and *ω* are theoretically the same for the four motors but this may not be the case in practice and therefore, this can be one of sources of modeling errors/uncertainties for fault-tolerant control design and trajectory

A schematic representation of the Qball-X4 is given in Figure 1(b). The motors and propellers are configured in such a way that the back and front (1 and 2) motors spin clockwise and the left and right (3 and 4) spin counter-clockwise. Each motor is located at a distance *L* from the center of mass *o* and when spinning, a motor produces a torque *τi*. The origin of the body-fixed frame is the system's center of mass *o* with the *x*-axis pointing from back to front

pointing upward in the *z*-direction in parallel to the motor's rotation axis. The thrusts *Ti* and

*th* PWM input *ui* by a first-order linear transfer function:

*θ* = *u<sup>θ</sup>*

*ui* ; *i* = 1, ..., 4 (7)

*<sup>y</sup>*¨ <sup>=</sup> <sup>−</sup>*φg*; *Jyφ*¨ <sup>=</sup> *<sup>u</sup><sup>φ</sup>* (6)

*x*¨ = *θg*; *Jx* ¨

(5)

*th*

*th* propeller is always

*mz*¨ = *uz* (*cosφ cosθ*) − *mg*

neglecting drag terms and gyroscopic and Coriolis-centripetal effects:

*Jx* ¨ *θ* = *u<sup>θ</sup>*

*Jyφ*¨ = *u<sup>φ</sup>*

*Jzψ*¨ = *u<sup>ψ</sup>*

design as well as for the trajectory planning and re-planning approach.

*Ti* <sup>=</sup> *<sup>K</sup> <sup>ω</sup>*

and the *y*-axis pointing from right to left. The thrust *Ti* generated by the *i*

*s* + *ω*

**2.2 ESCs, motors and propellers**

motor is related to the *i*

planning/re-planning.

**2.3 Geometry**

4 Will-be-set-by-IN-TECH

Fig. 2. The UAV system block diagram.

body frame (Bresciani, 2008):

$$\begin{aligned} m\ddot{x} &= u\_z \left( \cos\phi \sin\theta \cos\psi + \sin\phi \sin\psi \right) - k\_x \dot{x} \\ m\ddot{y} &= u\_z \left( \cos\phi \sin\theta \sin\psi - \sin\phi \cos\psi \right) - k\_y \dot{y} \\ m\ddot{z} &= u\_z \left( \cos\phi \cos\theta \right) - mg - k\_z \dot{z} \\ J\_x \dot{p} &= u\_p + \left( J\_y - J\_z \right) qr - J\_T q \ \Omega - k\_p p \\ J\_y \dot{q} &= u\_q + \left( J\_z - J\_x \right) pr - J\_T p \ \Omega - k\_q q \\ J\_z \dot{r} &= u\_r + \left( J\_x - J\_y \right) pq - k\_r r \end{aligned} \tag{1}$$

where *x*, *y* and *z* are the coordinates of the quadrotor UAV center of mass in the inertial frame. *m* is the system mass and *Jx*, *Jy* and *Jz* are the moments of inertia along *y*, *x* and *z* directions respectively. *θ*, *φ* and *ψ* are the pitch, roll and yaw Euler angles and *p*, *q* and *r* are the angular velocities in the body-fixed frame. *kx*, *ky*, *kz*, *kp*, *kq* and *kr* are drag coefficients and are constant. *JT* is the moment of inertia for each motor and Ω is the overall speed of propellers:

$$
\Omega = -\Omega\_1 - \Omega\_2 + \Omega\_3 + \Omega\_4 \tag{2}
$$

where Ω*<sup>i</sup>* is the *i th* propeller speed.

The angular velocities in the inertial frame (Euler rates) can be related to those in the body frame as follows:

$$
\begin{bmatrix} p \\ q \\ r \end{bmatrix} = \begin{bmatrix} 1 & 0 & -sin\theta \\ 0 & cos\phi & cos\theta sin\phi \\ 0 & -sin\phi \cos\theta cos\phi \end{bmatrix} = \begin{bmatrix} \dot{\phi} \\ \dot{\theta} \\ \dot{\psi} \end{bmatrix} \tag{3}
$$

Close to hovering conditions, the matrix in the above equation is close to identity matrix and therefore the angular velocities in the body frame can be seen as the angular velocities in the inertial frame. The model (1) can then be written as:

$$\begin{aligned} m\ddot{x} &= u\_z \left( \cos\phi \sin\theta \cos\psi + \sin\phi \sin\psi \right) - k\_x \dot{x} \\ m\ddot{y} &= u\_z \left( \cos\phi \sin\theta \sin\psi - \sin\phi \cos\psi \right) - k\_y \dot{y} \\ m\ddot{z} &= u\_z \left( \cos\phi \cos\theta \right) - mg - k\_z \dot{z} \\ J\_x \ddot{\theta} &= u\_\theta + \left( I\_y - I\_z \right) \dot{\phi} \dot{\psi} - f\_T \dot{\phi} \,\Omega - k\_\theta \dot{\theta} \\ J\_y \ddot{\phi} &= u\_\theta + \left( I\_z - I\_x \right) \dot{\theta} \dot{\psi} - f\_T \dot{\theta} \,\Omega - k\_\theta \dot{\phi} \\ J\_z \ddot{\psi} &= u\_\psi + \left( I\_x - I\_y \right) \dot{\theta} \dot{\phi} - k\_\theta \dot{\psi} \end{aligned} \tag{4}$$

where *up*, *uq*, *ur*, *kp*, *kq* and *kr* have been respectively changed to *u<sup>θ</sup>* , *uφ*, *uψ*, *k<sup>θ</sup>* , *kφ*, *k<sup>ψ</sup>* for notation convenience. At low speeds, one can obtain a simplified nonlinear model of (4) by neglecting drag terms and gyroscopic and Coriolis-centripetal effects:

$$\begin{aligned} m\ddot{x} &= u\_z \left( \cos\phi \sin\theta \cos\psi + \sin\phi \sin\psi \right) \\ m\ddot{y} &= u\_z \left( \cos\phi \sin\theta \sin\psi - \sin\phi \cos\psi \right) \\ m\ddot{z} &= u\_z \left( \cos\phi \cos\theta \right) - mg \\ J\_x \ddot{\theta} &= u\_\theta \\ J\_y \ddot{\phi} &= u\_\phi \\ J\_z \ddot{\psi} &= u\_\psi \end{aligned} \tag{5}$$

A further simplified linear model can be obtained by assuming hovering conditions (*uz* ≈ *mg* in the *x* and *y* directions) with no yawing (*ψ* = 0) and small roll and pitch angles as follows:

$$\begin{aligned} \ddot{\mathbf{x}} &= \theta \mathbf{g}; \quad & J\_{\mathbf{x}} \ddot{\theta} = \mathbf{u}\_{\theta} \\ \ddot{\mathbf{y}} &= -\phi \mathbf{g}; \quad & J\_{\mathbf{y}} \ddot{\theta} = \mathbf{u}\_{\phi} \\ \ddot{\mathbf{z}} &= \mathbf{u}\_{\mathbf{z}}/m - \mathbf{g}; \quad & J\_{\mathbf{z}} \ddot{\boldsymbol{\Psi}} = \mathbf{u}\_{\boldsymbol{\Psi}} \end{aligned} \tag{6}$$

The nonlinear model (4) will be used later on in the design of fault-tolerant control strategies such as the BSC, the MPC and the SMC. The simplified model (6) will be used for the MRAC design as well as for the trajectory planning and re-planning approach.

#### **2.2 ESCs, motors and propellers**

The motors of the Qball-X4 are outrunner brushless motors. The generated thrust *Ti* of the *i th* motor is related to the *i th* PWM input *ui* by a first-order linear transfer function:

$$T\_i = K \frac{\omega}{s + \omega} u\_i \; ; \; i = 1, \dots, 4 \tag{7}$$

where *K* is a positive gain and *ω* is the motor bandwidth. *K* and *ω* are theoretically the same for the four motors but this may not be the case in practice and therefore, this can be one of sources of modeling errors/uncertainties for fault-tolerant control design and trajectory planning/re-planning.

#### **2.3 Geometry**

4 Will-be-set-by-IN-TECH

Qball-X4

*mx*¨ = *uz* (*cosφ sinθ cosψ* + *sinφ sinψ*) − *kx x*˙ *my*¨ = *uz* (*cosφ sinθ sinψ* − *sinφ cosψ*) − *kyy*˙

*qr* − *JTq* Ω − *kp p*

Ω = −Ω<sup>1</sup> − Ω<sup>2</sup> + Ω<sup>3</sup> + Ω<sup>4</sup> (2)

⎤ ⎥ ⎥ ⎥ ⎦ =

*<sup>φ</sup>*˙*ψ*˙ <sup>−</sup> *JTφ*˙ <sup>Ω</sup> <sup>−</sup> *<sup>k</sup><sup>θ</sup>* ˙

*<sup>θ</sup>* <sup>Ω</sup> <sup>−</sup> *<sup>k</sup>φφ*˙

*θψ*˙ <sup>−</sup> *JT* ˙

*θφ*˙ <sup>−</sup> *<sup>k</sup>ψψ*˙

⎡ ⎢ ⎢ ⎢ ⎣

*φ*˙ ˙ *θ ψ*˙

*θ*

⎤ ⎥ ⎥ ⎥ ⎦

*pq* − *krr*

where *x*, *y* and *z* are the coordinates of the quadrotor UAV center of mass in the inertial frame. *m* is the system mass and *Jx*, *Jy* and *Jz* are the moments of inertia along *y*, *x* and *z* directions respectively. *θ*, *φ* and *ψ* are the pitch, roll and yaw Euler angles and *p*, *q* and *r* are the angular velocities in the body-fixed frame. *kx*, *ky*, *kz*, *kp*, *kq* and *kr* are drag coefficients and are constant.

The angular velocities in the inertial frame (Euler rates) can be related to those in the body

1 0 −*sinθ* 0 *cosφ cosθsinφ* 0 −*sinφ cosθcosφ*

Close to hovering conditions, the matrix in the above equation is close to identity matrix and therefore the angular velocities in the body frame can be seen as the angular velocities in the

> *mx*¨ = *uz* (*cosφ sinθ cosψ* + *sinφ sinψ*) − *kx x*˙ *my*¨ = *uz* (*cosφ sinθ sinψ* − *sinφ cosψ*) − *kyy*˙

*mz*¨ = *uz* (*cosφ cosθ*) − *mg* − *kzz*˙

*Jy* − *Jz* �

*Jx* − *Jy* � ˙

*mz*¨ = *uz* (*cosφ cosθ*) − *mg* − *kzz*˙

*Jy* − *Jz* �

*Jx* − *Jy* �

*JT* is the moment of inertia for each motor and Ω is the overall speed of propellers:

*Jyq*˙ = *uq* + (*Jz* − *Jx*) *pr* − *JT p* Ω − *kqq*

*Jx p*˙ = *up* + �

*Jzr*˙ = *ur* + �

*th* propeller speed.

inertial frame. The model (1) can then be written as:

*Jx* ¨

*<sup>θ</sup>* = *<sup>u</sup><sup>θ</sup>* + �

*Jzψ*¨ = *u<sup>ψ</sup>* + �

*Jyφ*¨ <sup>=</sup> *<sup>u</sup><sup>φ</sup>* <sup>+</sup> (*Jz* <sup>−</sup> *Jx*) ˙

⎡ ⎢ ⎢ ⎢ ⎣

*p q r*

⎤ ⎥ ⎥ ⎥ ⎦ = ⎡ ⎢ ⎢ ⎢ ⎣ **Geometry UAV**

Lift

Torques

**Dynamics**

P V A

(1)

(3)

(4)

**ESCs + Motors + Propellers**

Fig. 2. The UAV system block diagram.

Thrusts

*u*

PWM

body frame (Bresciani, 2008):

where Ω*<sup>i</sup>* is the *i*

frame as follows:

A schematic representation of the Qball-X4 is given in Figure 1(b). The motors and propellers are configured in such a way that the back and front (1 and 2) motors spin clockwise and the left and right (3 and 4) spin counter-clockwise. Each motor is located at a distance *L* from the center of mass *o* and when spinning, a motor produces a torque *τi*. The origin of the body-fixed frame is the system's center of mass *o* with the *x*-axis pointing from back to front and the *y*-axis pointing from right to left. The thrust *Ti* generated by the *i th* propeller is always pointing upward in the *z*-direction in parallel to the motor's rotation axis. The thrusts *Ti* and

state/output variables, and post-fault system models need to be estimated on-line in real-time. Based on the on-line information on the post-fault system model, the controller must be automatically reconfigured to maintain stability, desired dynamic performance and steady-state performance. To avoid potential actuator saturation and to take into consideration the degraded performance after fault occurrence, a command/reference governor may also need to be designed to adjust command input or reference trajectory automatically. Interested readers about FTCS may refer to the bibliographical review (Zhang & Jiang, 2008) and the recently published books (Noura et al., 2009) and (Edwards et al., 2010).

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 125

**Actuators System Sensors**

**Reconfigurable Feedback Controller**

System Faults

Actuator Faults

The subsequent sections consider some of the FTC methods that have been developed for the quadrotor UAV. Some of these are classified as passive FTC methods where the fault tolerance is achieved thanks to the controller's robustness without changing the controller gains. Others are active FTC methods where control gains are updated in function of the occurring faults.

The Proportional-Integral-Derivative (PID) controller is the most widely used among controllers in industry. This is due to its unique features such as the simple structure, the ease of use and tunning. Its main advantages over other control strategies is that it does not require a mathematical model of the process/system to be controlled and thus allows to save time and effort by skipping the modeling phase. PID controllers are reliable and can be used for linear and nonlinear systems with certain level of robustness to model uncertainties and disturbances. Although one single PID controller can handle a wide range of system nonlinearities, better performance can be obtained when using multiple PIDs to cover the entire operation range of a nonlinear process/system. This is known as gain-scheduled PID

The operating principle of GS-PID is shown in Figure 4(a) where the controlled system may have varying dynamic properties as for example a varying gain (Haugen, 2004). The adjustment/scheduling of the PID controller gains is performed by using a gain scheduling variable GS. This is some measured process variable which at every instant of time expresses

**w v** Sensor

Faults

**Reconfiguration Mechanism**

**z**

**r u**

Fig. 3. A general structure of AFTCS (Zhang & Jiang, 2008).

**Reconfigurable Feedforward Controller**

**Command (Reference) Governor**

**3.1 Gain-scheduled PID (GS-PID)**

(GS-PID) (Sadeghzadeh et al., 2011).

or represents the dynamic properties of the process.

**Fault Detection and Diagnosis (FDD)**

the torques *τ<sup>i</sup>* result in a lift in the *z*-direction (body-fixed frame) and torques about the *x*, *y* and *z* axis. The relation between the lift/torques and the thrusts is:

$$\begin{aligned} \mu\_z &= T\_1 + T\_2 + T\_3 + T\_4 \\ \mu\_\theta &= L(T\_1 - T\_2) \\ \mu\_\phi &= L(T\_3 - T\_4) \\ \mu\_\psi &= \tau\_1 + \tau\_2 - \tau\_3 - \tau\_4 \end{aligned} \tag{8}$$

The torque *τ<sup>i</sup>* produced by the *i th* motor is directly related to the thrust *Ti* via the relation of *τ<sup>i</sup>* = *KψTi* with *K<sup>ψ</sup>* as a constant. In addition, by setting *Ti* ≈ *Kui* from (7), the relation (8) reads:

$$\begin{aligned} \mu\_z &= K(\mu\_1 + \mu\_2 + \mu\_3 + \mu\_4) \\ \mu\_\theta &= KL(\mu\_1 - \mu\_2) \\ \mu\_\phi &= KL(\mu\_3 - \mu\_4) \\ \mu\_\psi &= KK\_\psi(\mu\_1 + \mu\_2 - \mu\_3 - \mu\_4) \end{aligned} \tag{9}$$

where *uz* is the total lift generated by the four propellers and applied to the quadrotor UAV in the *z*-direction (body-fixed frame). *u<sup>θ</sup>* , *u<sup>φ</sup>* and *u<sup>ψ</sup>* are respectively the applied torques in *θ*, *φ* and *ψ* directions (see Figure 1(b)).

## **3. Fault-tolerant control algorithms**

Modern technological systems rely on sophisticated control systems to replace or reduce the intervention of human operators. In the event of malfunctions in actuators, sensors or other system components, a conventional feedback control design may result in an unsatisfactory performance or even instability of the controlled system. To prevent such situations, new control approaches have been developed in order to tolerate component malfunctions while maintaining desirable stability and performance properties. This is particularly important for safety-critical systems, such as aircrafts, spacecrafts, nuclear power plants, and chemical plants processing hazardous materials. In such systems, the consequences of a minor fault in a system component can be catastrophic. It is necessary then to design control systems which are capable of tolerating potential faults in these systems in order to improve the reliability and availability while providing a desirable performance. These types of control systems are often known as fault-tolerant control systems (FTCS). More precisely, FTCS are control systems which possess the ability to accommodate component failures automatically. They are capable of maintaining overall system stability and acceptable performance in the event of such failures (Zhang & Jiang, 2008).

Generally speaking, FTCS can be classified into two types: passive (PFTCS) and active (AFTCS). In PFTCS, controllers are fixed and are designed to be robust against a class of presumed faults. This approach needs neither FDD schemes nor controller reconfiguration, but it has limited fault-tolerant capabilities. In contrast to PFTCS, AFTCS react to the system component failures actively by reconfiguring control actions so that the stability and acceptable performance of the entire system can be maintained (Zhang & Jiang, 2008). An overall structure of a typical AFTCS is shown in Figure 3. In the FDD module, faults must be detected and isolated as quickly as possible, and fault parameters, system state/output variables, and post-fault system models need to be estimated on-line in real-time. Based on the on-line information on the post-fault system model, the controller must be automatically reconfigured to maintain stability, desired dynamic performance and steady-state performance. To avoid potential actuator saturation and to take into consideration the degraded performance after fault occurrence, a command/reference governor may also need to be designed to adjust command input or reference trajectory automatically. Interested readers about FTCS may refer to the bibliographical review (Zhang & Jiang, 2008) and the recently published books (Noura et al., 2009) and (Edwards et al., 2010).

Fig. 3. A general structure of AFTCS (Zhang & Jiang, 2008).

The subsequent sections consider some of the FTC methods that have been developed for the quadrotor UAV. Some of these are classified as passive FTC methods where the fault tolerance is achieved thanks to the controller's robustness without changing the controller gains. Others are active FTC methods where control gains are updated in function of the occurring faults.

## **3.1 Gain-scheduled PID (GS-PID)**

6 Will-be-set-by-IN-TECH

the torques *τ<sup>i</sup>* result in a lift in the *z*-direction (body-fixed frame) and torques about the *x*, *y*

*uz* = *T*<sup>1</sup> + *T*<sup>2</sup> + *T*<sup>3</sup> + *T*<sup>4</sup>

(8)

(9)

*u<sup>ψ</sup>* = *τ*<sup>1</sup> + *τ*<sup>2</sup> − *τ*<sup>3</sup> − *τ*<sup>4</sup>

*τ<sup>i</sup>* = *KψTi* with *K<sup>ψ</sup>* as a constant. In addition, by setting *Ti* ≈ *Kui* from (7), the relation (8)

*u<sup>ψ</sup>* = *KKψ*(*u*<sup>1</sup> + *u*<sup>2</sup> − *u*<sup>3</sup> − *u*4)

where *uz* is the total lift generated by the four propellers and applied to the quadrotor UAV in the *z*-direction (body-fixed frame). *u<sup>θ</sup>* , *u<sup>φ</sup>* and *u<sup>ψ</sup>* are respectively the applied torques in *θ*, *φ*

Modern technological systems rely on sophisticated control systems to replace or reduce the intervention of human operators. In the event of malfunctions in actuators, sensors or other system components, a conventional feedback control design may result in an unsatisfactory performance or even instability of the controlled system. To prevent such situations, new control approaches have been developed in order to tolerate component malfunctions while maintaining desirable stability and performance properties. This is particularly important for safety-critical systems, such as aircrafts, spacecrafts, nuclear power plants, and chemical plants processing hazardous materials. In such systems, the consequences of a minor fault in a system component can be catastrophic. It is necessary then to design control systems which are capable of tolerating potential faults in these systems in order to improve the reliability and availability while providing a desirable performance. These types of control systems are often known as fault-tolerant control systems (FTCS). More precisely, FTCS are control systems which possess the ability to accommodate component failures automatically. They are capable of maintaining overall system stability and acceptable performance in the event

Generally speaking, FTCS can be classified into two types: passive (PFTCS) and active (AFTCS). In PFTCS, controllers are fixed and are designed to be robust against a class of presumed faults. This approach needs neither FDD schemes nor controller reconfiguration, but it has limited fault-tolerant capabilities. In contrast to PFTCS, AFTCS react to the system component failures actively by reconfiguring control actions so that the stability and acceptable performance of the entire system can be maintained (Zhang & Jiang, 2008). An overall structure of a typical AFTCS is shown in Figure 3. In the FDD module, faults must be detected and isolated as quickly as possible, and fault parameters, system

*uz* = *K*(*u*<sup>1</sup> + *u*<sup>2</sup> + *u*<sup>3</sup> + *u*4)

*u<sup>θ</sup>* = *KL*(*u*<sup>1</sup> − *u*2) *u<sup>φ</sup>* = *KL*(*u*<sup>3</sup> − *u*4)

*th* motor is directly related to the thrust *Ti* via the relation of

*u<sup>θ</sup>* = *L*(*T*<sup>1</sup> − *T*2) *u<sup>φ</sup>* = *L*(*T*<sup>3</sup> − *T*4)

and *z* axis. The relation between the lift/torques and the thrusts is:

The torque *τ<sup>i</sup>* produced by the *i*

and *ψ* directions (see Figure 1(b)).

**3. Fault-tolerant control algorithms**

of such failures (Zhang & Jiang, 2008).

reads:

The Proportional-Integral-Derivative (PID) controller is the most widely used among controllers in industry. This is due to its unique features such as the simple structure, the ease of use and tunning. Its main advantages over other control strategies is that it does not require a mathematical model of the process/system to be controlled and thus allows to save time and effort by skipping the modeling phase. PID controllers are reliable and can be used for linear and nonlinear systems with certain level of robustness to model uncertainties and disturbances. Although one single PID controller can handle a wide range of system nonlinearities, better performance can be obtained when using multiple PIDs to cover the entire operation range of a nonlinear process/system. This is known as gain-scheduled PID (GS-PID) (Sadeghzadeh et al., 2011).

The operating principle of GS-PID is shown in Figure 4(a) where the controlled system may have varying dynamic properties as for example a varying gain (Haugen, 2004). The adjustment/scheduling of the PID controller gains is performed by using a gain scheduling variable GS. This is some measured process variable which at every instant of time expresses or represents the dynamic properties of the process.

clearly, the switching time and gains depend on how fast and precise the FDD module is in detecting, isolating and identifying the faults. It is shown in Section 4 and through experimentations how the switching time affects the behavior of the system in handling the

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 127

Many adaptive control techniques for preserving stability have been proposed to deal with disturbances, unmodeled dynamics and time delays. Particularly, the concept of model reference adaptive control (MRAC) has gained significant attention and is now part of many standard textbooks on nonlinear and adaptive control. Two basic approaches for MRAC can be distinguished: the direct and the indirect approaches. In the direct method, the controller parameters are adjusted based on the error between the reference model describing the desired dynamics and the closed-loop dynamics of the physical plant. In the indirect approach, the parameters of the plant are estimated by updating them based on the identification error between the measured states and those provided by the estimation model. In this work, three MRAC techniques are implemented and applied to the Qball-X4, namely the MIT rule-based MRAC, the conventional MRAC and the modified MRAC (Chamseddine

This MRAC approach has been developed around 1960 at the Massachusetts Institute of Technology (MIT) for aerospace applications (Ioannou & Sun, 1995). For illustration, consider

where *a*1, *a*<sup>2</sup> and *b* are the unknown plant parameters. The reference model to be matched by

where *r*(*t*) is the reference command and *ami* (*i* = 1, 2, 3) and *bm* are constant and are chosen according to performance specifications. Let the control input *u*(*t*) be defined as follows:

It is obvious that one can achieve perfect model following if *k*1, *k*<sup>2</sup> and *k*<sup>3</sup> are chosen such that:

The control signal given by (12) cannot be implemented since the system parameters *a*1, *a*<sup>2</sup>

*<sup>k</sup>*2(*t*)*y*(*t*) <sup>−</sup> <sup>ˆ</sup>

*u*(*t*) = −*k*1*y*˙(*t*) − *k*2*y*(*t*) − *k*<sup>3</sup>

By replacing (12) in (10) and differentiating with respect to time, one obtains:

and *b* are assumed to be unknown. Nevertheless, one can use the following:

*<sup>k</sup>*1(*t*)*y*˙(*t*) <sup>−</sup> <sup>ˆ</sup>

*y*¨(*t*) = −*a*1*y*˙(*t*) − *a*2*y*(*t*) + *bu*(*t*) (10)

(*y*(*τ*) − *r*(*τ*)) *dτ* (12)

(*y*(*τ*) − *r*(*τ*)) *dτ* (15)

*<sup>m</sup>* (*t*) = −*am*<sup>1</sup> *y*¨*m*(*t*) − *am*<sup>2</sup> *y*˙*m*(*t*) − *am*<sup>3</sup> *ym*(*t*) + *bmr*(*t*) (11)

 *t* 0

(*t*) = − (*a*<sup>1</sup> + *bk*1) *y*¨(*t*) − (*a*<sup>2</sup> + *bk*2) *y*˙(*t*) − *bk*3*y*(*t*) + *bk*3*r*(*t*) (13)

*a*<sup>1</sup> + *bk*<sup>1</sup> = *am*<sup>1</sup> , *a*<sup>2</sup> + *bk*<sup>2</sup> = *am*<sup>2</sup> and *bk*<sup>3</sup> = *am*<sup>3</sup> = *bm* (14)

*k*3(*t*) *t* 0

occurring faults.

et al., 2011a).

**3.2.1 MIT rule**

the plant:

the closed-loop plant is:

*y* (3)

*y*(3)

*<sup>u</sup>*(*t*) = <sup>−</sup><sup>ˆ</sup>

**3.2 Model reference adaptive control (MRAC)**

Fig. 4. The operating principle of GS-PID and two rules for the interpolation of the proportional gain *Kp*.

There are several ways to express the PID parameters as functions of the GS variable such as the *piecewise constant controller parameters* and the *piecewise interpolation*. In the former method, an interval is defined around each GS value and the controller parameters are kept constant as long as the GS value is within the interval (see Figure 4(b) for an example of the proportional gain *Kp*). When the GS variable changes from one interval to another, the controller parameters are changed abruptly (Haugen, 2004). The same idea applies for the Integrator and Derivative gains. In the second method also shown in Figure 4(b), a linear function is found relating the controller parameter (output variable) and the GS variable (input variable). For the proportional gain, the linear function is of the form *Kp* = *aGS* + *b* where *a* and *b* are two constants to be calculated.

Since faults can be seen as varying parameters, GS-PID can also be used to deal with possible fault conditions that may take place in the actuators or the system components. Some research works consider this problem: a GS-PID control strategy is proposed in (Bani Milhim, 2010a) and (Bani Milhim et al., 2010b) in simulation framework to achieve fault-tolerant control for the quadrotor helicopter UAV in the presence of actuator faults. In (Johnson et al., 2010), the authors investigate this technique for a Georgia Tech Twinstar fixed-wing research vehicle in the presence of partial damage of the wing. As continuation of the work presented in (Bani Milhim et al., 2010b), GS-PID has been considered for further investigation and most importantly for experimental implementation and application to the Qball-X4 UAV testbed for fault-tolerant trajectory tracking control (Sadeghzadeh et al., 2011). The GS-PID has been implemented for different sections of the entire flight envelope by properly tuning the PID controller gains for both normal and fault conditions. A set of PID controllers is then designed for the fault-free situation and each possible fault situation. The switching from one PID to another is then based on the actuator's health status (hence, the scheduling variable GS is the actuator's health status). A Fault Detection and Diagnosis (FDD) scheme is then needed to provide the time of fault occurrence as well as the location and the magnitude of the fault during the flight. Based on the information provided by the FDD module, the GS-PID controller will switch the controller gains under normal flight conditions to the pre-tuned and fault-related gains to handle the faults during the flight of the UAV. One of the main issues to consider in GS-PID is how fast to switch from the nominal PID gains to the pre-tuned fault-related gains after fault occurrence. This issue does not represent a problem when the scheduling variable GS is a measured variable since in most cases it is instantaneously provided by the sensors. However, when the GS is the health status of the actuators then clearly, the switching time and gains depend on how fast and precise the FDD module is in detecting, isolating and identifying the faults. It is shown in Section 4 and through experimentations how the switching time affects the behavior of the system in handling the occurring faults.

## **3.2 Model reference adaptive control (MRAC)**

Many adaptive control techniques for preserving stability have been proposed to deal with disturbances, unmodeled dynamics and time delays. Particularly, the concept of model reference adaptive control (MRAC) has gained significant attention and is now part of many standard textbooks on nonlinear and adaptive control. Two basic approaches for MRAC can be distinguished: the direct and the indirect approaches. In the direct method, the controller parameters are adjusted based on the error between the reference model describing the desired dynamics and the closed-loop dynamics of the physical plant. In the indirect approach, the parameters of the plant are estimated by updating them based on the identification error between the measured states and those provided by the estimation model. In this work, three MRAC techniques are implemented and applied to the Qball-X4, namely the MIT rule-based MRAC, the conventional MRAC and the modified MRAC (Chamseddine et al., 2011a).

#### **3.2.1 MIT rule**

8 Will-be-set-by-IN-TECH

*Kp*

*Kp1*

*Kp2 Kp3*

*GS GS <sup>1</sup> GS2 GS3*

Piecewise constant value

Linear interpolation

(b) Constant and linear interpolation

**Set point Process**

**PID**

(a) Operating principle of GS-PID

where *a* and *b* are two constants to be calculated.

proportional gain *Kp*.

**Sensor**

*GS*

Fig. 4. The operating principle of GS-PID and two rules for the interpolation of the

There are several ways to express the PID parameters as functions of the GS variable such as the *piecewise constant controller parameters* and the *piecewise interpolation*. In the former method, an interval is defined around each GS value and the controller parameters are kept constant as long as the GS value is within the interval (see Figure 4(b) for an example of the proportional gain *Kp*). When the GS variable changes from one interval to another, the controller parameters are changed abruptly (Haugen, 2004). The same idea applies for the Integrator and Derivative gains. In the second method also shown in Figure 4(b), a linear function is found relating the controller parameter (output variable) and the GS variable (input variable). For the proportional gain, the linear function is of the form *Kp* = *aGS* + *b*

Since faults can be seen as varying parameters, GS-PID can also be used to deal with possible fault conditions that may take place in the actuators or the system components. Some research works consider this problem: a GS-PID control strategy is proposed in (Bani Milhim, 2010a) and (Bani Milhim et al., 2010b) in simulation framework to achieve fault-tolerant control for the quadrotor helicopter UAV in the presence of actuator faults. In (Johnson et al., 2010), the authors investigate this technique for a Georgia Tech Twinstar fixed-wing research vehicle in the presence of partial damage of the wing. As continuation of the work presented in (Bani Milhim et al., 2010b), GS-PID has been considered for further investigation and most importantly for experimental implementation and application to the Qball-X4 UAV testbed for fault-tolerant trajectory tracking control (Sadeghzadeh et al., 2011). The GS-PID has been implemented for different sections of the entire flight envelope by properly tuning the PID controller gains for both normal and fault conditions. A set of PID controllers is then designed for the fault-free situation and each possible fault situation. The switching from one PID to another is then based on the actuator's health status (hence, the scheduling variable GS is the actuator's health status). A Fault Detection and Diagnosis (FDD) scheme is then needed to provide the time of fault occurrence as well as the location and the magnitude of the fault during the flight. Based on the information provided by the FDD module, the GS-PID controller will switch the controller gains under normal flight conditions to the pre-tuned and fault-related gains to handle the faults during the flight of the UAV. One of the main issues to consider in GS-PID is how fast to switch from the nominal PID gains to the pre-tuned fault-related gains after fault occurrence. This issue does not represent a problem when the scheduling variable GS is a measured variable since in most cases it is instantaneously provided by the sensors. However, when the GS is the health status of the actuators then

**Adjustment mechanism**

> This MRAC approach has been developed around 1960 at the Massachusetts Institute of Technology (MIT) for aerospace applications (Ioannou & Sun, 1995). For illustration, consider the plant:

$$
\ddot{y}(t) = -a\_1 \dot{y}(t) - a\_2 y(t) + b u(t) \tag{10}
$$

where *a*1, *a*<sup>2</sup> and *b* are the unknown plant parameters. The reference model to be matched by the closed-loop plant is:

$$y\_m^{(3)}(t) = -a\_{m\_1} \ddot{y}\_m(t) - a\_{m\_2} \dot{y}\_m(t) - a\_{m\_3} y\_m(t) + b\_m r(t) \tag{11}$$

where *r*(*t*) is the reference command and *ami* (*i* = 1, 2, 3) and *bm* are constant and are chosen according to performance specifications. Let the control input *u*(*t*) be defined as follows:

$$u(t) = -k\_1 \dot{y}(t) - k\_2 y(t) - k\_3 \int\_0^t (y(\tau) - r(\tau)) \, d\tau \tag{12}$$

By replacing (12) in (10) and differentiating with respect to time, one obtains:

$$y^{(3)}(t) = -\left(a\_1 + bk\_1\right)\ddot{y}(t) - \left(a\_2 + bk\_2\right)\dot{y}(t) - bk\_3y(t) + bk\_3r(t)\tag{13}$$

It is obvious that one can achieve perfect model following if *k*1, *k*<sup>2</sup> and *k*<sup>3</sup> are chosen such that:

$$a\_1 + bk\_1 = a\_{m\_1}, \; a\_2 + bk\_2 = a\_{m\_2} \text{ and } \; bk\_3 = a\_{m\_3} = b\_m \tag{14}$$

The control signal given by (12) cannot be implemented since the system parameters *a*1, *a*<sup>2</sup> and *b* are assumed to be unknown. Nevertheless, one can use the following:

$$u(t) = -\hat{k}\_1(t)\dot{y}(t) - \hat{k}\_2(t)y(t) - \hat{k}\_3(t)\int\_0^t \left(y(\tau) - r(\tau)\right)d\tau\tag{15}$$

*a*ˆ2 and ˆ

*k*<sup>3</sup> using

*γ* and ˆ

*a*ˆ1 + ˆ *b*ˆ

and obtain the approximate sensitivity functions as: *∂y ∂*ˆ *k*1

> *∂y ∂*ˆ *k*2

> *∂y ∂*ˆ *k*3

> > *k*1, ˆ

*d*ˆ *k*1 *dt* <sup>=</sup> *<sup>γ</sup><sup>e</sup>*

*d*ˆ *k*2 *dt* <sup>=</sup> *<sup>γ</sup><sup>e</sup>*

*d*ˆ *k*3 *dt* <sup>=</sup> *<sup>γ</sup><sup>e</sup>*

frequencies, and the initial conditions ˆ

unbounded signal response.

**3.2.2 Conventional MRAC**

Krinshnakumar, 2010a):

*equations hold*

*k*<sup>2</sup> and ˆ

Finally, the adaptation of ˆ

*b* in the matching condition (14), i.e. we relate the estimates *a*ˆ1, *a*ˆ2 and ˆ

*b*ˆ

*p*<sup>3</sup> + *am*<sup>1</sup> *p*<sup>2</sup> + *am*<sup>2</sup> *p* + *am*<sup>3</sup>

*p*<sup>3</sup> + *am*<sup>1</sup> *p*<sup>2</sup> + *am*<sup>2</sup> *p* + *am*<sup>3</sup>

*p*<sup>3</sup> + *am*<sup>1</sup> *p*<sup>2</sup> + *am*<sup>2</sup> *p* + *am*<sup>3</sup>

1 *p*<sup>3</sup> + *am*<sup>1</sup> *p*<sup>2</sup> + *am*<sup>2</sup> *p* + *am*<sup>3</sup>

1 *p*<sup>3</sup> + *am*<sup>1</sup> *p*<sup>2</sup> + *am*<sup>2</sup> *p* + *am*<sup>3</sup>

1 *p*<sup>3</sup> + *am*<sup>1</sup> *p*<sup>2</sup> + *am*<sup>2</sup> *p* + *am*<sup>3</sup>

The equations given by (22) are known as the *sensitivity filters or models*, and can be easily implemented to generate the approximate sensitivity functions for the adaptive law (23). It should be noted that the MRAC based on the MIT rule is locally stable provided the adaptive gain *γ* is small, the reference input signal *r* has a small amplitude and sufficient number of

Consider a multi-input multi-output (MIMO) uncertain linear system (Stepanyan &

where *<sup>x</sup>* ∈ �*<sup>n</sup>* and *<sup>u</sup>* ∈ � are the state and the control input of the system respectively. *<sup>f</sup>*(*t*) <sup>∈</sup> � is a bounded and piece-wise continuous external disturbance. *<sup>A</sup>* ∈ �*n*×*<sup>n</sup>* and *<sup>B</sup>* ∈ �*n*×*<sup>p</sup>* are

**Assumption 1.** *Given a Hurwitz matrix Am* ∈ �*n*×*<sup>n</sup> and a matrix Bm* ∈ �*n*×*<sup>p</sup> of full column rank, there exists a matrix K*<sup>1</sup> ∈ �*p*×*<sup>n</sup> and a sign definite matrix* <sup>Λ</sup> ∈ �*p*×*<sup>p</sup> such that the following*

*A* = *Am* − *BK*<sup>1</sup>

*B* = *Bm*Λ

*ki*(0) away from the nominal values of *ki*, the MIT rule may lead to instability and

*<sup>k</sup>*<sup>1</sup> = *am*<sup>1</sup> , *<sup>a</sup>*ˆ2 + <sup>ˆ</sup>

<sup>≈</sup> <sup>−</sup>*<sup>b</sup>*

<sup>≈</sup> <sup>−</sup>*<sup>b</sup>*

<sup>≈</sup> <sup>−</sup>*<sup>b</sup>*

*k*<sup>3</sup> is:

where the unknow parameter *b* in the numerator is absorbed by the gains ˆ

unknown constant matrices satisfying the following matching conditions.

*<sup>k</sup>*<sup>2</sup> and <sup>ˆ</sup>

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 129

*<sup>k</sup>*<sup>2</sup> = *am*<sup>2</sup> and <sup>ˆ</sup>

*b*ˆ

*y*¨(*t*)

(*y*(*t*) − *r*(*t*))

(*y*(*t*) − *r*(*t*))

*ki*(0) are close to the nominal values of *ki*. For large

*x*˙(*t*) = *Ax*(*t*) + *B* [*u*(*t*) − *f*(*t*)] , *x*(0) = *x*<sup>0</sup> (24)

*y*¨(*t*)

*b* with ˆ

*k*<sup>3</sup> = *am*<sup>3</sup> = *bm* (21)

*y*˙(*t*) (22)

*y*˙(*t*) (23)

*ki*.

(25)

*k*1, ˆ

where ˆ *ki* are the estimates of *ki* and are updated according to the MIT rule. The objective of the MIT rule is to adjust the parameters *k*1, *k*<sup>2</sup> and *k*<sup>3</sup> so as to minimize a cost function *J*. This cost function can be chosen for example as follows:

$$J = \frac{1}{2}e^2\tag{16}$$

where *e* is the tracking error between the system and the reference model, i.e. *e* = *y* − *ym*. It is reasonable to adjust the parameters in the direction of the negative gradient of *J*:

$$\frac{d\hat{k}\_i}{dt} = -\gamma \frac{\partial f}{\partial \hat{k}\_i} = -\gamma e \frac{\partial e}{\partial \hat{k}\_i} = -\gamma e \frac{\partial y}{\partial \hat{k}\_i} \tag{17}$$

where *γ* > 0 is the adaptation rate. *∂e*/*∂*ˆ *ki* is called the sensitivity derivative of the system and is evaluated under the assumption that ˆ *ki* varies slowly. To calculate *<sup>∂</sup>y*/*∂*<sup>ˆ</sup> *ki* in (17) one can use (13) to obtain:

$$\begin{split} \frac{\partial y^{(3)}}{\partial \hat{k}\_{1}} &= -a\_{1} \frac{\partial \vec{y}}{\partial \hat{k}\_{1}} - a\_{2} \frac{\partial \vec{y}}{\partial \hat{k}\_{1}} - b\hat{k}\_{3} \frac{\partial y}{\partial \hat{k}\_{1}} - b\vec{y}(t) - b\hat{k}\_{1} \frac{\partial \vec{y}}{\partial \hat{k}\_{1}} - b\hat{k}\_{2} \frac{\partial \vec{y}}{\partial \hat{k}\_{1}} \\ \frac{\partial y^{(3)}}{\partial \hat{k}\_{2}} &= -a\_{1} \frac{\partial \vec{y}}{\partial \hat{k}\_{2}} - a\_{2} \frac{\partial \vec{y}}{\partial \hat{k}\_{2}} - b\hat{k}\_{3} \frac{\partial y}{\partial \hat{k}\_{2}} - b\hat{y}(t) - b\hat{k}\_{1} \frac{\partial \vec{y}}{\partial \hat{k}\_{2}} - b\hat{k}\_{2} \frac{\partial \vec{y}}{\partial \hat{k}\_{2}} \\ \frac{\partial y^{(3)}}{\partial \hat{k}\_{3}} &= -a\_{1} \frac{\partial \vec{y}}{\partial \hat{k}\_{3}} - a\_{2} \frac{\partial \vec{y}}{\partial \hat{k}\_{3}} - b\hat{k}\_{3} \frac{\partial y}{\partial \hat{k}\_{3}} - by(t) - b\hat{k}\_{1} \frac{\partial \vec{y}}{\partial \hat{k}\_{3}} - b\hat{k}\_{2} \frac{\partial \vec{y}}{\partial \hat{k}\_{3}} + br(t) \end{split} \tag{18}$$

With the assumption that the rate of adaptation is slow, i.e. ˆ *ki* are small and the changes of *y*(3), *y*¨ and *y* with respect to ˆ *k*1, ˆ *k*<sup>2</sup> and ˆ *k*<sup>3</sup> are also small, one can interchange the order of differentiation to obtain:

$$\begin{split} \frac{d^3}{dt^3} \frac{\partial \boldsymbol{y}}{\partial \hat{k}\_1} &= -(a\_1 + b\hat{\mathbb{k}}\_1) \frac{d^2}{dt^2} \frac{\partial \boldsymbol{y}}{\partial \hat{k}\_1} - (a\_2 + b\hat{\mathbb{k}}\_2) \frac{d}{dt} \frac{\partial \boldsymbol{y}}{\partial \hat{k}\_1} - b\hat{\mathbb{k}}\_3 \frac{\partial \boldsymbol{y}}{\partial \hat{k}\_1} - b\vec{\mathbb{y}}(t) \\ \frac{d^3}{dt^3} \frac{\partial \boldsymbol{y}}{\partial \hat{k}\_2} &= -(a\_1 + b\hat{\mathbb{k}}\_1) \frac{d^2}{dt^2} \frac{\partial \boldsymbol{y}}{\partial \hat{k}\_2} - (a\_2 + b\hat{\mathbb{k}}\_2) \frac{d}{dt} \frac{\partial \boldsymbol{y}}{\partial \hat{k}\_2} - b\hat{\mathbb{k}}\_3 \frac{\partial \boldsymbol{y}}{\partial \hat{k}\_2} - b\boldsymbol{y}(t) \\ \frac{d^3}{dt^3} \frac{\partial \boldsymbol{y}}{\partial \hat{k}\_3} &= -(a\_1 + b\hat{\mathbb{k}}\_1) \frac{d^2}{dt^2} \frac{\partial \boldsymbol{y}}{\partial \hat{k}\_3} - (a\_2 + b\hat{\mathbb{k}}\_2) \frac{d}{dt} \frac{\partial \boldsymbol{y}}{\partial \hat{k}\_3} - b\hat{\mathbb{k}}\_3 \frac{\partial \boldsymbol{y}}{\partial \hat{k}\_3} - b\boldsymbol{y}(t) + b\boldsymbol{r}(t) \end{split} \tag{19}$$

These latter equations can be written as:

$$\begin{aligned} \frac{\partial \dot{y}}{\partial \dot{k}\_1} &= \frac{-b}{p^3 + (a\_1 + b\hat{k}\_1)p^2 + (a\_2 + b\hat{k}\_2)p + b\hat{k}\_3} \dot{y}(t) \\ \frac{\partial \dot{y}}{\partial \dot{k}\_2} &= \frac{-b}{p^3 + (a\_1 + b\hat{k}\_1)p^2 + (a\_2 + b\hat{k}\_2)p + b\hat{k}\_3} \dot{y}(t) \\ \frac{\partial \dot{y}}{\partial \dot{k}\_3} &= \frac{-b}{p^3 + (a\_1 + b\hat{k}\_1)p^2 + (a\_2 + b\hat{k}\_2)p + b\hat{k}\_3} \left(y(t) - r(t)\right) \end{aligned} \tag{20}$$

where *p* is the differential operator. Because *a*1, *a*<sup>2</sup> and *b* are unknown, the above sensitivity functions cannot be used. Using the MIT rule, we replace *a*1, *a*<sup>2</sup> and *b* with their estimates *a*ˆ1, *a*ˆ2 and ˆ *b* in the matching condition (14), i.e. we relate the estimates *a*ˆ1, *a*ˆ2 and ˆ *b* with ˆ *k*1, ˆ *<sup>k</sup>*<sup>2</sup> and <sup>ˆ</sup> *k*<sup>3</sup> using

$$\pounds\_1 + \pounds\hat{k}\_1 = a\_{m\_1}, \pounds\_2 + \pounds\hat{k}\_2 = a\_{m\_2} \text{ and } \pounds\hat{k}\_3 = a\_{m\_3} = b\_m \tag{21}$$

and obtain the approximate sensitivity functions as:

$$\begin{aligned} \frac{\partial \underline{y}}{\partial \bar{k}\_1} &\approx \frac{-b}{p^3 + a\_{m\_1}p^2 + a\_{m\_2}p + a\_{m\_3}} \ddot{y}(t) \\ \frac{\partial \underline{y}}{\partial \bar{k}\_2} &\approx \frac{-b}{p^3 + a\_{m\_1}p^2 + a\_{m\_2}p + a\_{m\_3}} \ddot{y}(t) \\ \frac{\partial \underline{y}}{\partial \bar{k}\_3} &\approx \frac{-b}{p^3 + a\_{m\_1}p^2 + a\_{m\_2}p + a\_{m\_3}} (y(t) - r(t)) \end{aligned} \tag{22}$$

Finally, the adaptation of ˆ *k*1, ˆ *k*<sup>2</sup> and ˆ *k*<sup>3</sup> is:

10 Will-be-set-by-IN-TECH

*<sup>J</sup>* <sup>=</sup> <sup>1</sup> 2 *e*

where *e* is the tracking error between the system and the reference model, i.e. *e* = *y* − *ym*. It is

= −*γe*

*∂e ∂*ˆ *ki*

<sup>−</sup> *by*¨(*t*) <sup>−</sup> *<sup>b</sup>*<sup>ˆ</sup>

<sup>−</sup> *by*˙(*t*) <sup>−</sup> *<sup>b</sup>*<sup>ˆ</sup>

<sup>−</sup> *by*(*t*) <sup>−</sup> *<sup>b</sup>*<sup>ˆ</sup>

*<sup>k</sup>*2) *<sup>d</sup> dt ∂y ∂*ˆ *k*1 <sup>−</sup> *<sup>b</sup>*<sup>ˆ</sup> *k*3 *∂y ∂*ˆ *k*1

*<sup>k</sup>*2) *<sup>d</sup> dt ∂y ∂*ˆ *k*2 <sup>−</sup> *<sup>b</sup>*<sup>ˆ</sup> *k*3 *∂y ∂*ˆ *k*2

*<sup>k</sup>*2) *<sup>d</sup> dt ∂y ∂*ˆ *k*3 <sup>−</sup> *<sup>b</sup>*<sup>ˆ</sup> *k*3 *∂y ∂*ˆ *k*3

> *k*2)*p* + *b*ˆ *k*3 *y*¨(*t*)

*k*2)*p* + *b*ˆ *k*3

*k*2)*p* + *b*ˆ *k*3

= −*γe*

*∂y ∂*ˆ *ki*

*ki* varies slowly. To calculate *<sup>∂</sup>y*/*∂*<sup>ˆ</sup>

*k*1 *∂y*¨ *∂*ˆ *k*1 <sup>−</sup> *<sup>b</sup>*<sup>ˆ</sup> *k*2 *∂y*˙ *∂*ˆ *k*1

*k*1 *∂y*¨ *∂*ˆ *k*2 <sup>−</sup> *<sup>b</sup>*<sup>ˆ</sup> *k*2 *∂y*˙ *∂*ˆ *k*2

*k*1 *∂y*¨ *∂*ˆ *k*3 <sup>−</sup> *<sup>b</sup>*<sup>ˆ</sup> *k*2 *∂y*˙ *∂*ˆ *k*3

*ki* is called the sensitivity derivative of the system

*k*<sup>3</sup> are also small, one can interchange the order of

reasonable to adjust the parameters in the direction of the negative gradient of *J*:

*∂J ∂*ˆ *ki*

*ki* are the estimates of *ki* and are updated according to the MIT rule. The objective of the MIT rule is to adjust the parameters *k*1, *k*<sup>2</sup> and *k*<sup>3</sup> so as to minimize a cost function *J*. This

<sup>2</sup> (16)

(17)

(18)

*ki* in (17) one

+ *br*(*t*)

*ki* are small and the changes of

− *by*˙(*t*) (19)

− *by*(*t*) + *br*(*t*)

*y*˙(*t*) (20)

(*y*(*t*) − *r*(*t*))

− *by*¨(*t*)

where ˆ

cost function can be chosen for example as follows:

where *γ* > 0 is the adaptation rate. *∂e*/*∂*ˆ

= −*a*<sup>1</sup>

= −*a*<sup>1</sup>

= −*a*<sup>1</sup>

<sup>=</sup> <sup>−</sup>(*a*<sup>1</sup> <sup>+</sup> *<sup>b</sup>*<sup>ˆ</sup>

<sup>=</sup> <sup>−</sup>(*a*<sup>1</sup> <sup>+</sup> *<sup>b</sup>*<sup>ˆ</sup>

<sup>=</sup> <sup>−</sup>(*a*<sup>1</sup> <sup>+</sup> *<sup>b</sup>*<sup>ˆ</sup>

These latter equations can be written as:

*∂y ∂*ˆ *k*1

*∂y ∂*ˆ *k*2

*∂y ∂*ˆ *k*3

can use (13) to obtain:

*∂y*(3) *∂*ˆ *k*1

*∂y*(3) *∂*ˆ *k*2

*∂y*(3) *∂*ˆ *k*3

*y*(3), *y*¨ and *y* with respect to ˆ

*∂y ∂*ˆ *k*1

*∂y ∂*ˆ *k*2

*∂y ∂*ˆ *k*3

differentiation to obtain: *d*3 *dt*<sup>3</sup>

> *d*3 *dt*<sup>3</sup>

> *d*3 *dt*<sup>3</sup>

and is evaluated under the assumption that ˆ

*∂y*¨ *∂*ˆ *k*1 − *a*<sup>2</sup> *∂y*˙ *∂*ˆ *k*1 <sup>−</sup> *<sup>b</sup>*<sup>ˆ</sup> *k*3 *∂y ∂*ˆ *k*1

*∂y*¨ *∂*ˆ *k*2 − *a*<sup>2</sup> *∂y*˙ *∂*ˆ *k*2 <sup>−</sup> *<sup>b</sup>*<sup>ˆ</sup> *k*3 *∂y ∂*ˆ *k*2

*∂y*¨ *∂*ˆ *k*3 − *a*<sup>2</sup> *∂y*˙ *∂*ˆ *k*3 <sup>−</sup> *<sup>b</sup>*<sup>ˆ</sup> *k*3 *∂y ∂*ˆ *k*3

With the assumption that the rate of adaptation is slow, i.e. ˆ

*k*1, ˆ

*<sup>k</sup>*1) *<sup>d</sup>*<sup>2</sup> *dt*<sup>2</sup>

*<sup>k</sup>*1) *<sup>d</sup>*<sup>2</sup> *dt*<sup>2</sup>

*<sup>k</sup>*1) *<sup>d</sup>*<sup>2</sup> *dt*<sup>2</sup>

<sup>=</sup> <sup>−</sup>*<sup>b</sup> p*<sup>3</sup> + (*a*<sup>1</sup> + *b*ˆ

<sup>=</sup> <sup>−</sup>*<sup>b</sup> p*<sup>3</sup> + (*a*<sup>1</sup> + *b*ˆ

<sup>=</sup> <sup>−</sup>*<sup>b</sup> p*<sup>3</sup> + (*a*<sup>1</sup> + *b*ˆ

*k*<sup>2</sup> and ˆ

*∂y ∂*ˆ *k*1

*∂y ∂*ˆ *k*2

*∂y ∂*ˆ *k*3 <sup>−</sup> (*a*<sup>2</sup> <sup>+</sup> *<sup>b</sup>*<sup>ˆ</sup>

<sup>−</sup> (*a*<sup>2</sup> <sup>+</sup> *<sup>b</sup>*<sup>ˆ</sup>

<sup>−</sup> (*a*<sup>2</sup> <sup>+</sup> *<sup>b</sup>*<sup>ˆ</sup>

*k*1)*p*<sup>2</sup> + (*a*<sup>2</sup> + *b*ˆ

*k*1)*p*<sup>2</sup> + (*a*<sup>2</sup> + *b*ˆ

*k*1)*p*<sup>2</sup> + (*a*<sup>2</sup> + *b*ˆ

where *p* is the differential operator. Because *a*1, *a*<sup>2</sup> and *b* are unknown, the above sensitivity functions cannot be used. Using the MIT rule, we replace *a*1, *a*<sup>2</sup> and *b* with their estimates *a*ˆ1,

*d*ˆ *ki dt* <sup>=</sup> <sup>−</sup>*<sup>γ</sup>*

$$\begin{aligned} \frac{d\hat{k}\_1}{dt} &= \gamma e \frac{1}{p^3 + a\_{m\_1}p^2 + a\_{m\_2}p + a\_{m\_3}} \dot{y}(t) \\ \frac{d\hat{k}\_2}{dt} &= \gamma e \frac{1}{p^3 + a\_{m\_1}p^2 + a\_{m\_2}p + a\_{m\_3}} \dot{y}(t) \\ \frac{d\hat{k}\_3}{dt} &= \gamma e \frac{1}{p^3 + a\_{m\_1}p^2 + a\_{m\_2}p + a\_{m\_3}} (y(t) - r(t)) \end{aligned} \tag{23}$$

where the unknow parameter *b* in the numerator is absorbed by the gains ˆ *ki*.

The equations given by (22) are known as the *sensitivity filters or models*, and can be easily implemented to generate the approximate sensitivity functions for the adaptive law (23). It should be noted that the MRAC based on the MIT rule is locally stable provided the adaptive gain *γ* is small, the reference input signal *r* has a small amplitude and sufficient number of frequencies, and the initial conditions ˆ *ki*(0) are close to the nominal values of *ki*. For large *γ* and ˆ *ki*(0) away from the nominal values of *ki*, the MIT rule may lead to instability and unbounded signal response.

#### **3.2.2 Conventional MRAC**

Consider a multi-input multi-output (MIMO) uncertain linear system (Stepanyan & Krinshnakumar, 2010a):

$$\dot{\mathbf{x}}(t) = A\mathbf{x}(t) + B\begin{bmatrix} u(t) - f(t) \end{bmatrix}, \ \mathbf{x}(0) = \mathbf{x}\_0 \tag{24}$$

where *<sup>x</sup>* ∈ �*<sup>n</sup>* and *<sup>u</sup>* ∈ � are the state and the control input of the system respectively. *<sup>f</sup>*(*t*) <sup>∈</sup> � is a bounded and piece-wise continuous external disturbance. *<sup>A</sup>* ∈ �*n*×*<sup>n</sup>* and *<sup>B</sup>* ∈ �*n*×*<sup>p</sup>* are unknown constant matrices satisfying the following matching conditions.

**Assumption 1.** *Given a Hurwitz matrix Am* ∈ �*n*×*<sup>n</sup> and a matrix Bm* ∈ �*n*×*<sup>p</sup> of full column rank, there exists a matrix K*<sup>1</sup> ∈ �*p*×*<sup>n</sup> and a sign definite matrix* <sup>Λ</sup> ∈ �*p*×*<sup>p</sup> such that the following equations hold*

$$B = B\_{\mathcal{W}} \Lambda$$

$$A = A\_{\mathcal{W}} - B \mathcal{K}\_1$$

attempt to aggressively maneuver toward the reference model. In this case, the modified

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 131

where *λ* > 0 is a design parameter that specifies the tracking error feedback into the reference model. As the tracking error approaches zero, the reference model (32) approaches its original

previous section. It has been shown that the error feedback term *λ*(*x*(*t*) − *xm*(*t*)) determines the damping in the control signal. Increasing this term makes it possible to increase the learning rate for better transient performance without generating high frequency oscillations

Closed-loop systems can have some fault-tolerance when the controller gains are carefully chosen to take care of effects of both faults and system uncertainties. Such systems are called passive fault-tolerant control (PFTC) systems. Passive approaches make use of robust control techniques to ensure that a closed-loop system remains insensitive to certain faults using constant controller parameters and without use of on-line fault information. In the case of PFTC, systems continue to operate with the same control gains and structures and the scheme effectiveness depends upon the robustness of the nominal (fault-free) closed-loop system. Systems are made robust to faults by assuming a restrictive repertoire of likely faults and

Sliding mode control (SMC) techniques have a strong capability in handling uncertainties and disturbances, which makes them an excellent candidate for passive fault tolerant control system. The design of the SMC for the Qball-X4 starts by expressing the system model (4) in

> *x*7 *x*8 *x*9 *x*<sup>10</sup> *x*<sup>11</sup> *x*<sup>12</sup> *uz* (*cosx*<sup>5</sup> *sinx*<sup>4</sup> *cosx*<sup>6</sup> + *sinx*<sup>5</sup> *sinx*6) /*m* − *kx x*7/*m uz* (*cosx*<sup>5</sup> *sinx*<sup>4</sup> *sinx*<sup>6</sup> − *sinx*<sup>5</sup> *cosx*6) /*m* − *kyx*8/*m uz* (*cosx*<sup>5</sup> *cosx*4) /*m* − *g* − *kzx*9/*m*

> > *<sup>x</sup>*11*x*<sup>12</sup> <sup>−</sup> *JTx*<sup>11</sup> <sup>Ω</sup> <sup>−</sup> *<sup>k</sup>θx*10�

*<sup>x</sup>*10*x*<sup>11</sup> <sup>−</sup> *<sup>k</sup>ψx*12�

*<sup>u</sup><sup>φ</sup>* <sup>+</sup> (*Jz* <sup>−</sup> *Jx*) *<sup>x</sup>*10*x*<sup>12</sup> <sup>−</sup> *JTx*<sup>10</sup> <sup>Ω</sup> <sup>−</sup> *<sup>k</sup>φx*11�

*Jx* − *Jy* � /*Jx*

⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦

(34)

/*Jy*

/*Jz*

*x*˙*m*(*t*) = *Amxm*(*t*) + *BmNr*(*t*) + *λ*(*x*(*t*) − *xm*(*t*)), *xm*(0) = *x*<sup>0</sup> (32)

<sup>0</sup>(*t*) = *Amx*0(*t*) + *BmNr*(*t*), *x*0(0) = *x*<sup>0</sup> (33)

*f* are the same as in the

reference model is defined as follows:

in the adaptive system.

**3.3 Sliding mode control (SMC)**

⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣

*x*˙1 *x*˙2 *x*˙3 *x*˙4 *x*˙5 *x*˙6 *x*˙7 *x*˙8 *x*˙9 *x*˙10 *x*˙11 *x*˙12 ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦

=

� *<sup>u</sup><sup>θ</sup>* + �

�

� *u<sup>ψ</sup>* + �

*Jy* − *Jz* �

form, which is called an ideal reference model:

the way in which they affect the control function.

state-space representation (Li, 2011a), (Li et al., 2011b):

⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣

*x*˙

The control input *u* as well as the adaptive laws for *K*ˆ1, *K*ˆ2 and ˆ

The sign definiteness of Λ corresponds to the conventional sign condition of the high frequency gain matrix of MIMO systems. Without loss of generality, we assume that Λ is positive definite. The rest of the conditions for the existence of an adaptive controller are given by (25).

The control objective is to design a control signal *u*(*t*) such that the system tracks the reference model:

$$\dot{\mathbf{x}}\_m(t) = A\_m \mathbf{x}\_m(t) + B\_m \mathbf{N}r(t), \ \mathbf{x}\_m(0) = \mathbf{x}\_0 \tag{26}$$

*Am* and *Bm* are chosen according to performance specifications and satisfy Assumption 1 and *<sup>r</sup>*(*t*) is a bounded and smooth external reference command. The matrix *<sup>N</sup>* <sup>=</sup> <sup>−</sup> *CA*−<sup>1</sup> *<sup>m</sup> B*−<sup>1</sup> *<sup>m</sup>* <sup>−</sup><sup>1</sup> is chosen such that the output *ym*(*t*) = *Cxm*(*t*) perfectly tracks the reference command *r*(*t*). By using (25) and (26), one can note that system (24) can be written in the form:

*x*˙(*t*) = *Amx*(*t*) + *BmNr*(*t*) + *Bm*Λ [*u*(*t*) − *K*1*x*(*t*) − *K*2*r*(*t*) − *f*(*t*)] (27)

where *K*<sup>2</sup> = Λ−1*N*. Hence, choosing the control input *u*(*t*) as:

$$u(t) = \mathbf{K}\_1 x(t) + \mathbf{K}\_2 r(t) + f(t) \tag{28}$$

translates the system (24) into the reference model (26). The reference model (26) can always be specified from the performance perspective, however the control signal (28) cannot be implemented since the matrices *K*<sup>1</sup> and *K*<sup>2</sup> and the vector-function *f*(*t*) are assumed to be unknown. Thus, the adaptive control is designed according to the MRAC architecture as:

$$u(t) = \hat{\mathbb{K}}\_1(t)x(t) + \hat{\mathbb{K}}\_2(t)r(t) + \hat{f}(t) \tag{29}$$

where *K*ˆ1(*t*) and *K*ˆ2(*t*) are the estimates of the ideal control gains *K*<sup>1</sup> and *K*2, and ˆ *f*(*t*) is the estimate of a constant vector ¯ *f* that can be referred to as an average value of *f*(*t*). These estimates are updated online according to robust adaptive laws:

$$\begin{aligned} \dot{\hat{K}}\_1(t) &= -\gamma B\_m^T P \, \varepsilon(t) \mathbf{x}^T(t) + \Psi\_1 \left( \mathbf{x}(t), e(t), \hat{\mathcal{K}}\_1(t) \right) \\ \dot{\hat{K}}\_2(t) &= -\gamma B\_m^T P \, \varepsilon(t) r^T(t) + \Psi\_2 \left( r(t), e(t), \hat{\mathcal{K}}\_2(t) \right) \\ \dot{\hat{f}}(t) &= -\gamma B\_m^T P \, \varepsilon(t) + \Psi\_3 \left( e(t), \hat{f}(t) \right) \end{aligned} \tag{30}$$

where *γ* > 0 is the adaptation rate, *P* = *P<sup>T</sup>* > 0 is the solution of the Lyapunov equation:

$$A\_m^T P + PA\_m = -Q \tag{31}$$

for some *Q* = *Q<sup>T</sup>* > 0. The terms Ψ1, Ψ<sup>2</sup> and Ψ<sup>3</sup> represent the robust modifications such as *σ*-modification, *e*-modification, projection operator or dead-zone modification (Stepanyan & Krinshnakumar, 2010a). Here *e*(*t*) = *x*(*t*) − *xm*(*t*) is the tracking error between the system and the reference model.

#### **3.2.3 Modified MRAC**

The Modified MRAC (M-MRAC) is proposed in (Stepanyan & Krinshnakumar, 2010a;b). This approach is motivated by the fact that the initial large error in the control gains generates large transient excursions both in system's control and output signals. Therefore, driving the reference model toward the system proportional to the tracking error prevents the system's attempt to aggressively maneuver toward the reference model. In this case, the modified reference model is defined as follows:

$$\dot{\mathbf{x}}\_{\text{m}}(t) = A\_{\text{m}}\mathbf{x}\_{\text{m}}(t) + B\_{\text{m}}\mathbf{N}r(t) + \lambda(\mathbf{x}(t) - \mathbf{x}\_{\text{m}}(t)), \; \mathbf{x}\_{\text{m}}(0) = \mathbf{x}\_{0} \tag{32}$$

where *λ* > 0 is a design parameter that specifies the tracking error feedback into the reference model. As the tracking error approaches zero, the reference model (32) approaches its original form, which is called an ideal reference model:

$$\dot{\mathbf{x}}^{0}(t) = A\_{m}\mathbf{x}^{0}(t) + B\_{m}Nr(t), \ \mathbf{x}^{0}(0) = \mathbf{x}\_{0} \tag{33}$$

The control input *u* as well as the adaptive laws for *K*ˆ1, *K*ˆ2 and ˆ *f* are the same as in the previous section. It has been shown that the error feedback term *λ*(*x*(*t*) − *xm*(*t*)) determines the damping in the control signal. Increasing this term makes it possible to increase the learning rate for better transient performance without generating high frequency oscillations in the adaptive system.

## **3.3 Sliding mode control (SMC)**

12 Will-be-set-by-IN-TECH

The sign definiteness of Λ corresponds to the conventional sign condition of the high frequency gain matrix of MIMO systems. Without loss of generality, we assume that Λ is positive definite. The rest of the conditions for the existence of an adaptive controller are

The control objective is to design a control signal *u*(*t*) such that the system tracks the reference

*Am* and *Bm* are chosen according to performance specifications and satisfy Assumption 1 and

is chosen such that the output *ym*(*t*) = *Cxm*(*t*) perfectly tracks the reference command *r*(*t*).

translates the system (24) into the reference model (26). The reference model (26) can always be specified from the performance perspective, however the control signal (28) cannot be implemented since the matrices *K*<sup>1</sup> and *K*<sup>2</sup> and the vector-function *f*(*t*) are assumed to be unknown. Thus, the adaptive control is designed according to the MRAC architecture as:

*u*(*t*) = *K*ˆ1(*t*)*x*(*t*) + *K*ˆ2(*t*)*r*(*t*) + ˆ

*mP e*(*t*)*xT*(*t*) + <sup>Ψ</sup><sup>1</sup>

*mP e*(*t*)*rT*(*t*) + <sup>Ψ</sup><sup>2</sup>

where *γ* > 0 is the adaptation rate, *P* = *P<sup>T</sup>* > 0 is the solution of the Lyapunov equation:

for some *Q* = *Q<sup>T</sup>* > 0. The terms Ψ1, Ψ<sup>2</sup> and Ψ<sup>3</sup> represent the robust modifications such as *σ*-modification, *e*-modification, projection operator or dead-zone modification (Stepanyan & Krinshnakumar, 2010a). Here *e*(*t*) = *x*(*t*) − *xm*(*t*) is the tracking error between the system

The Modified MRAC (M-MRAC) is proposed in (Stepanyan & Krinshnakumar, 2010a;b). This approach is motivated by the fact that the initial large error in the control gains generates large transient excursions both in system's control and output signals. Therefore, driving the reference model toward the system proportional to the tracking error prevents the system's

*mP e*(*t*) + Ψ<sup>3</sup>

*AT*

where *K*ˆ1(*t*) and *K*ˆ2(*t*) are the estimates of the ideal control gains *K*<sup>1</sup> and *K*2, and ˆ

*x*˙(*t*) = *Amx*(*t*) + *BmNr*(*t*) + *Bm*Λ [*u*(*t*) − *K*1*x*(*t*) − *K*2*r*(*t*) − *f*(*t*)] (27)

*<sup>r</sup>*(*t*) is a bounded and smooth external reference command. The matrix *<sup>N</sup>* <sup>=</sup> <sup>−</sup>

By using (25) and (26), one can note that system (24) can be written in the form:

where *K*<sup>2</sup> = Λ−1*N*. Hence, choosing the control input *u*(*t*) as:

estimates are updated online according to robust adaptive laws:

*<sup>K</sup>*ˆ1(*t*) = <sup>−</sup>*γB<sup>T</sup>*

*<sup>K</sup>*ˆ2(*t*) = <sup>−</sup>*γB<sup>T</sup>*

*<sup>f</sup>*(*t*) = <sup>−</sup>*γB<sup>T</sup>*

estimate of a constant vector ¯

and the reference model.

**3.2.3 Modified MRAC**

˙

˙

˙ ˆ *x*˙*m*(*t*) = *Amxm*(*t*) + *BmNr*(*t*), *xm*(0) = *x*<sup>0</sup> (26)

*u*(*t*) = *K*1*x*(*t*) + *K*2*r*(*t*) + *f*(*t*) (28)

*f* that can be referred to as an average value of *f*(*t*). These

*x*(*t*),*e*(*t*), *K*ˆ1(*t*)

*r*(*t*),*e*(*t*), *K*ˆ2(*t*)

*mP* + *PAm* = −*Q* (31)

 *e*(*t*), ˆ *f*(*t*)  *CA*−<sup>1</sup> *<sup>m</sup> B*−<sup>1</sup> *<sup>m</sup>*

*f*(*t*) (29)

<sup>−</sup><sup>1</sup>

*f*(*t*) is the

(30)

given by (25).

model:

Closed-loop systems can have some fault-tolerance when the controller gains are carefully chosen to take care of effects of both faults and system uncertainties. Such systems are called passive fault-tolerant control (PFTC) systems. Passive approaches make use of robust control techniques to ensure that a closed-loop system remains insensitive to certain faults using constant controller parameters and without use of on-line fault information. In the case of PFTC, systems continue to operate with the same control gains and structures and the scheme effectiveness depends upon the robustness of the nominal (fault-free) closed-loop system. Systems are made robust to faults by assuming a restrictive repertoire of likely faults and the way in which they affect the control function.

Sliding mode control (SMC) techniques have a strong capability in handling uncertainties and disturbances, which makes them an excellent candidate for passive fault tolerant control system. The design of the SMC for the Qball-X4 starts by expressing the system model (4) in state-space representation (Li, 2011a), (Li et al., 2011b):

$$\begin{aligned} \begin{bmatrix} \dot{x}\_1\\ \dot{x}\_2\\ \dot{x}\_3\\ \dot{x}\_4\\ \dot{x}\_5\\ \dot{x}\_6\\ \dot{x}\_7\\ \dot{x}\_8\\ \dot{x}\_8\\ \dot{x}\_9\\ \dot{x}\_9\\ \dot{x}\_{10}\\ \dot{x}\_{11}\\ \dot{x}\_{12} \end{bmatrix} &= \begin{bmatrix} \text{x}\_7\\ \text{x}\_9\\ \text{x}\_{10}\\ \text{x}\_{11} \end{bmatrix} \end{aligned} \tag{34}$$
 
$$\begin{aligned} \dot{x}\_{\theta}\\ \dot{x}\_8\\ \dot{x}\_9\\ \dot{x}\_{10}\\ \dot{x}\_{10}\\ \dot{x}\_{11}\\ \dot{x}\_{12}\\ \dot{x}\_{12} \end{bmatrix} = \begin{bmatrix} \text{x}\_7\cos\varphi\_5\sin\varphi\_4\cos\varphi\_6 + \sin\varphi\_5\sin\varphi\_6\end{bmatrix} / \begin{bmatrix} m - k\_x\mathbf{x}\_7/m\\ m - k\_y\mathbf{x}\_8/m \end{bmatrix} \end{aligned} \tag{35}$$

(40) the equivalent control inputs can be derived as:

 *x*¨ *d*

 *x*¨ *d*

 *x*¨ *d*

reaching law by selecting the second term as:

*u*∗ *<sup>x</sup>* <sup>=</sup> <sup>1</sup> *uz*

*u*∗ *<sup>y</sup>* <sup>=</sup> <sup>1</sup> *uz*

*u*∗

*u*∗

*u*∗

*u*∗

are then (Li, 2011a), (Li et al., 2011b):

 *x*¨ *d*

*ux* <sup>=</sup> <sup>1</sup> *uz x*¨ *d*

*uy* <sup>=</sup> <sup>1</sup> *uz x*¨ *d*

*u<sup>θ</sup>* = *Jx*

*u<sup>φ</sup>* = *Jy*

*u<sup>ψ</sup>* = *Jz*

*uz* <sup>=</sup> *<sup>m</sup>*

 *x*¨ *d*

 *x*¨ *d*

 *x*¨ *d*

(*cosx*<sup>5</sup> *cosx*4)

*<sup>z</sup>* <sup>=</sup> *<sup>m</sup>*

<sup>1</sup> + *kx x*7/*m* + *λ*1*e*˙1 + *k*1*e*<sup>1</sup>

<sup>2</sup> + *kyx*8/*m* + *λ*2*e*˙2 + *k*2*e*<sup>2</sup>

<sup>3</sup> + *g* + *kzx*9/*m* + *λ*3*e*˙3 + *k*3*e*<sup>3</sup>

 −

 −

<sup>4</sup> + *λ*4*e*˙4 + *k*4*e*<sup>4</sup>

<sup>5</sup> + *λ*5*e*˙5 + *k*5*e*<sup>5</sup>

<sup>6</sup> + *λ*6*e*˙6 + *k*6*e*<sup>6</sup>

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 133

*Jy* − *Jz* 

*Jx* − *Jy* 

The second term of the control inputs is chosen to tackle uncertainties in the system and to introduce reaching law. One can achieve a proportional (*lisi*) plus constant (*misign*(*si*)) rate

(*l*1*s*<sup>1</sup> + *m*1*sign*(*s*1))

(*l*2*s*<sup>2</sup> + *m*2*sign*(*s*2))

where *li* and *mi* (*i* = 1, ..., 6) are positive control gains. The total control inputs *u* = *ueq* + *u*<sup>∗</sup>

*<sup>θ</sup>* = *Jx* (*l*4*s*<sup>4</sup> + *m*4*sign*(*s*4))

*<sup>φ</sup>* = *Jy* (*l*5*s*<sup>5</sup> + *m*5*sign*(*s*5))

*<sup>ψ</sup>* = *Jz* (*l*6*s*<sup>6</sup> + *m*6*sign*(*s*6))

<sup>1</sup> + *kx x*7/*m* + *λ*1*e*˙1 + *k*1*e*<sup>1</sup> + *l*1*s*<sup>1</sup> + *m*1*sign*(*s*1)

<sup>2</sup> + *kyx*8/*m* + *λ*2*e*˙2 + *k*2*e*<sup>2</sup> + *l*2*s*<sup>2</sup> + *m*2*sign*(*s*2)

<sup>4</sup> + *λ*4*e*˙4 + *k*4*e*<sup>4</sup> + *l*4*s*<sup>4</sup> + *m*4*sign*(*s*4)

<sup>5</sup> + *λ*5*e*˙5 + *k*5*e*<sup>5</sup> + *l*5*s*<sup>5</sup> + *m*5*sign*(*s*5)

<sup>6</sup> + *λ*6*e*˙6 + *k*6*e*<sup>6</sup> + *l*6*s*<sup>6</sup> + *m*6*sign*(*s*6)

for example *ux* of (43) and plugging it into *s*˙1 of (40) gives:

(*cosx*<sup>5</sup> *cosx*4) (*l*3*s*<sup>3</sup> <sup>+</sup> *<sup>m</sup>*3*sign*(*s*3))

<sup>3</sup> + *g* + *kzx*9/*m* + *λ*3*e*˙3 + *k*3*e*<sup>3</sup> + *l*3*s*<sup>3</sup> + *m*3*sign*(*s*3)

 −

 −

It is straightforward to verify the negativity of condition (39). For illustration purpose, taking

/ (*cosx*<sup>5</sup> *cosx*4)

− (*Jz* − *Jx*) *x*10*x*<sup>12</sup> + *JTx*<sup>10</sup> Ω + *kφx*<sup>11</sup>

*x*10*x*<sup>11</sup> + *kψx*<sup>12</sup>

*Jy* − *Jz* 

*Jx* − *Jy*  *x*11*x*<sup>12</sup> + *JTx*<sup>11</sup> Ω + *kθx*<sup>10</sup>

− (*Jz* − *Jx*) *x*10*x*<sup>12</sup> + *JTx*<sup>10</sup> Ω + *kφx*<sup>11</sup>

*x*10*x*<sup>11</sup> + *kψx*<sup>12</sup>

*s*˙1 = −*l*1*s*<sup>1</sup> − *m*1*sign*(*s*1) (44)

*x*11*x*<sup>12</sup> + *JTx*<sup>11</sup> Ω + *kθx*<sup>10</sup>

(41)

(42)

(43)

*ueq <sup>x</sup>* <sup>=</sup> <sup>1</sup> *uz x*¨ *d*

*ueq <sup>y</sup>* <sup>=</sup> <sup>1</sup> *uz x*¨ *d*

*ueq <sup>z</sup>* = *m x*¨ *d*

*ueq <sup>θ</sup>* = *Jx*

*ueq <sup>φ</sup>* = *Jy*

*ueq <sup>ψ</sup>* = *Jz*

where [*x*1, *x*2, *x*3, *x*4, *x*5, *x*6, *x*7, *x*8, *x*9, *x*10, *x*11, *x*12] *<sup>T</sup>* = *x*, *y*, *z*, *θ*, *φ*, *ψ*, *x*˙, *y*˙, *z*˙, ˙ *θ*, *φ*˙, *ψ*˙ *<sup>T</sup>* and *uz*, *<sup>u</sup><sup>θ</sup>* , *u<sup>φ</sup>* and *u<sup>ψ</sup>* are defined in (9). In order to achieve tracking for the system, the tracking errors need to be defined as following where *x<sup>d</sup> <sup>i</sup>* is the desired path for the *i th* state *xi*:

$$e\_i = \mathbf{x}\_i^d - \mathbf{x}\_i \quad ; \quad i = 1, \ldots, 6 \tag{35}$$

To guarantee the robustness of the passive fault tolerant control in both fault-free case and fault case, the faults need to be considered during the phase of controller design. Therefore, to design a controller that can handle both fault-free and fault situations, an integral sliding mode technique is employed to further enhance the robustness and to ensure a faster and smoother convergence. The sliding surface is then designed as:

$$s\_i = \dot{e}\_i + \lambda\_i e\_i + k\_i \int e\_i dt \quad ; \quad i = 1, \ldots, 6 \tag{36}$$

Consider the Lyapunov functions:

$$V\_{\rm i} = \frac{1}{2} s\_{\rm i}^2 \quad ; \quad i = 1, \ldots, 6 \tag{37}$$

The objective now is to design the control laws so that the time derivatives of the Lyapunov functions are negative. That is:

$$
\dot{V}\_{\dot{l}} = \dot{s}\_{\dot{l}} s\_{\dot{l}} < 0 \quad ; \quad \dot{\mathbf{i}} = \mathbf{1}, \dots, \mathbf{6} \tag{38}
$$

This latter condition states that the squared distance to the switching surface as measured by *s*<sup>2</sup> decreases along all system trajectories. However, this condition is not feasible in practice because the switching of real components is not instantaneous and this leads to an undesired phenomenon known as chattering in the direction of the switching surface. Thus, condition (38) is expanded by a boundary layer in which the controller switching is not required as:

$$\mathbf{s}\_{i}\mathbf{s}\_{i} < -\eta \left|\mathbf{s}\right| \quad \text{;} \quad \mathbf{i} = 1, \ldots, 6 \tag{39}$$

The control inputs should be chosen so that trajectories approach the sliding surface and then stay on it for all future time instants. Thus, the control inputs are expressed as the sum of two terms (Singh & Holé, 2004). The first one, called the equivalent control, is chosen so as to make *s*˙*<sup>i</sup>* = 0 when *si* = 0. Taking the time derivative of (36), the dynamics of the sliding surfaces can be obtained as following:

$$\begin{aligned} \dot{s}\_1 &= \ddot{x}\_1^d - u\_2 u\_X + k\_1 x\_7 / m + \lambda\_1 \dot{e}\_1 + k\_1 e\_1 \\ \dot{s}\_2 &= \ddot{x}\_2^d - u\_2 u\_Y + k\_3 x\_8 / m + \lambda\_2 \dot{e}\_2 + k\_2 e\_2 \\ \dot{s}\_3 &= \ddot{x}\_3^d - u\_2 \left( \cos x\_5 \cos x\_4 \right) / m + g + k\_5 x\_9 / m + \lambda\_3 \dot{e}\_3 + k\_3 e\_3 \\ \dot{s}\_4 &= \ddot{x}\_4^d - \left( u\_\theta + \left( f\_\theta - f\_z \right) x\_{11} x\_{12} - f\_T x\_{11} \, \Omega - k\_\theta x\_{10} \right) / f\_x + \lambda\_4 \dot{e}\_4 + k\_4 e\_4 \\ \dot{s}\_5 &= \ddot{x}\_5^d - \left( u\_\theta + \left( f\_z - f\_x \right) x\_{10} x\_{12} - f\_T x\_{10} \, \Omega - k\_\theta x\_{11} \right) / f\_y + \lambda\_5 \dot{e}\_5 + k\_5 e\_5 \\ \dot{s}\_6 &= \ddot{x}\_6^d - \left( u\_\theta + \left( f\_\Gamma - f\_y \right) x\_{10} x\_{11} - k\_\theta x\_{12} \right) / f\_z + \lambda\_6 \dot{e}\_6 + k\_6 e\_6 \end{aligned} \tag{40}$$

where *ux* = (*cosx*<sup>5</sup> *sinx*<sup>4</sup> *cosx*<sup>6</sup> + *sinx*<sup>5</sup> *sinx*6) /*m* and *uy* = (*cosx*<sup>5</sup> *sinx*<sup>4</sup> *sinx*<sup>6</sup> − *sinx*<sup>5</sup> *cosx*6) /*m* are defined as virtual inputs. By setting *s*˙*<sup>i</sup>* = 0 in (40) the equivalent control inputs can be derived as:

14 Will-be-set-by-IN-TECH

*u<sup>φ</sup>* and *u<sup>ψ</sup>* are defined in (9). In order to achieve tracking for the system, the tracking errors

To guarantee the robustness of the passive fault tolerant control in both fault-free case and fault case, the faults need to be considered during the phase of controller design. Therefore, to design a controller that can handle both fault-free and fault situations, an integral sliding mode technique is employed to further enhance the robustness and to ensure a faster and

The objective now is to design the control laws so that the time derivatives of the Lyapunov

This latter condition states that the squared distance to the switching surface as measured by *s*<sup>2</sup> decreases along all system trajectories. However, this condition is not feasible in practice because the switching of real components is not instantaneous and this leads to an undesired phenomenon known as chattering in the direction of the switching surface. Thus, condition (38) is expanded by a boundary layer in which the controller switching is not required as:

The control inputs should be chosen so that trajectories approach the sliding surface and then stay on it for all future time instants. Thus, the control inputs are expressed as the sum of two terms (Singh & Holé, 2004). The first one, called the equivalent control, is chosen so as to make *s*˙*<sup>i</sup>* = 0 when *si* = 0. Taking the time derivative of (36), the dynamics of the sliding surfaces

<sup>3</sup> − *uz* (*cosx*<sup>5</sup> *cosx*4) /*m* + *g* + *kzx*9/*m* + *λ*3*e*˙3 + *k*3*e*<sup>3</sup>

*u<sup>φ</sup>* + (*Jz* − *Jx*) *x*10*x*<sup>12</sup> − *JTx*<sup>10</sup> Ω − *kφx*<sup>11</sup>

*x*10*x*<sup>11</sup> − *kψx*<sup>12</sup>

where *ux* = (*cosx*<sup>5</sup> *sinx*<sup>4</sup> *cosx*<sup>6</sup> + *sinx*<sup>5</sup> *sinx*6) /*m* and *uy* = (*cosx*<sup>5</sup> *sinx*<sup>4</sup> *sinx*<sup>6</sup> − *sinx*<sup>5</sup> *cosx*6) /*m* are defined as virtual inputs. By setting *s*˙*<sup>i</sup>* = 0 in

*x*11*x*<sup>12</sup> − *JTx*<sup>11</sup> Ω − *kθx*<sup>10</sup>

*ei* = *x<sup>d</sup>*

*si* = *e*˙*<sup>i</sup>* + *λiei* + *ki*

*V*˙

<sup>1</sup> − *uzux* + *kx x*7/*m* + *λ*1*e*˙1 + *k*1*e*<sup>1</sup>

<sup>2</sup> − *uzuy* + *kyx*8/*m* + *λ*2*e*˙2 + *k*2*e*<sup>2</sup>

*Jy* − *Jz* 

*Jx* − *Jy* 

*<sup>u</sup><sup>θ</sup>* +

*u<sup>ψ</sup>* +

*Vi* <sup>=</sup> <sup>1</sup> 2 *s* 2

smoother convergence. The sliding surface is then designed as:

*<sup>T</sup>* =

*<sup>i</sup>* is the desired path for the *i*

*x*, *y*, *z*, *θ*, *φ*, *ψ*, *x*˙, *y*˙, *z*˙, ˙

*<sup>i</sup>* − *xi* ; *i* = 1, ..., 6 (35)

*eidt* ; *i* = 1, ..., 6 (36)

*<sup>i</sup>* ; *i* = 1, ..., 6 (37)

*<sup>i</sup>* = *s*˙*isi* < 0 ; *i* = 1, ..., 6 (38)

*s*˙*isi* < −*η* |*s*| ; *i* = 1, ..., 6 (39)

/*Jz* + *λ*6*e*˙6 + *k*6*e*<sup>6</sup>

/*Jx* + *λ*4*e*˙4 + *k*4*e*<sup>4</sup>

(40)

/*Jy* + *λ*5*e*˙5 + *k*5*e*<sup>5</sup>

*θ*, *φ*˙, *ψ*˙

*th* state *xi*:

*<sup>T</sup>* and *uz*, *<sup>u</sup><sup>θ</sup>* ,

where [*x*1, *x*2, *x*3, *x*4, *x*5, *x*6, *x*7, *x*8, *x*9, *x*10, *x*11, *x*12]

need to be defined as following where *x<sup>d</sup>*

Consider the Lyapunov functions:

functions are negative. That is:

can be obtained as following:

*s*˙1 = *x*¨ *d*

*s*˙2 = *x*¨ *d*

*s*˙3 = *x*¨ *d*

*s*˙4 = *x*¨ *d* <sup>4</sup> <sup>−</sup>

*s*˙5 = *x*¨ *d* <sup>5</sup> <sup>−</sup>

*s*˙6 = *x*¨ *d* <sup>6</sup> <sup>−</sup>

$$\begin{aligned} u\_x^{eq} &= \frac{1}{u\_z} \left( \ddot{x}\_1^d + k\_x \mathbf{x}\_7 / m + \lambda\_1 \dot{e}\_1 + k\_1 e\_1 \right) \\ u\_y^{eq} &= \frac{1}{u\_z} \left( \ddot{x}\_2^d + k\_y \mathbf{x}\_8 / m + \lambda\_2 \dot{e}\_2 + k\_2 e\_2 \right) \\ u\_z^{eq} &= m \left( \ddot{x}\_3^d + g + k\_5 \mathbf{x}\_9 / m + \lambda\_3 \dot{e}\_3 + k\_3 e\_3 \right) / \left( \cos \mathbf{x}\_5 \cos \mathbf{x}\_4 \right) \\ u\_\theta^{eq} &= f\_x \left( \ddot{x}\_4^d + \lambda\_4 \dot{e}\_4 + k\_4 e\_4 \right) - \left( f\_y - f\_z \right) \mathbf{x}\_{11} \mathbf{x}\_{12} + f\_T \mathbf{x}\_{11} \odot + k\_\theta \mathbf{x}\_{10} \\ u\_\phi^{eq} &= f\_y \left( \ddot{x}\_5^d + \lambda\_5 \dot{e}\_5 + k\_5 e\_5 \right) - \left( f\_z - f\_\chi \right) \mathbf{x}\_{10} \mathbf{x}\_{12} + f\_T \mathbf{x}\_{10} \odot + k\_\theta \mathbf{x}\_{11} \\ u\_\psi^{eq} &= f\_z \left( \ddot{x}\_6^d + \lambda\_6 \dot{e}\_6 + k\_6 e\_6 \right) - \left( f\_\chi - f\_\chi \right) \mathbf{x}\_{10} \mathbf{x}\_{11} + k\_\theta \mathbf{x}\_{12} \end{aligned} \tag{41}$$

The second term of the control inputs is chosen to tackle uncertainties in the system and to introduce reaching law. One can achieve a proportional (*lisi*) plus constant (*misign*(*si*)) rate reaching law by selecting the second term as:

$$\begin{aligned} u\_x^\* &= \frac{1}{u\_z} \left( l\_1 s\_1 + m\_1 \operatorname{sign}(s\_1) \right) \\ u\_y^\* &= \frac{1}{u\_z} \left( l\_2 s\_2 + m\_2 \operatorname{sign}(s\_2) \right) \\ u\_z^\* &= \frac{m}{\left( \cos s\_5 \cos s\_4 \right)} \left( l\_3 s\_3 + m\_3 \operatorname{sign}(s\_3) \right) \\ u\_\theta^\* &= f\_x \left( l\_4 s\_4 + m\_4 \operatorname{sign}(s\_4) \right) \\ u\_\phi^\* &= f\_y \left( l\_5 s\_5 + m\_5 \operatorname{sign}(s\_5) \right) \\ u\_\psi^\* &= f\_z \left( l\_6 s\_6 + m\_6 \operatorname{sign}(s\_6) \right) \end{aligned} \tag{42}$$

where *li* and *mi* (*i* = 1, ..., 6) are positive control gains. The total control inputs *u* = *ueq* + *u*<sup>∗</sup> are then (Li, 2011a), (Li et al., 2011b):

$$\begin{aligned} u\_x &= \frac{1}{u\_z} \left( \ddot{x}\_1^d + k\_3 x\_7 / m + \lambda\_1 \dot{e}\_1 + k\_1 e\_1 + l\_1 s\_1 + m\_1 \dot{s} g n(s\_1) \right) \\ u\_y &= \frac{1}{u\_z} \left( \ddot{x}\_2^d + k\_y x\_8 / m + \lambda\_2 \dot{e}\_2 + k\_2 e\_2 + l\_2 s\_2 + m\_2 \dot{s} g n(s\_2) \right) \\ u\_z &= \frac{m}{(\cos x\_5 \cos x\_4)} \left( \ddot{x}\_3^d + g + k\_5 x\_9 / m + \lambda\_3 \dot{e}\_3 + k\_3 e\_3 + l\_3 s\_3 + m\_3 \dot{s} g n(s\_3) \right) \\ u\_\theta &= f\_X \left( \ddot{x}\_4^d + \lambda\_4 \dot{e}\_4 + k\_4 e\_4 + l\_4 s\_4 + m\_4 \dot{s} g n(s\_4) \right) - \left( f\_y - f\_z \right) x\_{11} x\_{12} + f\_\mathcal{T} x\_{11} \, \Omega + k\_\theta x\_{10} \\ u\_\theta &= f\_y \left( \ddot{x}\_5^d + \lambda\_5 \dot{e}\_5 + k\_5 e\_5 + l\_5 s\_5 + m\_5 \dot{s} g n(s\_5) \right) - \left( f\_z - f\_x \right) x\_{10} x\_{12} + f\_\mathcal{T} x\_{10} \, \Omega + k\_\theta x\_{11} \\ u\_\theta &= f\_z \left( \ddot{x}\_6^d + \lambda\_6 \dot{e}\_6 + k\_6 e\_6 + l\_6 s\_6 + m\_6 \dot{s} g n(s\_6) \right) - \left( f\_\mathcal{T} - f\_y \right) x\_{10} x\_{11} + k\_\theta x\_{12} \end{aligned} \tag{4.3}$$

It is straightforward to verify the negativity of condition (39). For illustration purpose, taking for example *ux* of (43) and plugging it into *s*˙1 of (40) gives:

$$\dot{s}\_1 = -l\_1 s\_1 - m\_1 \text{sign}(s\_1) \tag{44}$$

One can see that the time derivative of *V*<sup>1</sup> is:

 *x*˙

<sup>1</sup> <sup>=</sup> <sup>−</sup>*k*1*z*<sup>2</sup>

<sup>1</sup> + *z*1*z*˙

*x*˙2 = *x*¨

model gives the control inputs (Zhang, 2010a), (Zhang et al., 2010b):

 <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 

 <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 

*<sup>d</sup>* <sup>+</sup> *<sup>z</sup>*<sup>1</sup> <sup>−</sup> *<sup>a</sup>*(*z*1)

Then, the next step is to define a Lyapunov function so as to make *z*<sup>1</sup> → 0:

<sup>1</sup> <sup>=</sup> <sup>−</sup>*k*1*z*<sup>2</sup>

*<sup>d</sup>* + <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 

<sup>3</sup> + *g* + *kzx*9/*m* +

*z*<sup>4</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>4</sup>

*z*<sup>5</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>5</sup>

*z*<sup>6</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>6</sup>

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 135

*V*<sup>2</sup> = *V*<sup>1</sup> +

1 2 *z*2

<sup>1</sup> + *z*1*z*<sup>1</sup> + *z*<sup>1</sup>

*<sup>d</sup>* <sup>+</sup> *<sup>k</sup>*1*z*<sup>1</sup> <sup>−</sup> *<sup>x</sup>*2.

The application of the method above to the state-space representation (34) of the Qball-X4

*z*<sup>1</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>1</sup>

*z*<sup>2</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>2</sup>

 <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 

 −

 −

with *ux* = (*cosx*<sup>5</sup> *sinx*<sup>4</sup> *cosx*<sup>6</sup> + *sinx*<sup>5</sup> *sinx*6) /*m* and *uy* = (*cosx*<sup>5</sup> *sinx*<sup>4</sup> *sinx*<sup>6</sup> − *sinx*<sup>5</sup> *cosx*6) /*m*

Model Predictive Control (MPC) is a promising tool for fault tolerant control applications (Maciejowski & Jones, 2003) due to its prominent capabilities such as constraint handling, flexibility to changes in the process dynamics and applicability to nonlinear dynamics. Since MPC recalculates the control signal at each sampling time, any change in the process dynamics can be reflected simply into the control signal calculation. Also, the constraint handling capability of MPC allows system working close to the boundaries of the tight post-failure operation envelope. The drawback of MPC is that similarly to most of the control techniques, it needs an almost explicit model of the system to calculate a stabilizing control signal. On the other hand, the abrupt changes in the model parameters, due to failure, cannot be predicted beforehand and an online data-driven parameter estimation methodology is required to extract the post-failure model parameters from online input/output data. In other words, an FDD module is required to provide information about the occurring faults to allow MPC

*<sup>i</sup>* − *xi* and *zi* = *x*˙

<sup>=</sup> *<sup>z</sup>*<sup>1</sup> (*z*<sup>1</sup> <sup>−</sup> *<sup>k</sup>*1*z*1) <sup>=</sup> <sup>−</sup>*k*1*z*<sup>2</sup>

 *x*¨

*Jy* − *Jz* 

*Jx* − *Jy* 

*d*

*z*<sup>3</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>3</sup>

− (*Jz* − *Jx*) *x*10*x*<sup>12</sup> + *JTx*<sup>10</sup> Ω + *kφx*<sup>11</sup>

*x*10*x*<sup>11</sup> + *kψx*<sup>12</sup>

*<sup>i</sup>* + *k*1*zi* − *x*˙*<sup>i</sup>* (*i* = 1, ..., 6).

<sup>1</sup> and *z*<sup>1</sup> is guaranteed to converge to zero asymptotically.

*<sup>d</sup>* <sup>+</sup> *<sup>k</sup>*1*z*˙1 <sup>−</sup> *<sup>x</sup>*˙2

<sup>1</sup> (54)

*z*<sup>1</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>1</sup> (56)

*x*11*x*<sup>12</sup> + *JTx*<sup>11</sup> Ω + *kθx*<sup>10</sup>

<sup>1</sup> + *z*1*z*<sup>1</sup> (53)

(55)

(57)

<sup>1</sup> = *z*1*z*˙1 = *z*<sup>1</sup>

*V*˙ <sup>2</sup> = *V*˙

<sup>2</sup> < 0, *x*˙2 is chosen as:

with *<sup>k</sup>*<sup>1</sup> <sup>&</sup>gt; 0, *<sup>k</sup>*<sup>2</sup> <sup>&</sup>gt; 0, *<sup>z</sup>*<sup>1</sup> <sup>=</sup> *<sup>x</sup><sup>d</sup>* <sup>−</sup> *<sup>x</sup>*<sup>1</sup> and *<sup>z</sup>*<sup>1</sup> <sup>=</sup> *<sup>x</sup>*˙

<sup>1</sup> + *kx x*7/*m* +

<sup>2</sup> + *kyx*8/*m* +

 *x*¨ *d*

*V*˙

Clearly if *z*<sup>1</sup> = 0, then *V*˙

The time derivative of *V*<sup>2</sup> is:

To obtain *V*˙

*ux* <sup>=</sup> <sup>1</sup> *uz x*¨ *d*

*uy* <sup>=</sup> <sup>1</sup> *uz x*¨ *d*

*u<sup>θ</sup>* = *Jx*

*u<sup>φ</sup>* = *Jy*

*u<sup>ψ</sup>* = *Jz*

to consider faults.

*uz* <sup>=</sup> *<sup>m</sup>*

 *x*¨ *d* <sup>4</sup> + <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 

 *x*¨ *d* <sup>5</sup> + <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 

 *x*¨ *d* <sup>6</sup> + <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 

(*cosx*<sup>5</sup> *cosx*4)

defined as virtual inputs and *zi* = *x<sup>d</sup>*

**3.5 Model predictive control (MPC)**

Multiplying both sides of the previous equation by *s*1:

$$s\_1 \dot{s}\_1 = -l\_1 s\_1^2 - m\_1 \left| s\_1 \right| \tag{45}$$

and properly choosing control gains *l*<sup>1</sup> and *m*<sup>1</sup> allows to verify (39). The same procedure can be followed for the other control inputs.

The elimination of the chattering effect produced by the discontinuous function *sign* can be attained by using a saturation function *sat* instead of the *sign* function. This saturation function is defined as follows:

$$sat(s\_i) = \begin{cases} \delta\_b & \text{if } \quad s\_i \ge \delta\_b \\\\ s\_i & \text{if } \quad -\delta\_b < s\_i < \delta\_b \\\\ -\delta\_b & \text{if } \quad s\_i \le -\delta\_b \end{cases} \tag{46}$$

where *δ<sup>b</sup>* is the boundary of the saturation function and is set small enough.

#### **3.4 Backstepping control (BSC)**

Backstepping design refers to "step back" to the control input, and a major advantage of backstepping design is its flexibility to avoid cancellation of useful nonlinearities and pursue the objectives of stabilization and tracking, rather than those of linearization. Recursively constructed backstepping controller (BSC) employs the control Lyapunov function to guarantee the global stability (Krstic et al., 1995).

In order to illustrate the BSC techniques, consider the following nonlinear system:

$$\begin{aligned} \dot{x} &= f(x) + g(x)\xi \\ \dot{\xi} &= u \end{aligned} \tag{47}$$

where *x* is the state vector and *ξ* is the control input. As a first step, define the tracking error between the actual value *x* and its desired value *x<sup>d</sup>* as follows:

$$e = \mathbf{x}^d - \mathbf{x} \tag{48}$$

As a second step, define the following states:

$$\begin{aligned} \mathbf{x}\_1 &= \mathbf{x} \\ \mathbf{x}\_2 &= \dot{\mathbf{x}}\_1 = \dot{\mathbf{x}} \\ \mathbf{x}\_3 &= \mathbf{e} = \mathbf{x}^d - \mathbf{x} = \mathbf{x}^d - \mathbf{x}\_1 \end{aligned} \tag{49}$$

The key idea of BSC is to choose certain variables as virtual controls. Assuming *x*<sup>2</sup> is the virtual control variable and *a*(*z*1) is the function which makes *z*<sup>1</sup> → 0, define *z*<sup>1</sup> as:

$$
\overline{z}\_1 = a(z\_1) - x\_2 \tag{50}
$$

The time derivative of *z*<sup>1</sup> is:

$$
\dot{z}\_1 = \dot{\mathbf{x}}^d - \dot{\mathbf{x}}\_1 = \dot{\mathbf{x}}^d - \mathbf{x}\_2 = \dot{\mathbf{x}}^d + \overline{z}\_1 - a(z\_1) \tag{51}
$$

Let us choose *a*(*z*1) as *a*(*z*1) = *x*˙ *<sup>d</sup>* + *k*1*z*<sup>1</sup> with *k*<sup>1</sup> > 0 and define the Lyapunov function:

$$V\_1 = \frac{1}{2}z\_1^2\tag{52}$$

One can see that the time derivative of *V*<sup>1</sup> is:

$$\dot{V}\_1 = z\_1 \dot{z}\_1 = z\_1 \left( \dot{\mathbf{x}}^d + \overline{z}\_1 - a(z\_1) \right) = z\_1 \left( \overline{z}\_1 - k\_1 z\_1 \right) = -k\_1 z\_1^2 + z\_1 \overline{z}\_1 \tag{53}$$

Clearly if *z*<sup>1</sup> = 0, then *V*˙ <sup>1</sup> <sup>=</sup> <sup>−</sup>*k*1*z*<sup>2</sup> <sup>1</sup> and *z*<sup>1</sup> is guaranteed to converge to zero asymptotically. Then, the next step is to define a Lyapunov function so as to make *z*<sup>1</sup> → 0:

$$V\_2 = V\_1 + \frac{1}{2}\overline{z}\_1^2\tag{54}$$

The time derivative of *V*<sup>2</sup> is:

16 Will-be-set-by-IN-TECH

2

and properly choosing control gains *l*<sup>1</sup> and *m*<sup>1</sup> allows to verify (39). The same procedure can

The elimination of the chattering effect produced by the discontinuous function *sign* can be attained by using a saturation function *sat* instead of the *sign* function. This saturation function

*δ<sup>b</sup>* if *si* ≥ *δ<sup>b</sup>*

−*δ<sup>b</sup>* if *si* ≤ −*δ<sup>b</sup>*

Backstepping design refers to "step back" to the control input, and a major advantage of backstepping design is its flexibility to avoid cancellation of useful nonlinearities and pursue the objectives of stabilization and tracking, rather than those of linearization. Recursively constructed backstepping controller (BSC) employs the control Lyapunov function to

*x*˙ = *f*(*x*) + *g*(*x*)*ξ*

where *x* is the state vector and *ξ* is the control input. As a first step, define the tracking error

*<sup>z</sup>*<sup>1</sup> <sup>=</sup> *<sup>e</sup>* <sup>=</sup> *<sup>x</sup><sup>d</sup>* <sup>−</sup> *<sup>x</sup>* <sup>=</sup> *<sup>x</sup><sup>d</sup>* <sup>−</sup> *<sup>x</sup>*<sup>1</sup>

The key idea of BSC is to choose certain variables as virtual controls. Assuming *x*<sup>2</sup> is the

*<sup>d</sup>* <sup>−</sup> *<sup>x</sup>*<sup>2</sup> <sup>=</sup> *<sup>x</sup>*˙

*<sup>V</sup>*<sup>1</sup> <sup>=</sup> <sup>1</sup> 2 *z*2

virtual control variable and *a*(*z*1) is the function which makes *z*<sup>1</sup> → 0, define *z*<sup>1</sup> as:

*<sup>d</sup>* <sup>−</sup> *<sup>x</sup>*˙1 <sup>=</sup> *<sup>x</sup>*˙

*si* if −*δ<sup>b</sup>* < *si* < *δ<sup>b</sup>*

<sup>1</sup> − *m*<sup>1</sup> |*s*1| (45)

*<sup>e</sup>* <sup>=</sup> *<sup>x</sup><sup>d</sup>* <sup>−</sup> *<sup>x</sup>* (48)

*z*<sup>1</sup> = *a*(*z*1) − *x*<sup>2</sup> (50)

*<sup>d</sup>* + *k*1*z*<sup>1</sup> with *k*<sup>1</sup> > 0 and define the Lyapunov function:

*<sup>d</sup>* <sup>+</sup> *<sup>z</sup>*<sup>1</sup> <sup>−</sup> *<sup>a</sup>*(*z*1) (51)

<sup>1</sup> (52)

(46)

(47)

(49)

*s*1*s*˙1 = −*l*1*s*

⎧ ⎪⎪⎪⎨

⎪⎪⎪⎩

where *δ<sup>b</sup>* is the boundary of the saturation function and is set small enough.

In order to illustrate the BSC techniques, consider the following nonlinear system:

˙ *ξ* = *u*

*x*<sup>1</sup> = *x x*<sup>2</sup> = *x*˙1 = *x*˙

between the actual value *x* and its desired value *x<sup>d</sup>* as follows:

*z*˙1 = *x*˙

Multiplying both sides of the previous equation by *s*1:

*sat*(*si*) =

be followed for the other control inputs.

is defined as follows:

**3.4 Backstepping control (BSC)**

guarantee the global stability (Krstic et al., 1995).

As a second step, define the following states:

The time derivative of *z*<sup>1</sup> is:

Let us choose *a*(*z*1) as *a*(*z*1) = *x*˙

$$
\dot{V}\_2 = \dot{V}\_1 + \overline{z}\_1 \dot{\overline{z}}\_1 = -k\_1 z\_1^2 + z\_1 \overline{z}\_1 + \overline{z}\_1 \left(\dot{\mathbf{x}}^d + k\_1 \dot{z}\_1 - \dot{x}\_2\right) \tag{55}
$$

To obtain *V*˙ <sup>2</sup> < 0, *x*˙2 is chosen as:

$$\begin{aligned} \dot{\mathfrak{X}}\_2 &= \ddot{\mathfrak{x}}^d + \left(1 - k\_1^2\right) z\_1 + \left(k\_1 + k\_2\right) \overline{z}\_1 \\ &\dots - z\_d \quad \dots \end{aligned} \tag{56}$$

with *<sup>k</sup>*<sup>1</sup> <sup>&</sup>gt; 0, *<sup>k</sup>*<sup>2</sup> <sup>&</sup>gt; 0, *<sup>z</sup>*<sup>1</sup> <sup>=</sup> *<sup>x</sup><sup>d</sup>* <sup>−</sup> *<sup>x</sup>*<sup>1</sup> and *<sup>z</sup>*<sup>1</sup> <sup>=</sup> *<sup>x</sup>*˙ *<sup>d</sup>* <sup>+</sup> *<sup>k</sup>*1*z*<sup>1</sup> <sup>−</sup> *<sup>x</sup>*2.

The application of the method above to the state-space representation (34) of the Qball-X4 model gives the control inputs (Zhang, 2010a), (Zhang et al., 2010b):

*ux* <sup>=</sup> <sup>1</sup> *uz x*¨ *d* <sup>1</sup> + *kx x*7/*m* + <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 *z*<sup>1</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>1</sup> *uy* <sup>=</sup> <sup>1</sup> *uz x*¨ *d* <sup>2</sup> + *kyx*8/*m* + <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 *z*<sup>2</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>2</sup> *uz* <sup>=</sup> *<sup>m</sup>* (*cosx*<sup>5</sup> *cosx*4) *x*¨ *d* <sup>3</sup> + *g* + *kzx*9/*m* + <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 *z*<sup>3</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>3</sup> *u<sup>θ</sup>* = *Jx x*¨ *d* <sup>4</sup> + <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 *z*<sup>4</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>4</sup> − *Jy* − *Jz x*11*x*<sup>12</sup> + *JTx*<sup>11</sup> Ω + *kθx*<sup>10</sup> *u<sup>φ</sup>* = *Jy x*¨ *d* <sup>5</sup> + <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 *z*<sup>5</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>5</sup> − (*Jz* − *Jx*) *x*10*x*<sup>12</sup> + *JTx*<sup>10</sup> Ω + *kφx*<sup>11</sup> *u<sup>ψ</sup>* = *Jz x*¨ *d* <sup>6</sup> + <sup>1</sup> <sup>−</sup> *<sup>k</sup>*<sup>2</sup> 1 *z*<sup>6</sup> + (*k*<sup>1</sup> + *k*2) *z*<sup>6</sup> − *Jx* − *Jy x*10*x*<sup>11</sup> + *kψx*<sup>12</sup> (57)

with *ux* = (*cosx*<sup>5</sup> *sinx*<sup>4</sup> *cosx*<sup>6</sup> + *sinx*<sup>5</sup> *sinx*6) /*m* and *uy* = (*cosx*<sup>5</sup> *sinx*<sup>4</sup> *sinx*<sup>6</sup> − *sinx*<sup>5</sup> *cosx*6) /*m* defined as virtual inputs and *zi* = *x<sup>d</sup> <sup>i</sup>* − *xi* and *zi* = *x*˙ *d <sup>i</sup>* + *k*1*zi* − *x*˙*<sup>i</sup>* (*i* = 1, ..., 6).

#### **3.5 Model predictive control (MPC)**

Model Predictive Control (MPC) is a promising tool for fault tolerant control applications (Maciejowski & Jones, 2003) due to its prominent capabilities such as constraint handling, flexibility to changes in the process dynamics and applicability to nonlinear dynamics. Since MPC recalculates the control signal at each sampling time, any change in the process dynamics can be reflected simply into the control signal calculation. Also, the constraint handling capability of MPC allows system working close to the boundaries of the tight post-failure operation envelope. The drawback of MPC is that similarly to most of the control techniques, it needs an almost explicit model of the system to calculate a stabilizing control signal. On the other hand, the abrupt changes in the model parameters, due to failure, cannot be predicted beforehand and an online data-driven parameter estimation methodology is required to extract the post-failure model parameters from online input/output data. In other words, an FDD module is required to provide information about the occurring faults to allow MPC to consider faults.

*3. Solve Problem 1 and generate uk*(.) *and xk*(.)*.*

This algorithm is repeated for *k* = 0, 1, ..., ∞. In step #2, if full state measurement is not

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 137

where *α* captures the fault information and is called the fault parameter matrix which determines the fault severity. *α* is a diagonal matrix, i.e. *α* = *diag*(*α*1, *α*2, ..., *αm*) where *m* is the number of inputs (*m* = 4 for the quadrotor helicopter) and the scalar *α<sup>i</sup>* denotes the

a complete loss of actuator effectiveness and 0 < *α<sup>i</sup>* < 1 represents a partial loss. Taking into consideration the model representation (65) after fault occurrence, the fault-tolerant MPC

One can see that the difference between Problem 1 and Problem 2 resides in the consideration of the fault matrix *α* in (67). Clearly, solving Problem 2 requires an FDD module for fault identification and thus the algorithm for solving Problem 2 is similar to Algorithm1 except

This section does not present an FTC method but a trajectory planning/re-planning approach that can be combined with any FTC module to provide a better management of the system resources after fault occurrence. This is achieved by redefining the reference trajectories to be followed by the damaged system depending on the fault severity. This approach is equivalent

that an FDD module is needed to run parallelly to provide an estimation of *α*.

**3.6 Flatness-based trajectory planning/re-planning (FTPR)**

to the reconfiguration of command governor block in Figure 3.

*x*(*k* + 1) = *f*(*x*(*k*), *α*(*k*)*u*(*k*)) (65)

*th* actuator. *α<sup>i</sup>* = 1 denotes a healthy actuator, *α<sup>i</sup>* = 0 denotes

*xk*(*j* + 1) = *f*(*xk*(*j*), *αuk*(*j*)) ; *xk*(0) = *x*(*k*) (67)

*xk*(*j*) ∈ **X** (68)

*uk*(*j*) ∈ **U** (69)

*xk*(*N*) ∈ **X***<sup>t</sup>* (70)

{*uk* (.),*xk* (.)} *<sup>J</sup>*(*xk*(.), *uk*(.)) (66)

available, then a state estimator (observer) can be used to provide the state estimate.

In the presence of an actuator fault, the system dynamics can be rewritten as follows:

*4. Apply uk*(0) *to the system. 5. Set k* = *k* + 1 *and GOTO Step #2.*

**3.5.3 Fault-tolerant MPC**

amplitude of the fault in the *i*

**Problem 2.** *Calculate:*

*for j* = 0, 1, ..., *N* − 1*.*

*Subject to:*

problem can be defined as follows (Izadi et al., 2011b):

*J*

∗(*x*(*k*)) = min

#### **3.5.1 Notation and terminology**

In the MPC, also known as Receding Horizon Control (RHC), a cost function is minimized over a future prediction horizon time step denoted by *N*, subject to the dynamical constraints. The first control input in the sequence is applied to the plant until the next update is available. The discrete timing is shown by *k* where *k* ∈ **N**. The state vectors are introduced as follows:


Similar notation is used for the control input vector *u*. Also the sequence of the state/input vector over the prediction horizon is called the state/input trajectory and is shown as follows:

$$\begin{aligned} \mathbf{x}\_k(.) &= \{ \mathbf{x}\_k(j) | j = 0, 1, 2, \dots, N \} \\ \mathbf{u}\_k(.) &= \{ \mathbf{u}\_k(j) | j = 0, 1, 2, \dots, N - 1 \} \end{aligned} \tag{58}$$

## **3.5.2 Fault-free MPC formulation**

The cost function at time step *k* is defined as follows:

$$f(\mathbf{x}\_k(.), \boldsymbol{\mu}\_k(.)) = \sum\_{j=0}^{N-1} \left( \|\mathbf{x}\_k(j) - \mathbf{x}^d\|\_{\boldsymbol{Q}}^2 + \|\boldsymbol{\mu}\_k(j)\|\_{R}^2 \right) + \|\mathbf{x}\_k(N) - \mathbf{x}^d\|\_{\boldsymbol{P}}^2 \tag{59}$$

where �*x*�<sup>2</sup> *<sup>Q</sup>* <sup>=</sup> *<sup>x</sup>TQx*, and *<sup>P</sup>* <sup>&</sup>gt; 0, *<sup>Q</sup>* <sup>&</sup>gt; 0 and *<sup>R</sup>* <sup>&</sup>gt; 0 are symmetric matrices. *<sup>x</sup><sup>d</sup>* is the desired or reference state of *x*. Then the MPC problem at each step time *k* is defined as follows:

**Problem 1.** *Calculate:*

$$J^\*(\mathbf{x}(k)) = \min\_{\{u\_k(.), x\_k(.)\}} J(\mathbf{x}\_k(.), u\_k(.)) \tag{60}$$

*Subject to:*

$$\mathbf{x}\_k(j+1) = f(\mathbf{x}\_k(j), \mathbf{u}\_k(j)) \quad ; \quad \mathbf{x}\_k(0) = \mathbf{x}(k) \tag{61}$$

$$\mathbf{x}\_k(j) \in \mathbb{X} \tag{62}$$

$$
\mu\_k(j) \in \mathbb{U} \tag{63}
$$

$$\mathbf{x}\_k(N) \in \mathbb{X}\_t \tag{64}$$

*for j* = 0, 1, ..., *N* − 1*.*

**<sup>X</sup>** <sup>⊆</sup> **<sup>R</sup>***n*, **<sup>U</sup>** <sup>⊆</sup> **<sup>R</sup>***<sup>m</sup>* and **<sup>X</sup>***<sup>t</sup>* <sup>⊆</sup> **<sup>X</sup>** denote the set of admissible states, inputs and terminal states (terminal region) respectively. *J*∗ denotes the optimal value of the cost function *J*. This MPC formulation is based on the quasi-infinite model predictive control (Chen & Allgower, 1998). At each time step *k*, MPC generates the input and state trajectories, by solving Problem 1. After generating these trajectories, MPC controller applies only the first computed control input, i.e. *uk*(0) to the system. The following algorithm presents the online implementation of Problem 1 (Izadi, 2009a), (Izadi et al., 2011b).

**Algorithm 1.** *Given x*(0) *and xd, do:*


18 Will-be-set-by-IN-TECH

In the MPC, also known as Receding Horizon Control (RHC), a cost function is minimized over a future prediction horizon time step denoted by *N*, subject to the dynamical constraints. The first control input in the sequence is applied to the plant until the next update is available. The discrete timing is shown by *k* where *k* ∈ **N**. The state vectors are introduced as follows:

• *xk*(*j*) : predicted state vector at time step *k* + *j* computed at time step *k* (*j* ∈ {0, 1, ..., *N*}). Similar notation is used for the control input vector *u*. Also the sequence of the state/input vector over the prediction horizon is called the state/input trajectory and is shown as follows:

*xk*(.) = {*xk*(*j*)|*j* = 0, 1, 2, ..., *N*}

�*xk*(*j*) <sup>−</sup> *<sup>x</sup>d*�<sup>2</sup>

or reference state of *x*. Then the MPC problem at each step time *k* is defined as follows:

**<sup>X</sup>** <sup>⊆</sup> **<sup>R</sup>***n*, **<sup>U</sup>** <sup>⊆</sup> **<sup>R</sup>***<sup>m</sup>* and **<sup>X</sup>***<sup>t</sup>* <sup>⊆</sup> **<sup>X</sup>** denote the set of admissible states, inputs and terminal states (terminal region) respectively. *J*∗ denotes the optimal value of the cost function *J*. This MPC formulation is based on the quasi-infinite model predictive control (Chen & Allgower, 1998). At each time step *k*, MPC generates the input and state trajectories, by solving Problem 1. After generating these trajectories, MPC controller applies only the first computed control input, i.e. *uk*(0) to the system. The following algorithm presents the online implementation

∗(*x*(*k*)) = min

*uk*(.) = {*uk*(*j*)|*<sup>j</sup>* <sup>=</sup> 0, 1, 2, ..., *<sup>N</sup>* <sup>−</sup> <sup>1</sup>} (58)

*R* 

*xk*(*j* + 1) = *f*(*xk*(*j*), *uk*(*j*)) ; *xk*(0) = *x*(*k*) (61) *xk*(*j*) ∈ **X** (62) *uk*(*j*) ∈ **U** (63) *xk*(*N*) ∈ **X***<sup>t</sup>* (64)

<sup>+</sup> �*xk*(*N*) <sup>−</sup> *<sup>x</sup>d*�<sup>2</sup>

{*uk* (.),*xk* (.)} *<sup>J</sup>*(*xk*(.), *uk*(.)) (60)

*<sup>P</sup>* (59)

*<sup>Q</sup>* <sup>+</sup> �*uk*(*j*)�<sup>2</sup>

*<sup>Q</sup>* <sup>=</sup> *<sup>x</sup>TQx*, and *<sup>P</sup>* <sup>&</sup>gt; 0, *<sup>Q</sup>* <sup>&</sup>gt; 0 and *<sup>R</sup>* <sup>&</sup>gt; 0 are symmetric matrices. *<sup>x</sup><sup>d</sup>* is the desired

**3.5.1 Notation and terminology**

**3.5.2 Fault-free MPC formulation**

where �*x*�<sup>2</sup>

*Subject to:*

*1. k* = 0*.*

*2. Measure x*(*k*)*.*

**Problem 1.** *Calculate:*

*for j* = 0, 1, ..., *N* − 1*.*

The cost function at time step *k* is defined as follows:

*N*−1 ∑ *j*=0

*J*

of Problem 1 (Izadi, 2009a), (Izadi et al., 2011b).

**Algorithm 1.** *Given x*(0) *and xd, do:*

*J*(*xk*(.), *uk*(.)) =

• *x*(*k*) : actual state vector at time step *k*.

*5. Set k* = *k* + 1 *and GOTO Step #2.*

This algorithm is repeated for *k* = 0, 1, ..., ∞. In step #2, if full state measurement is not available, then a state estimator (observer) can be used to provide the state estimate.

#### **3.5.3 Fault-tolerant MPC**

In the presence of an actuator fault, the system dynamics can be rewritten as follows:

$$\mathbf{x}(k+1) = f(\mathbf{x}(k), \mathbf{a}(k)\boldsymbol{\mu}(k)) \tag{65}$$

where *α* captures the fault information and is called the fault parameter matrix which determines the fault severity. *α* is a diagonal matrix, i.e. *α* = *diag*(*α*1, *α*2, ..., *αm*) where *m* is the number of inputs (*m* = 4 for the quadrotor helicopter) and the scalar *α<sup>i</sup>* denotes the amplitude of the fault in the *i th* actuator. *α<sup>i</sup>* = 1 denotes a healthy actuator, *α<sup>i</sup>* = 0 denotes a complete loss of actuator effectiveness and 0 < *α<sup>i</sup>* < 1 represents a partial loss. Taking into consideration the model representation (65) after fault occurrence, the fault-tolerant MPC problem can be defined as follows (Izadi et al., 2011b):

**Problem 2.** *Calculate:*

$$J^\*(\mathfrak{x}(k)) = \min\_{\{\boldsymbol{\mu}\_k(.), \boldsymbol{\mu}\_k(.)\}} J(\mathfrak{x}\_k(.), \boldsymbol{\mu}\_k(.)) \tag{66}$$

*Subject to:*

$$\mathbf{x}\_k(j+1) = f(\mathbf{x}\_k(j), \mathbf{a}u\_k(j)) \quad ; \quad \mathbf{x}\_k(0) = \mathbf{x}(k) \tag{67}$$

$$\mathfrak{x}\_k(j) \in \mathbb{X} \tag{68}$$

$$
\mu\_k(j) \in \mathbb{U} \tag{69}
$$

$$\mathbf{x}\_k(N) \in \mathbb{X}\_t \tag{70}$$

*for j* = 0, 1, ..., *N* − 1*.*

One can see that the difference between Problem 1 and Problem 2 resides in the consideration of the fault matrix *α* in (67). Clearly, solving Problem 2 requires an FDD module for fault identification and thus the algorithm for solving Problem 2 is similar to Algorithm1 except that an FDD module is needed to run parallelly to provide an estimation of *α*.

#### **3.6 Flatness-based trajectory planning/re-planning (FTPR)**

This section does not present an FTC method but a trajectory planning/re-planning approach that can be combined with any FTC module to provide a better management of the system resources after fault occurrence. This is achieved by redefining the reference trajectories to be followed by the damaged system depending on the fault severity. This approach is equivalent to the reconfiguration of command governor block in Figure 3.

*u<sup>ψ</sup>* of *F*¨

*<sup>i</sup>* (*t*0) and *<sup>F</sup>*(*ni*)

The coefficients *a<sup>i</sup>*

*F*(*ni*)

and

*F*˙ *<sup>i</sup>*(*t*0), *F*¨

inputs can be obtained if one can impose *F*(0)

*F*∗ *<sup>i</sup>* <sup>=</sup> *<sup>a</sup><sup>i</sup>* 5*t* <sup>5</sup> + *a<sup>i</sup>* 4*t* <sup>4</sup> + *a<sup>i</sup>* 3*t* <sup>3</sup> + *a<sup>i</sup>* 2*t* <sup>2</sup> + *a<sup>i</sup>*

*F*∗ *<sup>i</sup>* <sup>=</sup> *<sup>a</sup><sup>i</sup>* 9*t* <sup>9</sup> + *a<sup>i</sup>* 8*t*

initial and the final instants of the mission.

this case, the nominal control inputs are:

and the final conditions *Fi*(*tf*), *F*˙

**3.6.3 Trajectory planning**

degree 9 for *F*<sup>2</sup> and *F*3. The reference trajectories are then:

*<sup>i</sup>*(*t*0) and the final conditions *Fi*(*tf*), *F*˙

inputs to be applied along the reference trajectories are:

*j* = 0, ..., 9) are calculated to verify the initial conditions *Fi*(*t*0), *F*˙

*<sup>i</sup>*(*tf*), *F*¨

*u*∗ *<sup>z</sup>* = *<sup>m</sup>*

*u*∗ *<sup>θ</sup>* = *Jx*

*u*∗ *<sup>φ</sup>* = −*Jy*

*u*∗ *<sup>ψ</sup>* = *JzF*¨<sup>∗</sup> 4

> *u*∗ *<sup>z</sup>* = *mg*;

*u*∗ *<sup>θ</sup>* = *Jx*

*u*∗ *<sup>φ</sup>* = −*Jy*

*u*∗ *<sup>ψ</sup>* = 0

Since the quadrotor is assumed to have a zero yaw angle (*ψ* = 0), then *F*¨<sup>∗</sup>

is also assumed that the quadrotor is not changing altitude and thus *F*¨<sup>∗</sup>

4. The relative degrees are then *r*<sup>1</sup> = 2, *r*<sup>2</sup> = 4, *r*<sup>3</sup> = 4 and *r*<sup>4</sup> = 2. Smooth control

*<sup>i</sup>* (*tf*)) where *ni* = 2 for *i* = 1, 4 and *ni* = 4 for *i* = 2, 3. To this end, we employ

<sup>1</sup>*<sup>t</sup>* <sup>+</sup> *<sup>a</sup><sup>i</sup>*

<sup>1</sup>*<sup>t</sup>* <sup>+</sup> *<sup>a</sup><sup>i</sup>*

*<sup>j</sup>* (*i* = 1, 4 and *j* = 0, ..., 5) are calculated to verify the initial conditions *Fi*(*t*0),

*<sup>i</sup>* at the initial and final time (i.e. up to

<sup>0</sup> ; (*i* = 1, 4) (75)

<sup>0</sup> ; (*i* = 2, 3) (76)

*<sup>i</sup>*(*t*0), *<sup>F</sup>*(3)

*<sup>i</sup>* (*tf*). *t*<sup>0</sup> and *tf* are respectively the

*<sup>j</sup>* (*i* = 2, 3 and

*<sup>i</sup>* (*t*0)

(77)

(78)

<sup>4</sup> = 0 ∀ *t* ∈ [*t*0, *tf* ]. It

<sup>1</sup> = 0 ∀ *t* ∈ [*t*0, *tf* ]. In

*<sup>i</sup>* (*t*0), *<sup>F</sup>*(4)

*<sup>i</sup>*(*tf*). The coefficients *a<sup>i</sup>*

*<sup>i</sup>*(*t*0), *F*¨

*<sup>i</sup>* up to *<sup>F</sup>*(*ni*)

a Bézier polynomial function of degree 5 for *F*<sup>1</sup> and *F*<sup>4</sup> and a Bézier polynomial function of

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 139

2*t* <sup>2</sup> + *a<sup>i</sup>*

*<sup>i</sup>*(*tf*), *F*¨

*<sup>i</sup>* (*tf*), *<sup>F</sup>*(4)

<sup>8</sup> <sup>+</sup> ··· <sup>+</sup> *<sup>a</sup><sup>i</sup>*

*<sup>i</sup>*(*tf*), *<sup>F</sup>*(3)

The trajectory planning consists in driving the quadrotor from an initial to a final position. The initial and final conditions as well as the initial time *t*<sup>0</sup> are all known and the only unknown is the final time of the mission *tf* . Thus, the trajectory planning tends to tune the profile of the trajectory (by tuning *tf* ) so that to drive the system along the desired trajectory without violating actuator constraints. Thanks to flatness, it is possible to find the relation between the applied control inputs and the reference trajectories. According to (73) the nominal control

> *F*¨∗ <sup>1</sup> + *g* ;

*F*(4)<sup>∗</sup> 2 *g* ;

> *F*(4)<sup>∗</sup> 3 *g* ;

*F*(4)<sup>∗</sup> 2 *g* ;

> *F*(4)<sup>∗</sup> 3 *g* ;

#### **3.6.1 Flatness notion**

The flatness can be defined as follows. A dynamic system:

$$\begin{aligned} \dot{x} &= f(x, u) \\ y &= h(x) \end{aligned} \tag{71}$$

with *<sup>x</sup>* ∈ �*<sup>n</sup>* and *<sup>u</sup>* ∈ �*m*, is flat if and only if there exist variables *<sup>F</sup>* ∈ �*<sup>m</sup>* called the flat outputs such that: *x* = Ξ1(*F*, *F*˙, ..., *F*(*n*−<sup>1</sup>)), *y* = Ξ2(*F*, *F*˙, ..., *F*(*n*−<sup>1</sup>)) and *u* = Ξ3(*F*, *F*˙, ..., *F*(*n*)). Ξ1, Ξ<sup>2</sup> and Ξ<sup>3</sup> are three smooth mappings and *F*(*i*) is the *i th* derivative of *F*. The parameterization of the control inputs *u* in function of the flat outputs *F* plays a key role in the trajectory planning problem: the nominal control inputs to be applied during a mission can be expressed in function of the desired trajectories. Thus allowing to tune the profile of the trajectories for keeping the applied control inputs below the actuator limits (Chamseddine et al., 2011b).

For the quadrotor UAV simplified model given in (6), one can see that the outputs to be controlled can be chosen as flat outputs. Thus, system (6) is flat with flat outputs *F*<sup>1</sup> = *z*, *F*<sup>2</sup> = *x*, *F*<sup>3</sup> = *y* and *F*<sup>4</sup> = *ψ*. In addition to *x*, *y*, *z* and *ψ*, the parameterization of *θ* and *φ* in function of the flat outputs is:

$$\begin{aligned} \theta &= \frac{\ddot{F}\_2}{\mathcal{g}};\\ \phi &= -\frac{\ddot{F}\_3}{\mathcal{g}} \end{aligned} \tag{72}$$

The parameterization of the control inputs in function of the flat outputs is:

$$\begin{aligned} u\_z &= m \left( \ddot{F}\_1 + g \right); \\ u\_\theta &= J\_x \frac{F\_2^{(4)}}{g}; \\ u\_\phi &= -J\_y \frac{F\_3^{(4)}}{g}; \\ u\_\psi &= J\_z \ddot{F}\_4 \end{aligned} \tag{73}$$

#### **3.6.2 Reference trajectory design**

Let's define *F*∗ *<sup>i</sup>* as the reference trajectories for the flat output *Fi*. Several methods can be used to design *F*∗ *<sup>i</sup>* . In this work we employ the Bézier polynomial function. A general Bézier polynomial function of degree *n* is:

$$F = a\_n t^n + a\_{n-1} t^{n-1} + \dots + a\_2 t^2 + a\_1 t + a\_0 \tag{74}$$

where *t* is the time and *ai* (*i* = 0, ..., *n*) are constant coefficients to be calculated in function of the initial and final conditions. It is clear that the larger is *n*, the smoother is the reference trajectory. However, calculations for trajectory planning become heavier as *n* increases. For the quad-rotor UAV, it can be seen in (73) that *uz* is function of *F*¨ 1, *<sup>u</sup><sup>θ</sup>* of *<sup>F</sup>*(4) <sup>2</sup> , *<sup>u</sup><sup>φ</sup>* of *<sup>F</sup>*(4) <sup>3</sup> and *u<sup>ψ</sup>* of *F*¨ 4. The relative degrees are then *r*<sup>1</sup> = 2, *r*<sup>2</sup> = 4, *r*<sup>3</sup> = 4 and *r*<sup>4</sup> = 2. Smooth control inputs can be obtained if one can impose *F*(0) *<sup>i</sup>* up to *<sup>F</sup>*(*ni*) *<sup>i</sup>* at the initial and final time (i.e. up to *F*(*ni*) *<sup>i</sup>* (*t*0) and *<sup>F</sup>*(*ni*) *<sup>i</sup>* (*tf*)) where *ni* = 2 for *i* = 1, 4 and *ni* = 4 for *i* = 2, 3. To this end, we employ a Bézier polynomial function of degree 5 for *F*<sup>1</sup> and *F*<sup>4</sup> and a Bézier polynomial function of degree 9 for *F*<sup>2</sup> and *F*3. The reference trajectories are then:

$$F\_i^\* = a\_5^i t^5 + a\_4^i t^4 + a\_3^i t^3 + a\_2^i t^2 + a\_1^i t + a\_0^i \; ; \; (i = 1, 4) \tag{75}$$

and

(71)

(72)

(73)

*th* derivative of *F*.

20 Will-be-set-by-IN-TECH

*x*˙ = *f*(*x*, *u*) *y* = *h*(*x*)

with *<sup>x</sup>* ∈ �*<sup>n</sup>* and *<sup>u</sup>* ∈ �*m*, is flat if and only if there exist variables *<sup>F</sup>* ∈ �*<sup>m</sup>* called the flat outputs such that: *x* = Ξ1(*F*, *F*˙, ..., *F*(*n*−<sup>1</sup>)), *y* = Ξ2(*F*, *F*˙, ..., *F*(*n*−<sup>1</sup>)) and *u* =

The parameterization of the control inputs *u* in function of the flat outputs *F* plays a key role in the trajectory planning problem: the nominal control inputs to be applied during a mission can be expressed in function of the desired trajectories. Thus allowing to tune the profile of the trajectories for keeping the applied control inputs below the actuator limits (Chamseddine

For the quadrotor UAV simplified model given in (6), one can see that the outputs to be controlled can be chosen as flat outputs. Thus, system (6) is flat with flat outputs *F*<sup>1</sup> = *z*, *F*<sup>2</sup> = *x*, *F*<sup>3</sup> = *y* and *F*<sup>4</sup> = *ψ*. In addition to *x*, *y*, *z* and *ψ*, the parameterization of *θ* and *φ* in

> *<sup>θ</sup>* <sup>=</sup> *<sup>F</sup>*¨ 2 *g* ;

*<sup>φ</sup>* <sup>=</sup> <sup>−</sup> *<sup>F</sup>*¨ 3 *g*

> *F*¨ <sup>1</sup> + *g* ;

*F*(4) 2 *g* ;

> *F*(4) 3 *g* ;

*<sup>i</sup>* as the reference trajectories for the flat output *Fi*. Several methods can be

*<sup>n</sup>*−<sup>1</sup> + ... + *a*2*t*

where *t* is the time and *ai* (*i* = 0, ..., *n*) are constant coefficients to be calculated in function of the initial and final conditions. It is clear that the larger is *n*, the smoother is the reference trajectory. However, calculations for trajectory planning become heavier as *n* increases. For

*<sup>i</sup>* . In this work we employ the Bézier polynomial function. A general Bézier

<sup>2</sup> + *a*1*t* + *a*<sup>0</sup> (74)

<sup>2</sup> , *<sup>u</sup><sup>φ</sup>* of *<sup>F</sup>*(4)

<sup>3</sup> and

1, *<sup>u</sup><sup>θ</sup>* of *<sup>F</sup>*(4)

*uz* = *m*

*u<sup>θ</sup>* = *Jx*

*u<sup>φ</sup>* = −*Jy*

*u<sup>ψ</sup>* = *JzF*¨ 4

Ξ3(*F*, *F*˙, ..., *F*(*n*)). Ξ1, Ξ<sup>2</sup> and Ξ<sup>3</sup> are three smooth mappings and *F*(*i*) is the *i*

The parameterization of the control inputs in function of the flat outputs is:

**3.6.1 Flatness notion**

et al., 2011b).

function of the flat outputs is:

**3.6.2 Reference trajectory design**

polynomial function of degree *n* is:

*F* = *ant*

the quad-rotor UAV, it can be seen in (73) that *uz* is function of *F*¨

*<sup>n</sup>* <sup>+</sup> *an*−1*<sup>t</sup>*

Let's define *F*∗

used to design *F*∗

The flatness can be defined as follows. A dynamic system:

$$F\_i^\* = a\_9^i t^9 + a\_8^i t^8 + \dots + a\_2^i t^2 + a\_1^i t + a\_0^i \; ; \; (i = 2, 3) \tag{76}$$

The coefficients *a<sup>i</sup> <sup>j</sup>* (*i* = 1, 4 and *j* = 0, ..., 5) are calculated to verify the initial conditions *Fi*(*t*0), *F*˙ *<sup>i</sup>*(*t*0), *F*¨ *<sup>i</sup>*(*t*0) and the final conditions *Fi*(*tf*), *F*˙ *<sup>i</sup>*(*tf*), *F*¨ *<sup>i</sup>*(*tf*). The coefficients *a<sup>i</sup> <sup>j</sup>* (*i* = 2, 3 and *j* = 0, ..., 9) are calculated to verify the initial conditions *Fi*(*t*0), *F*˙ *<sup>i</sup>*(*t*0), *F*¨ *<sup>i</sup>*(*t*0), *<sup>F</sup>*(3) *<sup>i</sup>* (*t*0), *<sup>F</sup>*(4) *<sup>i</sup>* (*t*0) and the final conditions *Fi*(*tf*), *F*˙ *<sup>i</sup>*(*tf*), *F*¨ *<sup>i</sup>*(*tf*), *<sup>F</sup>*(3) *<sup>i</sup>* (*tf*), *<sup>F</sup>*(4) *<sup>i</sup>* (*tf*). *t*<sup>0</sup> and *tf* are respectively the initial and the final instants of the mission.

#### **3.6.3 Trajectory planning**

The trajectory planning consists in driving the quadrotor from an initial to a final position. The initial and final conditions as well as the initial time *t*<sup>0</sup> are all known and the only unknown is the final time of the mission *tf* . Thus, the trajectory planning tends to tune the profile of the trajectory (by tuning *tf* ) so that to drive the system along the desired trajectory without violating actuator constraints. Thanks to flatness, it is possible to find the relation between the applied control inputs and the reference trajectories. According to (73) the nominal control inputs to be applied along the reference trajectories are:

$$\begin{aligned} u\_z^\* &= m \left( F\_1^\* + g \right); \\ u\_\theta^\* &= Jx \frac{F\_2^{(4)\*}}{g}; \\ u\_\phi^\* &= -Jy \frac{F\_3^{(4)\*}}{g}; \\ u\_\psi^\* &= Jz \ddot{F}\_4^\* \end{aligned} \tag{77}$$

Since the quadrotor is assumed to have a zero yaw angle (*ψ* = 0), then *F*¨<sup>∗</sup> <sup>4</sup> = 0 ∀ *t* ∈ [*t*0, *tf* ]. It is also assumed that the quadrotor is not changing altitude and thus *F*¨<sup>∗</sup> <sup>1</sup> = 0 ∀ *t* ∈ [*t*0, *tf* ]. In this case, the nominal control inputs are:

$$\begin{aligned} u\_z^\* &= mg; \\ u\_\theta^\* &= f\_x \frac{F\_2^{(4)\*}}{\mathcal{g}}; \\ u\_\phi^\* &= -f\_y \frac{F\_3^{(4)\*}}{\mathcal{g}}; \\ u\_\psi^\* &= 0 \end{aligned} \tag{78}$$

Since the above study is based on the simplified model (6), the constant 0 ≤ *ρ* ≤ 1 is introduced to create some safety margin and to robustify the obtained solution with respect

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 141

1/4 ; ⎛ ⎝±*c*<sup>7</sup>

for the constants *c*<sup>6</sup> and *c*7. In conclusion, the quadrotor UAV will have 16 extrema (four per motor) and therefore 16 solutions are obtained and the maximal one among them is to be

As for the fault-free case, the trajectory re-planning consists in determining the minimal time of the mission *tf* so that the actuator constraints are not violated. For the damaged UAV, this

*δ<sup>i</sup>* = 1 denotes a complete loss of the rotor and 0 < *δ<sup>i</sup>* < 1 represents a partial loss of control effectiveness. Clearly, trajectory re-planning in the fault case requires the knowledge of the fault amplitude *δi*. Thus, a fault detection and diagnosis module is needed to detect, isolate and identify the fault. Unlike trajectory planning, the initial conditions are not zero at the

*<sup>i</sup>*(*trep*) �<sup>=</sup> 0, *<sup>F</sup>*(3)

is the re-planning time. Therefore, it is difficult to analytically calculate *tf* as in the previous section since the expressions are much more complicated and thus another method is needed to solve the problem. Starting from the idea that the larger *tf* is, the smaller are the PWM

5. If the error is smaller than a predefined threshold, exit the algorithm and the solution is the current *tf* . If not, update the current *tf* as follows *tf* ← *tf* + *tf E*/*ν* with *ν* is a positive

allowable PWM input and thus it is necessary to increase *tf* . If the error is negative then *u*<sup>∗</sup>

is smaller than the maximal allowable PWM input and thus it is necessary to decrease *tf* . The constant *ν* must be carefully selected since it affects the convergence speed of the algorithm.

*F*2(*tf*)*Jx*

*<sup>ρ</sup>umax* <sup>−</sup> *mg*

4*K* �

*th* rotor. *δ<sup>i</sup>* = 0 denotes a healthy rotor,

⎞ ⎠

1/4⎞

<sup>1</sup> with different values

*<sup>i</sup>* (*trep*) �= 0 where *trep*

*imax* among all the

*imax*

*imax* is larger than the maximal

⎟⎠ (86)

*gKL* �

*<sup>i</sup>* ≤ *ρ*(1 − *δi*)*umax* ; (*i* = 1, ..., 4) (87)

*<sup>i</sup>* (*trep*) �<sup>=</sup> 0 and *<sup>F</sup>*(4)

*<sup>i</sup>* (*t*) (similar to the procedure in the previous section) with

*imax* and the maximal allowable PWM input (*ρumax* for the

*<sup>i</sup>* (*t*) and determine the maximum value *u*<sup>∗</sup>

<sup>4</sup> have the same structure as for *u*<sup>∗</sup>

⎞ ⎠

to model uncertainties. Four solutions can then be obtained:

*gKL* �

<sup>2</sup>, *u*<sup>∗</sup>

*F*2(*tf*)*Jx*

<sup>3</sup> and *u*<sup>∗</sup>

*u*∗

*<sup>i</sup>*(*trep*) �<sup>=</sup> 0, *<sup>F</sup>*¨

inputs *ui*, we propose the following algorithm to calculate *tf* :

healthy UAVs and *ρ*(1 − *δi*)*umax* for the damaged one).

As can be seen in Step #5, if the error *Ei* is positive then *u*<sup>∗</sup>

2. Start with an initial guess of the mission time *tf* .

where *δ<sup>i</sup>* represents the loss of effectiveness in the *i*

*<sup>ρ</sup>umax* <sup>−</sup> *mg*

4*K* �

*tf* ≥

The four extrema of *u*∗

**3.6.4 Trajectory re-planning**

re-planning instant i.e. *F*˙

1. Develop the expressions of *u*∗

3. For *t* = 0 : *Te* : *tf* calculate *u*<sup>∗</sup>

*<sup>i</sup>* (*t*). *Te* is a sampling period. 4. Determine the error *Ei* between *u*<sup>∗</sup>

nonzero initial conditions.

considered.

is written as:

*u*∗

constant.

6. Repeat from Step #3.

⎛

⎜⎝ ⎛ ⎝±*c*<sup>6</sup>

The system is required to move from an initial position *Fi*(*t*0) = 0 with initial conditions *F*˙ *<sup>i</sup>*(*t*0) = *F*¨ *<sup>i</sup>*(*t*0) = *<sup>F</sup>*(3) *<sup>i</sup>* (*t*0) = *<sup>F</sup>*(4) *<sup>i</sup>* (*t*0) = 0 to a final position *Fi*(*tf*) �= 0 with final conditions *F*˙ *<sup>i</sup>*(*tf*) = *F*¨ *<sup>i</sup>*(*tf*) = *<sup>F</sup>*(3) *<sup>i</sup>* (*tf*) = *<sup>F</sup>*(4) *<sup>i</sup>* (*tf*) = 0 (*i* = 2, 3). Without loss of generality, by setting *t*<sup>0</sup> = 0 one can write (76) as

$$F\_i^s = 70\mathcal{F}\_i(t\_f)\frac{t^9}{t\_f^9} - 315\mathcal{F}\_i(t\_f)\frac{t^8}{t\_f^8} + 540\mathcal{F}\_i(t\_f)\frac{t^7}{t\_f^7} - 420\mathcal{F}\_i(t\_f)\frac{t^6}{t\_f^6} + 126\mathcal{F}\_i(t\_f)\frac{t^5}{t\_f^5} \; ; \; (i=2,3) \tag{79}$$

Thus, it is possible to calculate *u*∗ *<sup>θ</sup>* <sup>=</sup> *JxF*(4)<sup>∗</sup> <sup>2</sup> /*g* and *u*<sup>∗</sup> *<sup>φ</sup>* <sup>=</sup> <sup>−</sup>*JyF*(4)<sup>∗</sup> <sup>3</sup> /*g* since

$$F\_i^{(4)\*} = c\_1 F\_i(t\_f) \frac{t^5}{t\_f^9} - c\_2 F\_i(t\_f) \frac{t^4}{t\_f^8} + c\_3 F\_i(t\_f) \frac{t^3}{t\_f^7} - c\_4 F\_i(t\_f) \frac{t^2}{t\_f^6} + c\_5 F\_i(t\_f) \frac{t}{t\_f^5} \; ; \; (i = 2, 3) \tag{80}$$

where *cj* (*j* = 1, ..., 5) are constants that can be easily derived from (79) and are not given here for simplicity. From (9), (78) and (80), it is possible to determine the nominal PWM inputs to be applied along the references trajectories, which are:

$$
\mu\_{1/2}^\* = \frac{mg}{4K} \pm \frac{F\_2(t\_f)f\_\text{x}\Delta}{2gKLt\_f^9} \text{ and } \mu\_{4/3}^\* = \frac{mg}{4K} \pm \frac{F\_3(t\_f)f\_\text{y}\Delta}{2gKLt\_f^9} \tag{81}
$$

where Δ = *c*1*t* <sup>5</sup> <sup>−</sup> *<sup>c</sup>*2*tf <sup>t</sup>* <sup>4</sup> + *c*3*t* 2 *f t* <sup>3</sup> <sup>−</sup> *<sup>c</sup>*4*<sup>t</sup>* 3 *f t* <sup>2</sup> + *c*5*t* 4 *f t* . Since *F*2(*tf*) and *F*3(*tf*) are known, one must find the minimal *tf* so that *u*<sup>∗</sup> *<sup>i</sup>* < *umax* where *umax* is the maximal PWM that corresponds to the maximal thrust that can be generated by a rotor. One way to determine *tf* is to analytically calculate when the extrema of *u*∗ *<sup>i</sup>* take place and what are their values (where the extrema collectively denote the maxima and the minima of a function). For this purpose, it is necessary to calculate the derivative of *u*∗ *<sup>i</sup>* in (81) with respect to time and then solve for *t* the following equation:

$$\frac{d\mu\_i^\*}{dt} = 0 \; ; \; (i = 1, \ldots, 4) \tag{82}$$

For a fixed *i* (*i* = 1, ..., 4), each equation *du*∗ *<sup>i</sup>* /*dt* is a polynomial function of fourth degree and thus has four extrema which take place at:

$$\frac{t\_f}{2}\left(1\pm\sqrt{\frac{3}{7}-\frac{2}{35}\sqrt{30}}\right) \text{ and } \frac{t\_f}{2}\left(1\pm\sqrt{\frac{3}{7}+\frac{2}{35}\sqrt{30}}\right) \tag{83}$$

The values of the four extrema can be obtained by replacing *t* of (81) by the values obtained in (83). As an example, the values of the four extrema of *u*∗ <sup>1</sup> of the first rotor are:

$$u\_{1\_{\rm Ent}}^{\*} = \left(\frac{m\mathcal{g}}{4K} \pm c\_6 \frac{F\_2(t\_f)I\_\mathbf{x}}{\mathcal{g}\mathcal{K}Lt\_f^4}; \frac{m\mathcal{g}}{4\mathcal{K}} \pm c\gamma \frac{F\_2(t\_f)I\_\mathbf{x}}{\mathcal{g}\mathcal{K}Lt\_f^4}\right) \tag{84}$$

with *c*<sup>6</sup> and *c*<sup>7</sup> two constants. The determination of *tf* consists finally in solving (84) so that the extrema of the nominal PWM input verifies:

$$
\mu\_{1\_{\text{Ext}}}^{\*} \le \rho u\_{\text{max}} \tag{85}
$$

Since the above study is based on the simplified model (6), the constant 0 ≤ *ρ* ≤ 1 is introduced to create some safety margin and to robustify the obtained solution with respect to model uncertainties. Four solutions can then be obtained:

$$t\_f \ge \left( \left( \pm c\_6 \frac{F\_2(t\_f)I\_x}{gKL\left(\rho u\_{\max} - \frac{mg}{4K}\right)} \right)^{1/4}; \left( \pm c\_7 \frac{F\_2(t\_f)I\_x}{gKL\left(\rho u\_{\max} - \frac{mg}{4K}\right)} \right)^{1/4} \right) \tag{86}$$

The four extrema of *u*∗ <sup>2</sup>, *u*<sup>∗</sup> <sup>3</sup> and *u*<sup>∗</sup> <sup>4</sup> have the same structure as for *u*<sup>∗</sup> <sup>1</sup> with different values for the constants *c*<sup>6</sup> and *c*7. In conclusion, the quadrotor UAV will have 16 extrema (four per motor) and therefore 16 solutions are obtained and the maximal one among them is to be considered.

#### **3.6.4 Trajectory re-planning**

22 Will-be-set-by-IN-TECH

The system is required to move from an initial position *Fi*(*t*0) = 0 with initial conditions

*t* 7 *t* 7 *f*

<sup>2</sup> /*g* and *u*<sup>∗</sup>

*t* 3 *t* 7 *f*

where *cj* (*j* = 1, ..., 5) are constants that can be easily derived from (79) and are not given here for simplicity. From (9), (78) and (80), it is possible to determine the nominal PWM inputs to

and *u*∗

to the maximal thrust that can be generated by a rotor. One way to determine *tf* is to

the extrema collectively denote the maxima and the minima of a function). For this purpose,

and *tf* 2

The values of the four extrema can be obtained by replacing *t* of (81) by the values obtained in

*F*2(*tf*)*Jx gKLt*<sup>4</sup> *f* ; *mg* <sup>4</sup>*<sup>K</sup>* <sup>±</sup> *<sup>c</sup>*<sup>7</sup>

with *c*<sup>6</sup> and *c*<sup>7</sup> two constants. The determination of *tf* consists finally in solving (84) so that

*u*∗

 1 ± 3 7 + 2 35 √ 30 

− 420*Fi*(*tf*)

− *c*4*Fi*(*tf*)

4/3 <sup>=</sup> *mg*

4*K* ±

*<sup>i</sup>* < *umax* where *umax* is the maximal PWM that corresponds

*dt* <sup>=</sup> 0 ; (*<sup>i</sup>* <sup>=</sup> 1, ..., 4) (82)

*<sup>i</sup>* (*t*0) = 0 to a final position *Fi*(*tf*) �= 0 with final conditions

*<sup>i</sup>* (*tf*) = 0 (*i* = 2, 3). Without loss of generality, by setting

+ 126*Fi*(*tf*)

<sup>3</sup> /*g* since

<sup>+</sup> *<sup>c</sup>*5*Fi*(*tf*) *<sup>t</sup>*

*F*3(*tf*)*Jy*Δ 2*gKLt*<sup>9</sup> *f*

*<sup>i</sup>* take place and what are their values (where

*<sup>i</sup>* in (81) with respect to time and then solve for *t*

*<sup>i</sup>* /*dt* is a polynomial function of fourth degree and

<sup>1</sup> of the first rotor are:

<sup>1</sup>*Ext* ≤ *ρumax* (85)

*F*2(*tf*)*Jx gKLt*<sup>4</sup> *f*

. Since *F*2(*tf*) and *F*3(*tf*) are known, one

*t* 5 *f*

*t* 5 *t* 5 *f*

; (*i* = 2, 3) (79)

; (*i* = 2, 3) (80)

(81)

(83)

(84)

*t* 6 *t* 6 *f*

*<sup>φ</sup>* <sup>=</sup> <sup>−</sup>*JyF*(4)<sup>∗</sup>

*t* 2 *t* 6 *f*

*F*˙

*F*˙

*F*∗

*<sup>i</sup>*(*t*0) = *F*¨

*<sup>i</sup>*(*tf*) = *F*¨

*F*(4)<sup>∗</sup>

where Δ =

*<sup>i</sup>* = 70*Fi*(*tf*)

*<sup>i</sup>* = *c*1*Fi*(*tf*)

 *c*1*t*

the following equation:

*<sup>i</sup>*(*t*0) = *<sup>F</sup>*(3)

*<sup>i</sup>*(*tf*) = *<sup>F</sup>*(3)

*t* 9 *t* 9 *f*

Thus, it is possible to calculate *u*∗

*t* 5 *t* 9 *f*

*u*∗

<sup>5</sup> <sup>−</sup> *<sup>c</sup>*2*tf <sup>t</sup>*

analytically calculate when the extrema of *u*∗

it is necessary to calculate the derivative of *u*∗

For a fixed *i* (*i* = 1, ..., 4), each equation *du*∗

 1 ± 3 <sup>7</sup> <sup>−</sup> <sup>2</sup> 35 √ 30 

(83). As an example, the values of the four extrema of *u*∗

*mg* <sup>4</sup>*<sup>K</sup>* <sup>±</sup> *<sup>c</sup>*<sup>6</sup>

*u*∗ <sup>1</sup>*Ext* =

the extrema of the nominal PWM input verifies:

thus has four extrema which take place at:

*tf* 2

must find the minimal *tf* so that *u*<sup>∗</sup>

*t*<sup>0</sup> = 0 one can write (76) as

*<sup>i</sup>* (*t*0) = *<sup>F</sup>*(4)

− 315*Fi*(*tf*)

*<sup>i</sup>* (*tf*) = *<sup>F</sup>*(4)

− *c*2*Fi*(*tf*)

be applied along the references trajectories, which are:

4*K* ±

<sup>4</sup> + *c*3*t* 2 *f t* <sup>3</sup> <sup>−</sup> *<sup>c</sup>*4*<sup>t</sup>* 3 *f t* <sup>2</sup> + *c*5*t* 4 *f t* 

1/2 <sup>=</sup> *mg*

*t* 8 *t* 8 *f*

> *t* 4 *t* 8 *f*

+ 540*Fi*(*tf*)

*<sup>θ</sup>* <sup>=</sup> *JxF*(4)<sup>∗</sup>

+ *c*3*Fi*(*tf*)

*F*2(*tf*)*Jx*Δ 2*gKLt*<sup>9</sup> *f*

> *du*∗ *i*

As for the fault-free case, the trajectory re-planning consists in determining the minimal time of the mission *tf* so that the actuator constraints are not violated. For the damaged UAV, this is written as:

$$
\mu\_i^\* \le \rho (1 - \delta\_i) \mu\_{\max} \; ; \; (i = 1, \dots, 4) \tag{87}
$$

where *δ<sup>i</sup>* represents the loss of effectiveness in the *i th* rotor. *δ<sup>i</sup>* = 0 denotes a healthy rotor, *δ<sup>i</sup>* = 1 denotes a complete loss of the rotor and 0 < *δ<sup>i</sup>* < 1 represents a partial loss of control effectiveness. Clearly, trajectory re-planning in the fault case requires the knowledge of the fault amplitude *δi*. Thus, a fault detection and diagnosis module is needed to detect, isolate and identify the fault. Unlike trajectory planning, the initial conditions are not zero at the re-planning instant i.e. *F*˙ *<sup>i</sup>*(*trep*) �<sup>=</sup> 0, *<sup>F</sup>*¨ *<sup>i</sup>*(*trep*) �<sup>=</sup> 0, *<sup>F</sup>*(3) *<sup>i</sup>* (*trep*) �<sup>=</sup> 0 and *<sup>F</sup>*(4) *<sup>i</sup>* (*trep*) �= 0 where *trep* is the re-planning time. Therefore, it is difficult to analytically calculate *tf* as in the previous section since the expressions are much more complicated and thus another method is needed to solve the problem. Starting from the idea that the larger *tf* is, the smaller are the PWM inputs *ui*, we propose the following algorithm to calculate *tf* :


As can be seen in Step #5, if the error *Ei* is positive then *u*<sup>∗</sup> *imax* is larger than the maximal allowable PWM input and thus it is necessary to increase *tf* . If the error is negative then *u*<sup>∗</sup> *imax* is smaller than the maximal allowable PWM input and thus it is necessary to decrease *tf* . The constant *ν* must be carefully selected since it affects the convergence speed of the algorithm.

**<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> <sup>40</sup> <sup>50</sup> <sup>60</sup> <sup>70</sup> <sup>80</sup> <sup>90</sup> <sup>0</sup>**

**<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> <sup>40</sup> <sup>50</sup> <sup>60</sup> <sup>70</sup> <sup>80</sup> <sup>90</sup> <sup>0</sup>**

**Time [s]**

**<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> <sup>40</sup> <sup>50</sup> <sup>60</sup> í**

**Time [s]**

**<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>20</sup> <sup>25</sup> <sup>30</sup> <sup>35</sup> <sup>40</sup> <sup>45</sup> <sup>50</sup> í**

**0 10 20 30 40 50 60 70 80**

**Measurement Reference**

**Time [s]**

**Time [s]**

**0.2 0.4 0.6 0.8 1**

**í í 0** 

**í í 0** 

**Y position [m]**

The objective in the SMC is to track a square trajectory of 1.5 *m* × 1.5 *m*. Figure 9 shows the system evolution along the *x*, *y* and *z* directions when the SMC-based PFTC is experimentally applied to the Qball-X4. The SMC-based PFTC is giving good performance where very small deviation in position *z* can be observed at 20 *s* due to a partial damage in the 4*th* propeller.

> **0 0.5 1 1.5**

**y position [m]**

**0 10 20 30 40 50 60 70 80**

**Time [s]**

Fig. 8. System behavior with a damage of 12% and 16% of the fourth propeller.

**Reference LQR &í05\$&**

**Reference LQR &í05\$&**

**Y position [m]**

**Reference LQR MIT rule C−MRAC M−MRAC**

**Height [m]**

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 143

Fig. 7. System behavior with a simulated fault of 30% and 40% loss in the total thrust.

The MRAC has been also tested in the presence of a partial damage of the 4*th* propeller. This type of faults is more realistic than the simulated faults given above. To accommodate a partial damage of the propeller, the controller tries to speed up the 4*th* rotor so that to produce the same lift as for the fault-free case. Thus, the maximal speed that a rotor can reach is a critical factor that does not play a role in simulated faults. Figure 8 shows the system behavior along the *z* and *y* directions where the first row corresponds to 12% damage and the second to 16%. One can see that the performance obtained with the C-MRAC is better than that of the LQR.

**Time [s]**

**<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> <sup>40</sup> <sup>50</sup> <sup>60</sup> <sup>0</sup>**

**Time [s]**

**<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>20</sup> <sup>25</sup> <sup>30</sup> <sup>35</sup> <sup>40</sup> <sup>45</sup> <sup>50</sup> <sup>0</sup>**

**Time [s]**

**0 10 20 30 40 50 60 70 80**

**Time [s]**

**z position [m]**

**0 0.2 0.4 0.6**

**Measurement Reference**

Fig. 9. Qball-X4 evolution along the *x*, *y* and *z* directions using SMC-based PFTC.

**4.3 SMC experimental results**

**0.2 0.4 0.6 0.8 1**

> **0.2 0.4 0.6 0.8 1**

> **0.2 0.4 0.6 0.8 1**

> > **í í í 0**

**Measurement Reference**

**x position [m]**

**Height [m]**

**Height [m]**

**Reference LQR MIT rule C−MRAC M−MRAC**

**Height [m]**

## **4. Simulation and experimental testing results**

The approaches that have been experimentally tested on the Qball-X4 are built using Matlab/Simulink and downloaded on the Gumstix emdedded computer to be run on-board with a frequency of 200 *Hz*. The experiments are taking place indoor in the absence of GPS signals and thus the OptiTrack camera system from NaturalPoint is employed to provide the system position in the 3D space. Some photos of the NAV Lab of Concordia University are shown in Figure 5 and many videos related to the above approaches as well as other videos can be watched online on http://www.youtube.com/user/NAVConcordia.

Fig. 5. The NAV Lab of Concordia University.

## **4.1 GS-PID experimental results**

Starting with the GS-PID, an 18% loss of overall power of all motors is considered where the Qball-X4 is requested to track a one meter square trajectory tracking. The fault-free case is shown in the left-hand side plot of Figure 6 whereas the middle one shows a deviation from the desired trajectory after the fault occurrence when the switching between the PID gains is taking place after 0.5 *s* of fault occurrence. Better tracking performance can be achieved with shorter switching time which requires fast and correct fault detection. The right-hand plot of Figure 6 demonstrates better performance when the switching is done without time delay.

Fig. 6. Fault-free case and 18% loss in the total thrust with and without time delay.

## **4.2 MRAC experimental results**

As for the MRAC, a partial effectiveness loss of 30% and 40% are simulated in the total thrust *uz*. The faults are injected at *t* = 40 *s* and the experimental results are illustrated in Figure 7. This kind of fault induces a loss in the height *z* without significant effect on *x*, *y* or *ψ* directions. One can see that all the three MRAC techniques give better performance than the baseline LQR controller and that the conventional MRAC (C-MRAC) is the best among the MRAC techniques.

Fig. 7. System behavior with a simulated fault of 30% and 40% loss in the total thrust.

The MRAC has been also tested in the presence of a partial damage of the 4*th* propeller. This type of faults is more realistic than the simulated faults given above. To accommodate a partial damage of the propeller, the controller tries to speed up the 4*th* rotor so that to produce the same lift as for the fault-free case. Thus, the maximal speed that a rotor can reach is a critical factor that does not play a role in simulated faults. Figure 8 shows the system behavior along the *z* and *y* directions where the first row corresponds to 12% damage and the second to 16%. One can see that the performance obtained with the C-MRAC is better than that of the LQR.

Fig. 8. System behavior with a damage of 12% and 16% of the fourth propeller.

#### **4.3 SMC experimental results**

24 Will-be-set-by-IN-TECH

The approaches that have been experimentally tested on the Qball-X4 are built using Matlab/Simulink and downloaded on the Gumstix emdedded computer to be run on-board with a frequency of 200 *Hz*. The experiments are taking place indoor in the absence of GPS signals and thus the OptiTrack camera system from NaturalPoint is employed to provide the system position in the 3D space. Some photos of the NAV Lab of Concordia University are shown in Figure 5 and many videos related to the above approaches as well as other videos

Starting with the GS-PID, an 18% loss of overall power of all motors is considered where the Qball-X4 is requested to track a one meter square trajectory tracking. The fault-free case is shown in the left-hand side plot of Figure 6 whereas the middle one shows a deviation from the desired trajectory after the fault occurrence when the switching between the PID gains is taking place after 0.5 *s* of fault occurrence. Better tracking performance can be achieved with shorter switching time which requires fast and correct fault detection. The right-hand plot of Figure 6 demonstrates better performance when the switching is done without time delay.

Fig. 6. Fault-free case and 18% loss in the total thrust with and without time delay.

As for the MRAC, a partial effectiveness loss of 30% and 40% are simulated in the total thrust *uz*. The faults are injected at *t* = 40 *s* and the experimental results are illustrated in Figure 7. This kind of fault induces a loss in the height *z* without significant effect on *x*, *y* or *ψ* directions. One can see that all the three MRAC techniques give better performance than the baseline LQR controller and that the conventional MRAC (C-MRAC) is the best among the

can be watched online on http://www.youtube.com/user/NAVConcordia.

**4. Simulation and experimental testing results**

Fig. 5. The NAV Lab of Concordia University.

**4.1 GS-PID experimental results**

**4.2 MRAC experimental results**

MRAC techniques.

The objective in the SMC is to track a square trajectory of 1.5 *m* × 1.5 *m*. Figure 9 shows the system evolution along the *x*, *y* and *z* directions when the SMC-based PFTC is experimentally applied to the Qball-X4. The SMC-based PFTC is giving good performance where very small deviation in position *z* can be observed at 20 *s* due to a partial damage in the 4*th* propeller.

Fig. 9. Qball-X4 evolution along the *x*, *y* and *z* directions using SMC-based PFTC.

Fig. 11. MPC in fault-free and fault conditions without and with fault estimation.

error in the positions and orientations.

fault-tolerance.

**4.6 FTPR simulation results**

thrusts do not exceed *ρTmax*.

can see that system states do not converge to their desired values and therefore it exhibits poor performance. The figure also shows that interestingly MPC exhibits some degree of fault tolerance inherently; all the linear and angular velocities are stabilized and there is only some

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 145

For the fault-tolerant MPC, Problem 2 is used where fault parameters estimation is provided by employing the Moving Horizon Estimator (MHE) Izadi et al. (2011b). The two lower plots of Figure 11 show fault parameters estimates as well as system states. It is clear that fault-tolerant MPC improves the system performance compared to the case without

To illustrate the FTPR approach, let us assume that the quadrotor system is required to move from an initial position to a final one with *F*2(*t*0) = 0 and *F*3(*t*0) = 0, *F*2(*tf*) = 20 *m* and *F*3(*tf*) = 30 *m*. It is also assumed that the maximal thrust that can be generated by each motor is *Tmax* = 8 *N*. *ρ* is set to 0.1 and the approach described is Section 3.6.3 gives the solution of *tf* = 6.81 *s*. The simulation results for this scenario are given in Figure 12 which shows the system trajectories along the *x* and *y* directions. The figure also shows that the four applied

For the fault scenario, it is assumed that the Qball-X4 loses 25% of the control effectiveness of its fourth rotor at the time instant *t* = 2 *s*. In this case and without trajectory re-planning, Figure 13(a) shows that the damaged system is not able anymore to reach the final desired

## **4.4 BSC simulation results**

In the BSC approach, the system is required to follow a circular trajectory and the the actuator faults are injected at time *t* = 5 *s*. Simulations are carried out with different control gains *k*<sup>1</sup> = 1, *k*<sup>2</sup> = 3 and *k*<sup>1</sup> = 5, *k*<sup>2</sup> = 30. Figures 10(a) and 10(b) show a comparison between the fault-free case and the fault-case of 50% loss of control effectiveness for both position and angle tracking errors. The control gains used in Figures 10(a) and 10(b) are *k*<sup>1</sup> = 1 and *k*<sup>2</sup> = 3. One can see that in the fault case, the position tracking errors in the *x* and *y* directions change slightly whereas the *z* tracking error is greatly affected. The roll, pitch and yaw tracking errors are also affected as can be seen in Figure 10(b). With higher control gains *k*<sup>1</sup> = 5 and *k*<sup>2</sup> = 30, it is possible to reduce fault effects on tracking errors as can be seen in Figures 10(c) and 10(d).

Fig. 10. Position and angle error comparison between fault-free and 50% control effectiveness loss in first actuator, with control gains *k*<sup>1</sup> = 1/*k*<sup>2</sup> = 3 and *k*<sup>1</sup> = 5/*k*<sup>2</sup> = 30.

## **4.5 MPC simulation results**

To illustrate the MPC approach, the quadrotor is assumed to be on the ground initially and it is required to reach a hover height of 4 m and stay in that height while stabilizing the pitch and roll angles. The *xd*, *y<sup>d</sup>* and *ψ<sup>d</sup>* are *x<sup>d</sup>* = 2 *m*, *y<sup>d</sup>* = 3 *m* and *ψ<sup>d</sup>* = 0. The upper left plot of Figure 11 shows the time history of states for fault-free condition (the desired position values are dotted and the velocities are dashed lines).

The fault is designed to happen at time *t* = 5 *s*. At this time it is assumed that actuator faults occur which lead to multiple simultaneous partial loss of effectiveness of three actuators as follows: *α*<sup>1</sup> = 0.9, *α*<sup>2</sup> = 0.7, *α*<sup>3</sup> = 0.8 and *α*<sup>4</sup> = 1.0 (i.e. 10% loss of control effectiveness in the first motor, 30% in the second, 20% in the third and no fault in the fourth one). The upper right plot of Figure 11 shows the time history of the states when no fault estimation is performed. In fact in this case Algorithm 1 is used without any information about the occurred fault. One

Fig. 11. MPC in fault-free and fault conditions without and with fault estimation.

can see that system states do not converge to their desired values and therefore it exhibits poor performance. The figure also shows that interestingly MPC exhibits some degree of fault tolerance inherently; all the linear and angular velocities are stabilized and there is only some error in the positions and orientations.

For the fault-tolerant MPC, Problem 2 is used where fault parameters estimation is provided by employing the Moving Horizon Estimator (MHE) Izadi et al. (2011b). The two lower plots of Figure 11 show fault parameters estimates as well as system states. It is clear that fault-tolerant MPC improves the system performance compared to the case without fault-tolerance.

#### **4.6 FTPR simulation results**

26 Will-be-set-by-IN-TECH

In the BSC approach, the system is required to follow a circular trajectory and the the actuator faults are injected at time *t* = 5 *s*. Simulations are carried out with different control gains *k*<sup>1</sup> = 1, *k*<sup>2</sup> = 3 and *k*<sup>1</sup> = 5, *k*<sup>2</sup> = 30. Figures 10(a) and 10(b) show a comparison between the fault-free case and the fault-case of 50% loss of control effectiveness for both position and angle tracking errors. The control gains used in Figures 10(a) and 10(b) are *k*<sup>1</sup> = 1 and *k*<sup>2</sup> = 3. One can see that in the fault case, the position tracking errors in the *x* and *y* directions change slightly whereas the *z* tracking error is greatly affected. The roll, pitch and yaw tracking errors are also affected as can be seen in Figure 10(b). With higher control gains *k*<sup>1</sup> = 5 and *k*<sup>2</sup> = 30, it is possible to reduce fault effects on tracking errors as can be seen in Figures 10(c) and 10(d).

**4.4 BSC simulation results**

<sup>0</sup> <sup>10</sup> 20 30 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6

<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> -0.1

time (sec)

**4.5 MPC simulation results**

0 0.1 0.2 0.3 0.4 0.5 0.6

x error (m)

x error (m)

time (sec)

y error (m)


<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> -0.35

(a) Position errors with *k*<sup>1</sup> = 1/*k*<sup>2</sup> = 3

<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> -0.35

(c) Position errors with *k*<sup>1</sup> = 5/*k*<sup>2</sup> = 30

are dotted and the velocities are dashed lines).

time (sec)


y error (m)

time (sec)

loss in first actuator, with control gains *k*<sup>1</sup> = 1/*k*<sup>2</sup> = 3 and *k*<sup>1</sup> = 5/*k*<sup>2</sup> = 30.

time (sec)

z error (m)

z error (m)

time (sec)

no fault b1 50%

pitch angle error (deg)

<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> -20

<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> -20

time (sec)

time (sec)

no fault b1 decreases 50%



roll angle error (deg)

Fig. 10. Position and angle error comparison between fault-free and 50% control effectiveness

To illustrate the MPC approach, the quadrotor is assumed to be on the ground initially and it is required to reach a hover height of 4 m and stay in that height while stabilizing the pitch and roll angles. The *xd*, *y<sup>d</sup>* and *ψ<sup>d</sup>* are *x<sup>d</sup>* = 2 *m*, *y<sup>d</sup>* = 3 *m* and *ψ<sup>d</sup>* = 0. The upper left plot of Figure 11 shows the time history of states for fault-free condition (the desired position values

The fault is designed to happen at time *t* = 5 *s*. At this time it is assumed that actuator faults occur which lead to multiple simultaneous partial loss of effectiveness of three actuators as follows: *α*<sup>1</sup> = 0.9, *α*<sup>2</sup> = 0.7, *α*<sup>3</sup> = 0.8 and *α*<sup>4</sup> = 1.0 (i.e. 10% loss of control effectiveness in the first motor, 30% in the second, 20% in the third and no fault in the fourth one). The upper right plot of Figure 11 shows the time history of the states when no fault estimation is performed. In fact in this case Algorithm 1 is used without any information about the occurred fault. One

roll angle error (deg)


> -15 -10 -5 0

pitch angle error (deg)

<sup>0</sup> <sup>10</sup> 20 30 -250

(b) Angle errors with *k*<sup>1</sup> = 1/*k*<sup>2</sup> = 3

<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> -20

(d) Angle errors with *k*<sup>1</sup> = 5/*k*<sup>2</sup> = 30

time (sec)

time (sec)

<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> -250

time (sec)

<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> -20

no fault b1 decreases 50%

time (sec)


> -15 -10 -5 0

yaw angle error (deg)

yaw angle error (deg)

To illustrate the FTPR approach, let us assume that the quadrotor system is required to move from an initial position to a final one with *F*2(*t*0) = 0 and *F*3(*t*0) = 0, *F*2(*tf*) = 20 *m* and *F*3(*tf*) = 30 *m*. It is also assumed that the maximal thrust that can be generated by each motor is *Tmax* = 8 *N*. *ρ* is set to 0.1 and the approach described is Section 3.6.3 gives the solution of *tf* = 6.81 *s*. The simulation results for this scenario are given in Figure 12 which shows the system trajectories along the *x* and *y* directions. The figure also shows that the four applied thrusts do not exceed *ρTmax*.

For the fault scenario, it is assumed that the Qball-X4 loses 25% of the control effectiveness of its fourth rotor at the time instant *t* = 2 *s*. In this case and without trajectory re-planning, Figure 13(a) shows that the damaged system is not able anymore to reach the final desired

(Ma & Zhang, 2010a), (Ma & Zhang, 2010b), (Ma, 2011), (Gollu & Zhang, 2011), (Zhou, 2009) and (Amoozgar et al., 2011) for information on FDD techniques applied to UAV and satellite systems. Research work on fault-tolerant attitude control for spacecraft in the presence of actuator faults could not also be included but can be found in (Hu et al., 2011a), (Hu et al., 2011b), (Xiao et al., 2011a) and (Xiao et al., 2011b). Current and future work will focus more on the multi-vehicles cooperative control where preliminary works on cooperative control have been presented in (Izadi et al., 2009b), (Izadi et al., 2011a), (Sharifi et al., 2010), (Sharifi

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 147

Financial support of this work by the Natural Sciences and Engineering Research Council of Canada (NSERC) through a Strategic Project Grant (STPGP 350889-07) and Discovery Project Grants is highly acknowledged. Support from Quanser Inc. and colleagues from Quanser Inc. for the development of the Qball-X4 UAV testbed is also highly appreciated. Acknowledgements go also to the colleagues at the Department of Mechanical and Industrial Engineering of Concordia University, DRDC and other academic and industrial partners of the above grants, and all Postdoctoral Fellows/Research Associates, PhD, MASc/MEng students

Amoozgar, M. H., Gollu, N., Zhang, Y. M., Lee, J. & Ng, A. (2011). Fault detection and

Bani Milhim, A. (2010a). *Modeling and Fault Tolerant PID Control of a Quad-rotor UAV*, Master's

Bani Milhim, A., Zhang, Y. M. & Rabbath, C. A. (2010b). Gain scheduling based PID controller

Bresciani, T. (2008). *Modelling, Identification and Control of a Quadrotor Helicopter*, Master's

Chamseddine, A., Zhang, Y. M., Rabbath, C. A., Fulford, C. & Apkarian, J. (2011a).

Chamseddine, A., Zhang, Y. M., Rabbath, C. A., Join, C. & Theilliol, D. (2011b). Flatness-based

Chen, H. & Allgower, F. (1998). A quasi infinitive horizon nonlinear model predictive control

Dierks, T. & Jagannathan, S. (2008). Neural network output feedback control of a quadrotor

Dierks, T. & Jagannathan, S. (2009). Neural network control of quadrotor UAV formations, *American Control Conference*, St. Louis, Missouri, USA, pp. 2990–2996. Edwards, C., Lombaerts, T. & Smaili, H. (2010). *Fault Tolerant Flight Control: A Benchmark Challenge*, Lecture Notes in Control and Information Sciences, Springer.

thesis, Concordia University, Montreal, QC, Canada.

diagnosis of attitude control system for the JC2Sat-FF mission, *The 4th International Conference on Spacecraft Formation Flying Missions and Technology*, Saint Hubert, QC,

for fault tolerant control of a quad-rotor UAV, *AIAA Infotech@Aerospace*, Atlanta,

Model reference adaptive fault tolerant control of a quadrotor UAV, *AIAA*

trajectory planning/re-planning for a quadrotor unmanned aerial vehicle, *IEEE*

UAV, *Proceedings of the 47th IEEE Conference on Decision and Control*, Cancun, Mexico,

et al., 2011), (Mirzaei et al., 2011) and (Qu & Zhang, 2011).

**6. Acknowledgements**

who contributed to this work.

Canada.

Georgia, USA.

pp. 3633–3639.

thesis, Lund University, Sweden.

*Infotech@Aerospace*, St. Louis, Missouri, USA.

*Transactions on Aerospace and Electronic Systems (To appear)* .

scheme with guaranteed stability, *Automatica,* 34(10): 1205–1217.

**7. References**

Fig. 12. System evolution in the *x* and *y* directions and the applied thrusts.

Fig. 13. Trajectories and control inputs without and with re-planning.

position. Figure 13(c) shows how the applied thrusts saturate when the system is forced to follow the pre-fault nominal trajectory. For the trajectory re-planning, once the fault is detected, isolated and identified, the trajectories are re-planned at *t* = 2.5 *s* where 0.5 *s* is the time assumed to be taken by the FDD module. The solution obtained from Section 3.6.4 is *tf* = 13.3 *s*. Figure 13(b) shows that after re-planning, the UAV is able to reach the final desired position. The applied thrusts are illustrated in Figure 13(d) where it can be seen that the thrusts remain smaller than their maximal allowable limits. Thus, trajectory planning can help in keeping system stability by redefining the desired trajectories to be followed by taking into consideration the post-fault actuators limits.

## **5. Conclusion**

This chapter presents some of the work that have been carried out at the Networked Autonomous Vehicles Laboratory of Concordia University. The main concern is to propose approaches that can be effective, easy to implement and to run on-board the UAVs. Many of the proposed methods have been implemented and tested with the Qball-X4 testbed and current work aims to propose and implement more advanced and practical techniques. As one of functional blocks in an AFTCS framework, FDD plays an important role for successful fault-tolerant control of systems (see Figure 3). Development on FDD techniques could not be included in the chapter due to space limit. Interested readers can refer to our recent work in (Ma & Zhang, 2010a), (Ma & Zhang, 2010b), (Ma, 2011), (Gollu & Zhang, 2011), (Zhou, 2009) and (Amoozgar et al., 2011) for information on FDD techniques applied to UAV and satellite systems. Research work on fault-tolerant attitude control for spacecraft in the presence of actuator faults could not also be included but can be found in (Hu et al., 2011a), (Hu et al., 2011b), (Xiao et al., 2011a) and (Xiao et al., 2011b). Current and future work will focus more on the multi-vehicles cooperative control where preliminary works on cooperative control have been presented in (Izadi et al., 2009b), (Izadi et al., 2011a), (Sharifi et al., 2010), (Sharifi et al., 2011), (Mirzaei et al., 2011) and (Qu & Zhang, 2011).

## **6. Acknowledgements**

28 Will-be-set-by-IN-TECH

**Applied thrust [N]**

position. Figure 13(c) shows how the applied thrusts saturate when the system is forced to follow the pre-fault nominal trajectory. For the trajectory re-planning, once the fault is detected, isolated and identified, the trajectories are re-planned at *t* = 2.5 *s* where 0.5 *s* is the time assumed to be taken by the FDD module. The solution obtained from Section 3.6.4 is *tf* = 13.3 *s*. Figure 13(b) shows that after re-planning, the UAV is able to reach the final desired position. The applied thrusts are illustrated in Figure 13(d) where it can be seen that the thrusts remain smaller than their maximal allowable limits. Thus, trajectory planning can help in keeping system stability by redefining the desired trajectories to be followed by taking

This chapter presents some of the work that have been carried out at the Networked Autonomous Vehicles Laboratory of Concordia University. The main concern is to propose approaches that can be effective, easy to implement and to run on-board the UAVs. Many of the proposed methods have been implemented and tested with the Qball-X4 testbed and current work aims to propose and implement more advanced and practical techniques. As one of functional blocks in an AFTCS framework, FDD plays an important role for successful fault-tolerant control of systems (see Figure 3). Development on FDD techniques could not be included in the chapter due to space limit. Interested readers can refer to our recent work in

**Applied thrust [N]**

**Flat output F2 [m]**

**<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>0</sup>**

**<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>0</sup>**

**<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>0</sup>**

**Time [s]**

**End of the mission** → ← **Fault occurrence**

← **Fault occurrence**

**Time [s]**

**End of the mission** →

**Time [s]**

**End of the mission** →

**Applied thrusts [N]**

**<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup> <sup>4</sup> <sup>5</sup> <sup>6</sup> <sup>7</sup> <sup>0</sup>**

**Time [s]**

**Applied thrust [N]**

(d) Control inputs with re-planning

**Applied thrust [N]**

**Flat output F3 [m]**

(b) Trajectories with re-planning

**End of the mission** →

**<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>0</sup>**

**<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>0</sup>**

**<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>0</sup>**

**Time [s]**

**End of the mission** → ← **Fault occurrence**

**Time [s]**

**End of the mission** → ← **Fault occurrence**

**Time [s]**

**End of the mission** →

**<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>0</sup>**

**Time [s]**

**<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>0</sup>**

**<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>10</sup> <sup>0</sup>**

**<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>10</sup> <sup>0</sup>**

Fig. 13. Trajectories and control inputs without and with re-planning.

← **Fault occurrence**

**Time [s]**

← **Fault occurrence**

**Time [s]**

**Time [s]**

Fig. 12. System evolution in the *x* and *y* directions and the applied thrusts.

**End of the mission** →

**Applied thrust [N]**

(c) Control inputs without re-planning

into consideration the post-fault actuators limits.

**Applied thrust [N]**

**Flat output F3 [m]**

(a) Trajectories without re-planning

**Flat output F3 [m]**

**<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>0</sup>**

**<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>0</sup>**

**<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>10</sup> <sup>0</sup>**

**<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>10</sup> <sup>0</sup>**

← **Fault occurrence**

**5. Conclusion**

**Time [s]**

← **Fault occurrence**

**Time [s]**

**Time [s]**

**Time [s]**

**End of the mission** →

**Applied thrust [N]**

**Applied thrust [N]**

**Flat output F2 [m]**

**Flat output F2 [m]**

Financial support of this work by the Natural Sciences and Engineering Research Council of Canada (NSERC) through a Strategic Project Grant (STPGP 350889-07) and Discovery Project Grants is highly acknowledged. Support from Quanser Inc. and colleagues from Quanser Inc. for the development of the Qball-X4 UAV testbed is also highly appreciated. Acknowledgements go also to the colleagues at the Department of Mechanical and Industrial Engineering of Concordia University, DRDC and other academic and industrial partners of the above grants, and all Postdoctoral Fellows/Research Associates, PhD, MASc/MEng students who contributed to this work.

## **7. References**


*by the 50th IEEE Conference on Decision and Control and European Control Conference*,

Diagnosis of an inertial measurement unit based on set membership estimation, *The 17th Mediterranean Conference on Control and Automation*, Thessaloniki, Greece,

UAVs flight, *Invited Special Issue on "Fault Detection, Diagnosis and Tolerant Control" in*

based sensor diagnosis and speed estimation of unmanned aerial vehicle, *Proceedings of the 47th IEEE Conference on Decision and Control*, Cancun, Mexico, pp. 2938–2943. Sadeghzadeh, I., Mehta, A., Zhang, Y. M. & Rabbath, C. A. (2011). Fault-tolerant trajectory

tracking control of a quadrotor helicopter using gain-scheduled PID and model reference adaptive control, *Annual Conference of the Prognostics and Health Management*

multi-agent systems subject to communication delays, *AIAA Guidance, Navigation,*

multi-quadrotor UAVs, *Proceedings of the 7th ASME/IEEE International Conference on*

presence of bounded disturbances, *AIAA Guidance, Navigation, and Control Conference*,

reference model modification, *American Control Conference*, Baltimore, Maryland,

without angular velocity magnitude measurement, *Journal of Guidance, Control, and*

tracking control for flexible spacecraft under actuator saturation, *IEEE Transactions*

backstepping approach, *The 48th AIAA Aerospace Sciences Meeting Including the New*

Nguyen, H. V., Berbra, C., Lesecq, S., Gentil, S., Barraud, A. & Godin, C. (2009).

Fault Tolerant Flight Control Techniques with Application to a Quadrotor UAV Testbed 149

Noura, H., Theilliol, D., Ponsart, J. C. & Chamseddine, A. (2009). *Fault-tolerant Control Systems:*

Qu, Y. H. & Zhang, Y. M. (2011). Cooperative localization against GPS signal loss in multiple

Rafaralahy, H., Richard, E., Boutayeb, M. & Zasadzinski, M. (2008). Simultaneous observer

Sharifi, F., Gordon, B. W. & Zhang, Y. M. (2010). Decentralized sliding control of cooperative

Sharifi, F., Zhang, Y. M. & Gordon, B. W. (2011). Voroni-based coverage control for

Stepanyan, V. & Krinshnakumar, K. (2010a). Input and output performance of M-MRAC in the

Stepanyan, V. & Krinshnakumar, K. (2010b). MRAC revisited: guaranteed performance with

Xiao, B., Hu, Q.-L. & Zhang, Y. M. (2011a). Fault-tolerant attitude control for flexible spacecraft

Xiao, B., Hu, Q.-L. & Zhang, Y. M. (2011b). Adaptive sliding mode fault tolerant attitude

Zhang, X. (2010a). *Lyapunov-based Fault Tolerant Control of Quadrotor Unmanned Aerial Vehicles*,

Zhang, X., Zhang, Y. M., Su, C.-Y. & Feng, Y. (2010b). Fault tolerant control for quadrotor via

*on Control Systems Technology (Available on-line on 25 October 2011)* .

Master's thesis, Concordia University, Montreal, QC, Canada.

*Horizons Forum and Aerospace Exposition*, Orlando, Florida, USA.

*Mechatronic & Embedded Systems & Applications*, Washington, DC, USA. Singh, G. K. & Holé, K. E. (2004). Guaranteed performance in reaching mode of sliding mode

STARMAC (2011). http://hybrid.stanford.edu/~starmac/project.htm.

NAV (2011). http://users.encs.concordia.ca/~ymzhang/UAVs.htm.

*Journal of Systems Engineering and Electronics,* 1(22): 103–122. Quanser (2010). Quanser Qball-X4 User Manual. Document number 829.

*Design and Practical Applications*, Springer.

*Society*, Montreal, QC, Canada.

Toronto, Ontario, Canada.

SWARM (2011). http://vertol.mit.edu.

*Dynamics,* 5(34): 1556–1561.

USA, pp. 93–98.

*and Control Conference*, Toronto, Ontario, Canada.

controlled systems, *Sadhana,* 29(1): 129–141.

Orlando, Florida, USA.

pp. 211–216.


30 Will-be-set-by-IN-TECH

Gollu, N. & Zhang, Y. M. (2011). Fault detection and diagnosis of a thruster controlled

Hu, Q.-L., Xiao, B. & Zhang, Y. M. (2011a). Fault-tolerant attitude control for spacecraft

Hu, Q.-L., Zhang, Y. M., Huo, X. & Xiao, B. (2011b). Adaptive integral-type sliding mode

Izadi, H. A. (2009a). *Decentralized Receding Horizon Control of Cooperative Vehicles with Communication Delays*, PhD thesis, Concordia University, Montreal, QC, Canada. Izadi, H. A., Gordon, B. W. & Zhang, Y. M. (2009b). Decentralized receding horizon control

Izadi, H. A., Gordon, B. W. & Zhang, Y. M. (2011a). Decentralized model predictive control

Johnson, E. N., Chowdhary, G. V. & Kimbrell, M. S. (2010). Guidance and control of an airplane under severe structural damage, *AIAA Infotech@Aerospace*, Atlanta, Georgia, USA. Krstic, M., Kanellakopoulos, I. & Kokotovic, P. V. (1995). *Nonlinear and Adaptive Control Design*,

Li, T. (2011a). *Nonlinear and Fault-tolerant Control Techniques for a Quadrotor Unmanned Aerial Vehicle*, Master's thesis, Concordia University, Montreal, QC, Canada. Li, T., Zhang, Y. M. & Gordon, B. (2011b). Fault tolerant control applied to a quadrotor

Ma, L. & Zhang, Y. M. (2010a). Fault detection and diagnosis for GTM UAV with dual

Ma, L. & Zhang, Y. M. (2010b). DUKF-based fault detection and diagnosis for GTM UAV using

MAST (2011). https://www.grasp.upenn.edu/research/micro\_autonomous\_

Mirzaei, M., Sharifi, F., Gordon, B. W., Rabbath, C. A. & Zhang, Y. M. (2011). Cooperative

*on Mechatronic & Embedded Systems & Applications*, Qingdao, P. R. China. Maciejowski, J. M. & Jones, C. N. (2003). MPC fault-tolerant flight control case study: flight

1862, *IFAC Symposium on Safeprocess*, Washington D.C., USA.

*Mechatronics & Embedded Systems & Applications*, Washington DC, USA. Ma, L. (2011). *Development of Fault Detection and Diagnosis Techniques with Applications to*

Ioannou, P. A. & Sun, J. (1995). *Robust Adaptive Control*, Prentice Hall PTR.

*Guidance, Control, and Dynamics,* 6(32): 1959–1965.

Haugen, F. (2004). *PID Control*, Tapir Academic Press.

*Journal of Aeronautics,* 1(24): 32–45.

*World Congress*, Milano, Italy.

Wiley-Interscience, New York.

system\_technologies\_mast.

QC, Canada.

Ontario, Canada.

3(34): 927–932.

satellite for autonomous rendezvous and docking, *The 4th International Conference on Spacecraft Formation Flying Missions and Technology*, Saint Hubert, QC, Canada.

under loss of actuator effectiveness, *Journal of Guidance, Control, and Dynamics,*

control for spacecraft attitude maneuvering under actuator stuck failures, *Chinese*

for cooperative multiple vehicles subject to communication delay, *AIAA Journal of*

for cooperative multiple vehicles subject to communication loss, *Special Issue on "Formation Flight Control" in International Journal of Aerospace Engineering,* 2011. Izadi, H. A., Zhang, Y. M. & Gordon, B. W. (2011b). Fault tolerant model predictive control

of quad-rotor helicopters with actuator fault estimation, *Proceedings of the 18th IFAC*

unmanned helicopter, *Proceedings of the 7th ASME/IEEE International Conference on*

*Fixed-wing and Rotary-wing UAVs*, Master's thesis, Concordia University, Montreal,

unscented Kalman filter, *AIAA Guidance, Navigation, and Control Conference*, Toronto,

nonlinear and LPV models, *Proceedings of the 6th ASME/IEEE International Conference*

multi-vehicle search and coverage problem in an uncertain environment, *Accepted*

*by the 50th IEEE Conference on Decision and Control and European Control Conference*, Orlando, Florida, USA.

NAV (2011). http://users.encs.concordia.ca/~ymzhang/UAVs.htm.


STARMAC (2011). http://hybrid.stanford.edu/~starmac/project.htm.


**6** 

Marilena D. Pavel

*The Netherlands* 

**Effects of Automatic Flight Control** 

*Faculty of Aerospace Engineering, Delft University of Technology* 

**System on Chinook Underslung Load Failures** 

One of the major helicopter attributes is its ability to transport cargo externally in the form of external slung loads (see Fig. 1). Commercial and military operators accept the fact that using a helicopter for external load transportation is usually expensive in terms of both money and time. However, helicopters still have the significant advantage of accessing unreachable sites. Operations of helicopters with external loads impose limitations to the use of the helicopter, as for example: helicopter maximum forward speed is usually severely reduced because of the danger on dynamic instabilities of the load; due to external load the aerodynamic drag can become excessive, resulting in power and control limitations on the helicopter. The problem addressed in this chapter concerns the behaviour of a helicopter following the premature breakdown of one of its cables sustaining the slung load. As a specific example, the Chinook helicopter CH-47B with an external load will be considered. The CH-47 (Chinook) is a twin-engine tandem rotor helicopter (see Fig. 1) designed for allweather, medium-sized transport type operations. The three bladed rotors are driven in opposite directions (front rotor rotates anticlockwise, rear rotor rotates clockwise) through interconnecting shafts which enable both rotors to be driven by either engine. The rotor

heads are fully articulated, with pitch, flapping, and lead-lag hinges.

Fig. 1. Chinook helicopter transporting single and multiple loads (Courtesy of the Royal

**1. Introduction** 

Netherlands Air Force)

