A Decoupled Approach for Flight Control

A decoupling method for flight control is presented that greatly simplifies the controller design. By approximating the higher order derivatives of the angle of attack and sideslip, it enables a rotation controller and a speed controller to be derived independently of each other, and thus gives access to a vast number of controller solutions derived for general classes of rotational and translational systems. For rotational control, a quaternion-based sliding surface controller is derived to align the wind frame in a desired direction, and using standard Lyapunov methods an airspeed controller is derived to ensure that an unmanned aerial vehicle moves with a positive airspeed. Simulations validate the potential of the proposed method, where the unmanned aerial vehicle is able to obtain leveled flight and move in a desired direction with a desired airspeed.


Introduction
Fixed-wing unmanned aerial vehicles (uavs) have six degrees of freedom and four actuators: thrust for translational control and three control surfaces for rotational control.With fewer degrees of freedom than number of actuators, this constitutes an underactuated control problem (cf. Reyhanoglu et al. (1999)), a control problem that has received much attention with regards to e.g.ships, autonomous underwater vehicles (auv) and quadrotors (cf.Børhaug and Pettersen (2005), Fossen et al. (2003), Tayebi and McGilvray (2006)).Surprisingly, fixed-wing uavs are rarely defined as underactuated, even though the same constraints as for an auv are present.With basis in the fact that the uav is underactuated, the question remains: "how can we make the uav reach a desired point in Euclidean space?"In the case of an ideal particle with all its speed along one of its axes, the problem reduces to that of pointing the speed axis in a desired direction and move with a positive speed.This will make the particle reach a desired point in finite time.This basic example can be related to that of controlling a fixed-wing uav.The thrust can be used to control the speed, while the control surfaces can be used to control the orientation.This enables the uav to obtain a desired speed that can be pointed in a desired direction and which then can be used to solve any control objective.
The common approach for flight control is to solve the translational dynamics for the angle of attack and sideslip rates.The angle of attack and sideslip can then be made to track desired values using the angular velocities, while the angular velocities can be controlled using the deflection angles (cf.Farrell et al. (2005), Lee and Kim (2001), Sonneveldt et al. (2009)).For example in Sonneveldt et al. (2009), the dynamics become on a non-affine form as ẋ1 =f 1 (x 1 , x 2 , x 3 , T, u) + g 1 (T, x 2 ) (1) ẋ2 =f 2 (x 1 , x 2 , x 3 , T, u) + G 2 (x 2 )x 3 (2) ẋ3 =f 3 (x 1 , x 2 , x 3 ) + G 3 (x 1 )u (3) where x 1 represents the heading, flight path and airspeed, x 2 represents the bank angle, angle of attack and sideslip, x 3 represents the angular velocity, T is the thrust and u represents the deflection angles.Even though the dynamics is on a non-affine form with the control signal in the x 1 system, it is possible to apply command-filtered backstepping to stabilize the system resulting in good tracking capabilities.Instead of controlling the angle of attack and sideslip directly, they can be used indirectly as part of a rotational control law that points the airspeed in a desired direction.Some preliminary results on this approach are given in Oland et al. (2013) and Oland and Kristiansen (2014).

Contribution
This paper presents a new approach for flight control.By approximating higher order derivatives of the angle of attack and sideslip, it enables a decoupling of the rotational and translational systems.A quaternionbased sliding surface controller is derived to point the airspeed in a desired direction, while an airspeed controller is derived using standard Lyapunov methods to enable the uav to track a desired speed profile.The combination of the two relatively simple control laws, enables the uav to reach any point in R 3 by properly defining the desired airspeed, orientation, angular velocity and angular acceleration.

