Equations of Motion for Micro Air Vehicles September, 005 Randal W. Beard, Associate Professor Department of Electrical and Computer Engineering Brigham Young University Provo, Utah 84604 USA voice: (80 4-839 fax: (80 4-00 beard@ee.byu.edu
CONTENTS CONTENTS Contents Cover Page Table of Contents i ii UAV Coordinate Frames UAV State Variables 3 3 UAV Model 3 4 Linear Pitch Model 5 5 Linear Roll Model 7 6 Trim 7 7 Linearization 8 7. Longitudinal Dynamics.......................................... 8 7. Lateral Dynamics............................................. 9 7.3 Coefficients from Aviones........................................ 0 8 Transfer Functions 0 ii
UAV COORDINATE FRAMES UAV Coordinate Frames For UAVs there are several coordinate systems that are of interest. The inertial frame C I. The inertial coordinate system is an earth fixed coordinate system with origin at the defined home location. The x-axis of C I points North, the y-axis points East, and the z axis points toward the center of the earth. The vehicle frame C v. The origin of the vehicle frame is at the center of mass of the UAV. However, the axes of C v are aligned with the axis of the inertial frame C I. In other words, the x-axis points North, the y-axis points East, and the z-axis points toward the center of the earth. The body frame C b. The origin of the body frame is also at the center of mass of the UAV. The x-axis points out the nose of the UAV, the y-axis points out the right wing, and the z-axis point out the belly. As the attitude of the UAV moves, the body frame remains fixed with respect to the airframe. The wind frame C w. To maintain lift, the UAV is required to maintain a positive pitch angle with respect to the velocity vector of the UAV. It is often convenient to align the body fixed reference frame with the velocity vector. This is the purpose of the wind frame. The origin of the wind frame is the center of mass of the UAV. The x-axis is aligned with the projection of the velocity vector on the x z plane of the body axis. The y- axis points out the right wing of the UAV and the z-axis is constructed to complete a right handed orthogonal coordinate systems. Figure shows the body and the wind axes. The velocity vectory of the UAV points in the direction of the x w axis which makes a angle α with the x b axis. Figure : The body and the wind axes of the UAV. The x-axis of the body frame C b is aligned with the body of the UAV, whereas the x-axis of the wind frame C w is aligned with the velocity vector of the UAV. The angle between x b and x w is the angle of attack α. The orientation of an aircraft is specified by three angles, roll (φ, pitch (θ, and yaw (ψ, which are called the Euler angles. The yaw angle is defined as the rotation ψ about the z v -axis in the vehicle frame C v. The resulting coordinate frame is denoted C and is shown in Figure. It can be seen from the figure that the transformation from C v to C is given by cos(ψ sin(ψ 0 R yaw (ψ R v sin(ψ cos(ψ 0. 0 0
UAV COORDINATE FRAMES C v x v y ψ C x ψ y v z z v Figure : Yaw Angle. The pitch angle is defined as the rotation θ about the y axis in C. The resulting coordinate frame is denoted by C and is shown in Figure 3. It can be seen from the figure that the transformation from C to C is given by x θ x y y C θ C z z Figure 3: Pitch Angle. cos(θ 0 sin(θ R pitch (θ R 0 0. sin(θ 0 cos(θ The roll angle is defined as the rotation φ about the x axis in C. The resulting coordinate frame is the body frame, denoted by C b, and shown in Figure 4. It can be seen from the figure that the transformation from C to C is given by R roll (φ R b 0 0 0 cos(φ sin(φ. 0 sin(φ cos(φ Therefore, the complete transformation from the vehicle frame C v to the body frame C b is given by where p b R v b p v, R v b R roll (φr pitch (θr yaw (ψ cθcψ cθsψ sθ sφsθcψ cφsψ sφsθsψ + cφcψ sφcθ, cφsθcψ + sφsψ cφsθsψ sφcψ cφcθ
3 UAV MODEL x x b y φ y b C C b z φ z b Figure 4: Roll Angle. where cϕ cos(ϕ and sϕ sin(ϕ. UAV State Variables The state variables of the UAV are the following twelve quantities x the inertial position of the UAV along x I in C I, y the inertial position of the UAV along y I in C I, h the altitude of the aircraft measured along z v in C v, u the body frame velocity measured along x b in C b, v the body frame velocity measured along y b in C b, w the body frame velocity measured along z b in C b, φ the roll angle defined with respect to C, θ the pitch angle defined with respect to C, ψ the yaw angle defined with respect to C v, p the roll rate measured along x b in C b, q the pitch rate measured along y b in C b, r the yaw rate measured along z b in C b. The state variables are shown schematically in Figure 5. 3 UAV Model If we assume that the inertia matrix has the form J x 0 J xz J 0 J y 0, J xz 0 J z and that the aerodynamic moments are linear, then the rotational dynamics of the UAV are given by 3
3 UAV MODEL (θ, q (φ, p (x, u Roll Axis (y, v Pitch Axis (z, w (ψ, r Yaw Axis Figure 5: Definition of Axes ḣ u sin θ v sin φ cos θ w cos φ cos θ ( u rv qw g sin θ + ρv S C X0 + C Xα α + C Xq V + C X δ δ e e + ρs prop C prop (kδ t V ( v pw ru + g cos θ sin φ + ρv S bp C Y0 + C Yβ β + C Yp V + C br Y r V + C Y δ δ a a + C δ Yδ r r (3 ẇ qu pv + g cos θ cos φ + ρv S C Z0 + C Zα α + C Zq V + C Z δ δ e e (4 φ p + q sin φ tan θ + r cos φ tan θ (5 θ q cos φ r sin φ ψ q sin φ sec θ + r cos φ sec θ (7 ṗ Γ pq Γ qr + ρv S b bp C p0 + C pβ β + C pp V + C br p r V + C p δ δ a a + C δ pδ r r (8 q J xz (r p + J z J x pr + ρv cs C m0 + C mα α + C mq J y J y J y V + C m δ δ e e (9 ṙ Γ 3 pq Γ 4 qr + ρv S b bp C r0 + C rβ β + C rp V + C br r r V + C r δa δ a + C rδr δ r, (0 (6 4
4 LINEAR PITCH MODEL where Γ (J x J z J xz Γ J xz (J x J y + J z /Γ, Γ (J z (J z J y + J xz/γ Γ 3 ((J x J y J x + J xz/γ Γ 4 (J xz (J x J y + J z /Γ C p0 C pβ C pp C pr C pδ a C pδ r C r0 C rβ C rp C rr C rδ a C rδ r J z Γ C l 0 + J xz Γ C n 0 J z Γ C l β + J xz Γ C n β J z Γ C l p + J xz Γ C n p J z Γ C l r + J xz Γ C n r J z Γ C l δ a + J xz Γ C n δ a J z Γ C l + J xz δ r Γ C n δ r J xz Γ C l 0 + J x Γ C n 0 J xz Γ C l β + J x Γ C n β J xz Γ C l p + J x Γ C n p J xz Γ C l r + J x Γ C n r J xz Γ C l δ a + J x Γ C n δ a J xz Γ C l + J x δ r Γ C n. δ r 4 Linear Pitch Model In this section we will derive a linear equation for the evolution of the pitch angle θ. From Equation (6 we have θ q cos φ r sin φ q + q(cos φ r sin φ q + d θ, where d θ q(cos φ r sin φ. Differentiating we get θ q + d θ. 5
4 LINEAR PITCH MODEL Plugging in from Equation (9 and using the relationship θ α + γ, where γ is the flight path angle, we get θ J xz (r p + J z J x pr + ρv cs C m0 + C mα α + C mq J y J y J y V + C m δ δ e e + d θ J xz (r p + J z J x pr + ρv cs c C m0 + C mα (θ γ + C mq J y J y J y V ( θ d θ + C δ mδ e e ( ( c ρv cs + C mq J y V + J z J x J y pr + J y ρv cs a θ θ + aθ θ + a θ3 + d θ, θ + ρv csc mα J y c C m0 C mα γ C mq V d θ ( θ + ρv csc mδ e J y } + d θ δ e + { Jxz J y (r p + d θ where a θ, a θ, a θ3, and d θ have been appropriately defined. We have therefore derived a linear model for the evolution of the pitch angle. Taking the Laplace transform we have ( ( a θ3 θ(s s δ e (s + + a θ s + a θ s d θ (s + a θ s + a θ Note that in straight and level flight, r p φ γ 0 In addition, airframes are usually designed such that C m0 0, which implies that d θ 0. In general however, we have the equivalent block diagrams shown in Figures 6 and 7. Figure 6: Output disturbance form. Figure 7: Input disturbance form. 6
6 TRIM 5 Linear Roll Model In this section we will derive similar equations for roll. From Equation (5 we have Differentiating and using Equation (8 we get φ ṗ + d φ φ p + q sin φ tan θ + r cos φ tan θ p + d φ. Γ pq Γ qr + ρv S b bp C p0 + C pβ β + C pp V + C br p r V + C p δ δ a a + C δ pδ r r + d φ Γ pq Γ qr + ρv S b b C p0 + C pβ β + C pp V ( φ br d φ + C pr V + C p δa δ a + C pδr δ r ( ρv S b ( C b p p φ + V ρv S b C p δa δ a { + Γ pq Γ qr + ρv S b } b C p0 + C pβ β C pp V (d br φ + C pr V + C p δ δ r r + d φ a φ φ + aφ δ a + d φ. In the Laplace domain we have ( φ(s 6 Trim a φ s(s + a φ ( δ a (s + s(s + a φ d φ (s + d φ The notion of trim is an important topic in flight dynamics. The objective of this section is to briefly describe trim conditions. Suppose that we are given the nonlinear system described by the differential equations ẋ f(x, u, where f : R n R m R n, x is the state of the system and u is the input. The system is said to be in equilibrium at the state ˆx and input û if f(ˆx, û 0. When a UAV is in wings level steady flight, a subset of its states are in equilibrium. In the aerodynamics literature, an aircraft in equilibrium is said to be in trim. Trim is usually found about several flight conditions. The following four flight conditions are particularly useful.. Wings level flight. In wings level flight, airspeed is assumed to be constant. The wings are level but the flight path angle may not be zero. In other words, we allow for constant rate climbs and descents. Wings level flight is a pure longitudinal motion.. Constant altitude turn. In a constant altitude turn, the velocity is assumed constant and the altitude is held constant. To maintain constant altitude, both longitudinal and lateral controls are required. 3. Turn with a constant climb rate. This flight condition is a combination of wings-level flight and constant altitude turn maneuvers. Wings level flight and constant altitude turns are special cases of this flight condition. It is particularly useful for autonomous take-off and landing of mini-uavs. 4. Pull-up and push-down maneuvers. Pull-up and push-down maneuvers are not really equilibrium maneuvers in that f(ˆx, û 0 cannot be maintained indefinitely. Instead they may only be maintained for short periods of time. In pull-up and push-down maneuvers, airspeed is held constant, and the UAV travels a constant radius path in the longitudinal direction. The system equations given in ( (0 can be linearized around these trim conditions to obtain linear models for UAV flight. 7
7 LINEARIZATION 7 Linearization The UAV dynamics can be represented by the general nonlinear system of equations ẋ f(x, u, where x R is the state, u R 4 is the control vector, and f is given by Equations?? (??. Suppose that we have trimed the UAV with a trim input û and a trim state ˆx where ˆx f(ˆx, û. Letting x x ˆx we get x ẋ ˆx f(x, u f(ˆx, û f(x + ˆx ˆx, u + û û f(ˆx, û f(ˆx + x, û + ũ f(ˆx, û. Taking the Taylor series expansion of the first term about the trim state we get f(ˆx, û x f(ˆx, û + x + x f(ˆx, û x + x f(ˆx, û ũ + H.O.T f(ˆx, û Therefore, the linearized dynamics are determined by finding f f x and. 7. Longitudinal Dynamics f(ˆx, û ũ. ( The typical approach in the autopilot literature is to separate the dynamics into longitudinal and lateral modes. Longitudinal modes are the dynamics in the x-z plane and are described the state variables h, V, α, u, w, q, and θ. The lateral modes are the roll and pitch dynamics and are described by the state variables β, v, p, r, φ, and ψ. From Equations ( (0 we get u rv qw g sin θ + ρv S ẇ qu pv + g cos θ cos φ + ρv S q J xz (r p + J z J x pr + J y J y θ q cos φ r sin φ ḣ u sin θ v sin φ cos θ w cos φ cos θ. C X0 + C Xα α + C Xq V + C X δ e δ e C Z0 + C Zα α + C Zq + ρs prop C prop V + C Z δ δ e e ρv cs C m0 + C mα α + C mq J y V + C m δ δ e e (kδ t V The first step is to assume that all of the lateral states are zero, i.e., set φ p r β v 0 and substitute ( α tan w u V u + w 8
7. Lateral Dynamics 7 LINEARIZATION from Equation (?? to get u qw g sin θ + ρ(u + w S ( C X0 + C Xα tan w u + ρs prop C prop (kδ t (u + w ẇ qu + g cos θ cos φ + ρ(u + w S ( C Z0 + C Zα tan w u q ( ρ(u + w cs C m0 + C mα tan w J y u θ q ḣ u sin θ w cos θ. + C δ Xδ e e The next step is to linearize Equation?? according to Equation ( where Toward that end, note that f x f ( w tan u ( w w tan u δ e δ e δ e δ e δ e w w w w w δ t δ t δ t δ t δ t + w u + w u + C δ Zδ e e + ρ u + w S C Xq + ρ u + w S C Zq + C mδe δ e + J y ρ u + w csc mq q q q q q. ( u ( u θ θ θ θ θ h h h h h w u + w w V u u + w u V, where we have used Equation (?? and the fact that v 0. Working out the derivatives we get that the linearized state space equations are ũ X u X w X q g cos w ˆθ 0 ũ q Z u Z w Z q g sin ˆθ X δe X δt 0 w M u M w M q 0 0 q θ 0 0 0 0 θ + Z δe 0 ( M δe 0 δe 0 0 δ t, h sin ˆθ cos ˆθ 0 û cos ˆθ + ŵ sin ˆθ 0 h 0 0 where the coefficients are given in Table 7.. 7. Lateral Dynamics A similar approach can be followed for the lateral dynamics to obtain v Y v ˆv û g cos ˆθ v Y δa Y δr ṗ ṙ L v L p L r 0 p N v N p N r 0 r + L δa L δr N φ 0 tan ˆθ δa N δr 0 φ 0 0 ( δa δ r. 9
7.3 Coefficients from Aviones 8 TRANSFER FUNCTIONS Longitudinal X u X w X q X δe X δt Z u Z w Z q Z δe M u M w M q M δe ûρs m ˆq + ŵρs m C X0 + C Xα ˆα + C Xδ e C X0 + C Xα ˆα + C Xδ e ŵρs m Formula ˆδ e ρsŵc Xα ˆδ e + ρs cc Xq ŵˆq ˆV ŵ + ρ ˆV SC X q ĉ ρ ˆV SC Xδe ρs prop C X p kˆδ e m ˆq + ûρs m C Z0 + C Zα ˆα + C Zδ e C Z0 + C Zα ˆα + C Zδ e ûρs c J y û + ρ ˆV SC Z q c ρ ˆV SC Zδe C m0 + C mα ˆα + C mδe ˆδe + ρs cc Xq ûˆq ˆV ˆδ e ρsc Zα ŵ ˆδ e + ρsc Zα û ρs ccm α ŵ J y ŵρs c J y C m0 + C mα ˆα + C mδe ˆδe + ρs ccm α û J y ρ ˆV S c C m q J y ρ ˆV S cc mδe J y + ρs ˆV C X α û ρspropcpropû m + ûρsc Zq cˆq ˆV m + ρŵs cc Zq ˆq m ˆV + ρs c C mq ˆqû J y ˆV + ρs c C m q ˆqŵ J y ˆV ρs propc prop ŵ Table : Longitudinal Coefficients State Space Models. 7.3 Coefficients from Aviones The linearized equations around level flight for the UAV model in Aviones, are given by ũ 0.3356.38.976 9.68 0 ũ 0.7436 6.878 w q.96 3.9003 9.85.895 0 w 0.700 3.5735.390 0 0 q θ 0 0.0000 0 0 θ + 3.7855 0 ( δe 47.970 0, 0 0 δ t h 0.98 0.98 0 0.0000 0 h 0 0 0.88 v.050.976 9.85 9.67 β ṗ ṙ.3.955.0096 0 p.755 0.099.798 0 r + 8.3479 0.8560 4.400.7 0 0 φ 0.0000 0.964 0.0000 φ 0 0 8 Transfer Functions Transfer function models can be extracted from the state-space models using the Matlab sstf command. For example the transfer function from δ e to u can be obtained using the following commands: >> num,den sstf(a_lon, B_lon,,0,0,0,0, 0,0, >> H_u_elevator zpk(minreal(tf(num,den. Using this method we the following transfer function: H u,δt 6.878(s 0.08383(s + 5.38s + 80.79 (s + 0.4543s + 0.8368(s + 5.7s + 79.8, ( δa δ r. 0
8 TRANSFER FUNCTIONS H u,δe 0.74363(s + 3.(s +.684s + 8.9 (s + 0.4543s + 0.8368(s + 5.7s + 79.8, H w,δe 3.7855(s + 35.8(s + 0.3845s +.06 (s + 0.4543s + 0.8368(s + 5.7s + 79.8, H q,δe H θ,δe H v,δa 47.97s(s + 3.038(s + 0.905 (s + 0.4543s + 0.8368(s + 5.7s + 79.8, 47.6(s + 3.038(s + 0.905 (s + 0.4543s + 0.8368(s + 5.7s + 79.8, 5.536(s 3.59(s +.4 (s +.6(s 0.0570(s +.58s +, H p,δa 8.3479(s 0.709(s + 3.454s + 5.95 (s +.6(s 0.0570(s +.58s +, H r,δa 4.4(s + 3.548(s 0.40s +.53 (s +.6(s 0.0570(s +.58s +, H φ,δa 9.808(s + 3.7s + 4.07 (s +.6(s 0.0570(s +.58s +.