Representing Attitudes as Sets of Frames

Similar documents
SATELLITE ATTITUDE TRACKING BY QUATERNION-BASED BACKSTEPPING. Raymond Kristiansen,1 Per Johan Nicklasson,2 Jan Tommy Gravdahl,3

Attitude Regulation About a Fixed Rotation Axis

Satellite Attitude Control by Quaternion-Based Backstepping

VII. Techniques of Integration

A Tutorial on Euler Angles and Quaternions

Robot Manipulator Control. Hesheng Wang Dept. of Automation

16.333: Lecture #3. Frame Rotations. Euler Angles. Quaternions

Tracking Control for Robot Manipulators with Kinematic and Dynamic Uncertainty

Quaternion-Based Tracking Control Law Design For Tracking Mode

Position and orientation of rigid bodies

The Jacobian. Jesse van den Kieboom

Example: RR Robot. Illustrate the column vector of the Jacobian in the space at the end-effector point.

Considerations choosing the Optimal Equilibrium Point on the Rotational Sphere

( ) ( ) ( ) 2 6A: Special Trig Limits! Math 400

Introduction to quaternions

Fundamental properties of snake robot locomotion

Simultaneous Orthogonal Rotations Angle

Algorithms and Numerical Methods for Motion Planning and Motion Control: Dynamic Manipulation Assignments

Adaptive Robust Tracking Control of Robot Manipulators in the Task-space under Uncertainties

*School of Aeronautics and Astronautics, Purdue University, West Lafayette, IN

Control of industrial robots. Centralized control

Core A-level mathematics reproduced from the QCA s Subject criteria for Mathematics document

Unit quaternion observer based attitude stabilization of a rigid spacecraft without velocity measurement

AP Calculus AB Summer Review Packet

8 Velocity Kinematics

GAIN SCHEDULING CONTROL WITH MULTI-LOOP PID FOR 2- DOF ARM ROBOT TRAJECTORY CONTROL

(3.1) a 2nd-order vector differential equation, as the two 1st-order vector differential equations (3.3)

Trajectory-tracking control of a planar 3-RRR parallel manipulator

IMU-Camera Calibration: Observability Analysis

Optimal Fault-Tolerant Configurations of Thrusters

2.13 Linearization and Differentials

WEIGHTING MATRICES DETERMINATION USING POLE PLACEMENT FOR TRACKING MANEUVERS

Ridig Body Motion Homogeneous Transformations

Spacecraft Attitude Control with RWs via LPV Control Theory: Comparison of Two Different Methods in One Framework

CAMI Education links: Maths NQF Level 4

we must pay attention to the role of the coordinate system w.r.t. which we perform a tform

Differential Kinematics

Practice Questions for Midterm 2 - Math 1060Q Fall

Lesson 50 Integration by Parts

VECTORS IN THREE DIMENSIONS

we must pay attention to the role of the coordinate system w.r.t. which we perform a tform

Minimal representations of orientation

Kinematics. Chapter Multi-Body Systems

Boundary Control of an Anti-Stable Wave Equation With Anti-Damping on the Uncontrolled Boundary

Safety-Critical and Constrained Geometric Control Synthesis using Control Lyapunov and Control Barrier Functions for Systems Evolving on Manifolds

SiRF White Paper. Great Circle Distances Computing the distance between two points on the surface of the Earth

CHAPTER 4 CONVENTIONAL CONTROL FOR SATELLITE ATTITUDE

arxiv: v1 [physics.pop-ph] 29 May 2009

Integration Techniques for the AB exam

13 Path Planning Cubic Path P 2 P 1. θ 2

Decentralized Stabilization of Heterogeneous Linear Multi-Agent Systems

Stabilization of Angular Velocity of Asymmetrical Rigid Body. Using Two Constant Torques

Computer Problems for Taylor Series and Series Convergence

Lesson 53 Integration by Parts

REACTION WHEEL CONFIGURATIONS FOR HIGH AND MIDDLE INCLINATION ORBITS

ADAPTIVE FORCE AND MOTION CONTROL OF ROBOT MANIPULATORS IN CONSTRAINED MOTION WITH DISTURBANCES

Inverse differential kinematics Statics and force transformations

Revision Checklist. Unit FP3: Further Pure Mathematics 3. Assessment information

INSPIRED by biological snake locomotion, snake robots

Robotics I. February 6, 2014

Vectors Coordinate frames 2D implicit curves 2D parametric curves. Graphics 2008/2009, period 1. Lecture 2: vectors, curves, and surfaces

Further Pure Mathematics 3 GCE Further Mathematics GCE Pure Mathematics and Further Mathematics (Additional) A2 optional unit

Chapter 3 Numerical Methods

Visual Feedback Attitude Control of a Bias Momentum Micro Satellite using Two Wheels