Notation
The time derivative of a vector is denoted as ẋ = dx/dt and the Euclidean length is written as ||x|| = √ x x.Superscript denotes the reference frame of a vector.The rotation matrix is denoted R c a ∈ SO(3) = {R ∈ R 3×3 : R R = I, det(R) = 1}, which rotates a vector from frame a to frame c and where I denotes the identity matrix.The angular velocity vector is denoted ω e a,c , which represents the angular velocity of frame c relative to frame a referenced in frame e. Angular velocities between different frames can be added together as ω e a,f = ω e a,c + ω e c,f (cf.Egeland and Gravdahl (2002)).The time derivative of the rotation matrix is found as Ṙc a = R c a S(ω a c,a ) where the cross product operator S(•) is such that for two vec- The rotation matrix can be parameterized using quaternions (cf.Hamilton (1844)), where the quaternion that represents a rotation from frame a to frame c is denoted q c,a ∈ S 3 = {q ∈ R 4 : q q = 1} and can be written as which performs a rotation of an angle ϑ c,a around the unit vector k c,a , and the inverse quaternion is defined as Figure 1: Different reference frames to consider when designing a flight controller (Inspired by Stengel (2004)).
η c,a − c,a .The scalar part is denoted η c,a and the vector part as c,a ∈ R 3 , enabling the rotation matrix to be constructed as R c a = I + 2η c,a S( c,a ) + 2S 2 ( c,a ).Composite rotations are found using the quaternion product as (cf.Egeland and Gravdahl (2002)) q c,e = q c,a ⊗ q a,e = T(q c,a )q a,e with which ensures that the resulting quaternion maintains the unit length property, while the quaternion kinematics is given as

Reference Frames
To facilitate flight control, several different reference frames are needed as illustrated in Figure 1.The objective is to relate the wind and body frame with a desired frame, which can be achieved by going through the velocity frame, or through the body and stability frame.
The North East Down (NED) Frame: is denoted by superscript n.The frame has its x n axis pointing North, y n points East while z n points down completing the right-handed orthonormal frame.The ned frame is treated as an inertial frame.
Body Frame: is denoted by superscript b and has its origin in the center of mass of the uav.The x b axis coincides with the fuselage of the uav, y b goes through the right wing, while z b points down completing the right-handed orthonormal frame.Stability Frame: is denoted by superscript s.The stability frame is obtained from the body frame by performing a left-handed rotation by the angle of attack, α, around the y b axis as shown in Figure 2.
Wind Frame: is denoted by superscript w.The wind frame is obtained from the stability frame by performing a right-handed rotation by the sideslip angle, β, around the z s axis as shown in Figure 2. In this frame, the total airspeed is aligned along the x w axis.
Velocity Frame: is denoted by superscript v and is defined relative to the ned frame.The velocity frame is obtained by rotating around the z n axis by the heading angle, χ, and around the y n axis by the flight path angle, γ.In this frame, the total ground speed is aligned along the x v axis.Note that the wind frame and velocity frame are not the same frame, but are related through the bank angle, µ (cf.Stengel (2004)).
Desired Frame: is denoted by superscript d and can be defined arbitraily to achieve any control objective.Waypoint tracking with collision and ground avoidance is presented in Oland et al. (2016), and can be combined with the results of this paper.

