**Sliding Mode Approach to Control Quadrotor Using Dynamic Inversion**

Abhijit Das, Frank L. Lewis and Kamesh Subbarao *Automation and Robotics Research Institute The University of Texas at Arlington USA* 

## **1. Introduction**

Nowadays unmanned rotorcraft are designed to operate with greater agility, rapid maneuvering, and are capable of work in degraded environments such as wind gusts etc. The control of this rotorcraft is a subject of research especially in applications such as rescue, surveillance, inspection, mapping etc. For these applications, the ability of the rotorcraft to maneuver sharply and hover precisely is important (Koo and Sastry 1998). Rotorcraft control as in these applications often requires holding a particular trimmed state; generally hover, as well as making changes of velocity and acceleration in a desired way (Gavrilets, Mettler, and Feron 2003). Similar to aircraft control, rotorcraft control too involves controlling the pitch, yaw, and roll motion. But the main difference is that, due to the unique body structure of rotorcraft (as well as the rotor dynamics and other rotating elements) the pitch, yaw and roll dynamics are strongly coupled. Therefore, it is difficult to design a decoupled control law of sound structure that stabilizes the faster and slower dynamics simultaneously. On the contrary, for a fixed wing aircraft it is relatively easy to design decoupled standard control laws with intuitively comprehensible structure and guaranteed performance (Stevens and F. L. Lewis 2003). There are many different approaches available for rotorcraft control such as (Altug, Ostrowski, and Mahony 2002; Bijnens et al. 2005; T. Madani and Benallegue 2006; Mistler, Benallegue, and M'Sirdi 2001; Mokhtari, Benallegue, and Orlov 2006) etc. Popular methods include input-output linearization and back-stepping. The 6-DOF airframe dynamics of a typical quadrotor involves the typical translational and rotational dynamical equations as in (Gavrilets, Mettler, and Feron 2003; Castillo, Lozano, and Dzul 2005; Castillo, Dzul, and Lozano 2004). The dynamics of a quadrotor is essentially a simplified form of helicopter dynamics that exhibits the basic problems including underactuation, strong coupling, multi-input/multi-output, and unknown nonlinearities. The quadrotor is classified as a rotorcraft where lift is derived from the four rotors. Most often they are classified as helicopters as its movements are characterized by the resultant force and moments of the four rotors. Therefore the control algorithms designed for a quadrotor could be applied to a helicopter with relatively straightforward modifications. Most of the papers (B. Bijnens et al. 2005; T. Madani and Benallegue 2006; Mokhtari, Benallegue, and Orlov 2006) etc. deal with either input-output linearization for decoupling pitch yaw roll or back-stepping to deal with the under-actuation problem. The problem of coupling in the

Sliding Mode Approach to Control Quadrotor Using Dynamic Inversion 5

the speed of the front and rear motors while decreasing (increasing) the speed of the lateral

*l*

1*f*

*M*1

4*f*

*M*<sup>4</sup>

*x*

In this section we will describe the basic state-space model of the quadrotor. The dynamics of the four rotors are relatively much faster than the main system and thus neglected in our

*y*

*z*

*b*

represents the relative position of the center of mass of the quadrotor with respect to an

Let us assume that the transitional and rotational coordinates are in the form

 

*b x*

. The potential energy in the system can be

*dt q q* (1)

are the three Euler angles representing the orientation of the

( /2) *<sup>T</sup> T m trans* is the translational kinetic energy,

<sup>3</sup> (,,) *R* . Now the total transitional kinetic energy of the

*<sup>m</sup> <sup>T</sup>* where *m* is the mass of the quadrotor. The rotational kinetic

, where (,,) *x y z*

is the auxiliary matrix expressed

as angular speed, *U m gz* is the

case. The generalized coordinates of the rotorcraft are *q xyz* (,,, ,,)

*M*<sup>3</sup>

*z*

*<sup>T</sup> T J rot* , where matrix *J J* ( )

 

characterized by the gravitational potential, described as *U m gz* . Defining the Lagrangian

potential energy, *z* is the quadrotor altitude, *I* is the body inertia matrix, and *g* is the

Then the full quadrotor dynamics is obtained as a function of the external generalized forces

 *dL L <sup>F</sup>*

motors (Bouabdallah, Noth, and Siegwart 2004).

2*f*

3*f*

*M*<sup>2</sup>

Fig. 1. A typical model of a quadrotor helicopter

*b y*

 

rotorcraft, namely yaw-pitch-roll of the vehicle.

 

*trans*

in terms of the generalized coordinates

*LT T U trans rot* , where

 2 *T*

*<sup>T</sup> T I rot* is the rotational kinetic energy with

 

1 2

inertial frame , and (,,)

<sup>3</sup> (,,)*<sup>T</sup> xyz R* and

rotorcraft will be

 (1 /2) 

 *F F* ( ,) as

energy is described as

acceleration due to gravity.

yaw-pitch-roll of a helicopter, as well as the problem of coupled dynamics-kinematic underactuated system, can be solved by back-stepping (Kanellakopoulos, Kokotovic, and Morse 1991; Khalil 2002; Slotine and Li 1991). Dynamic inversion (Stevens and F. L. Lewis 2003; Slotine and Li 1991; A. Das et al. 2004) is effective in the control of both linear and nonlinear systems and involves an inner inversion loop (similar to feedback linearization) which results in tracking if the residual or internal dynamics is stable. Typical usage requires the selection of the output control variables so that the internal dynamics is guaranteed to be stable. This implies that the tracking control cannot always be guaranteed for the original outputs of interest.

The application of dynamic inversion on UAV's and other flying vehicles such as missiles, fighter aircrafts etc. are proposed in several research works such as (Kim and Calise 1997; Prasad and Calise 1999; Calise et al. 1994) etc. It is also shown that the inclusion of dynamic neural network for estimating the dynamic inversion errors can improve the controller stability and tracking performance. Some other papers such as (Hovakimyan et al. 2001; Rysdyk and Calise 2005; Wise et al. 1999; Campos, F. L. Lewis, and Selmic 2000) etc. discuss the application of dynamic inversion on nonlinear systems to tackle the model and parametric uncertainties using neural nets. It is also shown that a reconfigurable control law can be designed for fighter aircrafts using neural net and dynamic inversion. Sometimes the inverse transformations required in dynamic inversion or feedback linearization are computed by neural network to reduce the inversion error by online learning.

In this chapter we apply dynamic inversion to tackle the coupling in quadrotor dynamics which is in fact an underactuated system. Dynamic inversion is applied to the inner loop, which yields internal dynamics that are not necessarily stable. Instead of redesigning the output control variables to guarantee stability of the internal dynamics, we use a sliding mode approach to stabilize the internal dynamics. This yields a two-loop structured tracking controller with a dynamic inversion inner loop and an internal dynamics stabilization outer loop. But it is interesting to notice that unlike normal two loop structure, we designed an inner loop which controls and stabilizes altitude and attitude of the quadrotor and an outer loop which controls and stabilizes the position *(x,y)* of the quadrotor. This yields a new structure of the autopilot in contrast to the conventional loop linear or nonlinear autopilot. Section 2 of this chapter discusses the basic quadrotor dynamics which is used for control law formulation. Section 3 shows dynamic inversion of a nonlinear state-space model of a quadrotor. Sections 4 discuss the robust control method using sliding mode approach to stabilize the internal dynamics. In the final section, simulation results are shown to validate the control law discussed in this chapter.

## **2. Quadrotor dynamics**

Fig. 1 shows a basic model of an unmanned quadrotor. The quadrotor has some basic advantage over the conventional helicopter. Given that the front and the rear motors rotate counter-clockwise while the other two rotate clockwise, gyroscopic effects and aerodynamic torques tend to cancel in trimmed flight. This four-rotor rotorcraft does not have a swashplate (P. Castillo, R. Lozano, and A. Dzul 2005). In fact it does not need any blade pitch control. The collective input (or throttle input) is the sum of the thrusts of each motor (see Fig. 1). Pitch movement is obtained by increasing (reducing) the speed of the rear motor while reducing (increasing) the speed of the front motor. The roll movement is obtained similarly using the lateral motors. The yaw movement is obtained by increasing (decreasing) 4 Challenges and Paradigms in Applied Robust Control

yaw-pitch-roll of a helicopter, as well as the problem of coupled dynamics-kinematic underactuated system, can be solved by back-stepping (Kanellakopoulos, Kokotovic, and Morse 1991; Khalil 2002; Slotine and Li 1991). Dynamic inversion (Stevens and F. L. Lewis 2003; Slotine and Li 1991; A. Das et al. 2004) is effective in the control of both linear and nonlinear systems and involves an inner inversion loop (similar to feedback linearization) which results in tracking if the residual or internal dynamics is stable. Typical usage requires the selection of the output control variables so that the internal dynamics is guaranteed to be stable. This implies that the tracking control cannot always be guaranteed

The application of dynamic inversion on UAV's and other flying vehicles such as missiles, fighter aircrafts etc. are proposed in several research works such as (Kim and Calise 1997; Prasad and Calise 1999; Calise et al. 1994) etc. It is also shown that the inclusion of dynamic neural network for estimating the dynamic inversion errors can improve the controller stability and tracking performance. Some other papers such as (Hovakimyan et al. 2001; Rysdyk and Calise 2005; Wise et al. 1999; Campos, F. L. Lewis, and Selmic 2000) etc. discuss the application of dynamic inversion on nonlinear systems to tackle the model and parametric uncertainties using neural nets. It is also shown that a reconfigurable control law can be designed for fighter aircrafts using neural net and dynamic inversion. Sometimes the inverse transformations required in dynamic inversion or feedback linearization are

In this chapter we apply dynamic inversion to tackle the coupling in quadrotor dynamics which is in fact an underactuated system. Dynamic inversion is applied to the inner loop, which yields internal dynamics that are not necessarily stable. Instead of redesigning the output control variables to guarantee stability of the internal dynamics, we use a sliding mode approach to stabilize the internal dynamics. This yields a two-loop structured tracking controller with a dynamic inversion inner loop and an internal dynamics stabilization outer loop. But it is interesting to notice that unlike normal two loop structure, we designed an inner loop which controls and stabilizes altitude and attitude of the quadrotor and an outer loop which controls and stabilizes the position *(x,y)* of the quadrotor. This yields a new structure of the autopilot in contrast to the conventional loop linear or nonlinear autopilot. Section 2 of this chapter discusses the basic quadrotor dynamics which is used for control law formulation. Section 3 shows dynamic inversion of a nonlinear state-space model of a quadrotor. Sections 4 discuss the robust control method using sliding mode approach to stabilize the internal dynamics. In the final section, simulation results are shown to validate

Fig. 1 shows a basic model of an unmanned quadrotor. The quadrotor has some basic advantage over the conventional helicopter. Given that the front and the rear motors rotate counter-clockwise while the other two rotate clockwise, gyroscopic effects and aerodynamic torques tend to cancel in trimmed flight. This four-rotor rotorcraft does not have a swashplate (P. Castillo, R. Lozano, and A. Dzul 2005). In fact it does not need any blade pitch control. The collective input (or throttle input) is the sum of the thrusts of each motor (see Fig. 1). Pitch movement is obtained by increasing (reducing) the speed of the rear motor while reducing (increasing) the speed of the front motor. The roll movement is obtained similarly using the lateral motors. The yaw movement is obtained by increasing (decreasing)

computed by neural network to reduce the inversion error by online learning.

for the original outputs of interest.

the control law discussed in this chapter.

**2. Quadrotor dynamics** 

the speed of the front and rear motors while decreasing (increasing) the speed of the lateral motors (Bouabdallah, Noth, and Siegwart 2004).

Fig. 1. A typical model of a quadrotor helicopter

In this section we will describe the basic state-space model of the quadrotor. The dynamics of the four rotors are relatively much faster than the main system and thus neglected in our case. The generalized coordinates of the rotorcraft are *q xyz* (,,, ,,) , where (,,) *x y z* represents the relative position of the center of mass of the quadrotor with respect to an inertial frame , and (,,) are the three Euler angles representing the orientation of the rotorcraft, namely yaw-pitch-roll of the vehicle.

Let us assume that the transitional and rotational coordinates are in the form <sup>3</sup> (,,)*<sup>T</sup> xyz R* and <sup>3</sup> (,,) *R* . Now the total transitional kinetic energy of the rotorcraft will be 2 *T trans <sup>m</sup> <sup>T</sup>* where *m* is the mass of the quadrotor. The rotational kinetic energy is described as 1 *<sup>T</sup> T J rot* , where matrix *J J* ( ) is the auxiliary matrix expressed

2 in terms of the generalized coordinates . The potential energy in the system can be characterized by the gravitational potential, described as *U m gz* . Defining the Lagrangian *LT T U trans rot* , where ( /2) *<sup>T</sup> T m trans* is the translational kinetic energy, (1 /2) *<sup>T</sup> T I rot* is the rotational kinetic energy with as angular speed, *U m gz* is the potential energy, *z* is the quadrotor altitude, *I* is the body inertia matrix, and *g* is the acceleration due to gravity.

Then the full quadrotor dynamics is obtained as a function of the external generalized forces *F F* ( ,) as

$$\frac{d}{dt}\frac{\partial \mathcal{L}}{\partial \dot{q}} - \frac{\partial \mathcal{L}}{\partial q} = F \tag{1}$$

Sliding Mode Approach to Control Quadrotor Using Dynamic Inversion 7

 

 

> 

 

> 

 

 

cos cos

 

 

0 0

*y*

*l*

(,, ) 0 0

*<sup>g</sup> <sup>I</sup>*

control inputs, *<sup>x</sup>* , , *<sup>y</sup> <sup>z</sup> I* are body inertia, *<sup>p</sup> J* is propeller/rotor inertia and

Thus, the system is the form of an under-actuated system with six outputs and four inputs.

*x*

*l I*

*z*

*l I*

0 0

 

*<sup>T</sup> J J T IT* with

 

 <sup>1</sup> ( ) <sup>2</sup>

 

, (14)

*f g* (,, ) (,, ) (16)

, <sup>1</sup> *u R* and

*<sup>d</sup> <sup>T</sup> JJ J dt* (12)

 , *<sup>d</sup> J JC dt* (13)

(11)

(15)

 

 

<sup>3</sup> *R* are the

.

2413 

0 0 *m FR mg*

 

> 

> >

sin 0 1 cos sin cos 0 cos cos sin 0 *T* .

Now finally the dynamic model of the quadrotor in terms of position *xyz* , , and rotation

0 sin <sup>1</sup> 0 cos sin

*y u m*

*J C* 

The final dynamic model of the quadrotor is described by (11)-(14),

 

*F u <sup>R</sup>* , auxiliary Matrix

 sin cos sin cos cos

is written as,

 

*I I <sup>J</sup> <sup>f</sup> I I*

where,

(,, ) 

where,

 

(,, )

 

 

 

,

 

*II J I I*

*yz p x x p z x y y x y z*

*I I I*

*z g*

*x*

The principal control inputs are defined as follows. Define

$$F\_{\mathbb{R}} = \begin{pmatrix} 0 \\ 0 \\ \mu \end{pmatrix} \tag{2}$$

where *u* is the main thrust and defined by

$$
\mu = f\_1 + f\_2 + f\_3 + f\_4 \tag{3}
$$

and *<sup>i</sup> f* 's are described as 2 *i ii f k* , where *<sup>i</sup> k* are positive constants and *<sup>i</sup>* are the angular speed of the motor *i* . Then *F*can be written as

$$F\_{\xi} = \overline{\mathcal{R}} F\_{\mathcal{R}} \tag{4}$$

where *R* is the transformation matrix representing the orientation of the rotorcraft as

$$
\overline{R} = \begin{pmatrix}
\mathcal{c}\_{\theta}\mathcal{c}\_{\psi} & s\_{\psi}s\_{\theta} & -s\_{\theta} \\
\mathcal{c}\_{\nu}s\_{\theta}s\_{\phi} - s\_{\nu}\mathcal{c}\_{\phi} & s\_{\nu}s\_{\theta}s\_{\phi} + \mathcal{c}\_{\nu}\mathcal{c}\_{\phi} & \mathcal{c}\_{\theta}s\_{\phi} \\
\mathcal{c}\_{\nu}s\_{\theta}\mathcal{c}\_{\phi} + s\_{\nu}s\_{\phi} & s\_{\nu}s\_{\theta}\mathcal{c}\_{\phi} - \mathcal{c}\_{\nu}s\_{\phi} & \mathcal{c}\_{\theta}\mathcal{c}\_{\phi}
\end{pmatrix} \tag{5}
$$

The generalized torque for the variables are

$$\boldsymbol{\pi} = \begin{pmatrix} \boldsymbol{\pi}\_{\boldsymbol{\nu}} \\ \boldsymbol{\pi}\_{\boldsymbol{\theta}} \\ \boldsymbol{\pi}\_{\boldsymbol{\rho}} \end{pmatrix} \tag{6}$$

where

$$
\pi\_{\varphi} = \sum\_{i=1}^{4} \pi\_{M\_i} = c(f\_1 - f\_2 + f\_3 - f\_4) \tag{7}
$$

$$
\pi\_{\vartheta} = (f\_2 - f\_4)l \tag{8}
$$

$$
\pi\_{\varphi} = (f\_3 - f\_1)l \tag{9}
$$

Thus the control distribution from the four actuator motors of the quadrotor is given by

$$
\begin{pmatrix} u \\ \pi\_{\boldsymbol{\sigma}} \\ \pi\_{\boldsymbol{\sigma}} \\ \pi\_{\boldsymbol{\sigma}} \end{pmatrix} = \underbrace{\begin{pmatrix} 1 & 1 & 1 & 1 \\ -l & 0 & l & 0 \\ 0 & l & 0 & -l \\ c & -c & c & -c \end{pmatrix}}\_{\widetilde{C}} \begin{pmatrix} f\_1 \\ f\_2 \\ f\_3 \\ f\_4 \end{pmatrix} \tag{10}
$$

where *l* is the distance from the motors to the center of gravity, *Mi* is the torque produced by motor *Mi* , and *c* is a constant known as force-to-moment scaling factor. So, if a required thrust and torque vector are given, one may solve for the rotor force using (10).

The final dynamic model of the quadrotor is described by (11)-(14),

$$\begin{aligned} \, ^0m \ddot{\tilde{\xi}} + \begin{pmatrix} 0 \\ 0 \\ mg \end{pmatrix} &= F\_{\mathbb{R}} \end{aligned} \tag{11}$$

$$J(\eta)\ddot{\eta} + \frac{d}{dt}\{J(\eta)\}\dot{\eta} - \frac{1}{2}\frac{\partial}{\partial \eta}(\dot{\eta}^T J(\eta)\dot{\eta}) = \tau \tag{12}$$

$$J(\eta)\ddot{\eta} + \frac{d}{dt}\{J(\eta)\}\dot{\eta} - \overline{\mathbb{C}}\left(\eta, \dot{\eta}\right) = \varepsilon \tag{13}$$

$$J(\eta)\ddot{\eta} + \mathcal{C}(\eta, \dot{\eta}) = \tau \tag{14}$$

where, sin cos sin cos cos *F u <sup>R</sup>* , auxiliary Matrix *<sup>T</sup> J J T IT* with

$$T\_{\eta} = \begin{pmatrix} -\sin\theta & 0 & 1 \\ \cos\theta\sin\psi & \cos\psi & 0 \\ \cos\theta\cos\psi & -\sin\psi & 0 \end{pmatrix}.$$

Now finally the dynamic model of the quadrotor in terms of position *xyz* , , and rotation (,, ) is written as,

$$
\begin{pmatrix} \ddot{\mathbf{x}} \\ \ddot{y} \\ \ddot{z} \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ -g \end{pmatrix} + \frac{1}{m} \begin{pmatrix} -\sin\theta \\ \cos\theta\sin\varphi \\ \cos\theta\cos\varphi \end{pmatrix} \mu \tag{15}
$$

$$\begin{pmatrix} \ddot{\phi} \\ \ddot{\theta} \\ \ddot{\nu} \end{pmatrix} = f(\wp, \theta, \wp) + \mathcal{g}(\wp, \theta, \wp)\tau \tag{16}$$

where,

6 Challenges and Paradigms in Applied Robust Control

 

*i ii f k* , where *<sup>i</sup> k* are positive constants and

 

*R c ss sc sss cc cs c sc ss ssc c s cc*

*cc ss s*

 

1234

*f*

( ) *Mi*

 

 

*F RF* 

where *R* is the transformation matrix representing the orientation of the rotorcraft as

 

 

variables are

(2)

(5)

*<sup>i</sup>* are the angular

*uf f f f* <sup>1234</sup> (3)

 

*<sup>R</sup>* (4)

(6)

*c ffff* (7)

( ) *f f* 2 4 *l* (8)

( ) *f f* 3 1 *l* (9)

(10)

*Mi* is the torque produced

0 0 *FR u*

The principal control inputs are defined as follows. Define

2

can be written as

 

 

 

> 

 

Thus the control distribution from the four actuator motors of the quadrotor is given by

by motor *Mi* , and *c* is a constant known as force-to-moment scaling factor. So, if a required

0 0

1 111 0 0

*u f*

*l l f l l f c cc c f C*

1

*i*

where *l* is the distance from the motors to the center of gravity,

thrust and torque vector are given, one may solve for the rotor force using (10).

4

where *u* is the main thrust and defined by

and *<sup>i</sup> f* 's are described as

speed of the motor *i* . Then *F*

The generalized torque for the

where

$$f(\boldsymbol{\varrho},\boldsymbol{\theta},\boldsymbol{\psi}) = \begin{pmatrix} \phi\boldsymbol{\psi}\left(\frac{I\_{y}-I\_{z}}{I\_{x}}\right) - \frac{I\_{y}}{I\_{x}}\boldsymbol{\delta}\boldsymbol{\Omega} \\\\ \phi\boldsymbol{\nu}\boldsymbol{\delta}\left(\frac{I\_{z}-I\_{x}}{I\_{y}}\right) + \frac{I\_{y}}{I\_{y}}\boldsymbol{\delta}\boldsymbol{\Omega} \\\\ \phi\boldsymbol{\theta}\left(\frac{I\_{x}-I\_{y}}{I\_{z}}\right) \end{pmatrix},\ \boldsymbol{\delta}\{\boldsymbol{\rho},\boldsymbol{\theta},\boldsymbol{\nu}\} = \begin{pmatrix} I & \boldsymbol{0} & \boldsymbol{0} \\ I\_{x} & \boldsymbol{0} & \boldsymbol{0} \\ \boldsymbol{0} & \frac{I}{I\_{y}} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{0} & \frac{I}{I\_{z}} \end{pmatrix},\ \boldsymbol{\nu} \in \boldsymbol{R}^{1} \text{ and } \ \boldsymbol{\tau} = \begin{pmatrix} \boldsymbol{\tau}\_{\boldsymbol{\rho}} \\\\ \boldsymbol{\tau}\_{\boldsymbol{\rho}} \\\\ \boldsymbol{\tau}\_{\boldsymbol{\nu}} \end{pmatrix} \in \boldsymbol{R}^{3} \text{ are the } $$

control inputs, *<sup>x</sup>* , , *<sup>y</sup> <sup>z</sup> I* are body inertia, *<sup>p</sup> J* is propeller/rotor inertia and 2413 . Thus, the system is the form of an under-actuated system with six outputs and four inputs.

Sliding Mode Approach to Control Quadrotor Using Dynamic Inversion 9

where,

*di p z x*

*M I I J*

 

*g II J I I*

*yz p x x*

*I I I I I*

*y y x y z*

It is seen that for non-singularity of *Edi* ,

we can write the desired input to the system

*T*

Assuming the desired output to the system is

*di*

*v*

which yields

where,

is designed as described below.

**3.2 Design of linear controller** 

*di v* is designed in the following way

non-square and is difficult to obtain a feasible linearizing input *udi* .

4

,

*di*

The number *r* 8 of differentiation required for an invertible *Edi* is known as the relative degree of the system and generally *r n* 12 ; if *r n* then full state feedback linearization is achieved if *Edi* is invertible. Note that for multi-input multi-output system, if number of outputs is not equal to the number of inputs (under-actuated system), then *Edi* becomes

> 

calculated as 8 whereas the order of the system is 12 . So, the remaining dynamics ( 4) which does not come out in the process of feedback linearization is known as internal dynamics. To guarantee the stability of the whole system, it is mandatory to guarantee the stability of the internal dynamics. In the next section we will discuss how to control the internal dynamics using a PID with a feed-forward acceleration outer loop. Now using (19)

*di z v vvvv* . This system is decoupled and linear. The auxiliary input *di v*

*v K K*

*v K K v K K*

 

 

*z z dd d z*

*v z Kzz K zz*

1 2 1 2 1 2 1 2

*dd d*

*dd d dd d*

 

 

*ydi di di di M Eu* (19)

0 0 0

*x*

0 , 90 . The relative degree of the system is

<sup>1</sup> *uE Mv di di di di* (20)

 

()() ( )( ) ()() ( )( )

 

 

 

 

> 

*ydi di v* (21)

 *<sup>T</sup> d ddd d y z* , the linear controller

(22)

*l I*

*y*

*I*

*z*

*l I*

0 00

4 4

 

*E l*

*m*

 

(1 / )cos cos 0 0 0

0 00

**Comment 2.1:** *In this chapter we considered a generalized state space model of quadrotor derived from Lagrangian dynamics. Design autopilot with actual Lagrangian model of quadrotor is discussed in* (Abhijit Das, Frank Lewis, and Kamesh Subbarao 2009)*.*

## **3. Partial feedback linearization for Quadrotor model**

Dynamic inversion (Stevens and F. L. Lewis 2003) is an approach where a feedback linearization loop is applied to the tracking outputs of interest. The residual dynamics, not directly controlled, is known as the internal dynamics. If the internal dynamics are stable, dynamic inversion is successful. Typical usage requires the selection of the output control variables so that the internal dynamics is guaranteed to be stable. This means that tracking cannot always be guaranteed for the original outputs of interest.

In this chapter we apply dynamic inversion to the system given by (15) and (16) to achieve station-keeping tracking control for the position outputs (,,, ) *xyz* . Initially we select the convenient output vector *y z di* (, , , ) which makes the dynamic inverse easy to find. Dynamic inversion now yields effectively an inner control loop that feedback linearizes the system from the control (, , , ) *u u di* to the output *y z di* (, , , ) . Note that the output contains attitude parameters as well as altitude of the quadrotor.

Note however that *di y* is not the desired system output. Moreover, dynamic inversion generates a specific internal dynamics, as detailed below, which may not always be stable. Therefore, a second outer loop is designed to generate the required values for *y z di* (, , , ) in terms of the values of the desired tracking output (,,, ) *xyz* . An overall Lyapunov proof guarantees stability and performance. The following background is required. Consider a nonlinear system of the form

$$
\dot{q} = f\left(q, \mu\_q\right) \tag{17}
$$

where *<sup>m</sup> u R <sup>q</sup>* is the control input and *<sup>n</sup> q R* is state vector. The technique of designing the control input *u* using dynamic inversion involves two steps. First, one finds a state transformation *z z* ( ) *q* and an input transformation (,) *u u qv q q* so that the nonlinear system dynamics is transformed into an equivalent linear time invariant dynamics of the form

$$
\dot{z} = az + bv
\tag{18}
$$

where , *nn nm aR bR* are constant matrices with *v* is known as new input to the linear system. Secondly one can design *v* easily from the linear control theory approach such as pole placement etc. To get the desired linear equations (18), one has to differentiate outputs until input vector *udi* appears. The procedure is known as dynamic inversion.

#### **3.1 Dynamic inversion for inner loop**

The system, (15)→(16) is an underactuated system if we consider the states (,,, ,, ) *xyz* as outputs and *T u u di* as inputs. To overcome these difficulties we consider four outputs *y z di* (, , , ) which are used for feedback linearization. Differentiating the output vector twice with respect to the time we get from (15) and (16) that,

$$
\ddot{y}\_{di} = \mathbf{M}\_{di} + \mathbf{E}\_{di}\mathbf{u}\_{di} \tag{19}
$$

where,

8 Challenges and Paradigms in Applied Robust Control

**Comment 2.1:** *In this chapter we considered a generalized state space model of quadrotor derived from Lagrangian dynamics. Design autopilot with actual Lagrangian model of quadrotor is discussed* 

Dynamic inversion (Stevens and F. L. Lewis 2003) is an approach where a feedback linearization loop is applied to the tracking outputs of interest. The residual dynamics, not directly controlled, is known as the internal dynamics. If the internal dynamics are stable, dynamic inversion is successful. Typical usage requires the selection of the output control variables so that the internal dynamics is guaranteed to be stable. This means that tracking

In this chapter we apply dynamic inversion to the system given by (15) and (16) to achieve

Dynamic inversion now yields effectively an inner control loop that feedback linearizes the

Note however that *di y* is not the desired system output. Moreover, dynamic inversion generates a specific internal dynamics, as detailed below, which may not always be stable. Therefore, a second outer loop is designed to generate the required values for

in terms of the values of the desired tracking output (,,, ) *xyz*

Lyapunov proof guarantees stability and performance. The following background is

where *<sup>m</sup> u R <sup>q</sup>* is the control input and *<sup>n</sup> q R* is state vector. The technique of designing the control input *u* using dynamic inversion involves two steps. First, one finds a state transformation *z z* ( ) *q* and an input transformation (,) *u u qv q q* so that the nonlinear system dynamics is transformed into an equivalent linear time invariant dynamics of the

where , *nn nm aR bR* are constant matrices with *v* is known as new input to the linear system. Secondly one can design *v* easily from the linear control theory approach such as pole placement etc. To get the desired linear equations (18), one has to differentiate outputs

The system, (15)→(16) is an underactuated system if we consider the states (,,, ,, ) *xyz*

*u u di* as inputs. To overcome these difficulties we consider

which are used for feedback linearization. Differentiating the

until input vector *udi* appears. The procedure is known as dynamic inversion.

*T*

output vector twice with respect to the time we get from (15) and (16) that,

*u u di* to the output *y z di* (, , , )

which makes the dynamic inverse easy to find.

*q fq* ,*uq* (17)

*z az bv* (18)

 

. Initially we select the

. Note that the

. An overall

 as

*in* (Abhijit Das, Frank Lewis, and Kamesh Subbarao 2009)*.*

**3. Partial feedback linearization for Quadrotor model** 

cannot always be guaranteed for the original outputs of interest.

convenient output vector *y z di* (, , , )

required. Consider a nonlinear system of the form

**3.1 Dynamic inversion for inner loop** 

 

four outputs *y z di* (, , , )

 

system from the control

*y z di* (, , , ) 

form

outputs and

station-keeping tracking control for the position outputs (,,, ) *xyz*

 

output contains attitude parameters as well as altitude of the quadrotor.

 (, , , ) 

$$\mathcal{M}\_{\text{id}} = \begin{bmatrix} -g & & & & & & & & \\ \dot{\boldsymbol{\theta}}\dot{\boldsymbol{\nu}} \left(\frac{I\_y - I\_z}{I\_x}\right) - \frac{I\_y}{I\_x}\dot{\boldsymbol{\theta}}\boldsymbol{\Omega} & & & & & \\ \dot{\boldsymbol{\theta}}\dot{\boldsymbol{\nu}} \left(\frac{I\_z - I\_x}{I\_y}\right) - \frac{I\_y}{I\_x}\dot{\boldsymbol{\theta}}\boldsymbol{\Omega} & & & & \\ \dot{\boldsymbol{\theta}}\dot{\boldsymbol{\nu}} \left(\frac{I\_z - I\_x}{I\_y}\right) + \frac{I\_y}{I\_y}\dot{\boldsymbol{\theta}}\boldsymbol{\Omega} & & & & \\ & \boldsymbol{\theta}\dot{\boldsymbol{\theta}} \left(\frac{I\_x - I\_y}{I\_z}\right) & & & & \\ & & \boldsymbol{\theta}\dot{\boldsymbol{\theta}} \left(\frac{I\_x - I\_y}{I\_z}\right) & & & & \\ & & & & & & & \\ & & & & & & & \\ & & & & & & & & \\ & & & & & & & & \\ & & & & & & & & \\ & & & & & & & & \\ & & & & & & & & \\ & & & & & & & & \\ & & & & & & & & \\ \end{bmatrix} \in \boldsymbol{\mathcal{R}}^{4 \times 4}$$

The number *r* 8 of differentiation required for an invertible *Edi* is known as the relative degree of the system and generally *r n* 12 ; if *r n* then full state feedback linearization is achieved if *Edi* is invertible. Note that for multi-input multi-output system, if number of outputs is not equal to the number of inputs (under-actuated system), then *Edi* becomes non-square and is difficult to obtain a feasible linearizing input *udi* .

It is seen that for non-singularity of *Edi* , 0 , 90 . The relative degree of the system is calculated as 8 whereas the order of the system is 12 . So, the remaining dynamics ( 4) which does not come out in the process of feedback linearization is known as internal dynamics. To guarantee the stability of the whole system, it is mandatory to guarantee the stability of the internal dynamics. In the next section we will discuss how to control the internal dynamics using a PID with a feed-forward acceleration outer loop. Now using (19) we can write the desired input to the system

$$
\mu\_{di} = \mathbb{E}\_{di}^{-1} \left( -M\_{di} + \upsilon\_{di} \right) \tag{20}
$$

which yields

$$
\ddot{y}\_{dl} = \upsilon\_{dl} \tag{21}
$$

where, *T di z v vvvv* . This system is decoupled and linear. The auxiliary input *di v* is designed as described below.

#### **3.2 Design of linear controller**

Assuming the desired output to the system is *<sup>T</sup> d ddd d y z* , the linear controller *di v* is designed in the following way

$$\boldsymbol{\upsilon}\_{\mathcal{A}} = \begin{bmatrix} \boldsymbol{\upsilon}\_{z} \\ \boldsymbol{\upsilon}\_{\boldsymbol{\varphi}} \\ \boldsymbol{\upsilon}\_{\boldsymbol{\theta}} \\ \boldsymbol{\upsilon}\_{\boldsymbol{\varphi}} \\ \boldsymbol{\upsilon}\_{\boldsymbol{\varphi}} \end{bmatrix} = \begin{bmatrix} \ddot{\boldsymbol{z}}\_{d} - \boldsymbol{K}\_{1\_{\boldsymbol{z}}} \left( \dot{\boldsymbol{z}} - \dot{\boldsymbol{z}}\_{d} \right) - \boldsymbol{K}\_{2\_{\boldsymbol{z}}} \left( \boldsymbol{z} - \boldsymbol{z}\_{d} \right) \\ \ddot{\boldsymbol{\varphi}}\_{d} - \boldsymbol{K}\_{1\_{\boldsymbol{\varphi}}} \left( \dot{\boldsymbol{\varphi}} - \dot{\boldsymbol{\varphi}}\_{d} \right) - \boldsymbol{K}\_{2\_{\boldsymbol{\varphi}}} \left( \boldsymbol{\varphi} - \boldsymbol{\varphi}\_{d} \right) \\ \ddot{\boldsymbol{\theta}}\_{d} - \boldsymbol{K}\_{1\_{\boldsymbol{\varphi}}} \left( \dot{\boldsymbol{\theta}} - \dot{\boldsymbol{\varphi}}\_{d} \right) - \boldsymbol{K}\_{2\_{\boldsymbol{\varphi}}} \left( \boldsymbol{\theta} - \boldsymbol{\theta}\_{d} \right) \\ \ddot{\boldsymbol{\varphi}}\_{d} - \boldsymbol{K}\_{1\_{\boldsymbol{\varphi}}} \left( \dot{\boldsymbol{\nu}} - \dot{\boldsymbol{\nu}}\_{d} \right) - \boldsymbol{K}\_{2\_{\boldsymbol{\varphi}}} \left( \boldsymbol{\nu} - \boldsymbol{\nu}\_{d} \right) \end{bmatrix} \tag{22}$$

Sliding Mode Approach to Control Quadrotor Using Dynamic Inversion 11

The internal dynamics (Slotine and Li 1991) for the feedback linearizes system given by

*x*

 *<sup>d</sup>* , 

 

\* \*\* \* \*\* \* \*\*

 

*d d dd d d d dd d d d dd d*

sin sin cos ( ) cos cos sin ( ) sin sin cos ( )

 

*x*

   

 

 

\* \*\* sin cos ( ) *d dd d*

\* \*\* \* \* \* cos sin ( ) sin cos ( ) *d dd d d dd d*

 *d u*

*m*

*d u y m*

<sup>2</sup> *<sup>T</sup>*

*u*

*m*

 

For hovering of a quadrotor, assuming the nominal values \* 0

*x*

*u y m*

and the sliding mode error for the internal dynamics as

sin

 cos sin 

For the stability of the whole system as well as for the tracking purposes, *x y*, should be bounded and controlled in a desired way. Note that the altitude *z* of the rotorcraft a any

*u y m* *m*

*u*

*<sup>d</sup>* and

*<sup>d</sup>* and considering up to first order terms

can be fed into (22) as a reference. Using Taylor series

 

> 

> >

 

> 

 

 *<sup>d</sup>* , \* 0 

(36)

(37)

*d d e x xy y* (38)

*re e* 2 2 22 (39)

(31)

(32)

*<sup>d</sup>* such that (,) *x y* is

(33)

(34)

(35)

*<sup>d</sup>* , (31) and (32)

Note that *R* 0 is also a diagonal matrix.

given time *t* is controlled by (20),(22).

expansion about some nominal values

bounded. Then that

Using (33) on (31) we get

becomes

Define the state error

**4. Sliding mode control for internal dynamics** 

To stabilize the zero dynamics, we select some desired

 *d d* ,

where, 1 2 *K K*, ,.... etc. are positive constants so that the poles of the error dynamics arising from (23) and (24) are in the left half of the *s* plane. For hovering control, *<sup>d</sup> z* and *<sup>d</sup>* are chosen depending upon the designer choice.

## **3.3 Defining sliding variable error**

Let us define the state error 1 *T ddd d e zz* and a sliding mode error as

$$
\sigma\_1 = \dot{e}\_1 + \Lambda\_1 e\_1 \tag{23}
$$

where, <sup>1</sup> is a diagonal positive definite design parameter matrix. Common usage is to select 1 diagonal with positive entries. Then, (23) is a stable system so that 1 *e* is bounded as long as the controller guarantees that the filtered error 1*r* is bounded. In fact it is easy to show (F. Lewis, Jagannathan, and Yesildirek 1999) that one has

$$\left\|c\_{1}\right\| \leq \frac{\left\|r\_{1}\right\|}{\sigma\_{\text{min}}\left(\Lambda\_{1}\right)}, \left\|\dot{e}\_{1}\right\| \leq \left\|r\_{1}\right\|\tag{24}$$

Note that *e e* 1 11 0 defines a stable sliding mode surface. The function of the controller to be designed is to force the system onto this surface by making 1*r* small. The parameter 1 is selected for a desired sliding mode response

$$e\_1(t) = e\_1^{-\Lambda\_1 t} e\_1(0) \tag{25}$$

We now focus on designing a controller to keep 1*r* small. From (23),

$$
\dot{r}\_1 = \ddot{e}\_1 + \Lambda\_1 \dot{e}\_1 \tag{26}
$$

Adding an integrator to the linear controller given in (22), and now we can rewrite (22) as

$$
\boldsymbol{\upsilon}\_{\boldsymbol{d}\boldsymbol{l}} = \ddot{\boldsymbol{y}}\_{\boldsymbol{d}\boldsymbol{l}\_{d}} + \boldsymbol{K}\_{1}\dot{\boldsymbol{e}}\_{1} + \boldsymbol{K}\_{2}\boldsymbol{e}\_{1} + \boldsymbol{K}\_{3}\int\_{0}^{t} \boldsymbol{r}\_{1} dt \tag{27}
$$

where, ,,, *<sup>d</sup> T di d d d d y z* and ( , , , )0 *<sup>z</sup> K diag K K K K i iiii* , *i* 1,2,3,4 .

Now using equation (20) and (27) we can rewrite the equation (19) in the form of error dynamics as

$$
\ddot{e}\_1 + K\_1 \dot{e}\_1 + K\_2 e\_1 + K\_3 \int\_0^t r\_1 dt = 0\tag{28}
$$

Thus equation (26) becomes

$$
\dot{r}\_1 = -K\_1 \dot{e}\_1 - K\_2 e\_1 - K\_3 \int\_0^t r\_1 dt + \Lambda\_1 \dot{e}\_1 \tag{29}
$$

If we choose *K RK R* 1 1 21 ( ), , then equation (29) will look like

$$
\dot{r\_1} = -Rr\_1 - K\_3 \int\_0^t r\_1 dt\tag{30}
$$

Note that *R* 0 is also a diagonal matrix.

10 Challenges and Paradigms in Applied Robust Control

where, <sup>1</sup> is a diagonal positive definite design parameter matrix. Common usage is to select 1 diagonal with positive entries. Then, (23) is a stable system so that 1 *e* is bounded as long as the controller guarantees that the filtered error 1*r* is bounded. In fact it is easy to

> <sup>1</sup> 1 1 1 min 1 , ( ) *r*

Note that *e e* 1 11 0 defines a stable sliding mode surface. The function of the controller to be designed is to force the system onto this surface by making 1*r* small. The parameter

<sup>1</sup>

*re e*

Adding an integrator to the linear controller given in (22), and now we can rewrite (22) as

11 21 3 1 *<sup>d</sup>* <sup>0</sup>

Now using equation (20) and (27) we can rewrite the equation (19) in the form of error

1 11 21 3 1

1 11 21 3 1 11

 1 1 31

( , , , )0 *<sup>z</sup> K diag K K K K i iiii* , *i* 1,2,3,4 .

0

0

0

*t*

*t*

*t*

from (23) and (24) are in the left half of the *s* plane. For hovering control, *<sup>d</sup> z* and

1 2 *K K*, ,.... etc. are positive constants so that the poles of the error dynamics arising

 

 *T ddd d e zz* and a sliding mode error as

*re e* 1 1 11 (23)

*e er* (24)

1 11 ( ) (0) *<sup>t</sup> et e e* (25)

1 1 11 (26)

*t di di v y K e K e K r dt* (27)

0

*e K e K e K r dt* (28)

*r K e K e K r dt e* (29)

*r Rr K r dt* (30)

*<sup>d</sup>* are

where,

 

chosen depending upon the designer choice.

Let us define the state error 1

show (F. Lewis, Jagannathan, and Yesildirek 1999) that one has

We now focus on designing a controller to keep 1*r* small. From (23),

If we choose *K RK R* 1 1 21 ( ), , then equation (29) will look like

1 is selected for a desired sliding mode response

where,

Thus equation (26) becomes

dynamics as

,,, *<sup>d</sup>*

*di d d d d y z* and

*T*

**3.3 Defining sliding variable error** 

## **4. Sliding mode control for internal dynamics**

The internal dynamics (Slotine and Li 1991) for the feedback linearizes system given by

$$
\ddot{\mathbf{x}} = -\frac{\mu}{m} \sin \theta \tag{31}
$$

$$
\ddot{y} = \frac{\mu}{m} \cos \theta \sin \varphi \tag{32}
$$

For the stability of the whole system as well as for the tracking purposes, *x y*, should be bounded and controlled in a desired way. Note that the altitude *z* of the rotorcraft a any given time *t* is controlled by (20),(22).

To stabilize the zero dynamics, we select some desired *<sup>d</sup>* and *<sup>d</sup>* such that (,) *x y* is bounded. Then that *d d* , can be fed into (22) as a reference. Using Taylor series expansion about some nominal values *<sup>d</sup>* , *<sup>d</sup>* and considering up to first order terms

$$\begin{aligned} \sin \theta\_d &= \sin \theta\_d^" + \cos \theta\_d^" (\theta\_d - \theta\_d^") \\ \cos \theta\_d &= \cos \theta\_d^" - \sin \theta\_d^" (\theta\_d - \theta\_d^") \\ \sin \varphi\_d &= \sin \varphi\_d^" + \cos \varphi\_d^" (\varphi\_d - \varphi\_d^") \end{aligned} \tag{33}$$

Using (33) on (31) we get

$$\ddot{\mathbf{x}} = -\frac{\mu}{m} \left\{ \sin \theta\_d^"+ \cos \theta\_d^"(\theta\_d - \theta\_d^") \right\} \tag{34}$$

$$\dot{y} = \frac{u}{m} \{ \cos \theta\_d^\circ - \sin \theta\_d^\circ (\theta\_d - \theta\_d^\circ) \} \left\{ \sin \phi\_d^\circ + \cos \phi\_d^\circ (\phi\_d - \phi\_d^\circ) \right\} \tag{35}$$

For hovering of a quadrotor, assuming the nominal values \* 0 *<sup>d</sup>* , \* 0 *<sup>d</sup>* , (31) and (32) becomes

$$
\ddot{\mathbf{x}} = -\frac{\mu}{m} \theta\_d \tag{36}
$$

$$
\ddot{y} = \frac{\mu}{m} \varphi\_d \tag{37}
$$

Define the state error

$$e\_2 = \begin{pmatrix} \mathbf{x}\_d - \mathbf{x} & y\_d - y \end{pmatrix}^T \tag{38}$$

and the sliding mode error for the internal dynamics as

$$
\sigma\_2 = \dot{e}\_2 + \Lambda\_2 e\_2 \tag{39}
$$

Sliding Mode Approach to Control Quadrotor Using Dynamic Inversion 13

The overall control system has two loops and is depicted in Fig. 2. The following theorem

**Definition 5.1:** *The equilibrium point e x is said to be uniformly ultimately bounded (UUB) if there exist a compact set <sup>n</sup> S R so that for all x S* <sup>0</sup> *there exist a bound B and a time* <sup>0</sup> *TBx* (, ) *such that*

**Theorem 5.1:** *Given the system as described in (15) and (16) with a control law shown in Fig. 2. and given by (20), (27), (42) , (43) . Then, the tracking errors* 1*r and* 2*r and thereby* <sup>1</sup> *e and* <sup>2</sup> *e are UUB if (53) and (54) are satisfied and can be made arbitrarily small with a suitable choice of gain parameters. According to the definition given by (23) of* 1*r and (39) of* 2*r , this guarantees that* <sup>1</sup> *e*

 

1

*r*

2

*r*

1

*r*

0

0

(50)

(52)

2

*r*

00 0 0

sgn( )

1 1 1 2 1 02 2 1 2 sgn( ) *TT T L r P Rr r Q S r r Q r* (55)

max 1 1 max 1 0 2 max 1 2 *L PR r QS r Q r* () ( ) ( ) 0 (56)

 

*P PK* 2 13 (53)

*Q QC* 2 13 (54)

*tt t t TT T <sup>T</sup> L r P r r Q r r dt P r dt r dt Q r dt* (51)

 

1 11 2 12 1 2 1 2 22

 1 1 1 1 1 3 1 1 2 1 2 1 02 0 0

*L r P Rr r P K r dt r P r dt r Q S r*

*t t T T T*

 

min 1 min 1

*r b e b*

*r b e b*

1

2

Therefore, by differentiating *L* we will get the following

1

2

11 1 1 22 2 2

*r Q C r dt r Q r dt r Q r*

 

2 2

2 13 2 2 2 2 2 1 2

*t t T TT*

0 0

min *i is the minimum singular value of* , 1,2 *<sup>i</sup> i* .

 

min 2 min 2

**5. Controller structure and stability analysis** 

details the performance of the controller.

**Proof:** Consider the Lyapunov function

with symmetric matrices *PPQQ* 12 1 2 ,, , 0

then integration term vanishes.

The Equation (55) can be written as

<sup>0</sup> () () *<sup>e</sup> xt x t B t t T* .

*and* <sup>2</sup> *e are UUB since* 

*where* 

Define,

where, 2 is a diagonal positive definite design parameter matrix with similar characteristic of <sup>1</sup> . Also

$$\left\|c\_{2}\right\| \leq \frac{\left\|r\_{2}\right\|}{\sigma\_{\text{min}}\left(\Lambda\_{2}\right)}, \left\|\dot{c}\_{2}\right\| \leq \left\|r\_{2}\right\|\tag{40}$$

Therefore according to (40), designing a controller to keep 2*r* small will guarantee that <sup>2</sup> *e* and <sup>2</sup> *e* are small. Differentiating 2*r* we get

$$
\dot{\vec{r}}\_2 = \ddot{\vec{e}}\_2 + \Lambda\_2 \dot{\vec{e}}\_2 \tag{41}
$$

Let the choice of the control law is as follows

$$\theta\_d = \frac{m}{\mu} \left[ -\ddot{\mathbf{x}}\_d - \mathbf{c}\_{11} \left( \dot{\mathbf{x}}\_d - \dot{\mathbf{x}} \right) - \mathbf{c}\_{12} \left( \mathbf{x}\_d - \mathbf{x} \right) - \mathbf{c}\_{13} \left\| \mathbf{r}\_2 dt - \beta\_x \operatorname{sgn}(\mathbf{r}\_2) \right\|\_1 \beta\_x > 0 \tag{42}$$

$$\mathfrak{osp}\_d = \frac{m}{\mathfrak{u}} \left[ \ddot{\mathfrak{y}}\_d + c\_{21} \left( \dot{\mathfrak{y}}\_d - \dot{\mathfrak{y}} \right) + c\_{22} (\mathfrak{y}\_d - \mathfrak{y}) + c\_{23} \int\_0^t \mathbf{r}\_2 dt + \beta\_y \operatorname{sgn}(\mathbf{r}\_2) \right] \,, \beta\_y > 0 \tag{43}$$

where, 11 1 21 0 0 0 *c C <sup>c</sup>* , 12 2 22 0 0 0 *c C <sup>c</sup>* , 13 3 23 0 0 0 *c C c* and 0 <sup>0</sup> <sup>0</sup> *x y* .

Combining the equations (36) to (43)

$$\ddot{e}\_2 + \mathbf{C}\_1 \dot{e}\_2 + \mathbf{C}\_2 e\_2 + \mathbf{C}\_3 \int\_0^t r\_2 dt + \beta \operatorname{sgn}(r\_2) = 0\tag{44}$$

Therefore

$$\dot{\mathbf{r}}\_{2} = -\mathbf{C}\_{1}\dot{\mathbf{e}}\_{2} - \mathbf{C}\_{2}\mathbf{e}\_{2} - \mathbf{C}\_{3}\int\_{0}^{t} \mathbf{r}\_{2}dt - \beta \operatorname{sgn}(\mathbf{r}\_{2}) + \Lambda\_{2}\dot{\mathbf{e}}\_{2} \tag{45}$$

Let

$$\mathbf{C}\_1 = \Lambda\_2 + \mathbf{S}\_0 \tag{46}$$

$$\mathbf{C\_2} = \Lambda\_2 \mathbf{S\_0} \tag{47}$$

Therefore

$$\dot{r}\_2 = -\left(\Lambda\_2 + S\_0\right)\dot{e}\_2 - \Lambda\_2 S\_0 e\_2 - \mathbb{C}\_3 \int\_0^t r\_2 dt - \beta \operatorname{sgn}(r\_2) + \Lambda\_2 \dot{e}\_2 \tag{48}$$

$$\dot{r}\_2 = -\mathbf{S}\_0 r\_2 - \mathbf{C}\_3 \int\_0^t r\_2 dt - \beta \operatorname{sgn}(r\_2) \tag{49}$$

## **5. Controller structure and stability analysis**

The overall control system has two loops and is depicted in Fig. 2. The following theorem details the performance of the controller.

**Definition 5.1:** *The equilibrium point e x is said to be uniformly ultimately bounded (UUB) if there exist a compact set <sup>n</sup> S R so that for all x S* <sup>0</sup> *there exist a bound B and a time* <sup>0</sup> *TBx* (, ) *such that* <sup>0</sup> () () *<sup>e</sup> xt x t B t t T* .

**Theorem 5.1:** *Given the system as described in (15) and (16) with a control law shown in Fig. 2. and given by (20), (27), (42) , (43) . Then, the tracking errors* 1*r and* 2*r and thereby* <sup>1</sup> *e and* <sup>2</sup> *e are UUB if (53) and (54) are satisfied and can be made arbitrarily small with a suitable choice of gain parameters. According to the definition given by (23) of* 1*r and (39) of* 2*r , this guarantees that* <sup>1</sup> *e and* <sup>2</sup> *e are UUB since* 

$$\begin{aligned} \left\| \mathcal{e}\_1 \right\| \leq \frac{\left\| r\_1 \right\|}{\sigma\_{\min} \left( \Lambda\_1 \right)} \leq \frac{b\_{\ast\_1}}{\sigma\_{\min} \left( \Lambda\_1 \right)} & \qquad b\_{\ast\_1} > 0\\ \left\| \mathcal{e}\_2 \right\| \leq \frac{\left\| r\_2 \right\|}{\sigma\_{\min} \left( \Lambda\_2 \right)} \leq \frac{b\_{\ast\_2}}{\sigma\_{\min} \left( \Lambda\_2 \right)} & \qquad b\_{\ast\_2} > 0 \end{aligned} \tag{50}$$

*where* min *i is the minimum singular value of* , 1,2 *<sup>i</sup> i* .

**Proof:** Consider the Lyapunov function

$$L = \frac{1}{2}r\_1^T P\_1 r\_1 + \frac{1}{2}r\_2^T Q\_1 r\_2 + \frac{1}{2} \left[ \stackrel{\iota}{r}\_1 r\_1^T dt \right] P\_2 \left[ \stackrel{\iota}{\int}\_0 r\_1 dt \right] + \frac{1}{2} \left[ \stackrel{\iota}{r}\_2 r\_2 dt \right] Q\_2 \left[ \stackrel{\iota}{\int}\_0 r\_2 dt \right] \tag{51}$$

with symmetric matrices *PPQQ* 12 1 2 ,, , 0

Therefore, by differentiating *L* we will get the following

$$\begin{aligned} \dot{L} &= -r\_1^T P\_1 R r\_1 - r\_1^T P\_1 K\_3 \int\_0^t r\_1 dt + r\_1 P\_2 \int\_0^t r\_1 dt - r\_2^T Q\_1 S\_0 r\_2 - \\\ r\_2^T Q\_1 C\_3 \int\_0^t r\_2 dt + r\_2^T Q\_2 \int\_0^t r\_2 dt - r\_2^T Q\_1 \beta \operatorname{sgn}(r\_2) \end{aligned} \tag{52}$$

Define,

12 Challenges and Paradigms in Applied Robust Control

where, 2 is a diagonal positive definite design parameter matrix with similar characteristic

 <sup>2</sup> 2 2 2 min 2 , ( ) *r*

Therefore according to (40), designing a controller to keep 2*r* small will guarantee that

*re e*

*d dd d x x <sup>m</sup> x c x x c x x c r dt r*

*ddd d y y <sup>m</sup> y c y y c y y c r dt r*

2

*C*

0

*<sup>c</sup>* ,

 <sup>21</sup> <sup>22</sup> 23 2 <sup>2</sup>

> 0 *c*

 2 02 3 2 2 0 sgn( ) *t*

2 2 0 2 2 02 3 2 2 22

0

*t*

*t*

 2 12 22 3 2 2 22 0

*t*

 2 12 22 3 2 <sup>2</sup> 0

 <sup>11</sup> <sup>12</sup> 13 2 <sup>2</sup>

*e er* (40)

2 2 22 (41)

 

*y*

0 <sup>0</sup> <sup>0</sup>

*x*

(42)

(43)

.

 

 

() sgn( ) , 0

3

sgn( ) 0

*e C e C e C r dt r* (44)

*C*

0

and

*C S* 1 20 (46)

*C S* 2 20 (47)

() sgn( ) , 0

0

0

 13

sgn( )

*r S e S e C r dt r e* (48)

sgn( )

*r S r C r dt r* (49)

*r C e C e C r dt r e* (45)

23 0

*c*

*t*

*t*

<sup>2</sup> *e* and <sup>2</sup> *e* are small. Differentiating 2*r* we get

Let the choice of the control law is as follows

*u*

*u*

1

*C <sup>c</sup>* ,

Combining the equations (36) to (43)

0

 12

0 *c*

22 0

 11

21 0

where,

Therefore

Therefore

Let

0 *c*

of <sup>1</sup> . Also

$$P\_2 = P\_1 K\_3 \tag{53}$$

$$Q\_2 = Q\_1 C\_3 \tag{54}$$

then integration term vanishes.

$$\dot{L} = -r\_1^T P\_1 R r\_1 - r\_2^T Q\_1 S\_0 r\_2 - r\_2^T Q\_1 \beta \operatorname{sgn}(r\_2) \tag{55}$$

The Equation (55) can be written as

$$\dot{L} \le -\sigma\_{\text{max}}(P\_1 R) r\_1^2 - \sigma\_{\text{max}}(Q\_1 S\_0) r\_2^2 - \sigma\_{\text{max}}(Q\_1 \mathcal{J}) \left| r\_2 \right| \le 0 \tag{56}$$

Sliding Mode Approach to Control Quadrotor Using Dynamic Inversion 15

As outlined in Refs (Hogan 1984; Flash and Hogan 1985), a reference trajectory is derived that minimizes the jerk (rate of change of acceleration) over the time horizon. The trajectory ensures that the velocities and accelerations at the end point are zero while meeting the

<sup>234</sup>

2 3

As we indicated before that initial and final velocities and accelerations are zero; so from

 

<sup>0</sup>

Similarly, the reference trajectories for the *y* and z directions are gives by Eq. (65) and Eq.

<sup>0</sup>

<sup>0</sup>

The beauty of this method lying in the fact that more demanding changes in position can be accommodated by varying the final time. That is acceleration/torque ratio can be controlled

Let us assume at *t* 0, <sup>0</sup> 0 *<sup>d</sup> x* and at *t* 10 sec, 10 *<sup>f</sup> <sup>d</sup> x* . Therefore *dx* 0.01 and the

trajectory is given by Eq. (67) and shown in Fig. 3 for various desired final positions.

*a tt d*

*d t ta*

*x ff*

1 0 34 5 0 6 12 20

1

*a tt a tt*

2

2

*t ta t ta*

*f f f f* 3

*x x x*

4 2 5

<sup>1</sup> <sup>2</sup>

2

*f f x f f f f*

34 5 0 6 12 20 0

2

345

345

345

<sup>345</sup> ( ) *xxx d d xt x at at at* (64)

<sup>345</sup> ( ) *yyy d d y t y at at at* (65)

<sup>345</sup> ( ) *zzz d d z t z at at at* (66)

34 5 ( ) 0.1 0.015 0.0006 *<sup>d</sup> xt t t t* (67)

 50 0 05 0 0 0 15

*J* ; *g* 9.81 .

12 3 4 5 () 2 3 4 5 *xx x x x <sup>d</sup> xt a at at at at* (60)

23 4 5 ( ) 2 6 12 20 *xx x x <sup>d</sup> xt a at at at* (61)

(62)

(63)

100 010 001 *M* ;

position tracking objective. The following summarizes this approach:

<sup>3</sup> / *<sup>f</sup> x dd <sup>f</sup> dxx t* . Now, solving for coefficients

3

*x x x*

4

5

Thus the desired trajectory for the *x* direction is given by

smoothly as per requirement. For example,

1

Eqs. (60) and (61) we can conclude the following:

**6.2 Reference trajectory generation** 

Differentiating again,

Where, <sup>0</sup>

(66) respectively.

#### where, max( ) denotes the maximum singular value. ▀

#### Fig. 2. Control configuration

**Comment 5.1:** *Equations* (31)-(32) *can also be rewritten* as

$$\ddot{\mathbf{x}} = -\frac{\boldsymbol{\mu}}{m}\boldsymbol{\theta}\_d - \frac{\boldsymbol{\mu}}{m}(-\tilde{\boldsymbol{\theta}}) \tag{57}$$

$$
\vec{y} = \frac{\mu}{m}\varphi\_d - \frac{\mu}{m}\tilde{\varphi} \tag{58}
$$

*where <sup>d</sup>* sin *and <sup>d</sup>* cos sin *. According to* (A. Das, K. Subbarao, and F. Lewis 2009) *there exist a robustifying term V which would modify the r di v as* 

$$\boldsymbol{\upsilon}\_{\boldsymbol{d}} = \begin{bmatrix} \boldsymbol{\upsilon}\_{\boldsymbol{z}} \\ \boldsymbol{\upsilon}\_{\boldsymbol{\rho}} \\ \boldsymbol{\upsilon}\_{\boldsymbol{\rho}} \\ \boldsymbol{\upsilon}\_{\boldsymbol{\rho}} \\ \boldsymbol{\upsilon}\_{\boldsymbol{\nu}} \end{bmatrix} = \begin{bmatrix} \ddot{\boldsymbol{z}}\_{d} - \boldsymbol{K}\_{1\_{\boldsymbol{z}}} \left( \dot{\boldsymbol{z}} - \dot{\boldsymbol{z}}\_{d} \right) - \boldsymbol{K}\_{2\_{\boldsymbol{z}}} \left( \boldsymbol{z} - \boldsymbol{z}\_{d} \right) \\ \ddot{\boldsymbol{\rho}}\_{d} - \boldsymbol{K}\_{1\_{\boldsymbol{\rho}}} \left( \dot{\boldsymbol{\rho}} - \dot{\boldsymbol{\rho}}\_{d} \right) - \boldsymbol{K}\_{2\_{\boldsymbol{\rho}}} \left( \boldsymbol{\rho} - \boldsymbol{\rho}\_{d} \right) \\ \ddot{\boldsymbol{\theta}}\_{d} - \boldsymbol{K}\_{1\_{\boldsymbol{\rho}}} \left( \dot{\boldsymbol{\rho}} - \dot{\boldsymbol{\theta}}\_{d} \right) - \boldsymbol{K}\_{2\_{\boldsymbol{\rho}}} \left( \boldsymbol{\theta} - \boldsymbol{\theta}\_{d} \right) \\ \ddot{\boldsymbol{\nu}}\_{d} - \boldsymbol{K}\_{1\_{\boldsymbol{\nu}}} \left( \dot{\boldsymbol{\nu}} - \dot{\boldsymbol{\nu}}\_{d} \right) - \boldsymbol{K}\_{2\_{\boldsymbol{\nu}}} \left( \boldsymbol{\nu} - \boldsymbol{\nu}\_{d} \right) \end{bmatrix} + \boldsymbol{V}\_{r} \tag{59}$$

*and thereby one can easily show that L* 0 *by suitbale choice of Vr . For this book chapter we considered the Eq. (36),(37), whcih in fact a simpler version of (31),(32). But we belive, for designing autopilot for quadrotor, the proposed mehtod discussed in this chapter can be used without loss of any genreality*.

## **6. Simulation results**

#### **6.1 Rotorcraft parameters**

Simulation for a typical quadrotor is performed using the following parameters (SI unit):

$$M\_1 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}; \qquad J = \begin{bmatrix} 5 & 0 & 0 \\ 0 & 5 & 0 \\ 0 & 0 & 15 \end{bmatrix}; \qquad g = 9.81\dots$$

#### **6.2 Reference trajectory generation**

As outlined in Refs (Hogan 1984; Flash and Hogan 1985), a reference trajectory is derived that minimizes the jerk (rate of change of acceleration) over the time horizon. The trajectory ensures that the velocities and accelerations at the end point are zero while meeting the position tracking objective. The following summarizes this approach:

$$\dot{x}\_d(t) = a\_{1\_x} + 2a\_{2\_x}t + 3a\_{3\_x}t^2 + 4a\_{4\_x}t^3 + 5a\_{5\_x}t^4 \tag{60}$$

Differentiating again,

14 Challenges and Paradigms in Applied Robust Control

 

 

*v K K v V v K K v K K*

 

 

*z z dd d z*

*v z Kzz K zz*

1 2 1 2 1 2 1 2

*dd d di r dd d dd d*

*considered the Eq. (36),(37), whcih in fact a simpler version of (31),(32). But we belive, for designing autopilot for quadrotor, the proposed mehtod discussed in this chapter can be used without loss of any* 

Simulation for a typical quadrotor is performed using the following parameters (SI unit):

 

 

*x*

 

2009) *there exist a robustifying term V which would modify the r di v as* 

*y*

 ( ) *<sup>d</sup> u u*

*m m*

*m m*

 

 *<sup>d</sup> u u*

*<sup>d</sup>* cos sin *. According to* (A. Das, K. Subbarao, and F. Lewis

 

()() ( )( ) ()() ( )( )

 

 

 

*L* 0 *by suitbale choice of Vr . For this book chapter we* 

 

> 

(57)

(58)

(59)

max( ) denotes the maximum singular value. ▀

where,

Fig. 2. Control configuration

 *<sup>d</sup>* sin *and* 

*and thereby one can easily show that* 

*where* 

*genreality*.

**6. Simulation results 6.1 Rotorcraft parameters** 

**Comment 5.1:** *Equations* (31)-(32) *can also be rewritten* as

$$\ddot{\mathbf{x}}\_d(t) = 2a\_{\mathbf{2}\_x} + 6a\_{\mathbf{3}\_z}t + 12a\_{\mathbf{4}\_x}t^2 + 20a\_{\mathbf{5}\_z}t^3 \tag{61}$$

As we indicated before that initial and final velocities and accelerations are zero; so from Eqs. (60) and (61) we can conclude the following:

$$
\begin{bmatrix} d\_x \\ 0 \\ 0 \end{bmatrix} = \begin{vmatrix} \mathbf{1} & t\_f & t\_f^2 \\ \mathbf{3} & \mathbf{4}t\_f & \mathbf{5}t\_f^2 \\ \mathbf{6} & \mathbf{12}t\_f & \mathbf{20}t\_f^2 \end{vmatrix} \begin{bmatrix} a\_{3\_x} \\ a\_{4\_x} \\ a\_{5\_x} \end{bmatrix} \tag{62}
$$

Where, <sup>0</sup> <sup>3</sup> / *<sup>f</sup> x dd <sup>f</sup> dxx t* . Now, solving for coefficients

$$
\begin{bmatrix} a\_{\mathbf{3\_{\times}}} \\ a\_{\mathbf{4\_{\times}}} \\ a\_{\mathbf{5\_{\times}}} \end{bmatrix} = \begin{bmatrix} \mathbf{1} & t\_{f} & t\_{f}^{2} \\ \mathbf{3} & \mathbf{4}t\_{f} & \mathbf{5}t\_{f}^{2} \\ \mathbf{6} & \mathbf{12}t\_{f} & \mathbf{20}t\_{f}^{2} \end{bmatrix}^{-1} \begin{bmatrix} d\_{\mathbf{x}} \\ \mathbf{0} \\ \mathbf{0} \end{bmatrix} \tag{63}
$$

Thus the desired trajectory for the *x* direction is given by

$$\propto \mathbf{x}\_d(t) = \mathbf{x}\_{d\_0} + a\_{\mathfrak{z}\_x} t^3 + a\_{\mathfrak{z}\_x} t^4 + a\_{\mathfrak{z}\_x} t^5 \tag{64}$$

Similarly, the reference trajectories for the *y* and z directions are gives by Eq. (65) and Eq. (66) respectively.

$$\mathbf{y}\_d(\mathbf{t}) = \mathbf{y}\_{d\_0} + a\_{\mathfrak{d}\_y} \mathbf{t}^\mathfrak{t} + a\_{\mathfrak{d}\_y} \mathbf{t}^\mathfrak{t} + a\_{\mathfrak{d}\_y} \mathbf{t}^\mathfrak{t} \tag{65}$$

$$z\_d(t) = z\_{d\_0} + a\_{3\_z}t^3 + a\_{4\_z}t^4 + a\_{5\_z}t^5 \tag{66}$$

The beauty of this method lying in the fact that more demanding changes in position can be accommodated by varying the final time. That is acceleration/torque ratio can be controlled smoothly as per requirement. For example,

Let us assume at *t* 0, <sup>0</sup> 0 *<sup>d</sup> x* and at *t* 10 sec, 10 *<sup>f</sup> <sup>d</sup> x* . Therefore *dx* 0.01 and the trajectory is given by Eq. (67) and shown in Fig. 3 for various desired final positions.

$$\mathbf{x}\_d(t) = 0.1t^5 - 0.015t^4 + 0.0006t^5 \tag{67}$$

0 5 10 15 20

x d x y d y z d z

xd − x yd − y z d − z

> φd φ θd θ

φd − φ θd − θ

Time in Sec

0 5 10 15 20

Time in Sec

0 5 10 15 20

Time in Sec

0 5 10 15 20

Time in Sec

Fig. 4. Three position commands simultaneously

−10

−4

−0.04

−4

−2

0

Angular Position errors in rad

2

4 x 10−4

−0.02

Angular Positions in rad

0

0.02

0.04

−2

0

Position erros in meter

2

4 x 10−6

0

10

Positions in meter

20

Fig. 5. Resultant angular positions and errors

Fig. 3. Example trajectory simulation for different final positions

## **6.3 Case 1: From initial position at** 0,5,10 **to final position at** 20, 5,0

Figure 4 describes the controlled motion of the quadrotor from its initial position 0,5,10 to final position 20, 5,0 for a given time (20 seconds). The actual trajectories *x t*( ), ( ), ( ) *y t zt* match exactly their desired values ( ), ( ), ( ) *d dd x t y tzt* respectively nearly exactly. The errors along the three axes are also shown in the same figure. It can be seen that the tracking is almost perfect as well as the tracking errors are significantly small. Figure 5 describes the attitude of the quadrotor , along with their demands *d d* , and attitude errors in radian. Again the angles match their command values nearly perfectly. Figure 6 describes the control input requirement which is very much realizable. Note that as described before the control requirement for yaw angle is 0 and it is seen from Fig. 6.

#### **6.4 Case 2: From initial position at** 0,5,10 **to final position at** 20,5,10

Figures 7-8 illustrates the decoupling phenomenon of the control law. Fig. 7 shows that *x t*( ) follows the command ( ) *<sup>d</sup> x t* nearly perfectly unlike *y*( )*t* and *z t*( ) are held their initial values. Fig. 8 shows that the change in *x* does not make any influence on . The corresponding control inputs are also shown in Fig. 9 and due to the full decoupling effect it is seen that is almost zero.

The similar type of simulations are performed for *y* and *z* directional motions separately and similar plots are obtained showing excellent tracking.

16 Challenges and Paradigms in Applied Robust Control

Example Reference Trajectory

Fig. 3. Example trajectory simulation for different final positions

,

attitude of the quadrotor

 

is seen that

control requirement for yaw angle is

0

5

10

15

20

xd (t) in meter

25

30

35

40

is almost zero.

and similar plots are obtained showing excellent tracking.

**6.3 Case 1: From initial position at** 0,5,10 **to final position at** 20, 5,0

Figure 4 describes the controlled motion of the quadrotor from its initial position 0,5,10 to final position 20, 5,0 for a given time (20 seconds). The actual trajectories *x t*( ), ( ), ( ) *y t zt* match exactly their desired values ( ), ( ), ( ) *d dd x t y tzt* respectively nearly exactly. The errors along the three axes are also shown in the same figure. It can be seen that the tracking is almost perfect as well as the tracking errors are significantly small. Figure 5 describes the

0 2 4 6 8 10

Time in Seconds

Again the angles match their command values nearly perfectly. Figure 6 describes the control input requirement which is very much realizable. Note that as described before the

Figures 7-8 illustrates the decoupling phenomenon of the control law. Fig. 7 shows that *x t*( ) follows the command ( ) *<sup>d</sup> x t* nearly perfectly unlike *y*( )*t* and *z t*( ) are held their initial

corresponding control inputs are also shown in Fig. 9 and due to the full decoupling effect it

The similar type of simulations are performed for *y* and *z* directional motions separately

values. Fig. 8 shows that the change in *x* does not make any influence on

*d d* ,

0 and it is seen from Fig. 6.

and attitude errors in radian.

. The

along with their demands

 

**6.4 Case 2: From initial position at** 0,5,10 **to final position at** 20,5,10

Fig. 4. Three position commands simultaneously

Fig. 5. Resultant angular positions and errors

0 5 10 15 20

φd φ θd θ

φd − φ θd − θ

taophi taotheta taosi

Time in Sec

0 5 10 15 20

Time in Sec

0 5 10 15 20

Time in Sec

0 5 10 15 20

Time in Sec

Fig. 8. Angular variations due to change in

−0.04

−4

9.81

−0.05

0

0.05

Control Torques In N−m

0.1

0.15

9.812

9.814

Control input U in Newton

9.816

9.818

−2

0

Angular Position errors in rad

2

4 x 10−4

−0.02

Angular Positions in rad

0

0.02

0.04

Fig. 9. Input commands for variation in (Case II)

Fig. 6. Input commands for Case I

Fig. 7. Plots of position and position tracking errors for command only

0 2 4 6 8 10 12 14 16 18 20

Time in Sec

taophi taotheta taosi

> x d x y d y z d z

xd − x y d − y z d − z

<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>10</sup> <sup>12</sup> <sup>14</sup> <sup>16</sup> <sup>18</sup> <sup>20</sup> −0.1

Time in Sec

0 5 10 15 20

Time in Sec

0 5 10 15 20

Time in Sec

Fig. 6. Input commands for Case I

0

−4

−2

0

Position erros in meter

2

4 x 10−6

5

10

Positions in meter

15

20

9.7 9.8 9.9 10 10.1

−0.05 0 0.05 0.1 0.15

Control Torques In N−m

Control input U in Newton

Fig. 7. Plots of position and position tracking errors for command only

Fig. 8. Angular variations due to change in

Fig. 9. Input commands for variation in (Case II)

0 5 10 15 20

φd φ θd θ

φd − φ θd − θ

taophi taotheta taosi

Time in Sec

0 5 10 15 20

Time in Sec

0 5 10 15 20

Time in Sec

0 5 10 15 20

Time in Sec

Fig. 11. Angular variations, errors and velocities (with input disturbances)

−0.04

−4

9.7 9.8 9.9 10 10.1 10.2

−0.4

−0.2

Control Torques In N−m

0

0.2

0.4

Control input U in Newton

−2

0

Angular Position errors in rad

2

4 x 10−4

−0.02

Angular Positions in rad

0

0.02

0.04

Fig. 12. Force and torque input variations (with input disturbances)

## 

The simulation is performed to verify its robustness properties against unmodeled input disturbances. For this case we simulate the dynamics with high frequency disturbance 0.1\* sin(5 ) (1% of maximum magnitude of force) for force channel and 0.01sin(5 ) (~15% of maximum angular acceleration) for torque channel.

## (0,5,10) (20, 5,0 − )

Fig. 1011 describes the motion of the quadrotor from its initial position (0,5,10) to final position (20, 5,0 − ) for a given time (20 seconds) with input disturbances. It can be seen from Fig 10 that the quadrotor can track the desired position effectively without any effect of high input disturbances. From Fig 10 and Fig 11, it is also seen that the position errors are bounded and small. Fig. 12 shows the bounded variation of control inputs in presence of disturbance. Similar tracking performance is obtained for other commanded motion.

Fig. 10. Position tracking – Simultaneous command in and + Input disturbances

The simulation is performed to verify its robustness properties against unmodeled input disturbances. For this case we simulate the dynamics with high frequency disturbance 0.1\* sin(5 ) (1% of maximum magnitude of force) for force channel and 0.01sin(5 ) (~15% of

Fig. 1011 describes the motion of the quadrotor from its initial position (0,5,10) to final position (20, 5,0 − ) for a given time (20 seconds) with input disturbances. It can be seen from Fig 10 that the quadrotor can track the desired position effectively without any effect of high input disturbances. From Fig 10 and Fig 11, it is also seen that the position errors are bounded and small. Fig. 12 shows the bounded variation of control inputs in presence of

(0,5,10) (20, 5,0 − )

disturbance. Similar tracking performance is obtained for other commanded motion.

Fig. 10. Position tracking – Simultaneous command in and + Input disturbances

0 5 10 15 20

x d x y d y zd z

xd − x y d − y z d − z

Time in Sec

0 5 10 15 20

Time in Sec

maximum angular acceleration) for torque channel.

−10

−2

−1

0

Position erros in meter

1

2 x 10−5

0

10

Positions in meter

20

Fig. 11. Angular variations, errors and velocities (with input disturbances)

Fig. 12. Force and torque input variations (with input disturbances)

Sliding Mode Approach to Control Quadrotor Using Dynamic Inversion 23

Das, Abhijit, Frank Lewis, and Kamesh Subbarao. 2009. Backstepping Approach for

Hogan, N. 1984. Adaptive Control of Mechanical Impedance by Coactivation of Antagonist

Hovakimyan, N., F. Nardi, A. J. Calise, and H. Lee. 2001. Adaptive Output Feedback Control

Kanellakopoulos, I., P. V. Kokotovic, and A. S. Morse. 1991. Systematic Design of Adaptive

Khalil, Hassan K. 2002. *Nonlinear Systems*. 3rd ed. Upper Saddle River, N.J: Prentice

Kim, B. S., and A. J. Calise. 1997. Nonlinear flight control using neural networks. *Journal of* 

Koo, T. J., and S. Sastry. 1998. Output tracking control design of a helicopter model based on

Lewis, F., S. Jagannathan, and A. Yesildirek. 1999. *Neural Network Control of Robot* 

Mistler, V., A. Benallegue, and N. K. M'Sirdi. 2001. Exact linearization and non- interacting

Mokhtari, A., A. Benallegue, and Y. Orlov. 2006. Exact Linearization and Sliding Mode

P. Castillo, R. Lozano, and A. Dzul. 2005. Stabilization of a Mini Rotorcraft Having Four

Prasad, J. V. R., and A. J. Calise. 1999. Adaptive nonlinear controller synthesis and

Rysdyk, R., and A. J. Calise. 2005. Robust Nonlinear Adaptive Flight Control for

T. Madani, and A. Benallegue. 2006. Backstepping control for a quadrotor helicopter. In .

Slotine, Jean-Jacques, and Weiping Li. 1991. *Applied Nonlinear Control*. Prentice Hall. Stevens, B. L., and F. L. Lewis. 2003. *Aircraft Simulation and Control*. Wiley and Sons.

*Manipulators and Nonlinear Systems*. London: Taylor and Francis.

of a Class of Nonlinear Systems Using Neural Networks. *International Journal of* 

Controllers for Feedback Linearizable Systems. *IEEE Transaction of Automatic* 

approximate linearization. In *Proceedings of the 37th Conference on Decision and* 

control of a 4 rotors helicopter via dynamic feedback. In *10th IEEE Int. Workshop on* 

Observer for a Quadrotor Unmanned Aerial Vehicle. *International Journal of Robotics* 

flight evaluation on an unmanned helicopter. In . Kohala Coast-Island of Hawaii,

Consistent Handling Qualities. *IEEE Transaction of Control System Technology* 13:

Muscles. *IEEE Transaction of Automatic Control* 29: 681-690.

*Robotic Systems* 56, no. 1-2 (4): 127-151. doi:10.1007/s10846-009-9331-0. Flash, T., and N. Hogan. 1985. The Coordination of Arm Movements: an Experimentally Confirmed Mathematical Model. *Journal of Neuro Science* 5: 1688-1703. Gavrilets, V., B. Mettler, and E. Feron. 2003. Dynamic Model for a Miniature Aerobatic

Helicopter. *MIT-LIDS report* LIDS-P-2580.

*Control* 74: 1161-1169.

*Control* 36: 1241-1253.

*Guidance Control Dynamics* 20: 26-33.

*Robot-Human Interactive Communication*. Paris.

Rotors. *IEEE Control System Magazine* 25: 45-55.

*Control*. Tampa, Florida: IEEE.

*and Automation* 21: 39-49.

Hall.

USA.

896-910.

Beijing, China.

Controlling a Quadrotor Using Lagrange Form Dynamics. *Journal of Intelligent and* 

## **7. Conclusion**

Sliding mode approach using input-output linearization to design nonlinear controller for a quadrotor dynamics is discussed in this Chapter. Using this approach, an intuitively structured controller was derived that has an outer sliding mode control loop and an inner feedback linearizing control loop. The dynamics of a quadrotor are a simplified form of helicopter dynamics that exhibits the basic problems including under-actuation, strong coupling, multi-input/multi-output. The derived controller is capable of deal with such problems simultaneously and satisfactorily. As the quadrotor model discuss in this Chapter is similar to a full scale unmanned helicopter model, the same control configuration derived for quadrotor is also applicable for a helicopter model. The simulation results are presented to demonstrate the validity of the control law discussed in the Chapter.

## **8. Acknowledgement**

This work was supported by the National Science Foundation ECS-0801330, the Army Research Office W91NF-05-1-0314 and the Air Force Office of Scientific Research FA9550-09- 1-0278.

## **9. References**


22 Challenges and Paradigms in Applied Robust Control

Sliding mode approach using input-output linearization to design nonlinear controller for a quadrotor dynamics is discussed in this Chapter. Using this approach, an intuitively structured controller was derived that has an outer sliding mode control loop and an inner feedback linearizing control loop. The dynamics of a quadrotor are a simplified form of helicopter dynamics that exhibits the basic problems including under-actuation, strong coupling, multi-input/multi-output. The derived controller is capable of deal with such problems simultaneously and satisfactorily. As the quadrotor model discuss in this Chapter is similar to a full scale unmanned helicopter model, the same control configuration derived for quadrotor is also applicable for a helicopter model. The simulation results are presented

This work was supported by the National Science Foundation ECS-0801330, the Army Research Office W91NF-05-1-0314 and the Air Force Office of Scientific Research FA9550-09-

Altug, Erdinc, James P. Ostrowski, and Robert Mahony. 2002. Control of a Quadrotor Helicopter Using Visual Feedback ID - 376. In . Washington DC, Virginia, June. B. Bijnens, Q. P. Chu, G. M. Voorsluijs, and J. A. Mulder. 2005. AIAA Guidance, Navigation,

Bijnens, B., Q. P. Chu, G. M. Voorsluijs, and J. A. Mulder. 2005. Adaptive Feedback

Bouabdallah, Samir, Andr´e Noth, and Roland Siegwart. 2004. International Conference on Intelligent Robots and Systems. In , 3:2451-2456. Sendal, Japan: IEEE. Calise, A. J., B. S. Kim, J. Leitner, and J. V. R. Prasad. 1994. Helicopter adaptive flight control

Campos, J., F. L. Lewis, and C. R. Selmic. 2000. Backlash Compensation in Discrete Time

Castillo, P., A. Dzul, and R. Lozano. 2004. Real-time Stabilization and Tracking of a Four-Rotor Mini Rotorcraft. *IEEE Transaction on Control System Technology* 12: 510-516. Castillo, P., R. Lozano, and A. Dzul. 2005. *Modelling and Control of Mini Flying Machines*.

Das, A., T. Garai, S. Mukhopadhyay, and A. Patra. 2004. Feedback Linearization for a

Das, A., K. Subbarao, and F. Lewis. 2009. Dynamic inversion with zero-dynamics

Nonlinear Systems Using Dynamic Inversion by Neural Networks. In . San

Nonlinear Skid-To-Turn Missile Model. *First India annual conference, Proceedings of* 

stabilisation for quadrotor control. *Control Theory & Applications, IET* 3, no. 3

and Control Conference and Exhibit. In . San Francisco, California.

Linearization Flight Control for a Helicopter UAVID - 199.

using neural networks. In . Lake Buena Vista, FL.

to demonstrate the validity of the control law discussed in the Chapter.

**7. Conclusion** 

**8. Acknowledgement** 

Francisco, CA.

Springer-Verlag.

(March): 303 - 314.

*the IEEE INDICON 2004*: 586-589.

1-0278.

**9. References** 


*Italy* 

**Advanced Control Techniques** 

Gianfranco Morani, Giovanni Cuciniello, Federico Corraro and Adolfo Sollazzo *Italian Aerospace Research Centre (CIRA)* 

**for the Transonic Phase of a Re-Entry Flight** 

New technological developments in space engineering and science require sophisticated control systems with both high performance and reliability. How to achieve these goals against various uncertainties and off-nominal scenarios has been a very challenging issue

Several efforts have been spent on control systems design in aerospace applications, in order to conceive new control approaches and techniques trying to overcome the inherent

In fact, the current industrial practice for designing flight control laws is based on Proportional Integral Derivative (PID) controllers with scheduled gains. With this approach, several controllers are designed at various points in the operative flight envelope, considering local time-invariant linear models based on small perturbations of a detailed nonlinear aircraft model. Although these techniques are commonly used in control systems design, they may have inherent limitations stemming from the poor capability of guaranteeing acceptable performances and stability for flight conditions different from the

This issue becomes very critical when designing flight control system for space re-entry vehicles. Indeed, space reentry applications have some distinctive features with respect to aeronautical ones, mainly related to the lack of stationary equilibrium conditions along the trajectories, to the wide flight envelope characterizing missions (from hypersonic flight regime to subsonic one) and to the high level of uncertainty in the knowledge of vehicle

Over the past years, several techniques have been proposed for advanced control system development, such as Linear Quadratic Optimal Control (LQOC), Eigenstructure Assignment, Robust control theory, Quantitative feedback theory (QFT), Adaptive Model Following, Feedback Linearization, Linear Parameter Varying (LPV) and probabilistic

Linear Quadratic Optimal Control (LQOC) allows finding an optimal control law for a given system based on a given criterion. The optimal control can be derived using Pontryagin's maximum principle and it has been commonly applied in designing Linear Quadratic

selected ones, especially when the scheduling parameters rapidly change.

approach. Hereinafter, a brief recall of the most used techniques will be given.

Regulator (LQR) of flight control system (see Xing, 2003; Vincent et al., 1994).

**1. Introduction** 

for control system design over the last years.

limitations of classical control designs.

aerodynamic parameters.

Wise, K. A., J. S. Brinker, A. J. Calise, D. F. Enns, M. R. Elgersma, and P. Voulgaris. 1999. Direct Adaptive Reconfigurable Flight Control for a Tailless Advanced Fighter Aircraft. *International Journal of Robust and Nonlinear Control* 9: 999-1012.
