Nonlinear Robust Tracking Control of a Quadrotor UAV on \mathsf{SE(3)}

# Nonlinear Robust Tracking Control of a Quadrotor UAV on SE(3)

Taeyoung Lee\authorrefmark1, Melvin Leok\authorrefmark2, and N. Harris McClamroch Taeyoung Lee, Mechanical and Aerospace Engineering, The George Washington University, Washington DC 20052 tylee@gwu.eduMelvin Leok, Mathematics, University of California at San Diego, La Jolla, CA 92093 mleok@math.ucsd.eduN. Harris McClamroch, Aerospace Engineering, University of Michigan, Ann Arbor, MI 48109 nhm@umich.eduThis research has been supported in part by NSF under grants CMMI-1029551.This research has been supported in part by NSF under grants DMS-0726263, DMS-1001521, DMS-1010687, and CMMI-1029445.
###### Abstract

This paper provides nonlinear tracking control systems for a quadrotor unmanned aerial vehicle (UAV) that are robust to bounded uncertainties. A mathematical model of a quadrotor UAV is defined on the special Euclidean group, and nonlinear output-tracking controllers are developed to follow (1) an attitude command, and (2) a position command for the vehicle center of mass. The controlled system has the desirable properties that the tracking errors are uniformly ultimately bounded, and the size of the ultimate bound can be arbitrarily reduced by control system parameters. Numerical examples illustrating complex maneuvers are provided.

## I Introduction

A quadrotor unmanned aerial vehicle (UAV) consists of two pairs of counter-rotating rotors and propellers. It has been envisaged for various applications such as surveillance or mobile sensor networks as well as for educational purposes, and several control systems have been studied.

Linear control systems have been widely used to enhance the stability properties of an equilibrium of a quadrotor UAV [1, 2, 3]. In [4], the quadrotor dynamics is modeled as a collection of simplified hybrid dynamic modes, and reachability sets are analyzed to guarantees the safety and performance for larger area of operating conditions.

Several nonlinear controllers have been developed as well. Backstepping and sliding mode techniques are applied in [5, 6], and a nonlinear controller is studied in [7]. An adaptive neural network based control system is developed in [8]. Since all of these controllers are based on Euler angles, they exhibit singularities when representing complex rotational maneuvers of a quadrotor UAV, thereby significantly restricting their ability to achieve complex flight maneuvers.

An attitude control system based on quaternions is applied to a quadrotor UAV [9]. Quaternions do not have singularities, but they have ambiguities in representing an attitude, as the three-sphere double-covers . As a result, in a quaternion-based attitude control system, convergence to a single attitude implies convergence to either of the two disconnected, antipodal points on  [10]. Therefore, depending on the particular choice of control inputs, a quaternion-based control system may become discontinuous when applied to actual attitude dynamics [11], and it may also exhibit unwinding behavior, where the controller rotates a rigid body through unnecessarily large angles [12, 13].

Attitude control systems also have been developed directly on the special orthogonal group, to avoid the singularities associated with Euler-angles and the ambiguity of quaternions [14, 15, 16, 17]. By following this geometric approach, the dynamics of a quadrotor UAV is globally expressed on the special Euclidean group, , and nonlinear control systems are developed to track outputs of several flight modes, namely an attitude controlled flight mode, a position controlled flight mode, and a velocity controlled flight mode [18]. Several aggressive maneuvers of a quadrotor UAV are also demonstrated based on a hybrid control architecture. This is particularly desirable since complicated reachability set analysis is not required to guarantee a safe switching between different flight modes, as the region of attraction for each flight mode covers the configuration space almost globally.

In this paper, we extend the results of [18] to construct nonlinear robust tracking control systems on for a quadrotor UAV. We assume that there exist unstructured, bounded uncertainties, with pre-determined bounds, on the translational dynamics and the rotation dynamics of a quadrotor UAV. Output tracking control systems are developed to follow an attitude command or a position command for the vehicle center of mass. We show that the tracking errors are uniformly ultimately bounded, and the size of the ultimate bound can be arbitrarily reduced. The robustness of the proposed tracking control systems are critical in generating complex maneuvers, as the impact of the several aerodynamic effects resulting from the variation in air speed is significant even at moderate velocities [2].