Translational Kinematics and Dynamics
The translational kinematics for a fixed-wing uav can be defined as (cf.Stevens and Lewis (2003)) where p n := x y z is the position of the uav in the ned frame, R n b is the rotation matrix from the body to the ned frame, v b is the velocity of the uav relative the Earth and v b r := u v w is the velocity relative the surrounding air, where v n wind is the velocity vector of the wind which is assumed to be constant.The ground speed of the uav is defined as V g := ||v b || which is the speed of the uav relative to the Earth, and the airspeed is defined as which is the speed relative to the surrounding air.The relative velocity can be rotated to the wind frame as where the total airspeed is aligned along the x w axis.
The rotation matrix from the body frame to the wind frame can be constructed using the angle of attack and sideslip angle as (cf.Stevens and Lewis (2003)) where α = tan −1 w u and β = sin −1 v Va .Using the laws of Newton, the relative acceleration is found as (cf.Stevens and Lewis (2003)) where m is the mass, f b thrust = T 0 0 is the thrust vector with T as the total thrust, f n g = 0 0 g is the gravity vector where g is the acceleration due to the gravity, and ω b n,b = p q r is the angular velocity of the body frame relative to the ned frame referenced in the body frame.The aerodynamic force vector can be defined as (cf.Campa et al. (2007), Etkin (1972), Stengel (2004)) where ρ is the air density, S is the wing area, C (•) are aerodynamic coefficients, b is the wing span and c is the mean aerodynamic chord, and δ a , δ e , δ r are the deflection angles of the aileron, elevator and rudder respectively, which are used for rotational control.Note that the aerodynamics are linear in the angle of attack and sideslip angle, making this aerodynamic model only valid for small angles of attack and sideslip.The aerodynamic model presented here has no impact on the overall design method, and can easily be extended to allow high angles of attack without affecting the proposed control solution.The acceleration relative to the surrounding air is found by differentiating eq. ( 8) and inserting eq. ( 11), and using that ( which can be used to design an airspeed controller.
Note that with V a > 0 and u >> v, w it follows that u > 0 ∀t ≥ t 0 .
To summarize, from eq. ( 9) the airspeed is aligned along the x w axis, such that by pointing the x w axis in a desired direction and moving with a positive airspeed, the uav can reach any point in R 3 .

Rotational Kinematics and Dynamics
Using quaternions, the rotational kinematics and dynamics can be written as where q n,b represents the orientation of the body frame relative to the ned frame, J = J ∈ R 3×3 is the inertia matrix which is assumed to be constant, τ b aero is the aerodynamic moments acting on the uav (cf.Campa et al. (2007), Etkin (1972), Stengel (2004)), where x = V a α β , and where u = δ a δ e δ r is the control signal.The aerodynamic vector f (x) is defined as and the damping matrix is defined as Note that D(x) is positive definite for all V a > 0. The control effectiveness matrix is defined as which has full rank as long as V a > 0 and Hence, by changing the deflection angles of the aileron, elevator and rudder (δ a , δ e , δ r ), aerodynamic moments are produced which result in a change of orientation and angular velocity.

Total System
Let the aerodynamic force vector in eq. ( 12) be rewritten as where ) is given in eq. ( 24) and then the total system can be written using eq.( 11) and eq.( 18) as shown in eq. ( 25).For this system there are four actuators, the thrust, T , that is acting along the x b axis, and three deflection angles, u = δ a δ e δ r that produce moments as well as affecting the aerodynamic drag, lift and sideforce.A critical issue with this model, and control of aircraft in general, is that the deflection angles enter the translational dynamics, an issue that often is ignored by simplifying the aerodynamics or solved by using values from the previous time-step.This represents a strong coupling between the rotational and translational systems that must be accounted for when designing the control laws.The common approach to address this issue, is to divide the system into a slow system and a fast system, where the deflection angles are treated as constants in the slow system, and are only "active" in the fast system.This means that the elevator is assumed to be constant when designing the speed controller.To be precise, the common approach is to solve the translational dynamics first, followed by the rotational dynamics.By studying the dynamics in eq. ( 25), it is evident that the thrust only appears in the translational dynamics, while the deflection angles are part of both systems.A better approach which is the focus of this paper is to first control the rotational system and then the translational system, something that can be achieved by approximating the higher order derivatives of the angle of attack and sideslip angle.With the deflection angles available from the control law, their impact on the translational system can be removed from the closed loop dynamics using the thrust.

Decoupling
The rotation matrix R b w can be parameterized using quaternions as q b,w = q b,s ⊗ q s,w where s denotes the stability frame.The quaternions can be defined as q b,s = cos( α 2 ) 0 − sin( α 2 ) 0 and q s,w = cos( β 2 ) 0 0 sin( β 2 ) .The angular velocity of the wind frame relative the body frame is found as (cf.Stevens and Lewis (2003)) and the angular acceleration is found through differentiation as The angle of attack and sideslip are functions of the linear velocity components, such that higher order derivatives are not directly available (requires measurements of the acceleration and jerk).Instead they can be approximated using a linear filter.In the case of estimating the angle of attack, let x 1 := α r , x 2 := αr and x 3 := αr where α r represents the estimated angle of attack.Then a linear filter with saturation can be proposed as (cf.Fossen ( 2011)) where ζ is the relative damping ratio, ω n is the natural frequency, and the saturation function is defined as which ensures that the higher derivatives remain smooth and bounded.A similar filter can be applied for the sideslip angle.Note that the higher order derivatives of the angle of attack and sideslip can also be found using other methods such as e.g a high gain observer (cf.Khalil (2002)) or a linear Kalman filter.For example a linear Kalman filter can be implemented by assuming constant angular acceleration as where ∆T is the time-step for the filter, x k = α α α β β β and w k is the process noise.Simulations using this process model have shown excellent results in estimating the higher order derivatives of the angle of attack and sideslip angle.The result of using a filter to estimate the higher order derivatives is that the rotational and translational systems become decoupled, such that a rotational controller can be designed first, followed by a speed controller.

