16.333: Lecture #43 Frame rotations Euler Angles Quaternions
16.333: Lecture #3 Frame Rotations Euler Angles Quaternions
Fa2004 16.3333-1 Euler Angles For general applications in 3D, often need to perform 3 separate rotations to relate our inertial frame to our body frame Especially true for aircraft problems There are many ways to do this set of rotations -with the variations be based on the order of the rotations All would be acceptable Some are more commonly used than others Standard: start with the body frame(a, y, a)aligned with the inertial (X,Y, Z), and then perform 3 rotations to re-orient the body frame ① Rotate by al about Z→x,y/, x.X Line of nodes ② Rotate by 6 about y→x",y/,z ③ Rotate byφ about ar→x,y/,z ③ Euler angles a n Heading/yaw 0 n Pitch -o roll z ZZ
Fall 2004 16.333 3–1 Euler Angles • For general applications in 3D, often need to perform 3 separate rotations to relate our “inertial frame” to our “body frame” – Especially true for aircraft problems • There are many ways to do this set of rotations with the variations be based on the order of the rotations – All would be acceptable – Some are more commonly used than others • Standard: start with the body frame (x, y, z) aligned with the inertial (X, Y, Z), and then perform 3 rotations to reorient the body frame. ① Rotate by ψ about Z x� , y� , z ⇒ � ② Rotate by θ about y� x��, y��, z ⇒ �� ③ Rotate by φ about x�� ⇒ x, y, z Euler angles: – ψ ∼ Heading/yaw – θ ∼ Pitch – φ ∼ Roll
Fa2004 16.3333-2 Can write these rotations in a convenient form sv01「X cabo Y=T3()Y 001 c0-s6 010 T2(0)y s60c0 00 y sy”=Ti() 0-s hi Ich com s to giv T()T2()T3(v)Y 8ca/ X -cosal+soseca cpca/+spss soco sos+cosec -soca+coses cocelZ Note that the order that these rotations are applied matters and will greatly change the answer - matrix multiplies of Ti must be done consistentl
Fall 2004 16.333 3–2 • Can write these rotations in a convenient form: ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ x� cψ sψ 0 X X ⎣ y� ⎦ = ⎣ −sψ cψ 0 ⎦ ⎣ Y ⎦ = T ⎦ 3(ψ) ⎣ Y z� 0 0 1 Z Z ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ x�� cθ 0 −sθ x� x� ⎣ y�� ⎦ = ⎣ 0 1 0 ⎦ ⎣ y� ⎦ = T2(θ) ⎣ y� ⎦ z�� sθ 0 cθ z� z� ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ x 1 0 0 x�� x�� ⎣ y ⎦ = ⎣ 0 cφ sφ ⎦ ⎣ y�� ⎦ = T1(φ) ⎣ y�� ⎦ z 0 −sφ cφ z�� z�� which combines to give: ⎡ ⎤ ⎡ ⎤ x X ⎣ y ⎦ = T1(φ)T2(θ)T3(ψ) ⎣ Y ⎦ z Z ⎡ ⎤ ⎡ ⎤ cθcψ cθsψ −sθ X = ⎣ −cφsψ + sφsθcψ cφcψ + sφsθsψ sφcθ ⎦ ⎣ Y ⎦ sφsψ + cφsθcψ −sφcψ + cφsθsψ cφcθ Z • Note that the order that these rotations are applied matters and will greatly change the answer – matrix multiplies of Ti must be done consistently
Fa2004 16.3333-3 To get the angular velocity in this case, we have to include three terms ① w about Z ②θ about y ③ o about which we combine to get w Want to write w in terms of its components in final frame(body -Use the rotation matrices · Example: rotate y about Z≡2 0 In terms of X, Y, Z, frame rotation rate has components 0 which is the same as in frame I', y,,2 To transform a vector from ,y, 2 to y, z, need to use T1( )12(8) 0 -Similar operation for 0 about y=y" use Ti(o)on o 0 Final result 0 7(o)72()0+7(o)+0 0
Fall 2004 16.333 3–3 • To get the angular velocity in this case, we have to include three terms: ① ψ˙ about Z ② θ ˙ about y� ③ φ˙ about x�� which we combine to get ω� • Want to write ω� in terms of its components in final frame (body) – Use the rotation matrices Example: rotate ψ˙ about Z ≡ z� • ⎡ ⎤ 0 – In terms of X, Y,Z, frame rotation rate has components ⎣ 0 ⎦, ψ˙ which is the same as in frame x� , y� , z� – To transform a vector from x� , y� , z� to x, y, z, need to use T1(φ)T2(θ) ⎡ ⎤0 – Similar operation for θ ˙ about y� ≡ y�� ⇒ use T1(φ) on ⎣ φ˙ ⎦ 0 • Final result: ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ωx 0 0 φ˙ ωb = ⎣ ωy ⎦ = T1(φ)T2(θ) ⎣ 0 ⎦ + T1(φ)⎣ θ ˙ ⎦ + ⎣ 0 ⎦ ωz ψ˙ 0 0
Fa2004 16.3333-4 Visualization Can write +6+ But 6, y do not form a mu orthogonal triad Need to form the orthogonal p tions onto the body frame z q 心b T1()T2(6) +Tilo 0.0 0 Final form o-a sin g 8 cos +l cos b sin g -0sin yl cos 8 cos o . With inverse Wr+Wy sin +w2 cos o]tan 8 8= wu cos -W2 sin g wy sin+ W2 cos o] sec 0
ly rojec , z � Fall 2004 16.333 3–4 • Visualization: Can write ω = � φ˙ +� �˙ θ ˙ + ψ But � φ, θ, ψ ˙ �˙ �˙ do not form a mutual orthogonal triad Need to form the orthogonal p tions onto the body frame x, y ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ωx 0 0 φ˙ ωb = ⎣ ωy ⎦ = T1(φ)T2(θ) ⎣ 0 ⎦ + T1(φ)⎣ θ ˙ ⎦ + ⎣ 0 ⎦ ωz ψ˙ 0 0 • Final form ω ˙ x = φ − ψ˙ sin θ ω ˙ y = θ ˙ cos φ + ψ cos θ sin φ ω ˙ z = −θ ˙ sin φ + ψ cos θ cos φ • With inverse: φ˙ = ωx + [ωy sin φ + ωz cos φ] tan θ θ ˙ = ωy cos φ − ωz sin φ ψ˙ = [ωy sin φ + ωz cos φ] sec θ
Fa2004 16.3333-5 Need to watch for singularities at g=±90° ●| f we limit 0≤v≤2丌 T 0≤<2 then any possible orientation of the body can be obtained by per- forming the appropriate rotations in the order given These are a pretty standard set of uler angles
Fall 2004 16.333 3–5 • Need to watch for singularities at θ = ±90◦ | | • If we limit 0 ≤ ψ ≤ 2π π π − θ 2 ≤ ≤ 2 0 ≤ φ < 2π then any possible orientation of the body can be obtained by performing the appropriate rotations in the order given. • These are a pretty standard set of Euler angles
Fa2004 16.3333-6 Quaternions Theorem by Euler states that any given sequence of rotations can be represented as a single rotation about a single fixed axis Quaterions provide a convenient parameterization of this effective axis and the rotation angle Esin S/2 COS S/2 where E is a unit vector and s is a positive rotation about e ● Notes: 1 and thus there are only 3 degrees of freedom in this formulation as well If b represents the rotational transformation from the reference frame a to reference frame b, the frame a is aligned with frame b when frame a is rotated by s radians about e In terms of the euler angles sin e 2(b264+b1b3 o= arctan 22(b2b3-b104), 1-2(61+b2) v= arctan2[2(bb2-b3b),1-2(62+b) ●Pros: Si ngular ity free; Computationally efficient to do state propagation n time compared to euler angles C ons Far less intuitive-less appealing Refs: Kuipers, Quaternions and rotation sequences, 1999 Princeton University Press
� � � � � � Fall 2004 16.333 3–6 Quaternions • Theorem by Euler states that any given sequence of rotations can be represented as a single rotation about a single fixed axis • Quaterions provide a convenient parameterization of this effective axis and the rotation angle ⎡ ⎤ ⎢ ⎢ ⎢ ⎣ b1 b2 b3 ⎥ ⎥ ⎥ ⎦ E sin ζ/2 cos ζ/2 b = = b4 where E is a unit vector and ζ is a positive rotation about E • Notes: – �b� = 1 and thus there are only 3 degrees of freedom in this formulation as well – If b represents the rotational transformation from the reference frame a to reference frame b, the frame a is aligned with frame b when frame a is rotated by ζ radians about E • In terms of the Euler Angles: sin θ = −2(b2b4 + b1b3) φ = arctan 2 1 + b2 2(b2b3 − b1b4), 1 − 2(b2 2) 2 + b2 ψ = arctan 2 2(b1b2 − b3b4), 1 − 2(b2 3) • Pros: – Singularity free; Computationally efficient to do state propagation in time compared to Euler Angles • Cons: – Far less intuitive less appealing • Refs: Kuipers, Quaternions and rotation sequences, 1999 Princeton University Press