The paper is organized as follows. We develop a globally defined model for the translational and rotational dynamics of a quadrotor UAV in Section II. A hybrid control architecture is introduced and a robust attitude tracking control system is developed in Section III. Section IV present results for a robust position tracking, followed by numerical examples in Section V.

Consider a quadrotor UAV model illustrated in Figure 1. This is a system of four identical rotors and propellers located at the vertices of a square, which generate a thrust and torque normal to the plane of this square. We choose an inertial reference frame and a body-fixed frame . The origin of the body-fixed frame is located at the center of mass of this vehicle. The first and the second axes of the body-fixed frame, , lie in the plane defined by the centers of the four rotors, as illustrated in Figure 1. The third body-fixed axis is normal to this plane. Each of the inertial reference frame and the body-fixed reference frame consist of a triad of orthogonal vectors defined according to the right hand rule. Define

m∈R the total mass the inertia matrix with respect to the body-fixed frame the rotation matrix from the body-fixed frame to the inertial frame the angular velocity in the body-fixed frame the position vector of the center of mass in the inertial frame the velocity vector of the center of mass in the inertial frame the distance from the center of mass to the center of each rotor in the →b1,→b2 plane the thrust generated by the i-th propeller along the −→b3 axis the torque generated by the i-th propeller about the →b3 axis the total thrust magnitude, i.e., f=∑4i=1fi the total moment vector in the body-fixed frame

The configuration of this quadrotor UAV is defined by the location of the center of mass and the attitude with respect to the inertial frame. Therefore, the configuration manifold is the special Euclidean group , which is the semidirect product of and the special orthogonal group .

The following conventions are assumed for the rotors and propellers, and the thrust and moment that they exert on the quadrotor UAV. We assume that the thrust of each propeller is directly controlled, and the direction of the thrust of each propeller is normal to the quadrotor plane. The first and third propellers are assumed to generate a thrust along the direction of when rotating clockwise; the second and fourth propellers are assumed to generate a thrust along the same direction of when rotating counterclockwise. Thus, the thrust magnitude is , and it is positive when the total thrust vector acts along , and it is negative when the total thrust vector acts along . By the definition of the rotation matrix , the total thrust vector is given by in the inertial frame. We also assume that the torque generated by each propeller is directly proportional to its thrust. Since it is assumed that the first and the third propellers rotate clockwise and the second and the fourth propellers rotate counterclockwise to generate a positive thrust along the direction of , the torque generated by the -th propeller about can be written as for a fixed constant . All of these assumptions are common [3, 9].

Under these assumptions, the moment vector in the body-fixed frame is given by

 ⎡⎢ ⎢ ⎢⎣fM1M2M3⎤⎥ ⎥ ⎥⎦=⎡⎢ ⎢ ⎢ ⎢⎣11110−d0dd0−d0−cτfcτf−cτfcτf⎤⎥ ⎥ ⎥ ⎥⎦⎡⎢ ⎢ ⎢ ⎢⎣f1f2f3f4⎤⎥ ⎥ ⎥ ⎥⎦. (1)

The determinant of the above matrix is , so it is invertible when and . Therefore, for given thrust magnitude and given moment vector , the thrust of each propeller can be obtained from (1). Using this equation, the thrust magnitude and the moment vector are viewed as control inputs in this paper.

The equations of motion of the quadrotor UAV can be written as

 ˙x=v, (2) m˙v=mge3−fRe3+Δx, (3) ˙R=R^Ω, (4) J˙Ω+Ω×JΩ=M+ΔR, (5)

where the hat map is defined by the condition that for all (see Appendix A-A). The inverse of the hat map is denoted by the vee map, . Unstructured uncertainties in the translational dynamics and the rotational dynamics of a quadrotor UAV are denoted by and , respectively. We assume that uncertainties are bounded:

 ∥Δx∥≤δx,∥ΔR∥≤δR (6)

for known, positive constants , .

Throughout this paper, and denote the minimum eignevalue and the maximum eigenvalue of a matrix, respectively.

## Iii Attitude Controlled Flight Mode

### Iii-a Flight Modes

