Академический Документы
Профессиональный Документы
Культура Документы
Rotational Kinematics
Description of attitude kinematics using reference frames, rotation matrices, Euler parameters, Euler angles, and quaternions Recall the fundamental dynamics equations d ~ p f = dt ~ d~ ~ g = dt h For both equations, we must relate momentum to kinematics
AOE 5204
~ f=
~ g=
d~ dt h
Linear momentum = mass velocity d/dt (linear momentum) = applied forces d/dt (position) = linear momentum/mass
Angular momentum = inertia angular velocity d/dt (angular momentum) = applied torques d/dt (attitude) = angular momentum/inertia
AOE 5204
Translational Kinematics
Newtons second law can be written in first-order state-vector form as
~ r ~ p ~ p/m = ~ f =
Here, ~ p is the linear momentum, dened by the kinematics equation; i.e., ~ p = m~ r
Thus, the kinematics differential equation allows us to integrate the velocity to compute the position The kinetics differential equation allows us to integrate the applied force to compute the linear momentum ~ In general, f =~ f (~ r, ~ p)
AOE 5204
AOE 5204
~ v = v1 i1 + v2 i2 + v3 i3
i v3 3
~ v
v1
i1
v2
Vector can be expressed as linear combination of the unit vectors Must be clear about which reference frame is used
i2
AOE 5204
Orthonormal
Orthonormal means the base vectors are perpendicular (orthogonal) to each other, and have unit length (normalized)
i1 i1 = 1 i1 i2 = 0 i1 i3 = 0 i1 = 0 i2 = 1 i3 = 0 i2 i2 i2 i1 = 0 i3 i2 = 0 i3 i3 = 1 i3 ij = ii
i 6= j
or
ii ij = ij
AOE 5204
Dextral, or Right-handed
Right-handed means the ordering of the three unit vectors follows the right-hand rule
i1 = ~ 0 i1 i2 = i3 i3 = i2 i1 i1 i1 = i2 = ~ i3 = i3 0 i2 i1 i2 i2 i1 = i2 i2 = i1 i3 = ~ 0 i3 i3 i3 ij = ijk ii ik
ijk
~ i2 i3 n o n oT 0 n o = i i = i 0 i1 i3 ~ 0 i1 ~ i2
1 for i, j, k an even permutation of 1,2,3 1 for i, j, k an odd permutation of 1,2,3 = 0 otherwise (i.e., if any repetitions occur)
AOE 5204
Skew Symmetry
The [] notation defines a skew-symmetric 3 3 matrix whose 3 unique elements are the components of the 3 1 matrix []
~ i 0 i 3 2 n o ~ i = 0 i1 i3 ~ i2 i1 0
The same notation applies if the components of the 3 1 matrix [] are scalars instead of vectors The skew-symmetry property is satisfied since
(a )T = a a1 0 a3 0 a = a2 a = a3 a3 a2 a1 a2 a1 0
AOE 5204
Vectors
A vector is an abstract mathematical object with two properties: direction and length Vectors used in this course include, for example, position, velocity, acceleration, force, momentum, torque, angular velocity Vectors can be expressed in any reference frame Keep in mind that the term state vector refers to a different type of object -- specifically, a state vector is generally a column matrix collecting all the system states
AOE 5204
~ i1 + v2 i2 + v3 i3 v = v1
i v3 3
~ v
v1
i1
v2
where v = k~ vk is the magnitude or length of ~ v, and j is the angle between ~ v and ij for j = 1, 2, 3
i2
AOE 5204
When we can easily identify the associated reference frame, we use the simple notation above; however, when multiple reference frames are involved, we use a subscript to make the connection clear. Examples:
vi denotes components in Fi vo denotes components in Fo vb denotes components in Fb
AOE 5204
Matrix multiplication arises frequently in dynamics and control, and an interesting application involves the 3 1 matrix of a vectors components and the 3 1 matrix of a frames base vectors* We frequently encounter problems of two types:
Given vi and vb , determine the attitude of Fb with respect to Fi Given the attitude of Fb with respect to Fi , and components vi , determine vb i1 no T ~ v = [v1 v2 v3 ] i = vi i2 i3 no n o T T T = } = vb b = vi i = vo {o
AOE 5204
Suppose we know the components of vector ~ v in Fb , denoted vb , and we want to determine its components in Fi , denoted vi In some sense this problem has three unknowns (the components of vi ); hence we expect to form a set of three equations and three unknowns no n o T T Specically, we note that ~ v = vi i = vb b and seek a linear no n o transformation R such that i =R b With we can make a substition and have ~ v= n such o a transformation, n o T = vT b R b vi b n o are orthonormal, the coecients on both Since the base vectors b sides of the equation must be equal, so
T T vi R = vb
RT vi = vb
AOE 5204
Rotations (2)
Problem reminder: Knowing vb , determine vi We have RT vi = vb If we know R, then we just have to solve the linear system to determine vi We know that R is a 3 3 matrix (i.e., R R33 ), and that no n o i =R b The latter can be expanded to i1 i2 i3 1 + R12 b 2 + R13 b 3 = R11 b 1 + R22 b 2 + R23 b 3 = R21 b 1 + R32 b 2 + R33 b 3 = R31 b
AOE 5204
Rotations (3)
1 + R12 b 2 + R13 b 3 i1 = R11 b
Comparing this expression with the denition of the components of a vector in a specic frame, we see that 1 , R12 = 2, R11 = i1 b i1 b and in general, j Rij = ii b Using direction cosines, R11 = cos 11 , R12 = cos 12 , and in general, j Rij = cos ij , where ij is the angle between ii and b Thus R is a matrix of direction cosines, and is frequently referred to as the DCM (direction cosine matrix)
AOE 5204
Rotations (4)
Another way to describe R is to observe that its rows contain the components of the base vectors of Fi expressed in Fb , and that its columns contain the components of the base vectors of Fb expressed in Fi These observations mean that the rows and columns are mutually orthogonal, and since the base vectors are unit vectors, the rows and columns are mutually orthonormal n o n oT = 1, we can also write R as the Recalling earlier notation, i i no n oT , i.e., dot product of i with b n o n oT R= i b
So, if we know the relative orientation of the two frames, we can compute R and solve the required linear system to compute vi
AOE 5204
Rotations (5)
Assuming we have computed R, we just need to solve the required linear system to compute vi The linear system, RT vi = vb , is easily solved because of the previously observed fact that R is an orthonormal matrix If we were to return to the beginning of this development and begin with no n o no n o T instead of i =R b R i = b
we would nd that the same matrix R satises both equations, thus proving that R1 = RT , which is perhaps the most useful property of orthonormal matrices Its application here leads to vi = Rvb vi = Rib vb
We adopt the notation Rib to denote the orthonormal matrix that transforms vectors from Fb to Fi
AOE 5204
Rotations (6)
Summary of Rotation Notation Rotation matrix, orthonormal matrix, attitude matrix, and direction cosine matrix are synonymous The inverse of the rotation matrix is simply its transpose The orthonormal matrix that transforms vectors from Fb to Fi is denoted Rib : vi = Rib vb and vb = Rbi vi The rotation matrix can be computed using n o n oT i b Rib = n o n oT and Rbi = b i b2i b3i
AOE 5204
Rotations (7)
More Properties of Rotation Matrices Since R1 = RT , RT R = 1 (the identity matrix) The determinant of R is unity: det R = 1 One of the eigenvalues of R is +1 Every rotation corresponds to a rotation about a single axis a through an angle ; this fact implies that Ra = a, and hence a is the eigenvector corresponding to the unity eigenvalue Rotations multiply; i.e., if Rab relates frames Fa and Fb , and Rbc relates frames Fb and Fc , then Rac = Rab Rbc
AOE 5204
The rotation matrix represents the attitude A rotation matrix has 9 numbers, but they are not independent There are 6 constraints on the 9 elements of a rotation matrix (what are they?) Rotation has 3 degrees of freedom There are many different sets of parameters that can be used to represent or parameterize rotations Euler angles, Euler parameters (aka quaternions), Rodrigues parameters (aka Gibbs vectors), Modified Rodrigues parameters,
AOE 5204
Euler Angles
Consider the rotation from Fi to Fb using three Euler angles, 1 , 2 , and 3 The rst rotation is about the i3 axis, through angle 1 The n resulting frame is denoted o Fi0 or i0 The rotation matrix from Fi to Fi0 is 0 Ri i = R3 (1 )
Leonhard Euler (17071783) reasoned that the rotation from one frame to another can be visualized as a sequence of three simple rotations about base vectors Each rotation is through an angle (Euler angle) about a specified axis
cos 1 = R3 (1 ) = sin 1 0
Ri i
sin 1 cos 1 0
0 0 1
vi0 = R3 (1 )vi
AOE 5204
cos 1 = R3 (1 ) = sin 1 0 i2
sin 1 cos 1 0
0 0 1
vi0 = R3 (1 )vi
0 i2
1 1
0 i1
i1
AOE 5204
0 The second rotation is about the i3 axis, through angle 2 The Fi00 or resulting frame is denoted o n i00
i0
= R2 (2 ) cos 2 = 0 sin 2
0 sin 2 1 0 0 cos 2
= R2 (2 )R3 (1 )
= R2 (2 )
is the rotation matrix transforming vectors from Fi to Fi00 For an Ri rotation, the ith row and column are always two zeros and a one. The other two rows and columns have cos and sin in an easily memorized pattern
The notation for the simple rotations is Ri (j ), which denotes a rotation about the ith axis. The subscript on R denes which axis is used, and the subscript on denes which of the three angles in the Euler sequence used
AOE 5204
The resulting frame is denoted Fb n o or b The rotation matrix from Fi00 to Fb is bi00 R = R1 (3 ) 3 b
00 i3
Note that the cos terms are on the diagonal of the matrix, whereas the sin terms are on the o-diagonal vb = R1 (3 )vi00 = R1 (3 )R2 (2 )R3 (1 )vi
= R1 (3 ) 1 0 = 0 cos 3 0 sin 3
0 sin 3 cos 3
AOE 5204
We can select arbitrary values of the three angles and compute a rotation matrix. For example, let 1 = /3, 2 = /7, and 3 = /5: 0.450484 0.780262 0.433884 0.529576 R = 0.573114 0.625371 0.684547 0.010099 0.728899 Conversely, given a rotation matrix, we can extract the Euler angles
AOE 5204
To extract Euler angles from a given of the two matrices: c1 c2 bi R = c3 s1 + c1 s2 s3 c1 s2 c3 + s1 s3 0.450484 0.780262 = 0.573114 0.625371 0.684547 0.010099 Choose the easy one rst:
R13 : s2 = 0.433884 2 = sin1 0.433884 = 0.448799 /7 R11 : c1 c2 = 0.450484 1 = 1.047198 /3 Quadrant checks are generally necessary for the second and third calculations. Exercise: Select another Euler angle sequence and determine the values of the three s that give the numerical R above.
AOE 5204
We just developed a 3-2-1 rotation, but there are other possibilities There are 3 choices for the rst rotation, 2 choices for the second rotation, and 2 choices for the third rotation, so there are 3 2 2 = 12 possible Euler angle sequences The Euler angle rotation sequences are (1 2 3) (1 3 2) (1 2 1) (1 3 1) (2 3 1) (2 1 3) (2 3 2) (2 1 2) (3 1 2) (3 2 1) (3 1 3) (3 2 3) The two left columns are sometimes called the asymmetric rotation sequences, and the two right columns are called the symmetric sequences The roll-pitch-yaw sequence is an asymmetric sequence (which one?), whereas the -i- sequence (what is this?) is a symmetric sequence
AOE 5204
The three simple rotation matrices are (1,0,0) in 1st row and column 1 0 0 Cosines on diagonal, Sines on off 0 cos sin R1 () = diagonal, negative Sine on row 0 sin cos above the 1st row cos 0 sin cos sin 0 0 sin 1 0 0 cos sin cos 0 0 0 1 (0,1,0) in 2nd row and column Cosines on diagonal, Sines on offdiagonal, negative Sine on row above the 2nd row (0,0,1) in 3rd row and column Cosines on diagonal, Sines on offdiagonal, negative Sine on row above the 3rd row
R2 () =
R3 () =
AOE 5204
Roll, pitch and yaw are Euler angles and are sometimes defined as a 3-2-1 sequence and sometimes defined as a 1-2-3 sequence Whats the difference? The 3-2-1 sequence (we did earlier) leads to s1 c2 c1 c2 Rbi = c3 s1 + c1 s2 s3 c1 c3 + s1 s2 s3 c1 s2 c3 + s1 s3 s1 s2 c3 c1 s3 The 1-2-3 sequence leads to c2 c3 s1 s2 c3 + c1 s3 Rbi = c2 s3 c1 c3 s1 22 s3 s1 c2 s2
where 1 is the yaw angle, 2 is the pitch angle, and 3 is the roll angle
s2 c2 s3 c2 c3
where 1 is the roll angle, 2 is the pitch angle, and 3 is the yaw angle
s1 s3 c1 s2 c3 s1 c3 + c1 s2 s3 c1 c2
AOE 5204
Note that the two matrices are not the same Rotations do not commute However, if we assume that the angles are small (appropriate for many vehicle dynamics problems), then the approximations of the two matrices are equal 3-2-1 Sequence cos 1 and sin 1 1 2 bi 1 3 R 1 2 3 1 1-2-3 Sequence cos 1 and sin 1 3 2 bi 1 1 R 3 2 1 1
where 1 is the yaw angle, 2 is the pitch angle, and 3 is the roll angle 3 Rbi 1 Rbi 1 2 1
where 1 is the roll angle, 2 is the pitch angle, and 3 is the yaw angle roll bi pitch R 1 yaw
AOE 5204
Perifocal Frame
inertial
Earth-centered, orbit-based, The P-axis is in periapsis direction The W-axis is perpendicular to orbital plane (direction of orbit angular G G momentum vector, r v) The Q-axis is in the orbital plane and finishes the triad of unit vectors In the perifocal frame, the position and velocity vectors both have a zero component in the W direction
W
P
Q
P
AOE 5204
^ K
^ I
ne a l p l Orbita
i ^ n ^ J
Orbit is defined by 6 orbital elements (oes): semimajor axis, a; eccentricity, e; inclination, i; right ascension of ascending node, ; argument of periapsis, ; and true anomaly,
AOE 5204
Use a 3-1-3 sequence Right ascension of the ascending : R3 (), rotates node about K I (the ascending node vector) to n Inclination i about the node vec to W (the tor: R1 (i), rotates K orbit normal direction) Argument of periapsis about the orbit normal: R3 ( ), rotates n (the periapsis direction) to P
0 0 1
Rpi
c c ci s s ci c s + c s = R3 ( )R1 (i)R3 () = s c ci c s ci c c s s si s si c
si s si c ci
AOE 5204
G v
1 o
G r o3
2 o
w
AOE 5204
Use a 2-3-2 sequence : R2 (270 ), rotates 270 about Q to P (the nadir direction) W 90 about the nadir vector: (the 2 to W R3 (90 ), rotates o negative orbit normal direction) Negative true anomaly about 3 to the 2 : R2 ( ), rotates o o transverse direction
R3 (90 ) =
R2 ( ) =
cos 0 sin c 0 s 0 1 0
0 sin 1 0 0 cos
Rop
AOE 5204
Rpi
Rop Roi
si s si c ci
where u = +
AOE 5204
An Illustrative Example
~ [km] ~ r = 6000 ~ I + 10, 000 ~ J + 5, 000 K ~ [km/s] ~ v = 5 ~ I 2~ J + 1K
In an inertial reference frame, an Earth-orbiting satellite has position and velocity vectors:
The orbital elements are (using elementary astrodynamics) a = 12, 142 km, e = 0.22026, i = 23.986 , = 46.469 , = 321.80 , = 113.98 We can use i, , and to compute Rpi as 0.95089 0.18060 0.25139 0.94286 0.31946 Rpi = 0.094620 0.29472 0.27998 0.91364 Then we can rotate position and velocity into Fp : rp vp = [5156.3 11594 0.037610]T = [5.3670 1.0932 2.7899 107 ]T
AOE 5204
We can then multiply Rop Rpi to get Roi , or we can use i, , and u = + to compute Roi : 0.83036 0.54821 0.099858 0.27998 0.91364 Roi = 0.29472 0.47291 0.78808 0.39406 Then we can rotate position and velocity into Fo : ro vo = [0.66151 0.037610 12, 689]T = [5.3481 2.7899 107 1.1824]T
We can use = 113.98 to compute Rop as 0.91369 0.40642 0 0 0 1 Rop = 0.40642 0.91369 0
AOE 5204
Given the velocity of a point and initial conditions for its position, we can compute its position as a function of time by integrating the differential equation We now need to develop the equivalent differential equations for the attitude when the angular velocity is known Preview:
0 sin 3 / cos 2 = 0 cos 3 1 sin 3 sin 2 / cos 2
=~ ~ r v
AOE 5204
One frame-to-frame at a time, just as we did for developing rotation matrices 3-2-1 rotation from Fi to Fi0 to Fi00 to Fb 3-rotation from Fi to Fi0 about i0 i3 3 through 1 The angular velocity of Fi0 with respect to Fi is ~ ~ We can express
i0 i i0 i
1 1 = i3 = i0 3
= =
0
1 ]T [0 0 1 ]T [0 0
ii Keep the notation in mind: i is the angular velocity of Fi0 with respect to Fi , expressed in Fi
AOE 5204
The angular velocity of Fi00 with respect to Fi0 is ~ ~ We can express simple:
i00 i0 i00 i0
2 00 = i0 2 = 2 i2
2 0]T = [0 2 0]T = [0
i00 i0 i0
AOE 5204
3 = i00 1 = 3 b1
= =
bi00 b
AOE 5204
~ +
i0 i
We have expressed these three vectors in dierent frames; to add them together, we need to express all of them in the same frame Typically, we want bi b , so we need to rotate the 3 1 matrices we just developed into Fb We have
0 i i i i00 i0 i0 00 bi 00 i
= = =
0 i i i0 i00 i0 i00 00 bi b
= = =
1 ]T [0 0 2 0]T [0 3 0 0]T [
R bi00 R Rbb = 1
bi0
We previously developed all these rotation matrices, so we just need to apply them and add the results
AOE 5204
and obtain bi b =
= = or =
3 sin 2 1 2 + cos 2 sin 3 1 cos 3 2 + cos 2 cos 3 1 sin 3 1 0 1 sin 2 2 cos 2 sin 3 cos 3 0 3 cos 2 cos 3 sin 3 0 S() 1 cos 3 / cos 2 2 sin 3 cos 3 sin 2 / cos 2 3
What happens when the Euler angles and their rates are small?
AOE 5204
For this Euler angle set (3-1-2), the Euler rates go to infinity when cos 2 0 The reason is that near 2 = /2 the first and third rotations are indistinguishable For the symmetric Euler angle sequences (3-1-3, 2-12, 1-3-1, etc) the singularity occurs when 2 = 0 or For the asymmetric Euler angle sequences (3-2-1, 23-1, 1-3-2, etc) the singularity occurs when 2 = /2 or 3/2 This kinematic singularity is a major disadvantage of using Euler angles for large-angle motion There are attitude representations that do not have a kinematic singularity, but 4 or more scalars are required
AOE 5204
If the Euler angles and rates are small, then sin i i and cos i 1: 3 2 bi b 1 1 0 0 1 2 0 1 0 3 1 0 0
Exercise: Repeat these steps for a 1-2-3 sequence and for a symmetric sequence.
AOE 5204
Suppose you want to invert the n n matrix A, with elements Aij The elements of the inverse are
1 A ij
Cji = |A|
where Cji is the cofactor, computed by multiplying the determinant of the (n 1) (n 1) minor matrix obtained by deleting the jth row and ith column from A, by (1)i+j This formulation is absolutely unsuitable for calculating matrix inverses in numerical work, especially with larger matrices, since it is computationally expensive One normally uses LU decomposition instead Elementary row reduction is essentially LU decomposition Note: In most cases, we do not need the inverse anyway; we need the solution to a linear system
AOE 5204
and apply simply row-reduction operations to transform the left 3 3 block to the identity, leaving the inverse in the right 3 3 block In this case, we must swap the rst row with one of the other two rows, say the 3rd row, which amounts to a permutation by : 0 0 1 P = 0 1 0 Note that P1 = P 1 0 0
In row reduction, we augment the matrix with sin 2 0 1 1 cos 2 sin 3 cos 3 0 0 cos 2 cos 3 sin 3 0 0
AOE 5204
Multiply row 1 by sin 3 / cos 3 and add to row 2. 0 0 0 tan 3 c2 c3 + c2 s3 tan 3 0 c3 + s3 tan 3 0 0 1 s2 0 1 1 0
1 tan 3 0
Multiply resulting row 1 by s2 , add to row 3, and simplify Divide row 2 by c3 + s3 tan 3 and simplify 1 0 0 0 s3 /c2 c3 /c2 0 1 0 0 s3 c3 0 0 1 1 s3 tan 2 c3 tan 2
AOE 5204
Eulers Theorem
The most general motion of a rigid body with a xed point is a rotation about a xed axis. The axis, denoted a, is called the eigenaxis or Euler axis The angle of rotation, , is called the Euler angle or the principal Euler angle Here the black axes are the base vectors of the inertial frame, and the red, blue, and yellow axes are the base vectors of a body frame, about rotated a = [ 2/2 2/2 2/2]T through angle = /4
1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.5 0
Why no subscript on a?
0.5
0.5 1 1
AOE 5204
Since a is an eigenvector of R with eigenvalue 1, Ra = a Check this result: T Ra = cos 1 + (1 cos )aa sin a a = = = = =
cos 1a + (1 cos )aaT a sin a a cos a + aaT a cos aaT a sin a a cos a + a cos a sin a a (aT a = 1) cos a + a cos a (a a = 0) a
AOE 5204
Given any rotation matrix we can compute the Euler axis a and angle using: 1 = cos1 (trace R 1) 2 1 T R R = a 2 sin What does one do about the sin = 0 case? One can show that the kinematics dierential equations for a and are: = aT 1 = a a cot a a 2 2 So, this system of equations also has kinematic singularities, at = 0 and = 2
AOE 5204
The 3 1 matrix q forms the Euler axis component of the quaternion, also called the vector component. The scalar q4 is called the scalar component. Collectively, these four variables are known as a quaternion, or as the Euler parameters. denotes the 4 1 matrix containing all four variables: The notation q T = q q4 q
AOE 5204
Quaternions (2)
(R) : R( q) and q 2 T R = q4 q q 1 + 2qqT 2q4 q 1 q4 = 1 + trace R 2 R R32 1 23 R31 R13 q = 4q4 R12 R21 : 1 2
Dierential equations q
= q
q + q4 1 qT
= Q( q)
AOE 5204
Given initial conditions for the attitude (in any form), and a time history of angular velocity, compute R or any other attitude representation as a function of time
Requires integration of one of the sets of differential equations involving angular velocity
AOE 5204
Use a rotation from Fi to Fr using two Euler angles, , and The rst (3) rotation is about the i3 axis, through angle The second (2) rotation is about axis through the e The three unit vectors have derivatives: r = sin e + e , e = sin er cos e , e = e er + cos e
Illustration from Wolfram Research Mathworld mathworld.wolfram.com/SphericalCoordinates.html
AOE 5204
As with Euler angles, we are frequently interested in small attitude motions. If is small, then q = a sin(/2) a 2 , and q4 1 Hence, for small , 2 T R = q4 q q 1 + 2qqT 2q4 q (1 0) 1 + 2(0) 2q 1 2q Compare this expression with the previously developed R 1 for Euler angles. What is the equivalent expression for the (a, ) representation? Small rotations are commutative: cb ba 2 q R R 1 2q2 1 2q1 = 1 2q 2 1
AOE 5204
We have seen direction cosines, Euler angles, Euler angle/axis, and quaternions Two other common representations
Euler-Rodriguez parameters
p = a tan 1+ 2 2 (p p p ) T 1+p p
R = p =
1 (ppT + 1 + p ) 2 4
AOE 5204
Given initial conditions for the attitude (in any form), and a time history of angular velocity, compute R or any other attitude representation as a function of time
Requires integration of one of the sets of differential equations involving angular velocity