Вы находитесь на странице: 1из 27

Thomas Bak

Lecture Notes - Modeling of Mechanical Systems


February 19, 2002

Aalborg University
Department of Control Engineering Fredrik Bajers Vej 7C DK-9220 Aalborg Denmark

Table of Contents

Table of Contents

1. 2.

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basic Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Vectors and Reference Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Vector Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Angular Velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Transport Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Orthogonal Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Direction Cosine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Euler Angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Eigenaxis Rotation Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 Quaternions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Kinematic Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 Direction Cosine Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 Euler Angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.3 Quaternions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3 5 5 7 7 8 11 12 15 17 19 23 23 23 24 25

3.

4.

1. Introduction

1. Introduction

This note discusses modeling of mechanical systems. The book is written for students in control. To understand most of the material presented, student readers will require only the usual undergraduate courses in vector dynamics and matrix algebra.

1. Introduction

2. Basic Geometry

2. Basic Geometry

This chapter provides mathematical tools and concepts that play essential roles in the modeling and analysis of dynamic systems. Fundamental concepts in classical mechanics essential to developing mathematical models of dynamic systems are emphasized. This chapter will also acquaint the reader with some basic denitions and general results.

2.1 Vectors and Reference Frames


Before discussing the problem analysis of dynamic systems, we require certain basic concepts from linear algebra, among them vectors and reference frames. A vector is formally dened as an element of a vector space1 . In the commonly encountered vector space Rn (i.e., Euclidean n-space), a vector may be specied by n coordinates, (p1 , p2 , . . . , pn ). Vectors can be added together (vector addition) and multiplied by scalars (scalar multiplication). Vector multiplication is not uniquely dened, but a number of different types of products, such as the dot product and the cross product. Let P dene a point in a three dimensional Euclidean space (R3 ) as illustrated in Figure 2.1.

Fig. 2.1. Cartesian coordinate system.

To dene the position of the point P as a vector, a basis (coordinate system or frame) along with its origin must be chosen. A coordinate system is dened by two things.
1

A vector space over Rn is a set of vectors for which any vectors and any scalars satisfy specic properties like commutativity, associativity, additive identity, existence of additive inverse, etc.

2. Basic Geometry

First, a coordinate system origin O must be established to specify its position in space. Second, the orientation of the coordinate system must be chosen. A simple example of a basis is the standard basis in R3 consisting a right-hand set of three mutually orthogonal unit vectors, represented in set notation by (1 , e2 , e3 )2 e as illustrated in Figure 2.1. Such a set of orthogonal unit vectors forms a rectangular (orthogonal) Cartesian coordinate system of a three-dimensional vector space. In general, sets of vectors are called basis vectors, if they are linearly independent and any vector can be uniquely expressed as a linear combination of these. Consequently, a non-orthogonal Cartesian coordinate system consists of straight-line axes that are not perpendicular to each other. The most familiar examples of nonCartesian coordinate systems are the cylindrical and spherical coordinate systems. Throughout this text we shall employ a right-hand set of three mutually orthogonal unit vectors as bases of the three-dimensional vector space, unless otherwise stated. Consider an arbitrary vector x (e.g. the vector pointing from the coordinate origin O to the point P ). Express x as a linear combination of the basis vectors (1 , e2 , e3 ); e i.e. let
3

x = x1 e1 + x2 e2 + x3 e3
i=1

xi ei

(2.1)

where the scalar coefcients xi are called the components of the vector x. For Cartesian coordinate systems, the i-th entry of the column vector is the component of the x vector along the i-th unit vector ei . Using matrix notation, we can write x = e1 e2 e3 x1 x2 x3 (2.2)

When it is clear in context, we can just also write the frame base vector components of x as the 31 column vector x1 x = x2 (2.3) x3 which is referred to as the representation of the vector x with respect to the basis vectors (1 , e2 , e3 ). The column matrix in Eq. 2.3 thus implicitly assumes an undere lying reference frame, here (1 , e2 , e3 ). The column matrix in Eq. 2.3 is, however, e frequently referred to as just a vector although it should be distinguished from the vector x itself. Throughout this text, a lowercase boldface symbol indicates a column vector. A subscript may be used to explicitly indicated the reference frame, i.e. xE refers to a representation relative to the frame E. Care must be taken when performing vector operations if multiple coordinate systems are used. Writing a vector addition as x=y+z
2

(2.4)

A vector with unit length is called a unit vector and is denoted using a hat, e

2.2 Vector Differentiation