Since the quadrotor UAV has four inputs, it is possible to achieve asymptotic output tracking for at most four quadrotor UAV outputs. The quadrotor UAV has three translational and three rotational degrees of freedom; it is not possible to achieve asymptotic output tracking of both attitude and position of the quadrotor UAV. This motivates us to introduce several flight modes, namely (1) an attitude controlled flight mode, and (2) a position controlled flight mode.

A complex flight maneuver can be defined by specifying a concatenation of flight modes together with conditions for switching between them; for each flight mode one also specifies the desired or commanded outputs as functions of time. Unlike a hybrid flight control system that requires reachability analyses [4], the proposed control system is robust to switching conditions since each flight mode has almost global stability properties, and it is straightforward to design a complex maneuver of a quadrotor UAV.

In this section, an attitude controlled flight mode is considered, where the outputs are the attitude of the quadrotor UAV and the controller for this flight mode achieves asymptotic attitude tracking.

### Iii-B Attitude Tracking Errors

Suppose that an arbitrary smooth attitude command is given. The corresponding angular velocity command is obtained by the attitude kinematics equation, .

We first define errors associated with the attitude dynamics of the quadrotor UAV. The attitude error function studied in [14, 19, 20], and several properties are summarized as follows.

###### Proposition 1

For a given tracking command , and the current attitude and angular velocity , we define an attitude error function , an attitude error vector , and an angular velocity error vector as follows:

 Ψ(R,Rd)=12tr[I−RTdR], (7) eR=12(RTdR−RTRd)∨, (8) eΩ=Ω−RTRdΩd, (9)

Then, the following statements hold:

• is locally positive-definite about .

• the left-trivialized derivative of is given by

 T∗ILR(DRΨ(R,Rd))=eR. (10)
• the critical points of , where , are .

• a lower bound of is given as follows:

 12∥eR(R,Rd)∥2≤Ψ(R,Rd), (11)
• Let be a positive constant that is strictly less than . If , then an upper bound of is given by

 Ψ(R,Rd)≤12−ψ∥eR(R,Rd)∥2. (12)
{proof}

See [20].

### Iii-C Attitude Tracking Controller

We now introduce a nonlinear controller for the attitude controlled flight mode, described by an expression for the moment vector:

 M =−kReR−kΩeΩ+Ω×JΩ −J(^ΩRTRdΩd−RTRd˙Ωd)+μR, (13) μR =−δ2ReAδR∥eA∥+ϵR, (14) eA =eΩ+c2J−1eR, (15)

where are positive constants.

In this attitude controlled mode, it is possible to ignore the translational motion of the quadrotor UAV; consequently the reduced model for the attitude dynamics are given by equations (4), (5), using the controller expression (13)-(15). We now state the result that the tracking errors are uniformly ultimately bounded.

###### Proposition 2

(Robustness of Attitude Controlled Flight Mode) Suppose that the initial attitude error satisfies

 Ψ(R(0),Rd(0))<ψ2<2 (16)

for a constant . Consider the control moment defined in (13)-(15). For positive constants , the constants are chosen such that

 c2

where the matrices are given by

 M21=12[kR−c2−c2λm(J)],M22=12[2kR2−ψ2c2c2λM(J)], W2=⎡⎢⎣c2kRλM(J)−c2kΩ2λm(J)−c2kΩ2λm(J)kΩ−c2⎤⎥⎦.

Then, the attitude tracking errors are uniformly ultimately bounded, and the ultimate bound is given by

 {∥eR∥2+∥eΩ∥2≤λM(M22)λm(M21)λm(W2)ϵR}. (19)
{proof}

See Appendix A-B.

From (16), the initial attitude error should be less than , in terms of the rotation angle about the eigenaxis between and . We can further show that the attitude tracking errors exponentially converges to (19), where the size of the ultimate bound can be reduced by the controller parameter . It is also possible to achieve exponential attractiveness if the constant in (14) is replaced by for . All of these results can be applied to a nonlinear robust control problem for the attitude dynamics of any rigid body.

Asymptotic tracking of the quadrotor attitude does not require specification of the thrust magnitude. As an auxiliary problem, the thrust magnitude can be chosen in many different ways to achieve an additional translational motion objective. For example, it can be used to asymptotically track a quadrotor altitude command [18].