9 th AAS/AIAA Astrodynamics Specialist Conference Breckenridge, CO February 7 10, 1999

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note 21

1. Find the area enclosed by the curve y = arctan x, the x-axis and the line x = 3. (Total 6 marks)

Gain Scheduling Control with Multi-loop PID for 2-DOF Arm Robot Trajectory Control

Section 4.1. the k-th coordinate function of f. We call the system of equations . =.

Observer Design for a Flexible Robot Arm with a Tip Load

Extremal Trajectories for Bounded Velocity Differential Drive Robots

MEAM 520. More Velocity Kinematics

Example: Inverted pendulum on cart

Multi-Robotic Systems

Lecture «Robot Dynamics» : Kinematics 3

Spacecraft Attitude Dynamics for Undergraduates

Inverse Trig Functions - Classwork

Dynamic Integral Sliding Mode Control of Nonlinear SISO Systems with States Dependent Matched and Mismatched Uncertainties

The Virtual Linkage: A Model for Internal Forces in Multi-Grasp Manipulation

Seul Jung, T. C. Hsia and R. G. Bonitz y. Robotics Research Laboratory. University of California, Davis. Davis, CA 95616

Exponential Controller for Robot Manipulators

Trajectory planning and feedforward design for electromechanical motion systems version 2

Hongbing Zhang October 2018

+ y = 1 : the polynomial

ROBOTICS 01PEEQW. Basilio Bona DAUIN Politecnico di Torino

Vector Geometry. Chapter 5

The region enclosed by the curve of f and the x-axis is rotated 360 about the x-axis. Find the volume of the solid formed.

Position and orientation of rigid bodies

Principal Rotation Representations of Proper NxN Orthogonal Matrices

Chapter 2 Coordinate Systems and Transformations

Example: Inverted pendulum on cart

Lecture Notes - Modeling of Mechanical Systems

Section Inverse Trigonometry. In this section, we will define inverse since, cosine and tangent functions. x is NOT one-to-one.

11.4. Differentiating ProductsandQuotients. Introduction. Prerequisites. Learning Outcomes

NOTES ON LINEAR ALGEBRA CLASS HANDOUT

(W: 12:05-1:50, 50-N202)

(a) Show that there is a root α of f (x) = 0 in the interval [1.2, 1.3]. (2)

Linear Feedback Control Using Quasi Velocities

Course MA2C02, Hilary Term 2010 Section 4: Vectors and Quaternions

Relative Pose Stabilization using Backstepping Control with Dual Quaternions

Transcription:

Representing Attitudes as Sets of Frames Pål Johan From and Jan Tommy Gravdahl Abstract A general framework for representing continuous sets of frames with the unit uaternion representation is presented. The determination and control of the attitude of a rigid body is important in a wide range of applications and has been given much attention in the control community. Not always, however, must the desired attitude be restricted to one given orientation, but can be given as a discrete or continuous set of orientations subject to some restriction. An attitude can be represented by the four-parameter unit uaternion without the presence of singularities. It is shown how continuous sets of frames can be described by the unit uaternion representation. It is also shown how this set can be reorientated into an arbitrary coordinate system by the uaternion product. Some work is done on finding the attitude that is closest to the desired orientation when the desired orientation is out of reach due to some restriction on the allowed orientations or rotations. I. INTRODUCTION The attitude control problem of a rigid body is given much attention in the control community, and its applications range from attitude control of aircraft, spacecraft and satellites ], ] to rigid bodies held by robotic manipulators 3], 4]. A thorough discussion on the attitude control problem is given in 5], where global stability is shown for a variety of control laws using the unit uaternion representation in a Lyapunov function. The unit uaternion group allows orientation and rotation to be represented globally without singularities. One problem of the unit uaternion group is that it is not as easy to visualise as the Euler angles. Many methods have been developed to help visualising uaternions and the relationship between uaternions and three-dimensional rotations. A good introduction on how to visualise uaternions can be found in 6] and 7]. 6] also gives a thorough presentation of uaternion curves, surfaces and volumes. Of special interest is the work presented on uaternion volumes, where it is shown that a continuous set of frames can be represented by a uaternion and a set of intuitive restrictions in Euler angle representation. The theory of uaternion volumes closely relates to orientation maps. Several techniues that can be used to visualise orientations are discussed in 8]. In this paper, the work on uaternion volumes is taken one step further, and a schematic approach on how to represent sets of frames is presented. It is shown how this set can be visualised by a set of points in the unit sphere, and how this set relate to the corresponding uaternion volume. It is also shown how this set can be reorientated so that it is defined with respect to some other reference frame. A test to verify if The authors are with Department of Engineering Cybernetics, Norwegian University of Science and Technology, 749 Trondheim, Norway. from@itk.ntnu.no and tommy.gravdahl@itk.ntnu.no a uaternion satisfies the restrictions given by the uaternion volume is also presented. This paper also addresses the problem of how the unit uaternion group can be utilised to find the attitude that is closest to some given orientation when rotations about one ais only are allowed. This work is similar to the results found in 3], 5] and 6] in how the orientation error is presented, but goes one step further in also finding the closest orientation. II. REPRESENTING ROTATIONS Most of the fundamental principles of rotation were presented in two papers by Leonhard Euler in 775 8]. The first paper shows that any rotation can be accomplished by a seuence of three rotations about the coordinate aes. In the second paper, Euler states that any orientation can be represented by a rotation of some angle φ about some fied ais n. He also shows that the composition of two rotations is itself a rotation. A. The Unit Quaternion The unit uaternion representation closely relates to the results presented in Euler s second paper. A good introduction to uaternions is found in 7]. Any positive rotation φ about a fied unit vector n can be represented by the four-tuple ] Q =, ( where R is known as the scalar part and R 3 as the vector part. Q(φ, n is written in terms of φ and n by = cos( φ, = sin (φ n. ( Q is a uaternion of unit length and denoted a unit uaternion. Henceforth, all uaternions have unit length if not other is stated. A multiplication of two uaternions is given by a uaternion product and is written in vector algebra notations as ] p P Q = p. (3 p + p + p The cross product implies that uaternion multiplication is not commutative, as epected. Let P = ] T p p p p 3 and Q = ] T. 3 Then the uaternion product is written as p p p p 3 3 P Q = p + p + p 3 p 3 p + p + p 3 p 3. (4 p 3 + p 3 + p p

The uaternion product of two unit uaternions is a unit uaternion. By the definition of the uaternion the uaternions Q and Q produce the same rotation. This is referred to as the dual covering. The uaternion identity is given by Q I = ] T. A pure uaternion is a uaternion with zero scalar part. Any vector, v = y z ] T can be represented by a pure uaternion v = v]. (5 The conjugate of a uaternion is defined as Q = 3 ] T. B. Quaternions and Rotations Let a vector, v, be represented by the pure uaternion v. This vector can be rotated φ radians around the ais n by v = Q v Q. (6 Every vector v R 3 can be represented by a pure uaternion, hence v is not necessarily a unit uaternion. The uaternion, Q(φ, n, however, is unitary. This represents the angle and the ais that the vector v is to be rotated about. The resulting vector, v, is then of the same length as v if and only if Q is a unit uaternion. The uaternion representation also leads to a useful formula for finding the shortest rotation from one orientation to another. Let P and Q be two orientations. Then, by taking E = P Q, (7 E will rotate P into Q by the shortest rotation. Note that euation (7 rotates one frame into another frame. By a frame it is meant a coordinate system in R 3 using Cartesian coordinates. One frame with respect to another frame represents three degrees of freedom and is referred to as an attitude orientation. Euation (6 rotates one vector into another vector and has two degrees of freedom (e.g. longitude and latitude 9]. A unit vector with respect to a unit reference vector is referred to as an attitude direction. Henceforth, when referred to direction, this is the direction of the z-ais of the body frame with respect to the z-ais of the reference frame. A. General Definition III. QUATERNION VOLUMES A set of frames that correspond to a reference frame by a rotation about a fied ais, n, can be represented by a uaternion and some restriction Q(φ, n, for φ min < φ < φ ma. (8 When restrictions are not limited to one ais only, a more general description of all allowed orientations can be defined The dual covering allows every rotation to be described twice. In this paper, however, it is only described once, so that all angles are assumed to be in the interval π, π]. It is also assumed that all angles of inverse trigonometric functions are in this interval with the correct sign. For arctan, this is denoted arctan. by a combination of rotations given by the uaternion product of two or more uaternions and their restrictions. In this paper, only sets of frames that can be described by a seuence of rotations about fied aes are treated. Definition 3. (Quaternion Volume: A uaternion volume, Q, is defined as Q {Q(φ,...,φ n, n,..., n n φ,min φ φ,ma for n and where. (9 φ n,min φ n φ n,ma } Q(φ,...,φ n, n,..., n n = Q(φ, n Q(φ n, n n. ( From the above it is clear that a uaternion volume is obtained by the uaternion product of one or more uaternion volumes. This is stated in the net proposition. Proposition 3. (Quaternion Product of Quat. Volume(s: The uaternion product of two uaternion volumes, or a uaternion volume and a uaternion, is itself a uaternion volume. Proof: By euation (3 the uaternion product of two uaternions is a uaternion. Let P be a uaternion with the restrictions φ min φ φ ma. Then it is a uaternion volume by definition 3. with n =. Then the uaternion product E = P Q consists of the 6 elements of euation (4. Let Q be a uaternion, then E can be written in terms of e 3. e = p (φ p (φ p (φ p 3 (φ 3, ( e = p (φ + p (φ + p (φ 3 p 3 (φ, ( e = p (φ + p (φ + p 3 (φ p (φ 3, (3 e 3 = p (φ 3 + p 3 (φ + p (φ p (φ. (4 Note that, as Q is a uaternion, the elements of E are sums of the products of a constant ( 3 and the elements of the uaternion volume (p 3 (φ. By representing P R 4 and Q R 4 as four-tuples, the uaternion product is given by (-(4 and the field property closure is satisfied so that e 3 R. Thus, e 3 are functions of φ so that the restrictions on φ can be applied to the uaternion product. Furthermore, as P = for all φ, E = so that E is a uaternion volume by definition 3. with n =. Similarly, when both P and Q are uaternion volumes the elements of E are sums of products of p i (φ j (φ and E is a uaternion volume by the same argumentation. The same argumentation applies when P and Q are uaternions or uaternion volumes with more than one restriction, n >. B. Quaternion Volumes by Rotations Seuences A rotation seuence describes a rotation about one coordinate ais followed by a rotation about another of the coordinate aes in the rotated coordinate system. A general framework on how to construct easily visualisable uaternion The real numbers are closed under addition and multiplication, hence if a and b are real numbers, so are a+b and ab 7].

volumes by rotation seuences is presented. The rotation seuence starts with two subseuent rotations about two coordinate aes, represented by the uaternion Q s. This defines the attitude direction. The last degree of freedom is added by a rotation about the direction vector, here the z-ais, by Q z. In euation (6, let Q z represent the vector to be rotated and let Q s be the uaternion describing the direction of this vector. Then the rotation seuence V = Q s Q z Q s (5 represents the direction of the z-ais for a given rotation Q s given by the direction of the vector part of V and the rotation about the z-ais given by the scalar part or length of the vector part of V by ψ = arcsin( v = arccos(v sgn(ψ. Henceforth, V is called a visualising uaternion. Note that V does not represent a rotation. It is used as a tool to visualise rotations and as a help to define an appropriate set of frames for different applications. The visualising uaternion and the corresponding uaternion should be viewed upon as a pair, (Q, V, where the visualising uaternion, V, gives an intuitive description of a rotation of a frame by Q. Let the vector part of the visualising uaternion be plotted as a point in the yz-sphere. Then the direction of the z- ais, rotated by the corresponding uaternion is given by the vector from the origin to this point, and the rotation about the z-ais itself is given by the length of this vector. Hence, a continuous set of uaternions (a uaternion volume is represented by a cloud in the yz-sphere describing the corresponding set of orientations. The uaternion that rotates the reference frame into the orientation described by euation (5 is then given by Q = Q s Q z. (6 Finally, the uaternion volume is given by restricting the allowed rotations of each uaternion. Given a visualising uaternion volume by the seuence V = Q s Q z (Q s (7 and the restrictions on Q s and Q z. Then the corresponding uaternion volume that results in the set of orientations described by V is given by Q = Q s Q z (8 with the same restrictions applied to Q as to V. Figure shows the difference between the uaternion volume and the visualising uaternion volume when the vector part is plotted in the yz-sphere 3. Note that the dual covering also applies to the visualising uaternion volume. Hence, one should always keep track of the sign of the rotation so that a negative rotation about the z-ais is not interpreted as an opposite direction of the z- ais. This can be done by moving the negative sign to the scalar part (which is positive in ( π, π or to assume all angles in the interval (, π where sin( φ is positive. 3 In figure, the orientations are plotted by sin ( φ n (the orthographic orientation map 8] for both the uaternion volume and the visualising uaternion volume. z z.5.5.5.5 z ais Quaternion Volume y Cone Quaternion Volume y z z.5.5.5.5 z ais Visualising Quaternion Volume Cone Visualising Quaternion Volume y y Fig.. The uaternion volume and the visualising uaternion volume in the yz-sphere. The upper plots show a freedom about the z-ais and the lower plots show all vectors that span out a cone and the orientations about these vectors. The visualising uaternion volume gives a more intuitive picture of the orientations described by the uaternion volume than the uaternion volume itself when plotted in the yz-sphere. C. Reorientation of Quaternion Volumes Let Q be a uaternion volume and the uaternion P represent some transformation on Q. It will be claimed that the transformation Q P = P Q rotates the entire set of frames by a rotation P. Similarly, the transformation Q P = P Q allows the set of frames represented by the uaternion volume to be represented with respect to a new reference frame P. The transformation induced by changing from one reference orientation to another is called reorientation 8]. Proposition 3. (Transformation of Quaternion Volumes: Any uaternion volume, Q, represented with respect to the identity frame can be transformed into another uaternion volume by Q P = P Q, (9 where the orientations represented by Q P relate to P in the same way as Q relates to the identity frame. Proof: The uaternion product E = P Q can be viewed upon as a rotation P followed by a rotation Q with respect to the new frame that resulted from the first rotation P. Hence, E relates to P in the same way as Q relates to the identity frame. By the same argumentation the uaternion volume Q P relates to P in the same way as Q relates to the identity frame. In proposition 3., the reference frame is kept constant and all the elements of the uaternion volume are rotated by P. Reorientation, however, is a rotation of the reference frame (change of observer while the uaternion volume is kept constant. The proof of the reorientation Q P = P Q is constructed in the same way as the proof of proposition 3..

Comment : From euations (3 and (6, four different ways of transforming uaternion volumes arise. Q P = Q P 3 Q P 3 = Q P (Q Q P = P Q 4 Q P 4 = P Q P The first transformation is used in 6] to find a set of frames, all with one ais pointing in a fied direction, as a mean to find an optimal path in the uaternion space. If Q represents a freedom about one of the coordinate aes, say the z-ais, Q P can also represent a set of orientations where the z-aes have the same angles with respect to the reference frame z- ais, determined by P. For this special case, the same result is obtained by the third representation. Even though the two representations present the same set of vectors they differ in orientation. The set of frames described by Q P is the set that results from rotating the frame represented by P about the coordinate ais, while Q P 3 is the set of frames when the shortest rotation is taken from the reference frame to the directions described by P and Q. IV. COORDINATE AXIS ROTATION There are several ways of representing the proimity of two frames 3], 5]. Here, the proimity of two frames will be described by the rotation reuired to take one frame into the other by the shortest rotation. Definition 4. (Quaternion Space Proimity: Given two orientations represented by the two uaternions P and Q. Let the error uaternion be denoted E = P Q. ( Then the scalar part of E, e, describes the proimity of the two frames. Definition 4. (Minimal Rotation: The larger (closer to 4 the error uaternion scalar part e, the closer are the two orientations P and Q. An uncountable number of devices have only one degree of rotational freedom, ranging from human elbows and revolute robotic joints to satellites with only one operating actuator. The control of a one-actuator satellite is important whenever actuator failure occurs. Two uestions arise: How close to the desired orientation can one get with just one degree of freedom. What is the reachable orientation closest to the desired orientation. Assume that Pz represents the set of orientations when the identity frame is rotated about the z-ais. Then the problem is to find the P z that that is closest to Q. Proposition 4. (Optimal Rotation: Consider an orientation Q = ] T. 3 The orientation described by the uaternion P z = ] T p p 3 that is closest to Q (by definition 4. and 4. is given by p = ± s + 3 ( 4 Note that an eually good description of proimity is given when e approaches. As cos( φ is positive for φ in the chosen interval ( π, π, the positive value of e is chosen. p 3 = ± s 3 + 3 where the two ± s have the same sign. Proof: E = P Q can be written ] ] ] e p p = 3 e 3 p 3 p 3 ] ] ] e p p = 3 e p 3 p ( (3 (4 By definitions 4. and 4., the uaternion P z that is closest to Q is found by the error uaternion with e closest to. so that Let de dψ e = p + p 3 3 (5 = cos( ψ + 3 sin( ψ, (6 de dψ = sin(ψ + 3 cos(ψ. (7 =. Then tan( ψ = 3. ( (8 Then by using arctan( = arcsin + ], ψ is written as ψ = arctan( 3 (9 = arcsin = arcsin ( 3 + ( 3 3 + 3 From the definition of the uaternion (3. (3 ψ = arcsin(p 3. (3 By comparing euations (3 and (3, ( euation ( is given. Similarly by arctan( = arccos sgn( + ψ = arctan( 3 (33 = arccos sgn( 3 (34 + ( 3 = arccos ( + 3 sgn( 3. (35 Note that the sign of ψ = arccos(p sgn(ψ is given by euation (3. Hence, euation ( is found. For ψ to be in the interval π, π], the sign ± s is chosen positive, so that e is positive. Similarly when P rotates about the - and y-ais. The largest rotation is given when e is close to zero. e = p + p 3 3 (36 = cos( ψ + 3 sin( ψ =. (37 tan( ψ = 3. (38

Similar to the proof of proposition 4., the orientation P z furthest away from Q is given by p = ± s 3 + 3 p 3 = ± t + 3 where the ± s and ± t have opposite signs. V. QUATERNION VOLUME DESIRED ATTITUDE (39 (4 In the following, a satellite is used to illustrate the results presented above and how they apply to the control of rigid bodies. Two basic problems are addressed in this paper. Fuel consumption is critical in the control of satellites. A methodology on how to represent the desired attitude by a uaternion volume as a mean to save energy is proposed. Failure in one or more of the satellite actuators greatly complicates the control and can result in a desired attitude that is out of reach. A method on how to take the satellite as close as possible to the desired attitude with just one actuator is proposed. A satellite with three actuators is considered. Each actuator applies a torue about one of the coordinate aes of the satellite body frame. The body frame and desired attitude are defined with respect to the North-East-Down coordinate system (NEDframe. The -ais of the body frame points in the speed direction and the operating device (camera, telescope, transponder, etc is aligned along the body frame z-ais. A. Desired Attitude Direction First assume that the satellite attitude must be aligned such that the z-ais is always orthogonal to the earth s surface, pointing towards the earth. This gives the satellite one degree of freedom about the z-ais. An arbitrary rotation, ψ, about the z-ais can be represented by the uaternion volume Q free = cos( ψ sin (ψ ] T, for π < ψ < π. (4 Hence, the uaternion volume is given with respect to the identity frame. Further, assume the desired uaternion volume instead is to be rotated by Q d = ] T d d d d 3 with respect to the identity frame. The uaternion volume that describes all attitudes where the z-ais points in the same direction as the z-ais of Q d is given by Q d = Q d Q free so that d cos( ψ d 3 sin( ψ d cos( ψ + d sin ( ψ Q d = d cos( ψ d sin ( ψ d 3 cos( ψ + d sin ( ψ, for π < ψ < π. (4 Eample : If the desired orientation is set so that the z-ais is always orthogonal to the y-plane, pointing outwards into space, by a rotation about the y-ais, Q d = ] T, euation (4 simplifies to Q d = sin( ψ cos( ψ ] T, for π < ψ < π. (43 It can be shown that this uaternion volume represents all attitudes with a z-ais in the opposite direction of the NED-frame z-ais. z = Q d v z (Q d (44 = sin( ψ cos( ψ sin( ψ cos( ψ cos( ψ sin( ψ + cos( ψ sin( ψ = cos ( ψ sin ( ψ =, for π < ψ < π. (45 B. Desired Attitude Orientation The attitude can be represented as a set of frames. This set can be composed by a rotation seuence of uaternion volumes. Two rotation seuences are discussed, the ZYZYZseuence, as in 6] and 8], and the XYZYX-seuence. The ZYZYZ-seuence: The ZYZYZ-seuence allows the desired attitude to be defined as a set of vectors that span out a cone about the reference z-ais and all orientations about these vectors. Let Q s (α, β = Q(α, z Q(β, y where Q(α, z = cos( α sin (α ] T and Q(β, y = cos( β sin ( β ] T so that cos( α cos( β Q s (α, β = sin( α sin ( β cos( α sin ( β. (46 sin ( α cos( β The uaternion volume can be visualised in the yz-sphere (see figure by the three last elements of cos( γ V (α, β, γ = sin( γ sin(βcos(α sin( γ sin(αsin(β. (47 sin( γ cos(β α represents the allowed orientations about the z-ais of the first rotation while β is the allowed orientation about the new y-ais. If α has no restrictions, β is the offset angle that defines a cone with the z-ais at the centre. γ restricts the orientation about the z-ais itself. A cone sector that allows a deviation, b ma, in the sector defined by the restrictions on α in the y-plane is defined by cos( β cos( γ + α Q d = Q s Q z = sin( β sin( γ α sin( β cos( γ α (48 cos( β sin( γ + α

and the restrictions a min α a ma (49 β b ma (5 c min γ c ma (5 Eample : Assume a satellite where the z-ais is to point outwards into space. Further assume that a small error, b ma, in the orientation is allowed and only the attitude directions are restricted. The set of frames describing these attitudes is given by (48 and the restrictions π α π (5 π β π + b ma (53 π γ π (54 It can be showed that this is the same as substituting β π + β and α α into euation (48 so that sin( β cos( γ α Q d = Q s Q z = cos( β sin( γ + α cos( β cos( γ + α sin( β sin( γ α (55 and keeping the restrictions (49-(5. Note that euation (55 can also be obtained by rotating the uaternion volume of the previous eample by π radians about the y- ais, hence by euation (9 with P = ] T and Q = ] T 3 as in (48 so that Q ] d = T, 3 which is the same as euation (55. The XYZYX-seuence: The XYZYX-seuence defines a pyramid of allowed orientations where the allowed orientations about the -ais and the (new y-ais are restricted. This is a good estimation of restricting the orientation about the globally defined - and y-aes whenever the angles are kept small. Q s (α, β is then given by cos( α cos( β Q s (α, β = sin( α cos( β cos( α sin( β, (56 sin( α sin( β and visualised by cos( γ V (α, β, γ = sin ( γ sin(β sin ( γ sin (α cos(β. (57 sin ( γ cos(αcos(β The corresponding uaternion volume is again given by and the restrictions Q d = Q s Q z (58 a min α a ma (59 b min β b ma (6 c min γ c ma (6 Eample 3: Assume a satellite where the attitude is to be restricted similarly to eample, but instead of allowing some error in the orientation, an orientation error about the - and y-aes are restricted to ±a and ±b. Then the set of frames describing these attitudes is given by (58 and the restrictions π a α π + a (6 b β b (63 π γ π (64 VI. CONTROL Two ways to eploit the uaternion volume representation to reduce fuel consumption are presented. Let the desired attitude (one frame only take part in a control loop. When the attitude is inside the attitude specifications given by the uaternion volume, some action is taken to save energy. This may be to switch to another controller which reuires less energy or to switch to another desired attitude inside the uaternion volume, closer or eual to the current attitude. Note also that if the uaternion volume defines a set of orientations close to some reference orientation, a linearised model of the satellite may be used. Find the frame within the set of frames restricted by the uaternion volume that corresponds to the shortest rotation from the current orientation and set this as the desired attitude. Two problems arise. A test to verify if a frame is inside the uaternion volume is needed. Find the orientation inside the uaternion volume that results in the shortest rotation from the current orientation. A. Quaternion Volume Test Consider a uaternion volume defined by the ZYZYZseuence. A test to verify if a uery uaternion Q ry = ] T 3 is an element of the uaternion volume is presented. A uery uaternion can be represented in terms of α, β and γ. The transformation between the uaternion representation and the (α,β,γ-representation can be performed in many ways, by geometric analysis, by the visualising uaternion or through a uaternion/orientation map. The first method is often the easiest and most intuitive method and works well when only the direction is concerned. When the full orientation is to be determined, this approach is not suitable. In the following, it is shown how this method can be combined with the visualising uaternion to find the orientation. By noting that α and β can be seen from the direction of the z-ais only (not from the entire frame, they can be found from the vector z = y z ] T of the rotation of the vector along the z-ais, v z = ] T by z = Qry v z Q ry. Then, by standard geometrical relations α and β are found. ( y α = arctan, (65 β = arccos(z, (66

where, y and z are the elements of z given by z = + 3 3. (67 + 3 As already stated, the rotation about the z-ais cannot be seen from the vector rotation of the z-ais, but is found from V by γ = arccos(v. The sign of γ is lost in the transformation but can be found by, for eample the sign of the fourth element of V. As α and β are known, V can be written as V = Q ry Q s (α, β. (68 Given a uery uaternion Q ry. Then α, β and γ from the ZYZYZ-seuence are found by ( 3 α = arctan, (69 + 3 β = arccos( + 3, (7 γ = arccos(v sgn(v 4. (7 It is now straight forward to verify if the uaternion is inside the uaternion volume. The uaternion volume is not always of such a structure that it can be analysed geometrically. Then the analytic epression of the uaternion volume can be used. For comparison, this approach is also shown for the ZYZYZseuence. The uaternion volume is given by euation (48 and its restrictions. cos( β cos( γ + α sin( β sin( γ α sin( β cos( γ α = cos( β sin( γ + α 3 (I (II (III (IV (7 By substituting (II into (III, (III simplifies to sin( β sin ( β = (73 so that β is found by β = arcsin +. (74 β is positive by definition. α and γ are found by dividing (II by (III and (IV by (I: tan( γ α =, (75 tan( γ + α = 3. (76 Further let γ α = arctan(, (77 γ + α = arctan( 3. (78 so that α and γ are given by α = arctan( 3 arctan(, (79 γ = arctan( 3 + arctan(. (8 Hence, α and β can by found by geometrical interpretation while α, β and γ are found from the analytical epression of the uaternion volume. In the following, it is shown that these two approaches give the same result. From euation (7, β is simplified by β = arccos( + 3 (8 = arccos(( + 3 (8 and the trigonometric relation arccos( = arccos( ] so that β = arccos + 3. (83 By arccos( = arcsin( this is eual ( to euation (74. By arctan( + arctan(y = arctan +y y, euation (79 can be written as α = arctan( 3 arctan( (84 ( 3 = arctan (85 + 3 ( 3 = arctan. (86 + 3 γ can be written in the same way so that, alternatively, a complete description of the uery uaternion can be given by Given a uery uaternion Q ry. Then α, β and γ from the ZYZYZ-seuence are found by ( 3 α = arctan, (87 + 3 β = arccos + 3, (88 ( 3 + γ = arctan. (89 3 B. Transformed Quaternion Volumes The easiest way to verify if a uery uaternion is inside a uaternion volume transformed by euation (9 is to transform the uery uaternion by the opposite transformation, P, so that both the uaternion volume and the uery uaternion are presented in the identity frame. Hence, the two problems below are identical. Q ry P Q? (9 P Q ry Q? (9 This operation is computationally demanding. As euation (9 gives an analytical epression of the transformed uaternion volume, the orientation should be found by a set of parameters similar to the ones found in euations (87-(89. This may be done when the uaternion volume is on a simple form, for eample by euation (55. Then the uery uaternion may be tested against the restrictions in (49-(5 directly. By following the mathematics of euations (7- (89, α, β and γ are found with respect to the coordinate

system of P = ] T by ( 3 α P = arctan, (9 + 3 β P = arcsin + 3 (, (93 + 3 γ P = arctan. (94 3 Hence, as epected C. Clamping β P = β π, (95 α P = α, (96 γ P = γ. (97 If any of the restrictions are violated, the uaternion might be clamped into the set of frames restricted by the uaternion volume in many ways. 6] suggests finding the nearest point in the uaternion metric. Another intuitively tempting approach is to set the eceeded value to the maimum allowed value. Then a uaternion that is inside the uaternion volume may be constructed by the definition in euation (48 directly. If the uaternion volume is on a simple form, the orientation can be clamped into the uaternion volume by the shortest rotation in order to save energy. D. Shortest Rotation How to find the orientation in the uaternion volume that results in the shortest rotation from the current attitude depends on the uaternion volume. One simple solution occurs when the uaternion volume represents a freedom about one ais. Then the theory from section IV can be applied directly. Let Q be the current attitude and P free = cos( ψ sin (ψ ] T represent the set of allowed attitudes, both defined in the NED-frame. Then the attitude within the uaternion volume that is closest to the current attitude is given by p = ± s + 3 p 3 = ± s 3 + 3 (98 (99 and the rotation reuired to take Q into P (the error is given by ψ = arccos(e, ( where e = p + p 3 3. E. Closest Orientation Closely related to the problem of the previous subsection is the problem of finding the optimal rotation when actuator failure occurs. When only one actuator is functional, the satellite can only rotate about one of the aes of the body frame. Let the current body orientation be described in the NED-frame by T. The desired orientation, Q d, is also given in the NED-frame. Assume that the freedom, represented by a uaternion volume, Q free, is given with respect to the body frame, so that Q T = T Q free. ( represent all reachable orientations. Then the problem is to find the uaternion Q Q free that takes the satellite as close to the desired orientation as possible. This is given by proposition 4. where E is given by E = Q d Q T ( = Q d T Q free. (3 Let T d = Q d T = 3 ]. Then, as only the size (not the direction of the rotation is considered, the closest possible orientation is given by euations ( and ( and the rotation needed to take the satellite from the closest reachable orientation to the desired orientation (the error is given by euation (. VII. CONCLUSIONS The unit uaternion group is used to find a general framework for representing sets of orientations. It is also shown how this set can be represented with respect to another reference frame or how to rotate this set when the reference frame is kept constant. Several eamples of sets of orientations are presented and it is shown how these sets can be represented by a uaternion and some easy to visualise restrictions. A satellite is used to illustrate how to save energy by defining the desired attitude as a set of orientations. A method to verify whether a uaternion is inside a uaternion volume is also presented. It is also shown how to find the rotation that reuires less energy in order to take the desired attitude into an element of the uaternion volume. Some work is done on finding the orientation closest to the desired orientation when the desired orientation is out of reach. REFERENCES ] T. A. W. Dwyer, Eact nonlinear control of large angle rotational maneuvers, IEEE Transactions on Automatic Control, vol. AC-9 no. 9, pp. 769 774, 984. ] R. Kristiansen and P. J. Nicklasson, Satellite attitude control by uaternion-based backstepping, American Control Conference, 5. 3] J. S. C. Yuan, Closed-loop manipulator control using uaternion feedback, IEEE Journal of Robotics Automation, vol. 4, no. 4, pp. 434 44, 988. 4] B. Xian, M. D. Queiroz, D. Dawson, and I. Walker, Task-space tracking control of robot manipulators via uaternion feedback, IEEE Transactions on Robotics and Automation, vol. no., 4. 5] J. T.-Y. Wen and K. Kreutz-Delgado, The attitude control problem, IEEE Transactions on Automatic Control, vol. 3 no., pp. 48 6, 99. 6] A. J. Hanson, Visualizing Quaternions. Morgan Kaufmann, 6. 7] J. B. Kuipers, Quaternions and Rotation Seuences. Princeton University Press,. 8] B. Alpern, L. Carter, M. Grayson, and C. Pelkie, Orientation maps: Techniues for visualizing rotations (a consumers guide, IEEE Conference on Visualization, pp. 83 88, 993. 9] J. M. Ahuactzin and K. K. Gupka, The kinematic roadmap: A motion planning based global approach for inverse kinematics of redundant robots. IEEE Trans. on Robotics and Automation, vol. 5, 999. ] I. N. Bronshtein, K. A. Semendyayev, G. Musiol, and H. Muehlig, Handbook of Mathematics. Springer, 3.