is correct since no coordinate systems have been assigned yet. However, if the vectors have specic coordinate systems representation (they refer to different coordinate systems), then the following matrix vector addition would not be correct xE = y E + z F (2.5)

To add the y and z representations, these components would rst have to be transformed (projected) onto the same frame. Next chapter will shown how the direction cosine matrix can be used to perform this transformation.

2.2 Vector Differentiation


2.2.1 Angular Velocity Before proceeding with vector differentiation we examine angular velocity. The angular velocity is the time derivative of the angular distance with direction e perpendicular to the plane of angular motion. In planar motion it is easy to dene and visualize the concept of angular velocity as is shown in Figure 2.2.

Fig. 2.2. Angular velocity for planar motion. A positive rotation or rotation rate is dened to be in the increasing (counterclockwise) direction shown.

Angular velocity of a particle in a plane is a scalar and simply describes at what rate the radius vector locating the particle is orbiting the origin. In the general three dimensional case, the angular velocity is a vector quantity. Consider a reference frame A with a set of three orthogonal unit vectors ( 1 , a2 , a3 ) a and a reference frame U with a set of three orthogonal unit vectors ( 1 , u2 , u3 ) as u shown in Figure 2.3. The angular velocity vector of a reference frame U with respect to a reference frame A is denoted by U A . The symbol U A is to be read as the angular velocity of U with respect to A or relative to A. The angular velocity vector U A lies along the instantaneous axis of rotation of the reference frame U, and it usually changes both its direction and magnitude continuously with time. We can also consider the angular velocity of A with respect to U, denoted by AU = U A . Expressed in terms of basis vectors of U we get:

2. Basic Geometry

Fig. 2.3. Reference frames A and U. The U frame rotates relative to A with the angular velocity .

U A = 1 u1 + 2 u2 + 3 u3

As the unit vectors ui xed in the reference frame U rotate with an angular velocity U A with respect to A, the rate of change of ui is caused only by U A and it must be normal to both ui and U A . Thus, the time derivatives of the unit vectors ui measured in A are given by d i u dt = U A ui ,
A

i = 1, 2, 3

If a reference frame A is inertially xed, it is called an inertial or Newtonian reference frame. The time derivative measured in an inertial or Newtonian reference frame is often denoted with an overdot, i.e. ui . We may now write ui = U A ui , 2.2.2 Transport Theorem When computing the velocity of the particle and taking the time derivative of the position vector, one must take into account that the base vector directions of the chosen coordinate system may be time varying also. The following theorem allows one to take the derivative of a vector in one coordinate system, even though the vector itself has its components taken in another, possibly rotating, coordinate system. Example 2.2.1 (Transport theorem). To understand the importance of the transport theorem, imagine that you are standing still on Earths surface. Let U be an Earth xed coordinate system with the origin in the center of the Earth. Your position vector would point from the Earths center to your feet on the surface. Your velocity (derivative of your position vector within U) is zero relative to the Earth xed frame, U you are standing still. Now, lets introduce another coordinate system A with the same origin, but this one is non-rotating (inertial). You now wish to calculating the derivative of your position vector in the A frame. Since Earth (U) itself is rotating, your position derivative would be non-zero in the A frame. This is because relative to A, you are moving at constant speed along a circle about the Earths spin axis. Consider a particle P that is in motion relative to a reference frame U, which is itself in motion relative to an inertial reference frame A, as shown in Figure 2.4. i = 1, 2, 3 (2.9)

(2.6) (2.7)

(2.8)

2.2 Vector Differentiation

Fig. 2.4. Reference frames A and U. The U frame rotates relative to A with the angular velocity . The particle P is in motion relative to U.

The angular velocity of U relative to A is denoted by = U A . The position vector of the particle from the origin of U is denoted by r. Express r in terms of basis vectors of U, r = r1 u1 + r2 u2 + r3 u3 (2.10)

Then take derivatives in A, which is assumed inertial. Using the chain rule of differentiation we get, dr dt = r = r1 u1 + r2 u2 + r3 u3 + r1 u1 + r2 u2 + r3 u3
A

The rst three terms are the time derivatives of r projected onto the U frame, i.e. dr dt = r1 u1 + r2 u2 + r3 u3
U

while the last three terms are found using Eq. 2.9. The result is dr dt =
A

dr dt dr dt

+ r1 (U A u1 ) + r2 (U A u2 ) + r3 (U A u3 )
U

+ U A r
U