Since the translational motion of the quadrotor UAV can only be partially controlled; this flight mode is most suitable for short time periods where an attitude maneuver is to be completed.

## Iv Position Controlled Flight Mode

We now introduce a nonlinear controller for the position controlled flight mode. This flight mode requires analysis of the coupled translational and rotational equations of motion; hence, we make use of the notation and analysis in the prior section to describe the properties of the closed loop system in this flight mode.

### Iv-a Position Tracking Errors

An arbitrary smooth position tracking command is chosen. The position tracking errors for the position and the velocity are given by:

 ex =x−xd, (20) ev =v−˙xd. (21)

Following the prior definition of the attitude error and the angular velocity error, we define

 eR=12(RTcR−RTRc)∨,eΩ=Ω−RTRcΩc, (22)

and the computed attitude and computed angular velocity are given by

 Rc=[b1c;b3c×b1c;b3c],^Ωc=RTc˙Rc, (23)

where is defined by

 b3c=−−kxex−kvev−mge3+m¨xd+μx∥−kxex−kvev−mge3+m¨xd+μx∥, (24)

and is selected to be orthogonal to , thereby guaranteeing that . The constants are positive, and the control input term is defined later in (29). We assume that

 (25)

and the commanded acceleration is uniformly bounded such that

 ∥−mge3+m¨xd∥

for a given positive constant .

### Iv-B Position Tracking Controller

The nonlinear controller for the position controlled flight mode, described by control expressions for the thrust magnitude and the moment vector, are:

 f =(kxex+kvev+mge3−m¨xd−μx)⋅Re3, (27) M =−kReR−kΩeΩ+Ω×JΩ −J(^ΩRTRcΩc−RTRc˙Ωc+μR), (28) μx =−δτ+2xeB∥eB∥τδτ+1x∥eB∥τ+1+ϵτ+1x, (29) eB =ev+c1mex, (30) μR =−δ2ReAδR∥eA∥+ϵR, (31) eA =eΩ+c2J−1eR, (32)

where are positive constants, and .

The nonlinear controller given by equations (27), (28) can be given a backstepping interpretation. The computed attitude given in equation (23) is selected so that the thrust axis of the quadrotor UAV tracks the computed direction given by in (24), which is a direction of the thrust vector that achieves position tracking. The moment expression (28) causes the attitude of the quadrotor UAV to asymptotically track and the thrust magnitude expression (27) achieves asymptotic position tracking.

The closed loop system for this position controlled flight mode is illustrated in Figure 2. The corresponding closed loop control system is described by equations (2)-(5), using the controller expressions (27)-(32). We now state the result that the tracking errors are uniformly ultimately bounded.

###### Proposition 3

(Robustness of Position Controlled Flight Mode) Suppose that the initial conditions satisfy

 Ψ(R(0),Rc(0))<ψ1<1, (33) ∥ex(0)∥

for positive constants . Consider the control inputs defined in (27)-(32). For positive constants , we choose positive constants such that

 c1∥W12∥24λm(W1), (37) ϵx+ϵR

where , and the matrices , are given by

 M11=12[kx−c1−c1m],M12=12[kxc1c1m],
 W1 =⎡⎣c1kxm(1−α)−c1kv2m(1+α)−c1kv2m(1+α)kv(1−α)−c1⎤⎦, W12 =[c1m(B+δx)0B+δx+kxexmax0], W2 =⎡⎢⎣c2kRλM(J)−c2kΩ2λm(J)−c2kΩ2λm(J)kΩ−c2⎤⎥⎦, W =[λm(W1)−12∥W12∥2−12∥W12∥2λm(W2)].

Then, the tracking errors are uniformly ultimately bounded, and the ultimate bound is given by

 {∥ex∥2 +∥ev∥2+∥eR∥2+∥eΩ∥2< max{λM(M12),λM(M′22)}min{λm(M11),λm(M21)}λm(W)(ϵx+ϵR)}. (39)
{proof}

See Appendix A-C.

This proposition shows that the proposed control system is robust to bounded, and unstructured uncertainties in the dynamics of a quadrotor UAV. Similar to Proposition 2, the ultimate bound can be arbitrarily reduced by choosing smaller , and it is possible to obtain exponential attractiveness.

