You are on page 1of 37
Satellite Dynamics and Control in a Quaternion Formulation Lecture note for course 31365 Spacecraft Dynamics and Control at DTU Mogens Blanke Section of Automation at Orsted- DTU Technical University of Denmark Jamnary 2004 Abstract Thislecture notetreatsmodellingand attitude control design using a quater- nion description of attitude for a rigid body in space. Dynamics and kine- matics ofa satellite is formulated asa non-linear model from Euler's moment equations and a description of kinematics using the attitude quaternion to represent rotation. A general linearized model is derived such that the user can specify an arbitrary point of operation in angular velocity and wheel angular momentum, specifying the a inertia matrix for a rigid satellite. A set of Simulink® models that simulate the satellite’s nonlinear behaviour are described and a Matlab@ * function is described that has been written to calculate the linear model in an arbitrary point of operation. Copyright © 2004 Mogens Blanke and Technical University of Denmark. This document may be used for academic purposes with reference to the originator. TMATLAB and SIMULINK are trademarks of MathWorks Inc. USA. Contents 1 Satellite Equations of Motion 1.1 Dynamics of satellite with momentum wheels . .. « 1.2. Kinematics 1.3. Reaction Wheels as Actuators « 1.3.1 Wheel Aligned with Satellite Coordinate System . 1.3.2 Wheel Aligned in Other Direction 14 Actuator Dynamics the Wheel Control Loop . « 1.4.1 Combined Model... « 1.5 Nonlinear model . . 2 Nonlinear Simulation Model 3. Linear Model for Analysi 3.1 Linear Satellite Model with Actuator Dynamics 4 Matlab Function to get Linearized Model 4.1 Linear model without wheel dynamics . . 4.2. Linear Models with wheel dynamics... 4.3. Linear model for sampled system . 5 Attitude Control 5.1 Reference in both angular rate and attitude 5.2. Reference in Attitude 5.3. Stability Analysis and Simple Controller Design . A Programme Listings and Contents CD ALL linSatModel - no gravity gradient . A.2 romerEx . . AB SATsimstart - Ad RWaAsim . AS SATsim Seord8s)8.H488 15 18, 19 19 20 20 21 21 23 24 29 30 31 34 34 35 List of Figures da 1.2 13 24 2.2 2.3 Satellite model with nonlinear dynamics andkinematics, Equa- tions 1.4 and 1.10, h istheangular momentum of wheels, Neze an external torque and Na the control torque from reaction wheels, all given in the SBC system. Output isqandw . . . Schematic wheel control loop. The upper part (A) shows the idealized model where h is identical to the demand torque. ‘The bottom part (B) shows a more realistic configuration where a speed control servo loop is closed around the wheel. This gives the generation of h a low-pass behaviour. The bandwidth of the h loop is equal to wy. - Satellite model with reaction wheel assembly as actuator, satellite dynamics and kinematics. . . « Simulink mainwindow for sat3.sim.mdl. Input are control torque demand, initial values for attitude quaternion of satel- lite, angular rate of satellite, initial valies of reaction wheel speeds. Parameters are to be resent in the workspace before you start a simulation. . . . Level2 of sat3sim with three component satellite kinematics and wheel model... . « Satellite dynamics is a direct implementation of Eulers mo- ment equation, Kinematics implemented using quaternion parameterization. . Simulation of reaction wheel assembly. The number of wheels are determined by the dimension of the number of columns in the A.war matrix, defined in the Matlab function RWA.sim. Closed loop with output feedback and reference to the loop from both w and g in the linear state space representation of the satellite. . Closed loop with output feedback and reference to the loop from g only in the linear state space model of the satellite. 7 9 9 12 12 13. 13. 22 23 LIST OF FIGURES 3 5.3 Romer-like satellite pole-zero plot for open (a) and closed loop (b). Angular velocity is w, = [0;0;0] rad/s and angular momentum is hy = [0;0;0] Nims. The closed loop eigenvalues are all in -0.2 as intended. The small imaginary part is due to numerics. Three eigenvalues at the origin are cancelled by threezeros. The origin of thisis the physical integration from htoh..- 5.4. Roemer-like satellite pole-zero plot for open (a) and closed loop (b). Angular velocity is w, = [0;—0.003;0] rad/s and angular momentum h, = [0;0;0.5] Nms. Theangular velocity around the y-axis, and the moment of inertia with Iz < Iy < T., cause the open loop system to be unstable. The closed loop is stable with closed loop poles only slightly affected by the perturbation of the open loop system. +e 26 Roemer-like satellite pole-zero plot for open (a) and closed loop (b). Angular velocity is w, = [0;—0.003;0] rad/s and angular momentum h, = [0;0;0.5] Nms. The bias in angular momentum has moved the open loop pole-zero pattern signif- icantly. Despite the large perturbation, the closed loop poles show that the closed loop system is still nicely damped. ... 27 Chapter 1 Satellite Equations of Motion ‘The purpose of this lecture note is to provide the complete nonlinear and linearized models of a satellite using quaternion representation of attitude. ‘The note extends and supplements the treatment of attitude models that are provided in section 4.8 and later in the book by Marcel J. Sidi [3], based on Euler angle description of attitude. Sidi analyses a number of feedback schemes in chapter 6, based on an Euler angle model and assuming small deviations from a reference. In chapter 7, he introduces attitude control is introduced based on quaternion error feedback. However, the complete quaternion based model was not derived by [3]. A linearized model was needed in the quaternion formulation as well. ‘When we wish to make an analysis of the quaternion feedback scheme similar to that done in chapter 6, a small signal model is needed for the satellite described with attitude represented as a quaternion. This note derives a linear model of spacecraft attitude dynamics and kinematics using a quaternion representation. Momentum wheels are in- cluded in the model. Gravity gradient effects are not included in this first version. 1.1 Dynamics of satellite with momentum wheels Recall from Euler’s moment equation [3, (Eq. 4.8.1) (p.107)] ,[2, (p.50)] N=h+wxh (1a) where h = Iw and the kinematics is described by the attitude quaternion [3]Eq. 4.7.13) (p.104),[1, (p.511)] q (1.2) CHAPTER 1. SATELLITE EQUATIONS OF MOTION o A rotation is described by the rotation matrix Bq. A.4.15 (p.324) where the four elements of the quaternion are the parameters used in the rotation matrix. ‘The standard form of satellite dynamics, with satellite inertia matrix I, angular velocity w and h is the total angular momentum of wheels, all seen in the satellite's coordinate system, Nest is total external torque. With this notation, the dynamic equation reads, © (ote) +h= Next —w x Lw—w xh (1.3) or Ty! (w x Iw) Tytw xh Th Ty Ne (1.4) Writing the cross product as a matrix operation using S() makes the notation simpler in the sequel 0 -ws 3 =| 0 -w (1.5) -—w wr 0 Sle gives & =-T,'S(w)I,w-1 1 'S(w)h 1) + Ty Nes (1.6) ‘The combined nonlinear dynamic model of the satellite is completed by noting that control torque in the body coordinate system is Nyiri and gives the rate of change of the total angular momentum from wheels, he Nan (17) 'S(w)I,w—T, 'S(w)h+ (L8) 1.2 Kinematics ‘The kinematics of the satellite, is described using the attitude quaternion q = (1942,43;44) to represent a rotation. The orientation of the satellite is obtained rotating from the inertial frame to the satellite frame by the diree- tional cosine (rotation) matrix Asy. The rotation matrix is parameterized by the quaternion, Ag;(qs7) or just Agj(q) for brevity. A vector measured in the inertial frame is aj, the vector measured in the satellites frame has coordinates as, then as = Asj(q)ay. The kinematics of the satellite is then a 0 ws -wn wr] fa d}aqz)_1] -ws 0 ww] | a a =i 1 di}as | 2] ow wr 0 ws | | as (19) on -w, —w -wz 0 | La CHAPTER 1. SATELLITE EQUATIONS OF MOTION 6 Ina compact notation, (110) This compact notation is subsequently referred to in block diagrams. An- other form of the detailed kinematies is also useful in the further analysis. Equation 1.9 is easily rewritten to separate terms with qq from other ele- ments of the quaternion, a d| a di| as (at) on (1.12) we can then write the kinematics equation using q = [g”,q4] where = [a1,42,95]" is the first three components of the quaternion, s[s][S]ee("v} om ‘The unit length of the quaternion is preserved in this operation. The model of the satellite comprise the dynamics from Equation 1.4 and the kinematics from Equation 1.10. This model is illustrated in Figure ?? 1.3 Reaction Wheels as Actuators A reaction wheel is an electromechanical device composed of an electric motor that drives a disc or wheel designed to have a large inertia for the mass it has. The motor can be integrated in the wheel structure. With permanent magnets incorporated in the circumference of the rotor and coils wound in the stator part, a brush-less DC motor would result. 1.3.1 Wheel Aligned with Satellite Coordinate System Let first the wheel's axes be aligned with the satellite body coordinate sys- tem, Denote the wheel inertia by J, the angular velocity of the wheel by i» and the angular momentum of the wheel by h, the torque from the stator to the rotor of the wheel as Nu» then (1.414) CHAPTER 1. SATELLITE EQUATIONS OF MOTION 7 atte dyramice | Saale inmaica AT Fie I @ +] se J+ Figure 1.1: Satellite model with nonlinear dynamics and kinematics, Equa- tions 1.4 and 1.10, his the angular momentum of wheels, Negt an external torque and Neri the control torque from reaction wheels, all given in the SBC system. Output is and w For the satellite and the wheel as an entirety, we observe from Equation 1.4 that the control torque on the satellite is with satellite angular momentum Ig, inertia Netrisat = (1.45) When a reaction wheel is used as actuator, mathb fh of the wheel provides the (negative) control torque on the satellite and the angular momentum of the wheel h (which was measured in satellite coordinates) gives a cross- coupling term in the dynamic equations of motion of the satellite, see Equa- tion 1.4. 1.3.2 Wheel Aligned in Other Direction When the wheel is not aligned with the x-y-z- axes of the satellite bod coordinate system (SBC), the shaft axis of the wheel, say its third axis is rotated with respect to the SBC. The angular momentum vector of the wheel, seen from the satellite (SBC) is then needed. The components of this angular momentum in the SBC system is a projection of the wheel's angular momentum in its 3direction (along its axis of rotation). The projection is CHAPTER 1. SATELLITE EQUATIONS OF MOTION 8 column vector, the directional cosines of which are hy ein Ct6 aw | = [= C25 | lor = [= Plu (1.16) hs Nye Lew @20 aay If the wheel assembly consists of several wheels, say four, we have the directional cosines for each wheel in the columns of the direction matrix for the wheels, Awl hy an a2 as au) |)" ho} =] ax ai ais aia || (17) 3 hs | ste aay aa as au || Abbreviated to vector form, this is h=Ayhy (1.18) ‘The matrix Ay, has three rows and a number of columns equal to the number of reaction wheels in the satellite. 1.4 Actuator Dynamics - the Wheel Control Loop ‘The above model assumed an ideal wheel servo, ie. the wheel can accelerate as fast as demanded. In practice, however, a torque control loop can not be ideal but has a limited, although high bandwidth. The block diagram in Fig. 1.2 shows the schematics of a wheel control loop. Referring to the idealized case (A) in Figure 1.2 Netrtsat(t) = —Neemao(t) (1.19) Incase (B) of Figure 1.2, the speed control loop around h gives rise toa low-pass dynamic relation between Naemw and Netrlsat Wao + Naemaw Netrlaat = (1.20) nit) = | hi(r)dr + h(0) In the Laplace transform domain, torque on the satellite reads, from Eq. 1 1.20 Netri.sat() ‘dema($) (1.21) 1.4.1 Combined Model ‘The combined model of satellite and wheels is shown in Figure 1.3 CHAPTER 1. SATELLITE EQUATIONS OF MOTION 9 1: Hosted whos model Naat Nene 1B: Moe wit wet yramesincloies Figure 1.2: Schematic wheel control loop. The upper part (A) shows the idealized model where A is identical to the demand torque. The bottom part (B) shows a more realistic configuration where a speed control servo loop is closed around the wheel. This gives the generation of h a low-pass behaviour. The bandwidth of the h loop is equal to wy» vith reaction wheel assembly as actuator, satel- Figure 1.3: Satellite model lite dynamics and kinematics CHAPTER 1. SATELLITE EQUATIONS OF MOTION 10 1.5 Nonlinear model ‘The combined dynamic and kinematics equations Eqs. 1.4 and 1.13 give, the general nonlinear model for the satellites angular motion, w Ty! (-Slw)Lw ~ S(w)h+ Neart+Naise) d\e —}S8(w)gtjadTsxae Ts = ~ 1.22) a| a lal g (1.22) h Newt Limitations of the model It is noted that the effects of flexibility of the satellite’s structure or ap- pendages is not included in this model. Remark 1 Change of reference coordinate system As a remark, it is noted that the dynamic model has a structure that is in- variant with the choice of coordinate system. As long as all quantities are referred to the same coordinate system, the structure of the equation is un- changed. The values of elements in the inertia tensor do change, needles to say. This is seen as follows. The effects caused by a rotation of both measured values and reference coordi- nates for the inertia tensor to a satellite geometry defined coordinate system is achieved by rotating the various quantities in the dynamic equation, Wp X Twp wp x hp — hap + Nuistp (1.23) then, rotating to the body system using wy = Apis, hy = Ayohy, Ny = AyoNs, 1, = ApsloAZ, gives d a (Apso AZ Ape) = Apoire x ApsTsnAT, Apion (1.24) —Appw, x Apihigy — Apolips + AppNexe» + AppNdist since Aw x Ah = A(w xh), this simplifies to a - a Tate) = wp X Taptns — we XIny — hy +} Nest p+ Nise (1.25) which is again the dynamics in its original structure but now expressed in body azes instead of principal azes. Chapter 2 Nonlinear Simulation Model ‘The complete nonlinear model of satellite dynamics and kinematics, and wheel actuation was implemented in Simulink® in the program sat3.sim.md] (by the author), ‘The torque on the satellite is Negi = —AwNusem where Nutem 18 the wheel torque demand and Ay the distribution matrix for wheel torque that is defined in the Matlab program RWA.sim.m. The distribution matrix has its number of columns equal to the number of wheels. The number of rows is always 3, since the Ne torque is the torque the three axes of the satellite coordinate system. ‘The spacecraft parameters used are, as an example: ¢ Principal moments of inertia Izz =5, Iyy=6, I-2=7 kgm’. ¢ The maximum angular momentum of the reaction wheel 0.12 Nms. ¢ The maximum wheel speed 280 rad/sec ‘© moments of inertia of the reaction wheel 0.00043 kgm?. The nominal wheel speed 100 rad/sec. The closed loop bandwidth the reaction wheel 10.0 rad/s. © Maximum torque produced by the reaction wheel 0.0075 N. © The reaction wheel assembly is defined by the number of wheels and their alignment. cr CHAPTER 2. NONLINEAR SIMULATION MODEL 12 we RR 7 SS Figure 21: Simulink mainwindow for sat3.sim.mdl. Input are control torque demand, initial values for attitude quaternion of satellite, angular rate of satellite, initial valves of reaction wheel speeds. Parameters are to be present in the workspace before you start a simulation. o_o =. —_— = Figure 2.2: Level 2 of satsim with three components: satellite dynamics, satellite kinematics and wheel model. CHAPTER 2. NONLINEAR SIMULATION MODEL 13. ions Figure 2.3: Satellite dynamics is a direct implementation of Eulers moment equation. ae Hef. Tet »| Phan —__ ilu nas Figure 2.4: Kinematics implemented using quaternion parameterization.

You might also like