The term dr A is the velocity of the particle P with respect to the origin of U as dt seen from A, while dr U is the velocity of the particle P with respect to the origin dt of U measured in U. Theorem 2.2.1. (Transport Theorem) Let frame U rotate relative to frame A with angular velocity U A and let r be a vector. The time derivative of r in the A frame is then related to the derivative of r in the U frame as dr dt =
A

dr dt

+ U A r
U

Theorem 2.2.1 apply to any vector quantity and are of fundamental importance to dynamic problems in which a rotating reference frame is involved.

(2.11)

(2.12)

(2.13)

(2.14)

10

2. Basic Geometry

3. Orthogonal Transformations

11

3. Orthogonal Transformations

The objective of this chapter is to describe rotations (or orthogonal transformations) of a rigid body in R3 which has one xed point but is otherwise free to rotate about any axis through the xed point. A rigid body is by denition a conguration of points for which the mutual distances are preserved during movement and a rotation of a rigid body must therefore preserve distance. Intuitively, rotations must also preserve the natural orientation of R3 , i.e. right-handed coordinate systems must be transformed into right-handed coordinate systems. There is an innite number of attitude coordinates to choose from analogous to choosing among the sets of translational coordinates such as Cartesian, polar or spherical coordinates to describe a spatial position of a point. However, describing the attitude of an object relative to some reference frame does differ fundamentally from describing the corresponding relative spatial position of a point. In Cartesian space, the linear displacement between two spatial positions can grow arbitrarily large. On the other hand orientations can differ at most by a 180 degree rotation, a nite rotational displacement. The quest for the best rigid body orientation description is a very fundamental and important one. It has been studied by such great scholars as Euler, Jacobi, Hamilton, Cayley, Klein, Rodrigues and Gibbs and has led to a rich collection of elegant results. A good choice for attitude coordinates can greatly simplify the mathematics and avoid such pitfalls as mathematical and geometrical singularities or highly nonlinear kinematic differential equations. Orthogonal transformations are dened as the group of linear invertible transformations (Jakubczyk and Respondek 1999) T : R3 R3 that preserve the standard scalar product T v, T w = v, w (3.2) (3.1)

for any v , w R3 . As the standard scalar product1 induces distance in R3 , orthogonal transformations preserve the distance between any two points. Equation (3.2) also implies that an orthonormal basis remains orthonormal under transformation. Rotations are now dened as those orthogonal transformations that also preserve the orientation of R3 . The problem of parameterizing orthogonal transformations has been of interest since 1776, when Euler rst showed that three parameters are required. Representations
1

R3 with the standard scalar product,

v, w = v T w dened is in fact an Euclidian space.

12

3. Orthogonal Transformations

involving more than three parameters are therefore subject to constraints. It was, however, demonstrated by (Stuelpnagel 1964) that no three-parameter set can be both global and nonsingular. In order to specify any global attitude at least four parameters are needed.

3.1 Direction Cosine


Consider a reference frame A with a right-hand set of three orthogonal unit vectors ( 1 , a2 , a3 ) and a reference frame U with another right-hand set of three orthogonal a unit vectors ( 1 , u2 , u3 ) as shown in Figure 3.1. u

Fig. 3.1. Reference frames A and U.

Basis vectors ( 1 , u2 , u3 ) of U are expressed in terms of basis vectors ( 1 , a2 , a3 ) u a of A as follows: u1 = C11 a1 + C12 a2 + C13 a3 u2 = C21 a1 + C22 a2 + C23 a3 u3 = C31 a1 + C32 a2 + C33 a3 (3.3) (3.4) (3.5)

where Cij = ui aj is the cosine of the angle between ui and aj and Cij is simply called the direction cosine. Using matrix notation, Eq. 3.3 becomes: a1 u1 C11 C12 C13 a1 u2 = C21 C22 C23 a2 = C U A a2 a3 a3 u3 C31 C32 C33 where C U A is the direction cosine matrix which relative to A. The components of C U A are u1 a1 u1 a2 C U A = u2 a1 u2 a2 u3 a1 u3 a2

describes the orientation of U u1 a3 u2 a3 u3 a3

The direction cosine matrix is also called the rotation matrix or coordinate transformation matrix to U from A. Such a coordinate transformation is symbolically represented as

(3.6)

(3.7)

3.1 Direction Cosine

13

