ADCS Review – Attitude Determination Prof. Der-Ming Ma, Ph.D. Dept. of Aerospace Engineering Tamkang University Contents • Attitude Determination and Control Subsystem (ADCS) Function • Spacecraft Coordinate Systems • Spacecraft Attitude Definition • Quaternions • Assignment – Attitude Dynamics Simulation 2009/03/05 Attitude Determination 2 ADCS Function The ADCS stabilizes the spacecraft and orients it in desired directions during the mission despite the external disturbance torques acting on it: To stabilize spacecraft after launcher separation To point solar array to the Sun To point payload (camera, antenna, and scientific instrument etc.) to desired direction To perform spacecraft attitude maneuver for orbit maneuver and payloads operation This requires that the spacecraft determine its attitude, using sensors, and control it, using actuators. 2009/03/05 Attitude Determination 3 Spacecraft Coordinate Systems - Spacecraft Body Coordinate System X-axis Z-axis Yaw: rotation around Z-axis Pitch: rotation around Y-axis Y-axis Roll: rotation around X-axis X-axis Y-axis Z-axis (Nadir direction) 2. Euler Angle Definition 1. Spacecraft (ROCSAT-2) Coordinate System 2009/03/05 Attitude Determination 4 Spacecraft Coordinate Systems (Cont.) - Earth Centered Inertial (ECI) Coordinate System ZECI: the rotation axis of the Earth ECI is a inertial fixed coordinate system 2009/03/05 Attitude Determination 5 Spacecraft Coordinate Systems (Cont.) - Local Vertical Local Horizontal (LVLH) Coordinate System x z x Earth z z x z x 2009/03/05 LVLH is not a inertial fixed coordinate system Attitude Determination 6 Spacecraft Attitude Definition Spacecraft Attitude: the orientation of the body coordinate with respect to the ECI (or LVLH) coordinate system Euler angle representation: 2009/03/05 [ y ] : rotate y angle around Z-axis, then rotate angle around Y-axis, finally angle around X-axis Attitude Determination 7 Euler Angles Yaw angle y - It is measured in the horizontal plane and is the angle between the xf and x1 axes. Pitch angle - It is measured in the vertical plane and is the angle between the x1 and x2 (or xb) axes. Roll angle - It is measured in the plane which is perpendicular to the xb axes and is the angle between the y2 and yb axes. The Euler angles are limited to the ranges 0 y 2 2 2 0 2 Attitude Determination 8 2009/03/05 Referring to the definitions of y, , and , we obtain the following equations: x1 cosy y1 siny z 0 1 siny cosy 0 0 x f 0 y f 1 z f x2 cos 0 sin x1 y y 0 1 0 2 1 z sin 0 cos z 2 1 0 0 x2 xb 1 y y 0 cos sin b 2 z 0 sin cos z b 2 Attitude Determination 9 2009/03/05 Performing the indicated matrix multiplication, we obtain the following result: xb cosy cos ( siny cos yb cosy sin sin ) (siny sin z cosy sin cos ) b Attitude Determination siny cos (cosy cos siny sin sin ) ( cosy sin siny sin cos ) 10 sin x f cos sin y f cos cos z f 2009/03/05 The angular velocity is ˆi ˆj2 kˆ 1y 0 p 1 1 q 0 0 cos r 0 0 sin 0 0 cos 1 0 cos sin 0 0 sin cos sin Attitude Determination 11 0 0 sin 1 cos 0 0 sin 0 1 0 0y 0 cos 1 2009/03/05 The relationship between the angular velocities in body frame and the Euler rates can be determined as 0 sin p 1 q 0 cos cos sin r 0 sin cos cos y The equations can be solved for the Euler rates in terms of the body angular velocities and is given by 1 sin tan cos tan p cos sin q 0 y 0 sin sec cos sec r By integrating the above equations, one can determine the Euler angles. Attitude Determination 12 2009/03/05 Quaternions The quaternion is a four-element vector q = [q1 q2 q3 q4]T that can be partitioned as e sin( / 2) q cos( / 2) where e is a unit vector and is a positive rotation about e. If the quaternion q represents the rotational transformation from reference frame a to reference frame b, then frame a is aligned with frame b when frame a is rotated by radians about e. Note that q has The normality property that ||q||=1. 2009/03/05 Attitude Determination 13 The rotation matrix from a frame to b frame, in terms of quaternion is R a 2b 2009/03/05 q12 q42 q22 q32 2(q1q2 q3q4 ) 2(q1q3 q2 q4 ) 2(q1q2 q3q4 ) q22 q42 q12 q32 2(q2 q3 q1q4 ) Attitude Determination 2(q1q3 q2 q4 ) 2(q2 q3 q1q4 ) q32 q42 q12 q22 14 Initialization of quaternions from a known direction cosine matrix is R (3, 2) R (2,3) 4q4 R (1,3) R (3,1) 4q4 q R (2,1) R (1, 2) 4 q 4 1 1 R (1,1) R (2, 2) R (3,3) 2 2009/03/05 Attitude Determination 15 The Euler angles can be obtained from the of quaternion sin 1 (2(q2 q4 q1q3 )) arctan 2[2(q2 q3 q1q4 ),1 2(q12 q22 )] y arctan 2[2(q1q2 q3q4 ),1 2(q22 q32 )] 2009/03/05 Attitude Determination 16 Quaternion derivatives q4 q 1 3 q 2 q2 q1 or 2009/03/05 q3 q4 q1 q2 q2 p q1 q q4 r q3 r q 0 r 0 p 1 q 2 q p 0 p q r Attitude Determination p q q r 0 17 Assignment – Attitude Dynamics Simulation Consider a rectangular box of 10cm X 14 cm X 20cm as shown in the figure with uniformly distributed mass of 2 Kg. The box has an initial angular velocity of 0.3 rad/sec and 0.05 rad/sec in the positive y and z directions, respectively. The center of mass of the box moves along a 10 m radius orbit with 0.3 rad/sec orbital speed. Neglect gravity effect and any external force or torqu Draw the attitude and the center of mass trajectories of the box for 10 seconds. Do as much as you can to show the continuous motion of the box at least for 10 seconds. (You may design an animation routine motion or use on-the-shelf software for the motion) 2009/03/05 Attitude Determination 18 2009/03/05 Attitude Determination 19