Control Objective
The control objective is to point the wind frame in a desired direction and then move with a positive airspeed.Let q n,d , ω d n,d , ωd n,d ∈ L ∞ represent the desired trajectory, then the attitude error of the wind frame relative to the desired frame can be written as the composite quaternion which has two equilibria at q d,w = ±1 0 0 0 which physically represent the same orientation, but mathematically they are different.From a control perspective it is more intuitive controlling the attitude relative to the origin.Inspired by Kristiansen et al. (2009), let an error function be defined as T e (e q± ) = 1 2 ± d,w η d,w I + S( d,w ) ( 36) For speed control, let a desired airspeed be defined through V d , Vd ∈ L ∞ which in general can be timevarying, and let a speed error function be defined as Ṽ = V a − V d .By differentiating the speed error and by inserting eq. ( 16) the error dynamics becomes The control objective is therefore to make ( Ṽ , e q± , ω b d,w ) → (0, 0, 0), making the uav move with a positive airspeed and track a desired attitude and angular velocity.

Assumptions
Before stating the main results, a few assumptions are required: Assumption 1 is required to enable flight, while Assumption 2 divides the rotation sphere into two halves enabling the controller to be derived while focusing on only one of the two equilibria of the quaternion error.
This assumption can be relaxed by introducing hybrid switching as shown in Schlanbusch et al. (2011).The assumptions included above are introduced to maintain the focus on the main contribution in the paper, which is the decoupling of the rotational and translational systems.

Rotational Controller
The attitude and angular velocity can be controlled using a sliding surface controller based on Slotine and Li (1987).The main result is summarized by the following proposition: Proposition 1 Let assumptions 1-2 hold.Given q n,d , ω d n,d , ωd n,d ∈ L ∞ , then the dual equilibrium points (e q± , s) = (0, 0) of the dynamics from eq. ( 17) and eq.( 18) in closed loop with the controller where k q > 0 and k s > 0, Λ = Λ > 0, are uniformly exponentially stable.
Proof 2 The proof is given in Appendix C.

Translational Controller
The objective of the translational controller is to make the airspeed tracking error go to zero, which can be solved using the following proposition: Proposition 2 Let Assumption 1 hold.Given a desired speed profile defined by V d , Vd ∈ L ∞ , then the origin Ṽ = 0 of the dynamics from eq. ( 16) in closed loop with the controller where k p > 0, is uniformly exponentially stable.
Proof 3 The proof is given in Appendix D.
By using the proposed decoupling method, the control structure can be presented as shown in Figure 3.Note that even though the translational and rotational dynamics are strongly coupled, the fixed-wing uav can be easily controlled with these two control laws.