CUA : U A For brevity, we often use C for C U A . Because each set of basis vectors of A and U consists of orthogonal unit vectors, the direction cosine matrix C is orthonormal matrix; thus, we have C 1 = C T (3.8) which is equivalent to CC T = I = C T C (3.9) In general, a square matrix A is called an orthogonal matrix if AAT is a diagonal matrix, and it is called an orthonormal matrix if AAT is an identity matrix. A important property of the orthonormal matrix (and thus the direction cosine matrix) is that its determinant is 1. From Eq. 3.9 it follows that det(CC T ) = det(I) = 1 Since C is a square matrix this can be written as det(C) det(C T ) = 1 As det(C) = det(C T ), this reduces to det(C)2 = 1 det(C) = 1 (3.12) (3.11) (3.10)

If the two coordinate frames are right-handed, then det(C) = +1 (Goldstein 1980). The space of matrices satisfying Eq. 3.10 and det(C) = +1 is called the special orthogonal group and is denoted by SO(3). Equation (3.10) implies six constraints on C matrix leaving at most three degrees of freedom. This means that there are six redundant elements among the nine components of matrix C. This is why in practice the elements of the direction cosine matrix are rarely used as coordinates to keep track of an orientation; instead less redundant attitude parameters are used. The biggest asset of the direction cosine matrix is the ability to easily transform vectors from one reference frame to another. We use C AU to denote a coordinate transformation matrix to A from U or a direction cosine matrix of A relative to U. In analogy to Eq. 3.7, we have a1 u1 a1 u2 a1 u3 (3.13) C AU = a2 u1 a2 u2 a2 u3 a3 u1 a3 u2 a3 u3 We thus have the following intimate relationship between C U A and C AU : C T A = C AU U (3.14)

In a standard coordinate transformation setting, the C matrix is typically not restricted to projecting one set of base vectors from one reference frame onto another. Rather, the direction cosines most powerful feature is the ability to directly project (or transform) an arbitrary vector, with components written in one reference frame, into a vector with components written in another reference frame.

14

3. Orthogonal Transformations

Given an arbitrary vector r expressed in the A and U frames as follows: r = r1 a1 + r2 a2 + r3 a3 = r1 u1 + r2 u2 + r3 u3 We now have r1 = u1 r = u1 (r1 a1 + r2 a2 + r3 a3 ) r2 = u2 r = u2 (r1 a1 + r2 a2 + r3 a3 ) r3 = u3 r = u3 (r1 a1 + r2 a2 + r3 a3 ) Written in matrix form we get r1 u1 a1 r2 = u2 a1 u3 a1 r3 (3.17) (3.18) (3.19) (3.15) (3.16)

u1 a2 u2 a2 u3 a2

r1 u1 a3 u2 a3 r2 u3 a3 r3

(3.20)

The components of a vector r are thus transformed to U from A using the direction cosine matrix C U A , which was dened in Eq. 3.7 for the transformation of basis vectors. Another common problem is cascading frames. Given several frames, each dened relative to the previous one it is desired to replace the sequence of transformations by a single transformation. Let r A be a vector, r, dened relative to reference frame A. The orientation of a frame B relative to A is given by C BA while the orientation of a frame C relative to B is given by C CB . The representation of the vector r in the C frame is then given by r C = C CB C BA r A = C CA r A (3.21)

where the direct transformation matrix from the rst to the last cascading reference frame is found by matrix multiplications of each relative transformation matrix. The order of the composition of successive rotations is very important. The direction cosine matrix is the most fundamental, but highly redundant, method of describing a relative orientation. As was mentioned earlier, the minimum number of parameter required to describe a reference frame orientation is three. Example 3.1.1 (Elementary rotations). Three elementary rotations respectively about the rst, second, and third axes of the reference frame A are described by the following rotation matrices: 1 0 0 sin 1 C 1 (1 ) = 0 cos 1 0 sin 1 cos 1 cos 2 0 sin 2 1 0 C 2 (2 ) = 0 sin 2 0 cos 2 cos 3 sin 3 0 C 3 (3 ) = sin 3 cos 3 0 0 0 1

3.2 Euler Angles

15

where C i (i ) denotes the direction cosine matrix representing a rotation about the i-th axis of A with an angle i . Note that the axis of rotation is unchanged by the rotation in each of the three cases, i.e. in C 1 (1 ) the 1-st axis is unchanged as the rotation is about this axis.

3.2 Euler Angles