Proposition 3 requires that the initial attitude error is less than in (33). Suppose that this is not satisfied, i.e. . We can still apply Proposition 2, which states that the attitude error exponentially decreases until it enters the ultimate bound given by (19). If the constant is sufficiently small, we can guarantee that the attitude error function decreases to satisfy (33) in a finite time. Therefore, by combining the results of Proposition 2 and 3, we can show ultimate boundedness of the tracking errors when .

###### Proposition 4

(Robustness of Position Controlled Flight Mode with a Larger Initial Attitude Error) Suppose that the initial conditions satisfy

 1≤Ψ(R(0),Rc(0))<ψ2<2, (40) ∥ex(0)∥

for a constant . Consider the control inputs defined in (27)-(32), where the control parameters satisfy (35)-(LABEL:eqn:epsilon_bound) for a positive constant . If the constant is sufficiently small such that

 ϵR<λm(M21)λm(W2)λM(M22)ψ1(2−ψ1), (42)

then the tracking errors are uniformly ultimately bounded.

{proof}

See Appendix A-D.

### Iv-C Direction of the First Body-Fixed Axis

As described above, the construction of the orthogonal matrix involves having its third column specified by a normalized feedback function, and its first column is chosen to be orthogonal to the third column. The unit vector can be arbitrarily chosen in the plane normal to , which corresponds to a one-dimensional degree of choice. This reflects the fact that the quadrotor UAV has four control inputs that are used to track a three-dimensional position command.

By choosing properly, we constrain the asymptotic direction of the first body-fixed axis. Here, we propose to specify the projection of the first body-fixed axis onto the plane normal to . In particular, we choose a desired direction , that is not parallel to , and is selected as , where denotes the normalized projection onto the plane perpendicular to . In this case, the first body-fixed axis does not converge to , but it converges to the projection of , i.e. as , up to the ultimate bound described by (39). In other words, the first body-fixed axis converges to a small neighborhood of the intersection of the plane normal to and the plane spanned by and . This can be used to specify the heading direction of a quadrotor UAV in the horizontal plane (see Figure 3 and [18] for details).

## V Numerical Examples

Numerical results are presented to demonstrate the prior approach for performing complex flight maneuvers. The parameters are chosen to match a quadrotor UAV described in [21].

 J=[0.0820,0.0845,0.1377]kg−m2,m=4.34kg d=0.315m,cτf=8.004×10−3m.

The controller parameters are chosen as follows:

 kx=59.02,kv=24.30,kR=8.81,kΩ=1.54 c1=3.6,c2=0.6,ϵx=ϵR=0.04.

We consider a fixed disturbance for the translational dynamics, and an oscillatory disturbance for the rotational dynamics as follows:

 Δx =[2.50,1.25,2.00]TN, ΔR(t) =2√3[sin(8πt),sin(πt),cos(4πt)]TNm.

The corresponding bounds of the disturbances are given by and . We consider the following two cases.

#### Case I (elliptic helix)

The initial conditions are given by

The desired position command is an elliptic helix, given by

 xd(t)=[0.4t,0.4sin(πt),−0.6cos(πt)]Tm,

and the desired heading direction is fixed as . This corresponds to the position controlled flight mode described in Proposition 3, as the initial attitude error is .

Figure 4 shows simulation results, where the position tracking error converges to a small neighborhood of the zero tracking errors, and the terminal tracking error is . For comparison, we set the robust control input terms to zero, i.e. , and we repeat numerical simulations to obtain Figure 5. It is observed that the angular velocity tracking error is mostly driven by the disturbance , and the corresponding position tracking error is larger than . This illustrates the robustness of the proposed control system for a complex maneuver with larger disturbances.

#### Case II (hovering)

The initial conditions are given by

where . The desired position command is given by

 xd(t)=[0,0,0]Tm,

and the desired heading direction is fixed as . This describes a case that a quadrotor UAV should recover from an initially upside-down configuration.

The initial attitude error is given by , and therefore, it corresponds to Proposition 4 that is based on both of the attitude controlled flight mode and the position controlled flight mode.

Figure 6 illustrates excellent convergence properties of the proposed control system for a large initial attitude error, where the terminal position tracking error is . Figure Figure 7 shows relatively poor tracking performances with a slower convergence when there are no robust control input terms proposed in this paper.