Simulation
The uav model that is employed is the YF-22 uav from Campa et al. (2007) where the stabilizer is treated as an elevator.The parameters are reproduced in Appendix A. The uav has the thrust constrained as 0 ≤ T ≤ 250 N, and the deflection angles are bounded as −0.3491 ≤ δ a , δ e , δ r ≤ 0.3491 radians.Let the initial states be given as q n,b (0 v b (0) = 25 0 0 , v n wind = 10 0 0 m/s.The gains are chosen as k q = 10, k s = 10, Λ = 2I, k p = 2.With the initial orientation, the uav is pointing along the negative x n axis, such that by defining q n,d = 1 0 0 0 , the objective is to perform a rotation of π radians such that the wind frame becomes aligned with the ned frame resulting in leveled flight.The desired angular velocity and acceleration are set equal to zero and the desired airspeed to V d = 40 m/s.
Figure 4 shows the the attitude error, e q , angular velocity error, ω b d,w := ω 1 ω 2 ω 3 , and deflection angles, u.The attitude error goes quickly to zero, and the same applies to the angular velocity.Note that there are some oscillations of the angular velocity error which is due to the actuator constraints as shown in bottom plot.Performing an attitude maneuver of π radians makes the rudder go into saturation, which affects the angular velocity error.As the attitude and angular velocity error converge to zero, the deflection angles go to constant values.The airspeed error and thrust are shown in Figure 5.The airspeed error exponentially converges to zero, and the thrust converges to a constant value maintaining the desired airspeed.The position of the uav is shown in Figure 6.Remember that the objective is simply to align wind frame with the ned frame such that the uav moves along the x n axis which is apparent from Figure 6.Also note that the z component converges to a constant such that the uav obtains leveled flight.
To better visualize the results, let the orientation of the body relative to the ned frame be defined through the roll (φ), pitch (θ) and yaw (ψ) angles.This is visualized in Figure 7 where the initial yaw angle is π radians which converges close to zero.In fact it is only the roll angle that goes to zero.When the roll angle is zero, there exists a simple relation between the yaw angle and the heading angle as χ = ψ+β, and between the pitch angle and the flight path angle as γ = θ − α (cf.Stengel (2004)).Figure 7 shows that the pitch and yaw angle do not go to zero, but to the angle of attack and the negative sideslip.This is highlighted in the bottom plot, where it is seen that the roll, flight path and heading angle all go to zero.The plot in the middle shows the angle of attack and sideslip during the maneuver, where it is seen that the sideslip is as large as about 0.42 radians while the uav performs its maneuver to change its orientation.Also note that the angle of attack does not go to zero, but converges to about 0.0617 radians which produces enough lift to compensate for the gravity.

Conclusion and Discussion
This paper has presented a solution to the problem of flight control for fixed-wing uavs by decoupling the rotational and translational subsystems using a simple filter.It enables the controllers to be derived independently of each other and greatly simplifies the overall control design.The proposed method was validated by tracking a desired orientation and airspeed, and shows promising results.The generality of the control laws enables any guidance method to be applied through the desired orientation, angular velocity and acceleration as well as airspeed.To perform guidance relative to the ground, the desired direction of the ground speed and its magnitude must be mapped to a desired airspeed and a desired orientation.

B. Proof of Lemma 1
Expanding the terms it can be written as where the inequality in eq. ( 45) is found by and it follows that the inequality holds for e q+ ∀ 0 ≤ η d,w ≤ 1 and e q− ∀ − 1 ≤ η d,w ≤ 0.

C. Proof of Proposition 1
Without loss of generality, consider the positive equilibrium point and let e q := e q+ and T e := T e (e q+ ).
The sliding variable is defined as where Λ = λI with λ > 0, enabling the angular velocity error to be written as and the sliding variable can be differentiated using eq.( 18), ( 19) and (47) as Let the error vector be defined as x e := e q s and a positive, radially unbounded Lyapunov function candidate as V 1 (x e ) := k q 2 e q e q + 1 2 s Js > 0 ∀ x e = 0 (51) where k q > 0 is a scalar gain.Equation (51) can be differentiated using eq.( 35) and eq.(50) as V1 (x e ) = − k q Λe q T e T e e q + k q e q T e R w and by inserting the control law from eq. ( 40) into eq.( 52) it results in V1 (x e ) = −k q Λe q T e T e e q − s (k s I + D(x))s where Lemma 1 has been used.The damping matrix D(x) is positive definite as long as V a > 0 and can be lower bounded using Assumption 1 as β D ≤ λ min (D(x min )) where λ min (D(x min )) is the smallest eigenvalue of the damping matrix where x min = β v 0 0 .The origin (x e = 0) can now be shown to be exponentially stable by applying Theorem 4.10 from Khalil (2002).The inertia matrix is assumed to be constants, such that c 1 = λ min (J) ≤ ||J|| ≤ λ max (J) = c 2 where c 1 , c 2 are two positive constants.This enables the Lyapunov function in eq. ( 51) to be bounded as where c 3 := 1 2 min{k q , c 1 }, c 4 := 1 2 max{k q , c 2 } such that V1 (x e ) = − c5 c4 V 1 (x e ) where c 5 := min{ indicating that the origin is exponentially stable.Note that all the positive constants c 3 , c 4 , c 5 are independent of the initial conditions.As emphasized in Loría and Panteley (2002), a system is uniformly exponentially stable if and only if the constants in eq. ( 55) are independent of the initial conditions.Hence, it follows that the origin x e = (e q , s) = (0, 0) is uniformly exponentially stable.A similar proof can be done for the negative equilibrium point by defining e q := e q− and T e := T e (e q− ).

D. Proof of Proposition 2
Let a radially unbounded, positive Lyapunov function candidate be chosen as V 2 = 1 2 Ṽ 2 > 0 ∀ Ṽ = 0, which can be differentiated using eq.( 38) as and by inserting eq. ( 44), the Lyapunov derivative becomes V2 = −k p Ṽ 2 , which is negative definite.Given V d , Vd ∈ L ∞ and by applying similar arguments as for Proposition 1, it follows that the origin ( Ṽ = 0) is uniformly exponentially stable.

Figure 2 :
Figure 2: The relationships between the body, stability and wind frame.
where β v is a lower bound on the airspeed.Assumption 2 Assume that sign(η d,w (t)) = sign(η d,w (t 0 )) ∀ t.Lemma 1 Using Assumption 2 the following inequality holds: e q± T e (e q± )T e (e q± )e q± ≥ 1 8 e q± e q± .(39) Proof 1 The proof is given in Kristiansen et al. (2009) and Schlanbusch et al. (2012) and is reproduced in Appendix B.