One scheme for orienting a rigid body to a desired orientation involves successively rotating three times about the axes of the rotated, body-xed reference frame. The rst rotation is about any axis. The second rotation is about either of the two axes not used for the rst rotation. The third rotation is then about either of the two axes not used for the second rotation. There are 12 sets of Euler angles for such successive rotations about the axes xed in the body. It is also possible to bring a rigid body into an arbitrary orientation by performing three successive rotations that involve the axes xed in an inertial reference frame. This scheme will then provide another 12 sets of Euler angles2 for the so-called space-axis rotations. Because the coordinate transformation matrices for the bodyaxis rotation and the space-axis rotation are intimately related to each other, we often only consider the 12 sets of body-axis rotations. Consider three successive body-axis rotations that describe the orientation of a reference frame U relative to a reference frame A. A particular sequence chosen here is symbolically represented as C 3 (3 ) : W A C 2 (2 ) : V W C 1 (1 ) : U V where each rotation is described as cos 3 sin 3 0 C 3 (3 ) = sin 3 cos 3 0 0 0 1 cos 2 0 sin 2 1 0 C 2 (2 ) = 0 sin 2 0 cos 2 1 0 0 sin 1 C 1 (1 ) = 0 cos 1 0 sin 1 cos 1 (3.22) (3.23) (3.24)

where W and V are two intermediate reference frames with basis vectors. The three angles 1 , 2 , and 3 , are called Euler angles. The sequence of rotations to U from A results is a rotation matrix to U from A, dened as
2

Leonard Euler (1707-1783), rst introduced the concept of three successive rotations to describe orientation. Euler used space xed angles to describe the orientation of an orbital plane

16

3. Orthogonal Transformations

C U A C 1 (1 )C 2 (2 )C 3 (3 ) c2 c3 c2 s3 = s1 s2 c3 c1 s3 s1 s2 s3 + c1 c3 c1 s2 c3 + s1 s3 c1 s2 s3 s1 c3

s2 s1 c2 c1 c2

(3.25)

where ci = cos i and si = sin i . This sequence is called (3-2-1) Euler angles, following the rotation order. First a rotation about the 3rd axis, then a rotation about the new 2nd axis and nally a rotation about the 1st axis as shown in Figure3.2. Relative attitude is easy to visualize using the Euler angles for small angles.

Fig. 3.2. (3-2-1) Euler Angle sequence.

Example 3.2.1 (Orbiter reference frame). The space shuttle orbiter reference frame, is dened as follows. Three successive rotations of a coordinate frame form an initially aligned state to a nal orientation dene the attitude of the shuttle. These rotations are performed about the body axes of the body in a specic sequence. Each axis has, by convention been given a number which refers to a rotation about that axis in accordance with the right hand rule. A rotation about the body x axis is called a one rotation; a rotation about the body y axis is called a two rotation; and a rotation about the body z axis is called a three rotation. Any sequence of these rotations can represent shuttle attitude. By convention, NASA use a (2-3-1) rotation sequence for the orbiter which equates to a pitch-yawroll, as illustrated in Figure 3.3. Performing three successive rotations about the 3rd, 2nd and 1st body axis, does not yield the same orientation as if instead the rotation order is (1-2-3) or (2-3-1). In general, there are 12 sets of Euler angles, each resulting in a different form for the rotation matrix C U A . For example, we may consider the (2-3-1) sequence C U A C 1 (1 )C 3 (3 )C 2 (2 ) c2 c3 s3 = c1 c2 s3 + s1 s2 c1 c3 s1 c2 s3 + cl s2 s1 c3 s2 c3 c1 s2 s3 + s1 c2 s1 s2 s3 + c1 c2

Note that for small (innitesimal) Euler angles of 1 , 2 and 3 , the direction cosine matrices in Eqs. 3.25 and 3.26 are identical and become 1 3 2 1 1 C 3 (3.27) 2 1 1

(3.26)

3.3 Eigenaxis Rotation Theorem

17

Fig. 3.3. Shuttle reference system. A (2-3-1) rotation sequence for the orbiter which equates to a pitch-yaw-roll.

That is, the rotation sequence of Euler angles becomes unimportant for innitesimal rotations, whereas rotation sequence is important for nite rotations. Another very popular set of Euler angles is the (3-1-3) set as illustrated in Figure 3.4. These angles are commonly used by astronomers to dene the orientation of orbit planes of the planets relative to the Earths orbit plane. In the (3-1-3) sequence the third axis is used twice, and the rotation matrix to U from A becomes C U A = C 3 ()C 1 ()C 3 () cc scs sc + ccs = cs scc ss + ccc ss cs where c = cos , s = sin , etc. The (3-1-3) Euler angles are called longitude of the ascending node, inclination and argument of the perihelion. In general, Euler angles have an advantage over direction cosines in that three Euler angles determine a unique orientation, although there is no unique set of Euler angles for a given orientation. ss sc c