## Appendix A Properties and Proofs

### A-a Properties of the Hat Map

The hat map is defined as

 ^x=⎡⎢⎣0−x3x2x30−x1−x2x10⎤⎥⎦ (43)

for . This identifies the Lie algebra with using the vector cross product in . The inverse of the hat map is referred to as the vee map, . Several properties of the hat map are summarized as follows.

 ^xy=x×y=−y×x=−^yx, (44) −12tr[^x^y]=xTy, (45) tr[^xA]=tr[A^x]=12tr[^x(A−AT)]=−xT(A−AT)∨, (46) ^xA+AT^x=({tr[A]I3×3−A}x)∧, (47) R^xRT=(Rx)∧, (48)

for any , , and .

### A-B Proof of Proposition 2

We first find the error dynamics for , and define a Lyapunov function. Then, we find conditions on control parameters to guarantee the boundedness of tracking errors.

#### Attitude Error Dynamics

The attitude error dynamics for are developed in [20], and they are summarized as follows:

 ddt(Ψ(R,Rd))=eR⋅eΩ, (49) ˙eR=E(R,Rd)eΩ, (50) ˙eΩ=J−1(−Ω×JΩ+u+ΔR)+^ΩRTRdΩd−RTRd˙Ωd, (51)

where the matrix is given by

 E(R,Rd) =12(tr[RTRd]I−RTRd). (52)

We can show that to obtain

 ∥˙eR∥≤∥eΩ∥. (53)

Substituting the control moment (13) into (51),

 J˙eΩ=−kReR−kΩeΩ+ΔR+μR. (54)

In short, the attitude error dynamics are given by equations (49), (50), (54), and they satisfy (53).

#### Lyapunov Candidate

Let a Lyapunov candidate be

 V2=12eΩ⋅JeΩ+kRΨ(R,Rd)+c2eR⋅eΩ. (55)

We analyzes the properties of along the solutions of the controlled system in the following domain :

 D2={(R,Ω)∈SO(3)×R3|Ψ(R,Rd)<ψ2}. (56)

From (11), (12), the attitude error function is bounded in as follows:

 12∥eR∥2≤Ψ(R,Rd)≤12−ψ2∥eR∥2, (57)

which implies that is positive-definite and decrescent. It follows that the Lyapunov function is bounded as

 zT2M21z2≤V2≤zT2M22z2, (58)

where , and the matrices are given by

 M21=12[kR−c2−c2λm(J)],M22=12[2kR2−ψ2c2c2λM(J)]. (59)

From equations (49), (50), (54), the time derivative of along the solution of the controlled system is given by

 ˙V2 =−kΩ∥eΩ∥2−c2kReR⋅J−1eR+c2E(R,Rd)eΩ⋅eΩ −c2kΩeR⋅J−1eΩ+(eΩ+c2J−1eR)⋅(ΔR+μR). (60)

Since , this is bounded by

 ˙V2 ≤−zT2W2z2+eA⋅(ΔR+μR), (61)

where and the matrix is given by

 W2=⎡⎢⎣c2kRλM(J)−c2kΩ2λm(J)−c2kΩ2λm(J)kΩ−c2⎤⎥⎦. (62)

Substituting (14), the last term of (61) is bounded by

 eA⋅(ΔR+μR) =δR∥eA∥−δ2R∥eA∥2δR∥eA∥+ϵR =ϵRδR∥eA∥δR∥eA∥+ϵR≤ϵR

to obtain

 ˙V2≤−zT2W2z2+ϵR, (63)

#### Boundedness

The condition (17) for the constant guarantees that the matrix in (63) and the matrices in (58) are positive-definite. Therefore, we obtain

 λm(M21)∥z2∥2≤V2≤λM(M22)∥z2∥2, (64) ˙V2≤−λm(W2)∥z2∥2+ϵR. (65)

This implies that when

 V2>{λM(M22)λm(W2)ϵR≜d1}.

Consider a sub-level set of the Lyapunov function , defined as for a positive constant . If satisfies the following inequality

 γ<{λm(M21)ψ2(2−ψ2)≜d2},</