You are on page 1of 46
Linear Flight Control Techniques 2 7 for Unmanned Aerial Vehicles Jonathan P. How, Emilio Frazzoli, and Girish Vinayak Chowdhary Contents 27.1 Introduction 530 27,2. Equations of Motion 531 27.2.1 Dynamics 532 27.2.2 Kinematics 533 27.2.3 Forces 538 27.2.4 Linearization of the Equations of Motion 339 27.2.5 Wind Disturbances 546 27.2.6 Simplified Aircraft Equations of Motion for Path Planning 347 27.3. Flight Vehicle Control Using Linear Techniques 548 27.3.1 Standatd Performance Specifications. 549 27.3.2 Classical Techniques 551 27.3.3 Successive Loop-Closure Examples 555 27.3.4 Multi-input-Multi-outpat Control 559 27.4 Path Following 570 27.5 Conclusion and Future Ditections 573 References 574 IP. How (52) Department of Aeronautics and Astronautics, Aerospace Controls Laboratory Massachusetts Institute of Technology, Cambridge, MA, USA ‘e-mail: how @mit.ed E, Frazzoli Department of Aeronautics and Astronautics, Massachusetts Institute of Technology, Cambridge, MA, USA ‘e-mail: frazzoli@mitedu GN. Chowdhary Department of Aeronautics and Astronautics Aerospace Controls Laboratory, Massachusetts Institute of Technology Laboratory for Information and Decision Systems, Cambridge, MA, USA ‘e-mail: girishc@MITEDU KP. Valavanis, G.J. Vachtsevanos (eds ), Handbook of Unmanned Aerial Vehicles, 529 DOF 10,1007/978-90-481-9707-1_50, © Springer Science+Business Media Dordrecht 2015 530 JP. How et a Abstract This chapter presents an overview of linear flight control and guidance methods for unmanned aerial vehicles (UAVs). The chapter begins with a discussion of rotation matrices and kinematic equations of a UAV. The six degree of freedom UAV equations of motion are also derived using rigid-body dynamics principles. ‘The equations of motion are then linearized, and several linear multi-loop closure techniques for UAV guidance and control are discussed. 27.1 Introduction A flight control system is required to ensure that the UAV exhibits stable behavior and delivers desired performance such as following a desired trajectory with suffi- cient accuracy in the presence of external disturbances. Thus, a UAV flight control system is typically safety/mission critical, as an incorrect design, lack of robustness to model variations, or a component failure could result in poor performance (impacting, e.g., payload pointing capability) or even loss of the vehicle. Figure 27.1 depicts a typical UAV control system. The goal of the control system is to track the desired reference command in presence of external disturbances. The control system achieves this by attempting to eliminate the tracking error between the reference commands and the measured response of the UAV. The control is, typically achieved by using estimates of the UAV states, which include position, velocity, angular rate, and attitude of the UAV. These estimates are obtained by the navigation system that fuses noisy measurements from several sensors. The purpose of this chapter, and its companion chapter on nonlinear control (chapter »Nonlinear Flight Control Techniques for Unmanned Aerial Vehicles), is to outline the various methods for designing the control system G. (and some aspects of the navigation system) and in the process highlight the benefits and challenges of using each approach. disturbances commands control inputs states State estimates ‘Sensor noise 27.1 A typical UAV control system architecture, A control system attempts to minimize the twacking error between the desired and estimated states in presence of disturbances. A navigation system provides estimates of the states by fusing together measurements from several complemen- tary sensors 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 531 This chapter presents a detailed overview of linear techniques for UAV control. Linear control techniques for manned and unmanned aircraft are well understood and are widely utilized due to their simplicity, ease of implementation, and asso- ciated metrics of stability and performance. The chapter begins with a description of UAV dynamics in Sect. 27.2. Linear control techniques are then developed in Sect. 27.3. A brief discussion of path following guidance controllers is presented in Sect. 27.4. 27.2 Equations of Motion For most problems of interest to UAVs, the Earth can be taken to be an inertial reference frame, and the aircraft can be modeled as a rigid body. In order to write equations of motions for an aircraft, it is customary to define a reference frame (often called a body frame) that is rigidly attached to it (see Fig. 27.2), A standard choice (often referred to as NED) for the inertial reference frame (X. ¥, Z) is to choose the X-axis pointing north, the Y-axis pointing east, and the Z-axis pointing down. Several choices of body frames are common, depending on the task at hand; examples include principal axes and stability axes, and will be discussed in the following. There are advantages to each choice, but the stability axes are very commonly used, In general though, the appropriate body frame (x, y.2) is chosen in such a way that the y-axis is orthogonal to the aircraft's plane of symmetry, pointing to the right. The x-axis is chosen pointing “forward” (the exact direction depends on the definition of the body frame), and the z-axis points “down,” to complete the right-handed triad (see Fig. 27.3). Note that for this set, in different flight equilibrium conditions, the axes will be oriented differently with respect to the aircraft principal axes, so one must transform (rotate) the principal 27.2 Aircraft body frame 532 JP. How et a Yeaxis body Xaxis body Zaxis body can Xaxis ae stability 27.3. Various body frames used for aircraft analysis inertia components between the frames. However, when vehicle undergoes motion with respect to the equilibrium, stability axes remain fixed to airplane as if painted on (see Fig. 27.3). 27.2.1 Dynamics Newton’s laws of mechanics imply that in a body frame whose origin coincides with the aircraft's center of mass, Fs = mip + op x mvp, Q7.1) Tr = InGop + on X Jpwog. (27.2) In the above equations, the subscript (:)g indicates vectors or tensors expressed in the body frame, the dot indicates differentiation with respect to time, vg is the velocity of the aircraft's center of mass with respect to the inertial frame, wy is the angular velocity of the body frame with respect to the inertial frame, m is the aircraft's mass, and Jy is its inertia tensor, which is constant in the body frame. The operator x denotes the cross product that arises duc to the vector derivative transport theorem (see, e.g., Etkin 1982; Stevens and Lewis 2003; Nelson and Smith 1989). On the left-hand side, Fs denotes the sum of the forces acting on the vehicle (including aerodynamic, gravity, thrust, and buoyancy), and Tg denotes the sum of the moments of these forces about its center of mass. Incoordinates, Eqs. (27.1) and (27.2) are written as follows. Let Fy = (X,Y, Z), Ts = (L.M.N), vs = (U.V.W), and op = (P,Q, R). The inertia tensor is defined as 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 533 fmf p(s) [(s-s)1 —s @s] ds, ha where p(s) indicates the density of the aircraft at the point s in the body frame, J is the identity matrix, - indicates the dot product, and ® is the Kronecker product, that is, ifw eR", v € RY, then w =u @ vis an m x n matrix with entries wy = wv, In most cases of interest, aircraft has a plane of symmetry, typically separating the left and right halves. Assuming that the y-axis is orthogonal to the aircraft's plane of symmetry, the inertia tensor will have the following structure: Ju 0 Se Je=| 0 ty 0 Sn 0 Sex (The cross moment of inertia Jez = [pire POY 2) x2 dx dy dz will in general depend on the choice of the body axes and will be zero in case principal axes are chosen.) Substituting into Eqs. (27.1) and (27.2) (see Etkin and Reid 1996; Blakelock 1965; Etkin 1982; Stevens and Lewis 2003; Nelson and Smith 1989; Stengel 2004 for details), x U+QW-RV 1 1 —Fg=—|¥|=|V+RU-PW I, (27.3) ™ "Ie wW+Pv—ou r JogP = IgR +QR Ses — Jy) — PQTex Tr=|M |= IyQ | + PRU = Jez) + (P? = Re 74) N JB = IP +P Qy — In) + OR See 27.2.2 Kinematics Equations (27.1) and (27.2) give the evolution over time of the velocity of the aircraft's center of mass and of the aircraft’s angular velocity with respect to the inertial frame (expressed in body frame). In order to reconstruct the position and attitude (‘., orientation) of the aircraft as a function of time, it is necessary to write equations for the aircraft's kinematis Let Rig be the rotation matrix that maps vectors in the body frame to vectors in the inertial frame, Given a vector u R?, define a “hat” operator such that the matrix (u)/ = iis the unique matrix satisfying fv = uxv, Vv € I’. In coordinates, given u = (Ww, uz, us), one gets 534 JP. How et a ‘The aircraft kinematics can be written as P= Reve, 27.5) Ris = Rds. (27.6) where p is the position of the aircraft's center of mass. Even though the position and attitude of the aircraft can be completely specified by (27.5) and (27.6), maintaining all components of the rotation matrix Rrg may be expensive from the computational point of view, since rotation matrices are not a minimal representation of aircraft attitude, In practice, several other methods to represent an aircraft's attitude are commonly used and will be discussed in the following sections. However, some additional properties of rotation matrices are discussed first. A first point to note is that the spectrum of any matrix in SO(3) has the form eig(R) = {1,cos9 + i sind}. Hence, any matrix R admits a unit eigenvector y such that Rv = v. Such an eigenvector identifies a fixed axis for the rotation R. The amplitude of the rotation is given by the angle 6. Since the trace of a matrix is the sum of its eigenvalues, it is the case that Tr(R) = 1 — 2cos6. Conversely, given a rotation angle @ and a fixed axis unit vector v, the corresponding rotation is computed through Rodriguez’ formula: Rot(,v) = 1 + sind $+ (1 — cos 6)¥* 7.1) ‘The pair (9, v) is also referred to as the € R = Rot(G,»), since Rot(6, v) = exp ponential coordinates of a rotation matrix 27.2.2.1 Quaternions ‘A widely used parametrization of rotations that requires fewer parameters than rotation matrices is based on unit quaternions, that is, unit vectors in R* (Kuipers 2002). A quaternion (q. 4) is typically written in terms of a scalar part 7 € R and a vector part j € R?. A unit quaternion is such that Qq=F 4G-G=1 The set of unit vectors in R* is denoted as the sphere S*. @ = G.@) €S° defines a rotation A unit quaternion R= Ror(2arecos§, G/|/9\): (27.8) In other words, the vector part of a unit quaternion is parallel to the fixed axis of the rotation, and the scalar part determines the rotation angle. Conversely, a rotation matrix R = Rot(9, v) can be represented by the unit quaternion q = (cos(G/2), sin(G/2) v) 7.9) 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 535 Note that this representation is not unique, since for all q € S*, q and —q map to the same rotation matrix. (In other words, S? is a double covering of SO(3)), Quaternions are composed through a multiplication operation, indicated with o, defined as follows: nen = h-hh, hat dd - 4 xa). eer aeg=|t |g a 4 It can be verified that quaternion multiplication as defined above is consistent with matrix multiplication, in the sense that if R, and R; are rotation matrices corresponding (according to (27.8)) to the unit quatemions q; and qp, respectively, then R, R; corresponds to q; © gz. Also, for any unit quaternion g = (9.4), its conjugate quaternion g* = (9, —G) corresponds to the “inverse” rotation, in the sense that g 0g” = g” 0g = (1,0) Finally, quaternion kinematics take the form or in matrix form, a! 1 dx = 70.01) 2 4m = 54m 0 (0.08) (27.10) This equation can be written in matrix form as follows: 1 = —z2os)q. 27.1) where 0 P QO R -P 0 -R Q -Q R 0 -P -R -0 P oO Q@) = (27.12) Quaternions are often the preferred method to model aircraft kinematics, since storing and multiplying quaternions require less memory and computation time than storing and multiplying rotation matrices. On the other hand, the fact that the set of unit quaternions is a double covering of the set of rotation matrices can cause stability and robustness issues (Chaturvedi et al. 2011), Numerical errors in quaternion propagation can result in the quaternion losing its normal- ization constraint. It is common practice therefore to normalize a quaternion to ensure ||q||, = 1 if it is numerically integrated for control or navigation purposes. 27.2.2.2 Euler Angles A rotation can also be parameterized through a sequence of three elementary rotations about coordinated axes. While many choices are possible, in the field of 536 JP. How et a v of nodes Fig. 27.4 Definition of the three Euler angles used and the associated sequence of rotations aircraft flight dynamics and control, it is customary to use the “roll,” “pitch,” and “yaw” Euler angles, defined as follows. Let (X,Y, Z) be unit vectors defining the inertial frame, and let e1,¢2,€5 be the columns of the identity matrix. Starting with a body frame coinciding with the inertial frame, rotate it by an angle yr (yaw) about the Z-axis (coinciding with the third body axis), obtaining a first intermediate body frame given by Rip = Rot(y, es) = [x", y'.2/] (with 2 = Z, see Fig. 27.4). Then, rotate this body frame by an angle @ (pitch) about the y’-axis, obtaining a second intermediate body frame given by Rigv = Ryp’Rot(6,e2) = [x", y",2"] (with y” = y'), Finally, rotate this body frame by an angle ¢ (roll) about the x-axis, obtaining the final body frame Rip = RywRot(d, 1) = (x, yz}, with x = x". In summary, the rotation matrix Rig is computed as a function of the roll, pitch, and yaw Euler angles (¢, 9, 7) as 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 537 Rig = Rot(y,es)Rot(9, e2)Rot(¢, e1) cos ¥ cos cos W sing sind —cos #siny sing siny + cos. pcos ¥ sind =| cosOsinyy cospcosy +singsiny sind cos # sin y sind — cos y sing sind 0s 8 sing £08 § cos 0 7.13) Conversely, given a rotation matrix R, Euler angles can be obtained as Rs Ray aresin Ry, = arctan =, y = arctan 8 1 where the 4-quadrant arctangent should be taken for ¢ and y. A direct relationship can also be given between Euler angles and quaternions, Let the components of a quaternion be given by q = [g.x.4y. qc]; then 6 = —aresin2(q.a. — 445). @ = arctan? [2(g, 4. + qx). 1-22 + 43)] 7.14) vy = arctan? [2G.9, + Ga.).1-23 + 4)]. and + (cos($/2) cos(0/2) cos(yr/2) + sin(G/2) sin(0/2) sin(W/2)), (27.15) (sin(¢/2) c0s(8/2) cos(y7/2) — cos(#/2) sin(/2) sin(y/2)), (27.16) gy = £ (cos(¢/2) sin(8/2) cos(yr/2) + sin(¢/2) cos(6/2) sin(y/2)) , (27.17) (cos($ /2) cos(O/2) sin(y/2) — sin($ /2) sin(@/2) cos(yr/2)), (27.18) Foo nou where the sign is arbitrary but must be consistent. ‘The kinematics of the Euler angles can be obtained by differentiating (27.13) with respect to time and recalling (27.6). After simplification, one obtains é 1 singtan® cos¢tan@ [| j |=} cose = —sing 8 5 sine cosg ° @r-19) v cos 6 058 Singularities are a potential problem for an Euler angle representation of the attitude kinematics. In the case of roll, pitch, and yaw Euler angles, the singularities at @ = +£90° can cause computational difficulties. Hence, the recommended practice, especially for agile vehicles, such as fighter aircraft or small UAVs, that perform large-angle attitude maneuvers, is to use quaternions (or rotation matrices) to model the aircraft's kinematics. On the other hand, since Buler angles may be 538 JP. How et a mote intuitive to work with, it is common practice to use them as a front end for humans, for example, to specify initial conditions and to present simulation or flight test results. Equations (27.3}-(27.5) and (27.11)}-(27.14) can be combined to form the nonlinear rigid-body equations of motion for a UAV. The next logical step is to discuss how the forces and moments acting on the UAV are generated. The full equations of motion will then be linearized to develop models for the linear control design. 27.2.3 Forces Forces and torques acting on a UAV are from a variety of sources, including aerodynamic, gravity, and thrust, In general, forces and torques will depend on the aircraft's position, attitude, on its linear and angular speed with respect to the surrounding air, and on the control settings. The aerodynamic forces are typically resolved into two components, lift (L) and drag (D) (see Fig. 27.5). The aerodynamic lift force is perpendicular to the relative wind vector, while the drag force resists the vehicle motion along the relative wind. The direction of the aircraft's velocity relative to the wind with respect to the body frame is expressed by two angles, which can be thought of as spherical coordinates. The sideslip angle is the angle formed by the aircralt’s velocity with the aircraft’s symmetry plane. The angle of attack a is the angle formed by the projection of the aircraft velocity on the aircraft's symmetry plane with the x body axis. Aerodynamic forces primarily depend on the angle of attack a, on the sideslip f, and on the dynamic pressure Q = $V}, where p is the air density, which depends Drag Xeaxis body Xaxis stability 27.5 Lift and drag acting on the aireraft 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 539 on the altitude, and Vr is the free-stream airspeed of the aircraft. The lift and drag forces on the body will be in the plane of the x- and z-axes of the wind axis system shown in Fig. 27.5. These can be rotated into the body frame using a rotation matrix that is a function of the angles a and 6: cosacosf —cosasing —sina Rew = sin B cos B 0 (27.20) sinacosB —sinwsinB cosa In this case, the aerodynamic forces in the body frame can be written in terms of lift and drag (assuming no side forces): Xa (Focols = | Yo | = Rew Za 27.21) Propulsive forces are typically contained within the aircraft's symmetry plane, possibly with a small angular offset wy with respect to the x body axis, yielding X, cos ar (Focop)s = | Yp | = | Fprop!l 0 (27.22) Zp =sin oy Given the usual (NED) choice of inertial axis, wherein the z inertial axis points “down,” the forces due to gravity can be written as X, 0 —sin@ (Feaviy)e =| Ye | =mgRjy | 0| = mg | cos@sing |. (27.23) Ze 1 cos cos where g is the gravity acceleration, 27.2.4 Linearization of the Equations of Motion The right-hand side of Eqs. (27.3) and (27.4) are nonlinear and typically far more complicated than can be addressed by standard control techniques and are more complicated than necessary for most flight regimes. Furthermore, the left-hand side, which specify the total forces and moments acting on the vehicle are even more complicated. Thus, numerous simplifications have been developed, 27.2.4.1 Relative Equilibria ‘The standard approach is to assume that the vehicle is flying in a relative equi- librium condition and then linearize the equations of motion about this nominal 540 JP. How et a flight condition. In the case of aircraft dynamics, a relative equilibrium is defined as a “steady-state” trajectory along which «g = 0 and i = 0, and the control inputs are maintained fixed or “trimmed” to some value do. Clearly, such a trajectory will bbe such that the linear and angular velocities in body frame are constant, These nominal values of the linear and angular velocities will be denoted by vo and wo, respectively. At equilibrium conditions, after writing out explicitly the dependency of the forces and moments, Eqs. (27.1) and (27.2) take the form Fs(p, Rip, Yo. 0,80) = wo X myo, (27.24) Tap, Ris, V0. 000.80) = 0 X Into 27.25) Note that the position p and attitude R change along the trajectory, according to the kinematics equations p = Rjgvo and Ry = Ryg@y. For Eqs. (27.24) and (27.25) to hold over time, it is necessary that the left-hand sides do not change along the trajectory, even though the aircraft’s position and attitude change. In the case of aircraft dynamics, and over small vertical excursions (Le., neglecting the dependency of the air density on altitude), it can be safely assumed that the body forces and moments are invariant to translations and to rotations about a vertical inertial) axis, that is, F(p, Rip, Vo, 0,50) = Fa (p + Ap, Rot(Ay, es) Rip, Yo. 0, 0), Ts (Pp, Rip. Vo. 0, 50) = Fa(p + Ap, Rot(Ay, e3)Ryp, vo, 0, 80), for any translation Ap and for any heading rotation Ay. In order for Eqs. (27.24) and (27.25) to hold throughout the trajectory and hence for the trim condition (v9, «9, 85) to be a valid relative equilibrium, it is necessary that Rig) = [0,0, yo]” for some constant heading rate Wo. In other words, in the inertial frame, trajectories corresponding to relative equilibria take the form of circular helices with a vertical axis, flown at constant speed, angle of attack, and sideslip angle. In the special case in which yo = 0, that is, on relative equilibria corresponding to straight-line motion, the total forces and moments are zero — but this is not true for the general case When analyzing the dynamics of an aircraft near a relative equilibrium, it is convenient to choose the body frame in such a way that the angle of attack is zero at equilibrium. In other words, the x body axis is chosen in such a way that the relative wind direction is in the (x, y) body plane at equilibrium. Such a body frame is called the stability frame, due to its importance in the aircraft stability analysis. Notice that the stability frame depends on the particular relative equilibrium under consideration; for different flight conditions, stability frames will in general be different In the following, a class of “symmetric” relative equilibria are considered, along which the sidestip, roll, and yaw angle are zero, To proceed with the linearization of the dynamics for various flight conditions, define the perturbed velocity and accelerations in terms of the nominal values, as given in Table 27.1. The assumption 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 541 Table 27.1 Definition of the perturbation variables about the equilibrium condition Nominal Perturbed Perturbed velocity velocity acceleration Velocities Up W=0 w%=0 Angular Pp =0 rates Angles vey herein is that the perturbations to the nominal are much smaller in magnitude than the nominal (.e., |u| « |Uo)). A key clement of the complexity here is that typically the aerodynamic, thrust, and gravity forces and moments will also be perturbed by the perturbed motion of the vehicle, which are denoted in the following as AX,..., AN. AX it AY | =m| b+rUo (27.26) AZ w—qUy AL Sep - Sut aM]=| Iya 27.27) AN Jet = Iecp where we use the () to distinguish between the lift Z. and the moment T.. The key aerodynamic parameters are also perturbed: Total velocity Vp = (Up +u)?+v? + wy"? ~ Uy tu (27.28) Perturbed sideslip angle B = sin“!(v/Vp) = v/Up (27.29) Perturbed angle of attack ay = tan !(w/U) ~ w/Up (27.30) 27.2.4.2 Stability Derivatives To develop the equations of motion further, the terms AX’... AN must be investi- gated. Recall that at equilibrium, the net forces and moments must be zero. But since the aerodynamic and gravity forces are a function of equilibrium condition and the perturbations about this equilibrium, in general, it is very difficult to determine the exact nature of these aerodynamic perturbations. Thus, the standard approach (see detailed discussions in Etkin (1982), Etkin and Reid (1996), and Nelson and Smith (1989))s to try to predict the changes in the aerodynamic forces and moments using a first-order expansion in the key flight parameters: 542 JP. How et a ax ax aX, aw + “aw+ Zao Sia@+AXx® Q731 + paw + pq dO t+ Fgaet aay Fy + eo ax, easy ao" * Ww 7 where & is called a stability derivative, which is evaluated at the equilibrium condition, Note that both dimensional and nondimensional forms are used. Clearly, this is an approximation since it ignores any time lags in aerodynamics forces (assumes that forces are only functions of instantaneous values) As before, X, in Eq. (27.32) corresponds to the X body force component due (o gravity and the perturbation gravity and thrust forces and moments, Assuming ®y = 0, then aX, aZ, ot) =~ 8 TS |, = —mEOo FBI, —mg sin @o, Also AX® denotes the perturbations due to the control actuators (¢.g., rudder, ailerons, elevators, thrust) While Eq, (27.32) leads to simplified force (and moment) perturbations, itis still clear that the linearized expansion can involve many terms u, tii... , WW, ti, Thus, it is typical to only retain a few terms to capture the dominant effects. For symmetric aircraft, this dominant behavior is most easily discussed in terms of the symmetric variables U, W, Q and forces/torques X, Z, and M, and the asymmetric variables V, P, R, and forces/torques Y, L, and N (Table 27.2). Furthermore, for most flight conditions, further simplifications can often be made, For example, for truly symmetric flight, Y, Z, and N will be exactly zero for any value of U, W, Q. So the derivatives of asymmetric forces/torques with respect to the symmetric motion variables are zero. Also, the derivatives of symmetric forces/torques with respect to the asymmetric motion variables are small and can often be neglected. Often derivatives with respect to the derivatives of the motion variables can also be neglected, but 8Z/@iv and M;, = @M/@iv (aerodynamic Jag involved in forming new pressure distribution on the wing in response to the perturbed angle of attack) should not be neglected. Also, @X/dq is often negligibly small. A summary of the effects of the aerodynamic perturbations is as follows: () AX = (3%), + ( (2) AY ~B = v/Up, p.r @B) AZ ~u, ay ~ w/Uo, bey © w/Uo, 4g ) AL~B © v/Uo, pr () AM ~ ua, © w/Up, by © W/ Ud, g (© AN ~B ~v/Uo, p.r ‘The result is that, with these force and torque approximations, Eqs. (27.1), (27.3), and (27.5) decouple from (27.2), (27.4), and (27.6). In particular, Eqs. (27.1), (27.3), Jow > AX ~u,ay © w/o 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 543 Table 27.2 Standard stability derivatives for a typical aircraft planform showing that numerous terms are 0 or small. The other nonzero terms, denoted as #, must be computed using the methods described in Etkin and Reid (1996) and Nelson and Smith (1989) 20/20 x y z z M N ® ° ° . ° . ° ‘ ° . ° . ° . * . ° . ° . 0 P ° . ° . ° . 4 ~0 ° . ° . 0 A ° . ° . ° . and (27.5) are the longitudinal dynamics in ww, and q AX mit AZ | =| mov—qUo) (27.33) AM Sod 2 aX, ° + (2) + (5E),2 + AX =| (B)ou+ (How + (3), w+ (Ba + ( (27.34) (Bu + Gow + (MH), w+ (HF) a+ a and Eqs. (27.2), (27.4), and (27.6) are the lateral dynamies in v, p, and r AY m(i + rUo) AL | =| Jab - Sut (27.35) AN Jai = Seep GB)ps + By + gr + rar" =| (F),v+ (e+ (rt ae |. 27.36) (Sov + (oP + Geor + ANS 27.2.4.3 Actuators ‘The primary actuators in the longitudinal direction are the elevators and thrust. Clearly the thrusters and elevators play a key role in defining the steady-state and equilibrium flight condition. The focus now is on determining how they also influence the aircraft motion about this equilibrium condition. For example, if the elevator is deflected, a perturbation in the vehicle motion would be expected, as, captured by u(t), w(t), a) Recall that AX‘ is the perturbation in the total force in the X direction as a result of the actuator commands, that is, a force change due to an actuator deflection 544 JP. How et a from trim. As before, one can approximate these aerodynamic terms using the same perturbation approach: AX® = Xaybin + Xs,80, 27.37) where 4, is the deflection of the elevator from trim (down positive), 8,4 is the change in thrust, and Xs, and X;,, are the control stability derivatives. This results in Axe Xo, Xs) py AZ Zin Zs, [ "| (27.38) AM® Ms, Ms, °° A similar process can be performed in the lateral direction for the rudder and ailerons, Equations of Motion Combining the results of the previous sections for the longitudinal dynamics yields the equations of motion: mic = Xyu + Xyw — mg cos @o0 + AX* (27.39) mie — qUo) = Zu + Zuw + Zar + Zyq —mg sin 8 + AZ* (27.40) Ing = Muu + Myw + My + Mgg + AM (27.41) If there is no roll/yaw motion so that q = 6 and Mj and Z,, are assumed to be small, these can be rewritten in state space form using « = w/U, as mit X Xe 0 —mg cos @p u AX® ma |_| 24/Us Z_/Vo Zq/U) +m —mg/Unsin®o |) a |, | AZ Jo 1 | My Me My, 0 q AM: 6 0 0 1 0 6 0 27.42) or equivalently as x = Ax + Bu where x, |X, Xi, |X =*/"2) 9 |-gcos@ Ain) m |'m m |m Zu | Za | & Zin | Za, 8 A=| mUslmUsl * moe) Ue °°] and B =| mUmty |. 27.43) My|Ma| My 0 May] Ms, Sy | Joy | Soy Jy | Soy 0} 0 1 oO oj} 0 Note there are significant notational simplifications if the stability derivatives are defined to include m and Jy 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 545, Using a procedure similar to the longitudinal case, the equations of motion for the lateral dynamics can be developed using the state vector: ° v= [PF] wininpas «= [5]. P 3, , where = rsec Oo 0 oO 1 Yp y, cos 2 one mUs mUp 4 Ts gene) (Ena at 7.44) 0 (Ga i JN) (% JEN» 1g, 4 No iT Ne yy, 0 (405+ wt) (42,+ i 0 oo (my! 00 Ya % B ~ hy-tope Ls, Ls, (27.45) Ot I | Ly Pr a, Ns, and She = Sede — I Sex ucde = IZ) Ju (27.46) Jesl Ivvdez — F3) ‘Thus, in either case, the aircraft equations of motion can be written as i= Axt Bu 7.41) y =Cx+ Du, (27.48) where typically D = 0, but this depends on the sensor and actuator selection. One can also convert the dynamics into transfer function form (for each sensor/actuator pair) yy = Gi(s)uj, Gy(s) = C\(sT — A)!B, + Dy that can be used in the classical control design process. 546. JP. How et a 27.2.5 Wind Disturbances In the presence of wind, the atmosphere is moving relative to the Earth frame (Nel- son and Smith 1989; Stevens and Lewis 2003). Therefore, the equations of motion must be modified to account for the fact that the aerodynamic force and moments are functions of the relative motion between the aircraft and the atmosphere and not the inertial velocities. Thus, we must differentiate between the inertial velocity of the vehicle v; and the velocity of the vehicle with respect to the air mass vq resulting from wind effects W, Va =; — Rar Wy. 27.49) In this case, vg should be used to calculate the aerodynamic forces and moments rather than vj, and this quantity can be reliably estimated using an airspeed measurement device. More specifically, in the X direction, let u be the aircraft perturbation speed and uy be the gust speed in that direction, then the aircraft speed with respect to the atmosphere is u, = u — ug. In this case, the linearization of the aerodynamic forces and moments in Eq. (27.32) should be rewritten in terms of the perturbations relative to the atmosphere: + ew mg) + Eiri + Bag- Me) + Fp) + Get) + TE ~ a) ax, 30 + AX® (27.50) but note that the gravity and control input terms remain the same. The rotational aspects of the gusts are caused by spatial variations in the gust components, so that 2 Pe = Fy and gy to anew input term 2, Repeating the linearization process outlined before leads & = Ax + Bu+ Byw, (27.51) where, for example, in the longitudinal case, and w= | ay 2752) de and a similar operation can be performed for the lateral dynamics in terms of the disturbance inputs B,, py, and re. 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 847 The input w can now be used to model the effects of various steady and stochastic wind models, as well as wind shear. Numerous stochastic models have been developed for studying the effect of winds on the aircraft dynamics and performance (Moorhouse and Woodcock 1982; Tatom and Smith 1981; Stevens and Lewis 2003), but these must be used with care when applied to the low altitude operations expected for most small-scale UAV flights. 27.2.6 Simplified Aircraft Equations of Motion for Path Planning A simplified set of aircraft equations of motion can be derived for path planning purposes. In deriving these equations, the aircraft roll rate, pitch rate, and yaw rate dynamics are ignored and are replaced using kinematic approximations. The resulting model describes the motion of a rigid point mass with kinematic path constraints. For the purpose of this model, the position of the aircraft in an inertial frame whose x-axis is parallel to the local horizon is denoted by Xe, Ye. ze ‘The flight path angle y denotes the angle between the local horizon and the velocity vector of the aircraft Vp (see Fig. 27.6). The heading angle y is the angle between Vp and the z-axis of the local inertial frame. The bank angle ¢ is the angle that the aircraft is banked about the velocity vector Vr. The forces acting on the aircraft consist of the weight mg, thrust T, lift L, and drag D. The equations for a point mass model of a fixed wing aircraft can then be formulated by assuming small y and y (Zhao and Tsiotras 2010; Etkin and Reid 1996): e = Vr cos y cos 27.53) Je = Vr eos y sin y, 27.54) = -Vrsiny, (27.55) Vp = Ltr -D-mgsiny] (27.56) 1 ¥ = [Leos — mg cosy], 27.57) mVr Xeaxis body OV Yeaxis ———————_____—_>» body horizon Zaxis body 27.6 Definition of the flight path angle 548 JP. How et a =e, 2758) mV; cosy and the lift and drag of the aircraft can be approximated as L=@SC; and D=OS(Cp, + KC}), (27.59) where S is the wing surface area, C;, is the lift coefficient, Cp, is the parasitic drag coefficient, and K is a constant dependent on the aircraft wing geometry. 27.3 Flight Vehicle Control Using Linear Techniques As presented above, even in the simplest case of decoupled linearized dynamics, the equations of motion of an aircraft are quite complicated, with both the longitudinal and lateral dynamics being described by a fourth-order system with multiple actuator inputs and sensor outputs y. Furthermore, the speed of the natural response of the system associated with the pole locations of the open-loop dynamics are typically inconsistent with fast and/or stable response to commands, such as waypoint, trajectory tracking, and agile maneuvers. Finally, the dynamics of several UAVs can be inherently unstable, typical examples include rotoreraft such as helicopters, quadrotors, and ducted fans (see, ¢.g., Mettler 2003; Chowdhary and Jategaonkar 2009). Thus, feedback control is required to stabilize and/or speed up the response Given the complexity of the dynamics, there are two basic strategies for the control design. The first is to continue the decomposition in the previous section to identify components of the dynamics that are well controlled by specific choices of the actuators and then perform successive loop closure (see, e.g., Lawrence et al. 2008; Johnson and Kannan 2005). In this case, the loops are nested by arranging that the reference commands for the inner loop are provided by the outer-loop controller. An example of this is shown in Fig. 27.13 in which the outermost position control loop provides desired velocity commands using path following guidance discussed in Sect. 27.4. The outer velocity control loop provides a reference (in this case, a desired quaternion value) for the inner attitude control loop. One key advantage of this approach is that it leads to a natural mechanism of handling limits on flights variables (¢.g., such as bank or pitch angles) and actuator inputs because the reference commands can be saturated before being passed to the inner loop. Each step of the control design process is simpler, but the nesting of the control loops leads to some challenges. The general rule of thumb is to ensure that the inner control loops result in “fast” dynamics, and then each successive loop added is “slower than the previous one.” The primary difficulties here are to determine ‘what is meant by fast and slow and how to determine if there is too much interaction between the inner/outer loops being closed (e.g., closing the outer loop might reduce the performance of the inner loop, requiring a redesign). 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 549 The second approach is to design a controller for the full dynamics - either linear or nonlinear. The advantage of this approach is that it employs the power of state space control approaches to handle the fully coupled dynamics. However, it is difficult to handle actuator saturation and very hard to include state constraints, Furthermore, unless done with extreme care, these controllers, especially in high performance flight, can be very sensitive to modeling errors and omissions. Having determined the architecture, the next step in any control design is to determine the dynamics of the system of interest (ie., the full set of dynamics or the approximate inner loop dynamics). Having identified this, one should then determine the requirements and the extent to which the dynamics meet these goals, For example, there may be requirements on certain frequency (to ensure the dynamics are “fast”) and damping (to ensure that the oscillations die out quickly) specifications on the pole locations. There may also be requirements on the maximum steady tracking error to a step command input. Since the open-loop dynamics of the vehicle rarely satisfy these requirements, the typical approach is to use linear feedback control to modify the pole locations and loop gains. 27.3.1 Standard Performance Specifications Figure 27.7 shows a standard feedback control loop, where a typical performance metric, the tracking error, can be written as e (y +») = S(r-d, -v) - SG, yielding y = T(r —v) + Sd, + SGd, with L = GG. S = (+L)! T = LU +L)". So good tracking performance of r(t) (signal typically has low-frequency content) requires e be small, which translates to ||S(j@)|| being small at low frequencies, that is, 0 < @ < @y. Furthermore, to reduce the impact of sensor noise v (which typically has high-frequency content) requires ||7(j)|| be small for all @ > w. Since T(s) + S(s) = I ¥ s, one cannot make both 27.7 Classical control feedback loop 550 JP. How et a 10° iu 107 10? 10° sot 108 10% 107 10% 10° 10 102 Freq (rad/sec) 27.8 Standard loop shaping goals for the indirect design approach {|8Ga)|] and |/7 (jc) |] small at the same frequencies, which represents a fundamen- (al design constraint, ‘There are two basic approaches to design: the indirect approach that works on L and the loop transfer function, rather than S and T. Much of classical control design takes this approach. The direct approach, which works with S and T, is discussed in Sect.27.3.4.4. For the indirect approach, note that if |LGw)| > 1,5 = (1+ Ly = Lo, so |S] « land |7| ~ 1. Furthermore, if |LGw)| K 1,8 = +L)" = 1, and T = L, so |T| < 1. So this converts the performance requirements on S, T into specifications on L, with the two regions in Fig. 27.8: (A) high loop gain which leads to good command following and disturbance rejection and (B) low loop gain leads to attenuation of any sensor noise. One must be careful at crossover, when |L(jw.)| ~ 1, which requires that arg L(jw,) # +£180° to maintain stability (Levine 1996; Franklin et al. 1994; Kuo 1991; Dorf and Bishop 1995; Skogestad and Postlethwaite 2005). In summary, the typical control design challenges are to achieve high enough gain at low frequency to obtain good performance, low enough gain at high frequency to attenuate sensor noise effects, and sufficient stability margins in the transition range. 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 551 27.3.2 Classical Techniques 27.3.2.1 Classical and PID Controllers There are three standard forms of the classical controller, which in the form of Fig. 27.7 can be written as u = G.(s)e = fe, where ¢ is the error signal, typically the difference between the actual variable, for example, 0 and the commanded value 8. (¢ = 8. — 8) The simplest is proportional feedback, which uses G. = K, a gain, so that = D. = 1. This is adequate for some systems but is typically constrained in what gains can be applied before at least some of the dynamics of the vehicle are destabilized, Integral feedback uses u(/) = K; fj e(t)dt which means that G(s) = *. This is typically used to reduce/climinate steady-state error since, if e(r) is approximately constant, then the magnitude of u(t) will grow and thus hopefully correct the error. 1 Example 1. Consider the error response of G(s) uroern Sra (a > 0, > 0)to astep r(t) = 1(t) > r(s) = I/s where 1 r(s) 7 Taq, °) > ">= Ty Gay and S(s) is the sensitivity transfer function for the closed-loop system, The final value theorem (lim,-s2o e(#) = lim,-+9 se(s)) can be used to analyze the error. So with proportional control, ey = fim ett) = lim (2) = fi e() = lim J) IFEGo 1+ indicating that e,, can be made small but only with a very large K,. Note, however, that with integral control, lim,soG:(s) = 00, 80 @,, — 0. To summarize, integral control improves the steady state, but this is at the expense of the transient response, which typically gets worse because the system is less well damped, Example 2. Gp(s) = syab-ay: add integral feedback to improve the steady-state response. Increasing K, to increase the speed of the response pushes the poles toward the imaginary axis leading to a more oscillatory response (compare the possible locus of roots of the closed-loop system shown in Figs. 27.9 and 27.10 using the two control approaches). __ If the proportional and integral (P1) feedback are combined, then G.(s) = Ky + 42 = 4+ which introduces a pole at the origin and zero at s = —K,/Kj. The zero has the effect of reducing the tendency of the closed-loop poles to move into the 552 JP. How et a Root Locus 18 1 ¥ os g 0 Deerrmnnafnnennnnd . : fos “1 15 25 2 a8 1 08 0 05 Real Axis (seconds™) 27.9 Root locus for G(s) in Example 2 using proportional feedback right-half plane as the gain is increased, and thus, this PI combination solves some of the problems with using just integral control (compare Figs. 27.10 and 27.11), ‘The third approach is derivative feedback which uses u = K,é so that Ge(s) K,s. Note that this will not help with the steady-state response since, if stable, at steady state one should have é ~ 0. However, it does provide feedback on the rate of change of e(¢) so that the control can anticipate future errors. Example 3. G(s) = Gjgop (@ > 0, b > 0) with G.(s) = Kas. As shown in Fig. 27.12, derivative feedback is very useful for pulling the root locus into the left-hand plane or increasing the damping leading to a more stable response. It is, typically used in combination with proportional feedback to form proportional derivative feedback PD G.(s) = Ki + Kzs which moves the zero in Fig. 27.12 away from the origin. ‘The three approaches discussed above can be combined into the standard PID controller: G(s) (« + Ate Kos) (27.60) 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 553 Root Locus 15 7 / 1 Gos $B pnereeennnnnnnend Sennen < : pos “1 15 25 2 18 -- O08 0 08 Real Axis (seconds) 27.10 Root locus for G(s) in Example 2 with integral feedback ‘Typical difficulties in this case are that numerical differentiation of a noisy measured signal can result in noisy or lagged estimates in practice. Furthermore, long-term integration of a signal that has an unknown bias can lead to large control commands. Thus, one would typically use band-limited differentiation/integration instead, by rolling off the PD control with a high-frequency pole (or two) and only integrating signals above a certain frequency (high pass filter) in the PI controller, This leads to a slightly different primary building block for the controller components that is of the form G+ Gals) = Ke (27.61) which, depending on how the gains are selected, can be morphed into various types of controllers. For example, if one picks z > p, with p small, then Gp(s) ©: K, 42 which is essentially a Pl compensator. In this form, the compensator is known as a lag. If instead p is chosen such that p > z, then at low frequency, the impact of 25 is small, so Ga(s) (s+ Dh © K's +2) which is essentially a PD compensator. In this form, the compensator is called a lead. Various algorithms exist for selecting the components of G(s). One basic procedure is to first use a lead controller to augment the phase margin of the loop transfer function L = G,(s)G(s) at the crossover frequency «, to meet 554 JP. How et a Root Locus % a z “5 3 *«43°~«98 = 4S SCOSCS*C«S Real Axis (seconds“") fi 27.11, Root locus for G(s) using proportional and integral feedback the requirements (¢.g., desired phase margin). The phase margin is a standard stability margin for a system that measures the amount that the phase of the loop transfer function L(s) differs from —180° when |L(j)| = 1. Typically one wants a phase margin of greater than 30°, but other important performance metrics include the gain margin, the peak of the allowable transient, rise, and settling times, and time-delay margin (Dorf and Bishop 1995; Ozbay 2000). 1, Find @requiea Pequired from the performance specifications, Note that required = PM — (180° + 4G( je) 2. Arrange to put ¢max at the crossover frequency. Note that the maximum phase added by a lead is singmax = j75 where a = 4 which implies that a = 1-sing, {ite Further, since the frequency of the maximum phase addition is mex = viel Ipl. set @2 = |p| lel 3. Select K, so that the crossover frequency is at To increase the low-frequency gain to improve the steady-state response, one could use an integrator o use a lag to increase the loop gain. This is done by picking k, to yield the desired low-frequency gain increase for the loop transfer function (which now includes the vehicle dynamics and the lead controller if added). It is also important to include the constraint that lim),|+e0 [Giag(s)| = 1, 80k. Ipl 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 555 Root Locus 15 3 Imaginary Axis (seconds~*) 25 2 45 + 0S 0 08 1 15 2 25 Real Axis (seconds“!) Fig. 27.12 Root locus for G(s) using derivative feedback to avoid impacting the higher-frequency dynamics. A rule of thumb is to limit the frequency of the zero of the lag compensator so that there is a minimal impact of the phase lag at «. Thus, with z ~ @./10 and k. both specified, one can solve for the pole location using |p| = |z|/ke 27.3.3 Successive Loop-Closure Examples As an example of the successive loop-closure process in Fig. 27.13, the following considers the combination of the velocity and attitude control loops, wherein the attitude reference command is created by the velocity controller. Note that for small angles, the attitude controller could be based on independent PD control of each Euler angle, but the following presents a more general attitude control approach that is based on the quaternion representation of the vehicle attitude. A second example of the successive loop-closure approach is provided in Sect. 27.4. 27.3.3.1 Quaternion-Based Attitude Control The sequential rotation properties of quaternions can be used to devise a gener- alized attitude controller for flight vehicles (Wie and Barba 1985; Knoebel 2007; Hall et al. 2008; Michini 2009), Consider some desired aircraft attitude that is 556 JP. How et a 27.13 Example of a possible sucessive loop-closure control architecture where the measured quantities (,, v9.dy.@.) are fed back to specific control loops. Each outer loop generates a reference command that is used (o create error signals for the inner loop. Saturation on these reference commands can easily be incorporated (not shown). As shown in the text, the particular architecture required depends on the vebicle and control objectives specified as a quaternion rotation from the global frame q. This desired rotation can be constructed intuitively with an axis and an angle as in Eq, (27.9). The actual measured altitude of the aircraft can also be represented as a quaternion rotation from the global frame gz. Now consider that the desired attitude gy can be constructed as the measured attitude g, sequentially rotated by some error quaternion q.. Since quaternion rotations are sequential, the error quaternion represents a rotation from the body frame: a. Ge Ge (27.62) He we lobal frame body frame global frame ‘The error quaternion can then be solved for explicitly using the conjugate of the measured attitude quaternion: Ge = 4 8 as (27.63) “ee —e body tame global fame global fame ‘The error quaternion q, represents the rotation required to get from the measured attitude to the desired attitude. Since the rotation is from the body frame, the x, y, and z components of q. correspond to the rotations needed about the x, y, and z body axes of the aircraft. Thus, the three components correspond directly to the required aileron, elevator, and rudder commands (or roll cyclic, pitch cyclic, and pedal commands for a helicopter UAV) without any transformation, The scalar part of ge, f. represents the angle through which the aircraft must be rotated and is thus proportional to the amount of control effort required. As in Sect. 27.2.2.1, let ge denote the vector part of qe. ‘The quaternion representation suggests a simple control law of the form u = —KpGe — Kaw, where u = (34, 5¢.5)]” is the vector containing the aileron, elevator, and rudder deflections, and K,, and K, ate positive definite proportional and derivative gain matrices. However, this control law suffers from the unwinding phenomena (see, ¢.g., Mayhew et al. 2011) characterized by the aircraft undergoing 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 587 a larger full rotation in order to achieve the desired attitude instead of a more efficient smaller rotation. One reason this happens is because the unit quaternions [1,0,0,0] and [-1,0,0,0] both represent the unique zero attitude and are the equilibria of the quaternion dynamics given in Eq, (27.10). Hence, if a naive control Jaw was used for regulation (o zero altitude represented by ga = [-1,0,0,0], an undesirable rotation, possibly leading to instability, could occur. On the other hand, the control law u = Kpge — Kyw would stabilize gg = [-1, 0,0, 0] but result in an undesirable rotation if gy = [1,0, 0,0). This indicates that the sign of the error quatemion determines the sign of the gain Ky. Therefore, a consistent control law that satisfies u(ge,9.«@) = u(—4.,g, @) is desirable (Mayhew et al. 2011). Several such consistent asymptotically stabilizing quaternion control laws can be formulated (Gee, ¢.g., Mayhew et al. 2011; Wie and Barba 1985), with two examples being u = —sgn(fe)K pie — Kao, (27.64) or deg s w= — EK ye — Kew (27.65) Another way to implement a consistent control law is to simply monitor the sign of e online and enforce that the right error quaternion representation is chosen, With this constraint, the following control law with time-varying gains has yielded good attitude control performance (Sobolic 2009; Michini 2009; Cutler and How 2012) 8. 2 se K de — Kaw, 27.66) sin? 4° Ore) where 6, = 2 arccos(q-). While denoted above as aileron, elevator, and rudder, the control commands are given in the body frame and thus easily generalizable to any actuator set (c.g., a three-wing tailsitter or quadrotor helicopter) as long as the commands can be mapped to the appropriate actuators. Another key advantage of this attitude controller over Euler angle methods is the lack of singularities, that is, the output of the controller is the direct rotation needed (from the body frame) to get from the measured attitude to the desired attitude (Hall et al. 2008; Knoebel 2007; Michini 2009; Cutler and How 2012). Computationally, no trigonometric functions or rotation matrices are needed, making the controller amenable to onboard or embedded implementation, 27.3.3.2 Outer-Loop Horizontal Velocity Controller The outer-loop velocity controller can be designed to command a desired attitude based on the desired velocity. For airplanes, this means that in order to achieve a desired velocity in the body y direction, the aircraft must rotate (bank) about 558 JP. How et a its body x-axis and/or rotate (yaw) about its body z-axis. Furthermore, in order to achieve a desired flight path angle y, it must rotate (pitch) about its y-axis. Velocity error and desired attitudes are also tightly coupled for rotorcraft UAVs, where horizontal velocity is achieved by tilting the thrust vector. For a rotorcraft with non-hinged blades such as typical quadrotors, this is often achieved by tilting the body itself. Tilting the vehicle in any direction will generate a horizontal component of velocity. With the attitude controller in place, a simple outer-loop horizontal velocity controller can be added to generate the desired attitude g,. To calculate the desired quaternion given the desired x, y, and z velocities [va,.va,.v4.] and the actual measured x, y, and z velocities [¥a, , Va, Va.), the velocity errors are calculated: Yen = Vay — Vay (27.67) Ve, = Vd, — Vay ‘The errors are then used to determine the desired quaternion rotation qq in the form qa = [1.0, 4a,@.), 4a, Ge), 44,He)] (27.68) A simple control law that works particularly well for rotoreraft by generating the elements of the desired rotation in Eq, (27.68) based on the velocity error is 44, = Kp,¥e, + Ki, | ve,dt da, = —Kp,, Yer aK, f rade, (27.69) 4a = 9. where Kp are the proportional gains and Kj are the integral gains. In this control law, lateral motion is achieved by a rotation about the x-axis, and longitudinal motion is achieved by a rotation about the y-axis. For a rotorcratf, such a controller is based around the hover configuration, where thrust is being generated vertically to counteract the acceleration of gravity. For aitplanes, an outer-loop controller that commands the desired attitude is based around the level forward flight configuration. For airplanes, itis also desirable (o command a yaw rotation in the direction that reduces lateral velocity error and a pitch rotation to help achieve the desired flight path angle. This can be achieved by the following control law: 44, = Kp, Ve, + Ki frat 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 559 44 = —Kp,.¥e. — Kin f ved, (27.70) Finally, the desired quaternion is normalized to ensure that [|qy |, = 1. The result is, a combined proportional-integral (PI) horizontal velocity controller and quaternion attitude controller. Care must be taken in commanding qa, for airplanes in order to avoid stall due to high angle of attacks. If airspeed measurements ate available, this can be achieved by limiting commanded pitch attitude to keep the estimated angle of attack within limits (Chowdhary et al. 2011). Care must also be taken in order to ensure that the commanded attitude does not result in an undesired loss of altitude. For airplanes, this can be partially achieved by ensuring that the airplane pitches to maintain vertical speed as in Eq. (27.70). More generally, this can be achieved by limiting the magnitude of the desired attitudes in Eq. (27.68). In order to achieve this, define the inertial altitude error as ze = zy —za. Where zy is the desired altitude and zy is the actual altitude, and redefine the authority limited quaternion attitude controller as, 4a, = Ki ga = [1.0. qa, Be) — Kx, ga, Be) — Ky. Ga. @e)] - 27.71) An effective control authority limiting term is Sobolic (2009) ky = Kp,senlva,)2e + Ky,san(Va)¥4, 27.72) Ky = Kp.sen(va,)ze + Ky,sen(va,)¥a. ‘This controller is typically implemented in combination with a forward speed (or airspeed) controller and an altitude controller. 27.3.4 Mul input-Multi-output Control While PID and classical control are very effective ways of closing single-input single-output (SISO) loops, it is often challenging to use those techniques to design controllers for systems with multiple sensors and actuators (MIMO). State space techniques can handle that additional complexity very easily. 27.3.4.1 Full-State Feedback Controller The decoupled system dynamics were given in state space form in Eqs. (27.47) and (27.48), where it is assumed that D = 0. The time response of this linear state space system is determined by the eigenvalues of the matrix A, which are the same as the poles of a transfer function representation (Chen 1984; Franklin et al. 1994; Stengel 1994), As before, if the eigenvalues (poles) are unstable or in the wrong location for the desired response, the goal is to use the inputs u(t) to modify 560 JP. How et a the eigenvalues of A to change the system dynamics. The first approach is to assume a full-state feedback of the form u(t) = r(t) — Kx(), (27.73) where r(1) € R” is a reference input and K € R”*" is the controller gain. r(0) This gives the closed-loop dynamics: H(t) = Ax(t) + BO(t) — Kx(0)) = (A— BR)x(t) + Br(t) = Aax(t) + Bri) (27.74) Cx(). (27.75) yO Note that for a system with one input, there are m parameters in K that have to be selected to attempt to place the n eigenvalues in A. For a system with n states, a necessary and sufficient condition for controllability (see, e.g., Dorf and Bishop 1995) is that rank M. © rank [B AB B+. AB] =n Ackermann’s Formula This gives us a method of doing this entire design process in one step. For single- input system, the gains are K=[0...01]Mz'#,(4), where the roots of the polynomial ®,(s) give the desired pole locations. Linear Quadratic Regulator (LOR) Itmay be difficult to relate the desired performance criteria to desired pole locations. Insuch cases, an alternative approach is to automatically select pole locations so that the closed-loop system optimizes the cost function Jor [bo Rx +0" Ranta (27.76) 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 561 where x7 Ryx is the state cost with weight Rix = RY, > 0 and u! Ryu is called the control cost with weight R,, = RJ, > 0. It is well known that the solution to this infinite horizon optimal control problem is a linear time-invariant state feedback of the form (see, ¢.g., Bryson and Ho 1969) u(t) = Kiger), 21.71) where Kig = R7'B7 P, and P, is found by solving the algebraic Riccati equation (ARE) for the positive semidefinite symmetric solution P, 0 ATP, + P,A+ Ry — PBR! BP, (27.78) Equation (27.78) can be easily solved numerically, for example, by using the commands are or 1gr in MATLAB. The design freedom in this case is to select the Ri» and Ry, matrices. A good rule of thumb, typically called the Bryson’s rule (Bryson and Ho 1969), when selecting the weighting matrices Ry» and Ry is to normalize the signals: Rey = e @ i ft Bon diag (SSL... AL) and Rav = pdiag (a ws) The (x/)mux and (u;)mex represent the largest desired response or control input for that compo- nent of the state/actuator signal. )°; a? = 1 and )°; 6? = 1 are used to add an additional relative weighting on the various components of the state/control. The p is used as the last relative weighting between the control and state penalties — it effectively sets the controller bandwidth. This gives a relatively concrete way to discuss the relative size of Ry, and Ry, and theit ratio Rux/Ruw LOR is a very attractive control approach because it easily handles multiple actuators and complex system dynamics. Furthermore, it offers very large stability margins to errors in the loop gain (gain margin of infinity, gain reduction margin of 1/2, and a minimum phase margin of 60° in each control input channel) (Stengel 1994). However, LQR assumes access to the full state, which is rarely available. This assumption is removed in Sect. 27.3.4.2. Reference Inputs The proceeding showed how to pick K to change the dynamics to achieve some desired properties (ie., stabilize A). The question remains as to how well this controller allows the system to track a reference command, which is a performance issue rather than just stability. For good tracking performance the goal is to have y(t) © r(f) as f > oo. To consider this performance issue in the frequency domain, the final value theorem can be used. This indicates that for good performance, s¥(s) ~ sR(s) as s > 0, which gives ot 1, So, for good performance, the transfer function from R(s) to ¥(s) should be approximately 1 at low frequency (DC). One approach is to scale a constant reference input r so that u = Nr — Kx(t) where N is an extra gain used to scale the closed-loop transfer function. 562 JP. How et a ‘The closed-loop equations are now y = Cx(t) and $(t) = (A BK)x(Q) + BNr 27.79) so that re s 1 a = Go Fg 7 COE AH BRI BY = Gal Given the goal at DC, one can compute W = G,(0)7! = -(C(A- BKy'B)* (27.80) Note that this development assumed that r was constant, but it could also be used if ris a slowly time-varying command. This approach is simple to implement but is typically not robust to errors in the choice of N. ‘An alternative strategy within the LQR framework is to embed an integrator into the feedback control to obtain an LOR servo. If the relevant system output is y(t) = Cyx(t) and reference r(¢), add extra states x(t), where x(t) = e(f). In this case, if the state of the original system is x(t), then the dynamics are modified tobe HD ]_} 40 [2] [ede [7] [i [4 A sft bo Ot], ]O e781) H() = Ax() + But) + Br), (27.82) or where ¥(t) = [x7 (t) x)7(0) ]" . The modified optimal control problem is to obtain the feedback controller that minimizes the cost: Ag servo = f lo which is found by solving the Riccati equation (27.78) using the augmented dynamics A and B to obtain Raxk + UT Rugs] dt My =-Rew =-« Kil | u Note that the implementation of this LQR servo requires that the integrator states x; be implemented in software. While slightly more complicated to implement, the advantage of this approach is the additional robustness of ensuring a sufficiently high low-frequency gain in the loop transfer function that the steady-state tracking error to a step reference input will be zero. As such, the LQR-servo form is highly recommended. 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 563 27.3.4.2 Estimation ‘The preceding assumed access to the full state for the feedback control. If that information is available, the control given is very effective, but typically only the output of a few sensors are available. In this case, consider the n-th order system model of the form in Eqs.(27.47) and (27.48) (again with D = 0), x(0) unknown, and C such that x(t) cannot be directly determined. One could try direct (static) output feedback of the form u(t) = Ky y(t), but finding Ky is very difficult, and this approach will be fundamentally limited in what it can achieve, ‘The alternative typically used is to create a dynamic output feedback (DOFB) controller, which uses an observer ot estimator to estimate the system state as X(t), and then employs full-state feedback on the estimated state (so u(t) —K(t)) to control the system. This approach, called the separation princi- ple, separates the design of the DOFB compensator into the regulator problem (picking K) and the design of the estimator (Stengel 1994; Franklin et al. 1994; Bryson and Ho 1969). The estimator design starts with a simulation of the system dynamics, which are assumed known, but then adds a feedback term on the measurement error — the difference between what was measured and what was expected based on the estimator, F(t) = y(t) — C(t). The feedback gain is called L., and it yields the closed-loop estimator: 31) = AR(D) + Bult) + LeF() — LeC)R(0) + Bult) + Ley(t) (27.83) which is a dynamic system with poles given by Aj(A — L-C) and which takes the measured plant outputs as an input and generates an estimate of x(r). Note that if the pair A, C is observable, then the eigenvalues of A — L-C can be placed arbitrarily, Jeading to a similar (actually the dual) design problem as the regulator. A necessary and sufficient condition for observability (see, ¢.g., Dorf and Bishop 1995; Ozbay 2000) is that Cc CA rank M, “rank | C4 | =n (27.84) car L, can be determined using pole placement, with the typical strategy of choosing the real part of the poles to be approximately a factor of 2 larger in magnitude than the associated regulator poles. Given the desired estimator pole locations specified as the roots of the polynomial ®,(s), the estimator equivalent of Ackermann’s formula is r Le = &(A)M5*[0....01] (27.85) 564 JP. How et a Optimal Estimation Similar to Eq. (27.52), noise in the system is typically modeled as, X() = Ax(D) + Bult) + Byw(t) (27.86) VO) = Cx) +02) 27.87) where w is the process noise that models the uncertainty in the system model and v is the sensor noise that models uncertainty in the measurements. It is typically assumed that w(t) and v(f) are zero mean (Efw()] = 0, Elv(e)] = 0) and uncorrelated Gaussian white random noises so that Elw(tyw(e)"] = Rew(ti)8( — f) WO) ~NO. Rim), Ep(n)v()"] = Rw(h)i( —h) 30 ~NO. Rw) Efw(n)v@)"] = 0. Given this noise, one can develop an optimal estimator, where the key step in the design is to balance the effect of the various types of random noise in the system on the estimation error. With noise in the system, the dynamics of the estimation error X(t) for the closed-loop estimator are bse [Ax + Bu + Byw] —[At + But L(y - §)) (A-L.C,)5 + Byw - Lev (27.88) Equation (27.88) explicitly shows the conflict in the estimator design process because one must achieve a balance between the speed of the estimator decay rate, which is governed by R[A; (A — L-C,)], and the impact of the sensing noise y through the gain L,. Fast state reconstruction requires rapid decay rate, which typically requires a large L,, but that tends to magnify the effect of v on the estimation process. The effect of the process noise cannot be modified, but the choice of L, will tend to mitigate/accentuate the effect of v on ¥(t). An optimal filter can be designed that minimizes J = trace(Q.(t)) with (see Bryson and Ho 1969; Kwakernaak and Sivan 1972; Lewis 1986; Gelb 1974; Crassidis and Junkins 2004; Stengel 1994; Simon 2006 for details) Oe(t) = E [{x(t) — RH x(t) — 2(}7] which is the covariance matrix for the estimation error. The result is a closed-loop estimator with L.(f) = Q.(1)C7 Rz} and Q-(t) = 0 solves Qe(t) = AOL) + Qe(tVAT + ByRyw BT — Qe(CT RICO) 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 565 where £(0) and Q. (0) are known, Itis standard to assume that Ryy > 0, Rw > 0, all plant dynamics are constant in time, [A, C,] is detectable, and [A, By] is stabilizable. A system is said to be stabilizable if all unstable modes are controllable and is, detectable if all unstable modes are observable. In this case, the forward propagation of the covariance Q(t) settles down to a constant Q,, independent of Q.(0), as t+ 00 where AQss + QssA" + ByRyyBY — OssC] R5'Cy Ose 0 and Ls, = QreCy Rj". Note that the stabilizable/detectable assumptions give a unique Q,, > 0. Also, if Qs, exists, the steady-state filter 8) = (AL CRO + Ly 27.89) is asymptotically stable given these assumption, and thus, L.,, can be used as the estimator gains L.. for the system. 27.3.4.3 Dynamic Output Feedback Control System Given a closed-loop estimator with gain Le, (1) = (A-L.C)8) + Bult) + Ley) 27.90) ‘Then if L, is chosen as outlined in the previous sections, it is known that £(1) > Xx(f) as 1 — oo, but in general, (1) # x(t) Vt. Even so, the approach taken in the output feedback control case is to implement u(t) = —K(t), leading to the closed-loop system dynamics XO]_| 4 —BK x(t) [8)-[40 se nel] ore) Sei (t) = Aarxer(0) (27.92) or ‘The stability of this closed-loop system can be analyzed using the similarity transformation matrix T = [; ° In factitis easy to show that the dynamics matrix ofthe transformed system is given by . A-BK BK Ka © TAT! = : oO A-L,C Thus, the closed-loop pole locations are given by the roots of the polynomial | that preserves the location of the eigenvalues. det(st — Ay) & det(sT — (A — BK)) -det(st — (A—L-C)) = 0 566 JP. How et a which consist of the union of the regulator poles and estimator poles. The signifi- cance of this result is that it implies that one can design the estimator and regulator separately and combine them at the end, and the closed-loop system will be stable. ‘This is called the separation principle, and when it holds, it greatly simplifies the control design process The resulting dynamic output feedback compensator is the combination of the regulator and closed-loop estimator written using the new state x-(t) = £(t) as elt) = Acxel(t) + Bey) (27.93) u(t) = —Coxe(t), (27.94) 4 where the compensator dynamics are A. & A— BK —L.C, B. © L., and C, & K. Note that, as expected, the compensator maps sensor measurements to actuator commands. The DOFB solution provided in this section is called the (infinite horizon) linear quadratic Gaussian (LQG), and it is the controller that optimizes the expected time- averaged value of the cost in Eq. (27.76) for the stochastic system in Eqs. (27.86) and (27.87) (Bryson and Ho 1969; Stengel 1994; Franklin et al. 1994; Skogestad and Postlethwaite 2005). While LQG has proven to be very effective design algorithm for many MIMO systems, it does not have the same robustness properties guaranteed for the LQR design (Doyle 1978). Furthermore, LQG designs can exhibit high sensitivity to modeling errors. Thus, it is prudent to be cautious and check the peak magnitude of the sensitivity S(s), which provides a measure of the closeness of the loop transfer function to the critical point at s = —1. High sensitivities (above 20-50) are indicative of designs that could be susceptible to modeling errors, so further testing and simulation using perturbed dynamics should be considered. .4 Robust Control Techniques ‘The alternative approach to control design mentioned in Sect. 27.3.1 works with the ‘S(s) and T(s) functions to shape them directly (McFarlane and Glover 1992). For example, consider the following design problem in Fig. 27.14 where 200 GO = Gaara los FD 27.14 Direct design problem 27 Linear Flight Control Techniques for Unmanned Aerial Vehicles 567 Note that there is one input (r) and two performance outputs ~ one that penalizes the sensitivity S(s) of the system and the other that penalizes the control effort used with the weight functions W,(s) and W,(s) to be defined later. With a = W.()(r — Gu) (27.95) 2 = Wis\u (27.96) e Gu, 27.97) then closing the loop with w= G.(s)e yields Peu(s) = ("| 4 [in? Jeu + GG)7 27.98) W,-WGGS]_[ WS -[ W.G.S |=[nes] or) so that 2 WS [2] [wos] C710 and thus, the closed-loop transfer function from the reference input to the perfor- mance variable z; is the weighted sensitivity function, This setup gives us direct access to the sensitivity function in the analysis. It is, now possible to embed tests such as whether | (s)] satisfies a desired bound such as 1 SOOl< Ray ve or equivalently, whether |W,(ja)S(joo)| < 1, Vo. To make this bound useful, one can select the weight W,(s) to emphasize different frequency regions. For example, (o achieve good low-frequency tracking and a crossover frequency of about 10 rad/s, ick , s/15 +10 s+ (10) - (0.0001) Once the architecture of the problem is determined, the structure of Pex (s) is set. ‘The design choice is in the selection of the weights W,(s) and W,(s) which then “shape” the closed-loop S(s). The output z) participates by providing access to a measure of the amount of control authority being used. The overall objective then is to bound the size of the closed-loop transfer function Pex(s), which in most cases will be a matrix. The bound used is based on the singular values of the transfer function matrix evaluated over all frequencies. For a complex transfer function matrix G(jw), the singular values are the positive square roots of the eigenvalues of G"G. The largest of these is called the maximum singular value, so that 3[G(ja)] = max, (GG). Thus, for a stable system, 568 JP. How et a define |Pcx.(s) loo = sup 3 [Pex Gw)] 27.101) One interpretation of this Heo norm, || Pcz(s)|loc, of the system is that it is the energy gain from the input to output. This maximum gain is achieved using a “worst case” input signal that is essentially a sinusoid at frequency @* with (appropriate input direction) that yields [Pcz (jo*)] as the amplification, This interpretation is consistent with the graphical test which finds the peaks of 7 plotted versus frequency. Note that the difference here is that the performance test in the Hoo case is concemed with the maximum amplification of the input signals at any one frequency (worst case). This is contrast to the LQG design, which is concerned with minimizing the sum of the square of all singular values over all frequencies (average case). The Woo norm can also be evaluated using a state space test based on the Hamiltonian matrix 1 (Zhou et al. 1996), and the following result, which states that the gain of a generic stable system G(s) with state space representation Sn (t) = Apxn(t) + Byu(t) (27.102) y(t) = Cnxn(t) + Dau(t), (27.103) is bounded in the sense that Gna = 1. [Dl 0 that solves ATX + XA+ CTC. + X(y7B, BY — B,BT)X =0 (27.105) and RA; [A+ (vy? By BI — ByBT)X] <0 Vi (2) AY = 0 that solves AY + YAT + BI By + Y(y?CIC,-CPC)¥Y =0 (27.106) and RA; [A + ¥(yPCTC,- CTC] <0 Vi @) (XY)

You might also like