3.3 Eigenaxis Rotation Theorem


The following theorem has been very fundamental in the development of several types of attitude coordinates and is generally referenced to Euler (Goldstein 1980).

     

!      

""  0 ) $  ( ! %!   %    % $  !  #!   " 

$!! !  ' & $

(3.28)

18

3. Orthogonal Transformations

Fig. 3.4. (3-1-3) Euler Angle Illustration. First a rotation about the 3rd axis of , then a rotation about the 1st axis of and nally a rotation about the new third axis of .

Theorem 3.3.1 (Eulers Eigenaxis Rotation). A rigid body or coordinate reference frame xed in a point P can be brought from an arbitrary initial orientation to an arbitrary nal orientation by a single rotation, about the principal axis n through the point P . Eulers eigenaxis rotation theorem states that by rotating a rigid body about an axis that is xed to the body and stationary in an inertial reference frame, the rigid-body attitude can be changed from any given orientation to any other orientation. Such an axis of rotation, whose orientation relative to both an inertial reference frame and the body remains unchanged, is called the Euler axis or eigenaxis. Proof of Eulers Eigenaxis Rotation theorem is given in (Goldstein 1980). Let the eigenaxis rotation be . Thge eigenaxis unit vector e be written in the A and B frames as e = e1 a1 + e2 a2 + e3 a3 1 + e22 + e33 = e1 b b b (3.29) (3.30)

Following the theorem, the eigenaxis is unchanged by the rotation and the rotation is then characterized by e1 C11 C12 C13 e1 e2 = C21 C22 C23 e2 (3.31) e3 C31 C32 C33 e3 To parameterize the direction cosine matrix C in terms of ei and , a sequence of Eulers successive rotations is used as follows: 1. Rotation frame A with R to align the a1 axis with e. Let A be the new frame after this rotation, i.e. we have e1 e2 e3 C A A = R = R21 R22 R23 (3.32) R31 R32 R33

3.4 Quaternions

19

2. Now rotation frame A into A around the direction e through an angle , 1 0 0 sin C A A = C 1 () = 0 cos (3.33) 0 sin cos 3. Rotate A through the inverse matrix R1 = RT to compensate for the rotation in 1. The frame A should now be aligned with B, since C BA = R1 . These three successive rotations can be combined as C BA = RT C 1 ()R c + e2 (1 c) 1 = e2 21 (1 c) e3 s e3 e1 (1 c) + e2 s e1 e3 (1 c) e2 s e2 e3 (1 c) + e1 s c + e2 (1 c) 3 (3.34)

e1 e2 (1 c) + e3 s c + e2 (1 c) 2 e3 e2 (1 c) e1 s

where c = cos and s = sin . This is the parameterization of the direction cosine matrix C in terms of e and . By dening e1 0 e3 e2 0 e1 e = e2 and E = e3 (3.35) e3 e2 e1 0 Eq. 3.34 may be expressed as C(, ) = cos I + (1 cos )eeT sin E e where I is the identity matrix. By inspection of Eq. 3.34, the inverse transformation from the direction cosine matrix to the eigenaxis rotation elements is found to be cos = and e1 1 e = e2 = 2 sin e3 C23 C32 C31 C13 if = 0, , 2, . . . C12 C21 (3.38) 1 1 (C11 + C22 + C33 1) = (tr C 1) 2 2 (3.37) (3.36)

3.4 Quaternions
In this section the representation of rotations in terms of quaternions is discussed. Such a representation is not just concise and elegant but also yields a very efcient way of handling compositions of rotations. The mathematical theory of quaternions was rst developed by (Hamilton 1866). Quaternions are also known as hypercomplex numbers and denoted by H.

20

3. Orthogonal Transformations

Consider again Eulers eigenaxis rotation about an arbitrary axis xed both in a bodyxed reference frame B and in an inertial reference frame A. Then we dene the four quaternions as follows: q1 q2 q3 q4 = e1 sin(/2) = e2 sin(/2) = e3 sin(/2) = cos(/2) (3.39) (3.40) (3.41) (3.42)

where is the rotation angle about the Euler axis, e. Similar to the the eigenaxis vector, we dene a vector q 13 = (q1 , q2 , q3 ) such that q 13 = e sin(/2) (3.43)

The quaternions are not independent of each other, but constrained by the relationship
2 q T q 13 + q4 =1 13

(3.44)

Note that this constraint geometrically describes a four-dimensional unit sphere. Any rotation described through the quaternion has a trajectory on the surface of this constraint sphere. From the denition in Equation 3.39 to 3.42 it is clear that no rotation3 is represented by a unit quaternion q 13 T = 0 0 0 1 q4 The direction cosine parameterized in terms of quaternions is found by substituting Eqs. 3.39 to 3.42 into Eq. 3.34 while using that sin = 2 sin(/2) cos(/2) and cos = cos2 (/2) sin2 (/2) = 2 cos2 (/2) 1 = 1 2 sin2 (/2). The result is, as follows: 2 2 1 2(q2 + q3 ) 2(q1 q2 + q3 q4 ) 2(q1 q3 q2 q4 ) 2 2 C(q 13 , q4 ) 2(q2 q1 q3 q4 ) 1 2(q1 q3 ) 2(q2 q3 + q1 q4 ) 2 2 2(q3 q1 + q2 q4 ) 2(q3 q2 q1 q4 ) 1 2(q1 + q2 )

(3.45)

It is clear from Eq. 3.45 that changing the sign on the quaternion does not change the direction cosine. All quaternion components appear in quadratic product pairs, thus changing the signs of all components has no effect on the resulting C matrix. Given a certain orientation, there are actually two sets of quaternions that will describe the same orientation. This is due to the non-uniqueness of the principal rotation elements themselves. Similar to Eq. 3.35, the expression for the direction cosine may be simplied by dening a skew symmetric matrix Q, 0 q3 q2 0 q1 Q = q3 (3.46) q2 q1 0
3

Corresponds to an identity direction cosine matrix

3.4 Quaternions

21

The result is that Eq. 3.45 may be written as


2 C(q 13 , q4 ) = (q4 q T q 13 )I + 2q 13 q T 2q4 Q 13 13

(3.47)

The quaternion transpose is dened as q = such that C(q ) = C T (q). Given a direction cosine matrix C the quaternion can be found as follows: q4 = (1 + tr C) 2 C C32 1 23 C31 C13 = 4q4 C12 C21
1

q 13 q4

for 0 if q4 = 0

(3.48) (3.49)

q 13

A very important composite rotation property of the quaternion is the manner in which they allow two sequential rotations to be combined into one overall composite rotation, C(q 13 , q4 ) = C(q 13 , q4 )C(q 13 , q4 ) (3.50)

Using Eq. 3.45 in Eq. 3.50 and equating corresponding elements leads to following elegant transformation that bi-linearly combines the two quaternions q1 q2 q1 q3 q1 q4 q2 q3 q2 q2 q1 q4 = (3.51) q3 q2 q3 q3 q4 q1 q4 q1 q2 q3 q4 q4 which is known as the quaternion multiplication rule in matrix form. The 4 4 orthonormal matrix in Eq. 3.51 is called the quaternion matrix. Eq. 3.51 can also be written in a more compact form: q 13 = q4 q 13 + q4 q 13 + q 13 q 13 q4 = q4 q4 (q 13 ) q 13
T

(3.52) (3.53)

These transformations provide a simple, nonsingular and bilinear method to combine two successive rotations described through quaternions. For other attitude parameters such as the Euler angles, this same composite transformation would yield a very complicated, transcendental expression.

22

3. Orthogonal Transformations

4. Kinematics

23

4. Kinematics

Kinematics is mainly concerned with the geometry of motion without considerations of masses and forces. Essentially, Kinematics is a collection of vector/matrix methods to describe positions, velocities and accelerations of particles and rigid bodies, as viewed from various reference frames. The subject of kinematics does not involve any forces associated with the motion but address the relative orientation between two reference frames as these evolve over time. A thorough working knowledge of kinematics is a prerequisite to the successful formulation of the equations of motion of particles and rigid bodies. Throughout this chapter, we will speak of the orientation of a reference frame xed in a body to describe the orientation of the body itself.

4.1 Kinematic Differential Equations


In the preceding section, we have studied the problem of describing the orientation of a reference frame (or a rigid body) in terms of the direction cosine matrix. In this section, we treat kinematics in which the relative orientation between two reference frames is time dependent. The time-dependent relationship between two reference frames is described by the so-called kinematic differentia1 equations. In this section, we derive the kinematic differential equations for the direction cosine matrix, Euler angles, and the quaternions.

4.1.1 Direction Cosine Matrix Consider two reference frames A and B, which are moving relative to each other. The angular velocity vector of a reference frame B with respect to a reference frame A is denoted by BA . The direction cosine C is dened such that bi = C(t) i a or ai = C T (t)bi (4.2) (4.1)

Taking time derivatives of Eq. 4.2 in the A frame, and denoting it by an overdot, we get

24

4. Kinematics

0 = C(t)bi + C T (t) i b The last term may be found using Theorem 2.2.1, 0 = C(t)bi + C T (t)( BA (t) bi ) By introduction of the skew symmetric matrix 0 3 0 S( BA ) = 3 2 1 2 1 0

(4.3)

(4.4)

(4.5)

and taking transpose in Eq. 4.4 we get the direction cosine kinematic equation C(t) = S( BA (t))C(t) (4.6)

Given an arbitrary time history of BA , Eq. 4.6 represents a rigorously linear differential equation which can be integrated to yield the instantaneous direction cosine matrix. A major advantage of the kinematic differential equation is that it is linear and universally applicable. There are no geometric singularities present in the attitude description or its kinematic differential equations. However, this advantage comes at the cost of having a highly redundant formulation. Several other attitude parameters will be presented in the following sections which include a minimal number (3) of attitude parameters. However, all minimal sets of attitude coordinates have kinematic differential equations which contain some degree of nonlinearity and also embody geometric and/or mathematical singularities. Only the quaternions will be found to retain a singularity free description and possess linear kinematic differential equations analogous to the direction cosine matrix.

4.1.2 Euler Angles Like the kinematic differential equation for the direction cosine matrix C, the orientation of a reference frame B relative to a reference frame A can also be described by introducing the time dependence of Euler angles. Consider the rotational sequence B from A symbolically represented as C 3 (3 ) : A A C 2 (2 ) : A A C 1 (1 ) : B A (4.7) (4.8) (4.9)

The time derivatives of Euler angles, called Euler rates, are denoted by 3 , 2 and 1 . These successive rotations are also represented as A A = 3 a3 = 3 a3 A A = 2 a2 = 2 a2 b BA = 1 a = 11
1

(4.10) (4.11) (4.12) (4.13)

In the B frame, the angular velocity may thus be expressed as

4.1 Kinematic Differential Equations

25

0 0 1 1 2 = 0 + C 1 (1 ) 2 + C 1 (1 )C 2 (2 ) 0 3 0 0 3 1 1 0 sin 2 sin 1 cos 2 2 = 0 cos 1 0 sin 1 cos 1 cos 2 3 The inverse relationship can be found through inversion, 1 cos 2 sin 1 sin 2 cos 1 sin 2 1 2 = 1 0 cos 1 cos 2 sin 1 cos 2 2 cos 2 0 sin 1 cos 1 3 3

(4.14)

(4.15)

which is the kinematic differential equation for the (3-2-1) sequence. If 1 , 2 and 3 are known as functions of time, then the orientation of B relative to A as a function of time can be determined by solving Eq. 4.15. Numerical integration of Eq. 4.15, however, involves the computation of trigonometric functions of the angles. Also note that Eq. 4.15 becomes singular when 2 = /2. Such a mathematical singularity problem for a certain orientation angle can be avoided by selecting a different set of Euler angles, but it is an inherent property of all different sets of Euler angles. Different Euler sequences results in similar (but different) kinematic differential equations.

4.1.3 Quaternions The quaternion kinematic equation is given by q 13 = 1 (q4 q 13 ) 2 1 q4 = T q 13 2 (4.16) (4.17)

The kinematic differential equation in Eq. 4.16 may be integrated numerically to determine the orientation in terms of quaternions. Quaternions have no inherent geometric singularity as do Euler angles. Moreover, quaternions are well suited for real-time computation because only products and no trigonometric relations exist in the quaternion kinematic differential equations. There are a number of numerical methods available for solving Eq. 4.16. Methods include Taylor series expansion, the rotation vector concept, Runge-Kutta algorithms, and the state transition matrix.

26

4. Kinematics

REFERENCES

27

References

Goldstein, H. (1980). Classical Mechanics (2nd ed.). Addison-Wesley. Hamilton, W. R. (1866). Elements of Quaternions. London: Longmans, Green. Jakubczyk, B. and W. Respondek (1999). Geometric Nonlinear Control. Aalborg, Denmark: Lecture notes, Aalborg University, Department of Control Engineering. Stuelpnagel, J. D. (1964). On the parametrization of the three-dimensional rotation group. SIAM review 6, 422430.

Вам также может понравиться