Euler Angles

20 views
Skip to first unread message

Leo.Chen

unread,
Sep 11, 2006, 4:51:05 AM9/11/06
to cheny...@gmail.com, Sxx...@googlegroups.com

Euler Angles
COMMENT On this Page DOWNLOAD Mathematica Notebook
EulerAngles

According to Euler's rotation theorem, any rotation may be described using three angles. If the rotations are written in terms of rotation matrices B , C, and D , then a general rotation A can be written as

A==BCD.
(1)

The three angles giving the three rotation matrices are called Euler angles. There are several conventions for Euler angles, depending on the axes about which the rotations are carried out. Write the matrix A as

A=[a_(11) a_(12) a_(13); a_(21) a_(22) a_(23); a_(31) a_(32) a_(33)].
(2)

The so-called "x-convention," illustrated above, is the most common definition. In this convention, the rotation given by Euler angles (phi,theta,psi), where the first rotation is by an angle phi about the z-axis, the second is by an angle theta in [0,pi] about the x-axis, and the third is by an angle psi about the z-axis (again). Note, however, that several notational conventions for the angles are in common use. Goldstein (1960, pp. 145-148) and Landau and Lifschitz (1976) use (phi,theta,psi), Tuma (1974) says (psi,theta,phi) is used in aeronautical engineering in the analysis of space vehicles (but claims that (phi,theta,psi) is used in the analysis of gyroscopic motion), while Bate et al. (1971) use (Omega,i,omega) . Goldstein remarks that continental authors usually use (psi,theta,phi), and warns that left-handed coordinate systems are also in occasional use (Osgood 1937, Margenau and Murphy 1956-64). Varshalovich (1988, pp. 21-23) uses the notation (alpha,beta,gamma) or (alpha^',beta^',gamma^') to denote the Euler angles, and gives three different angle conventions, none of which corresponds to the x -convention.

Here, the notation (phi,theta,psi) is used, a convention also followed by RotationMatrix3D[phi, theta, psi] in the Mathematica add-on package Geometry`Rotations` (which can be loaded with the command <<Geometry`) and RotateShape[g, phi, theta, psi] in the Mathematica add-on package Graphics`Shapes` (which can be loaded with the command <<Graphics`) . In the x-convention, the component rotations are then given by

D = [cosphi sinphi 0; -sinphi cosphi 0; 0 0 1]
(3)
C = [1 0 0; 0 costheta sintheta; 0 -sintheta costheta]
(4)
B = [cospsi sinpsi 0; -sinpsi cospsi 0; 0 0 1],
(5)

so

a_(11) = cospsicosphi-costhetasinphisinpsi
(6)
a_(12) = cospsisinphi+costhetacosphisinpsi
(7)
a_(13) = sinpsisintheta
(8)
a_(21) = -sinpsicosphi-costhetasinphicospsi
(9)
a_(22) = -sinpsisinphi+costhetacosphicospsi
(10)
a_(23) = cospsisintheta
(11)
a_(31) = sinthetasinphi
(12)
a_(32) = -sinthetacosphi
(13)
a_(33) = costheta
(14)

To obtain the components of the angular velocity omega in the body axes, note that for a matrix

A=[A_1 A_2 A_3],
(15)

it is true that

[a_(11) a_(12) a_(13); a_(21) a_(22) a_(23); a_(31) a_(32) a_(33)][omega_x; omega_y; omega_z] = [a_(11)omega_x+a_(12)omega_y+a_(13)omega_z; a_(21)omega_x+a_(22)omega_y+a_(23)omega_z; a_(31)omega_x+a_(32)omega_y+a_(33)omega_z]
(16)
= A_1omega_x+A_2omega_y+A_3omega_z.
(17)

Now, omega_z corresponds to rotation about the phi axis, so look at the omega_z component of Aomega ,

omega_phi==A_3omega_z==[sinpsisintheta; cospsisintheta; costheta]phi^..
(18)

The line of nodes corresponds to a rotation by theta about the xi-axis, so look at the omega_xi component of Bomega,

omega_theta==B_1omega_xi==B_1theta^.==[cospsi; -sinpsi; 0]theta^..
(19)

Similarly, to find rotation by psi about the remaining axis, look at the omega_psi component of Bomega ,

omega_psi==B_3omega_psi==B_3psi^.==[0; 0; 1]psi^..
(20)

Combining the pieces gives

omega==[sinpsisinthetaphi^.+cospsitheta^.; cospsisinthetaphi^.-sinpsitheta^.; costhetaphi^.+psi^..]
(21)

For more details, see Goldstein (1980, p. 176) and Landau and Lifschitz (1976, p. 111).

The x-convention Euler angles are given in terms of the Cayley-Klein parameters by

phi = -2iln[+/-(alpha^(1/2)gamma^(1/4))/(beta^(1/4)(1+betagamma)^(1/4))],-2iln[+/-(ialpha^(1/2)gamma^(1/4))/(beta^(1/4)(1+betagamma)^(1/4))]
(22)
psi = -2iln[+/-(alpha^(1/2)beta^(1/4))/(gamma^(1/4)(1+betagamma)^(1/4))],-2iln[+/-(ialpha^(1/2)beta^(1/4))/(gamma^(1/4)(1+betagamma)^(1/4))]
(23)
theta = +/-2cos^(-1)(+/-sqrt(1+betagamma)).
(24)

In the "y-convention,"

phi_x = phi_y+1/2pi
(25)
psi_x = psi_y-1/2pi.
(26)

Therefore,

sinphi_x = cosphi_y
(27)
cosphi_x = -sinphi_y
(28)
sinpsi_x = -cospsi_y
(29)
cospsi_x = sinpsi_y,
(30)

giving rotation matrices

D = [-sinphi cosphi 0; -cosphi -sinphi 0; 0 0 1]
(31)
C = [1 0 0; 0 costheta sintheta; 0 -sintheta costheta]
(32)
B = [sinpsi -cospsi 0; cospsi sinpsi 0; 0 0 1]
(33)

and A is given by

a_(11) = -sinpsisinphi+costhetacosphicospsi
(34)
a_(12) = sinpsicosphi+costhetasinphicospsi
(35)
a_(13) = -cospsisintheta
(36)
a_(21) = -cospsisinphi-costhetacosphisinpsi
(37)
a_(22) = cospsicosphi-costhetasinphisinpsi
(38)
a_(23) = sinpsisintheta
(39)
a_(31) = sinthetacosphi
(40)
a_(32) = sinthetasinphi
(41)
a_(33) = costheta.
(42)

In the "xyz" (pitch-roll-yaw) convention, theta is pitch Eric Weisstein's World of Physics , psi is roll Eric Weisstein's World of Physics, and phi is yaw Eric Weisstein's World of Physics .

D = [cosphi sinphi 0; -sinphi cosphi 0; 0 0 1]
(43)
C = [costheta 0 -sintheta; 0 1 0; sintheta 0 costheta]
(44)
B = [1 0 0; 0 cospsi sinpsi; 0 -sinpsi cospsi]
(45)

and A is given by

a_(11) = costhetacosphi
(46)
a_(12) = costhetasinphi
(47)
a_(13) = -sintheta
(48)
a_(21) = sinpsisinthetacosphi-cospsisinphi
(49)
a_(22) = sinpsisinthetasinphi+cospsicosphi
(50)
a_(23) = costhetasinpsi
(51)
a_(31) = cospsisinthetacosphi+sinpsisinphi
(52)
a_(32) = cospsisinthetasinphi-sinpsicosphi
(53)
a_(33) = costhetacospsi.
(54)

A set of parameters sometimes used instead of angles are the Euler parameters e_0 , e_1, e_2 and e_3, defined by

e_0 = cos(phi/2)
(55)
e = [e_1; e_2; e_3]==n^^sin(phi/2).
(56)

Using Euler parameters (which are quaternions ), an arbitrary rotation matrix can be described by

a_(11) = e_0^2+e_1^2-e_2^2-e_3^2
(57)
a_(12) = 2(e_1e_2+e_0e_3)
(58)
a_(13) = 2(e_1e_3-e_0e_2)
(59)
a_(21) = 2(e_1e_2-e_0e_3)
(60)
a_(22) = e_0^2-e_1^2+e_2^2-e_3^2
(61)
a_(23) = 2(e_2e_3+e_0e_1)
(62)
a_(31) = 2(e_1e_3+e_0e_2)
(63)
a_(32) = 2(e_2e_3-e_0e_1)
(64)
a_(33) = e_0^2-e_1^2-e_2^2+e_3^2
(65)

(Goldstein 1960, p. 153).

If the coordinates of two pairs of n points x_i and x_i^' are known, one rotated with respect to the other, then the Euler rotation matrix can be obtained in a straightforward manner using least squares fitting. Write the points as arrays of vectors, so

[x_1^' ... x_n^']==A[x_1 ... x_n].
(66)

Writing the arrays of vectors as matrices gives

X^'==AX
(67)
X^'X^(T)==AXX^(T),
(68)

and solving for A gives

A==X^'X^(T)(XX^(T))^(-1).
(69)

However, we want the angles theta, phi , and psi, not their combinations contained in the matrix A. Therefore, write the 3x3 matrix

A==[f_1(theta,phi,psi) f_2(theta,phi,psi) f_3(theta,phi,psi); f_4(theta,phi,psi) f_5(theta,phi,psi) f_6(theta,phi,psi); f_7(theta,phi,psi) f_7(theta,phi,psi) f_9(theta,phi,psi)]
(70)

as a 1x9 vector

f==[f_1(theta,phi,psi); |; f_9(theta,phi,psi)].
(71)

Now set up the matrices

[(partialf_1)/(partialtheta)|_(theta_i,phi_i,psi_i) (partialf_1)/(partialphi)|_(theta_i,phi_i,psi_i) (partialf_1)/(partialpsi)|_(theta_i,phi_i,psi_i); | | |; (partialf_9)/(partialtheta)|_(theta_i,phi_i,psi_i) (partialf_9)/(partialphi)|_(theta_i,phi_i,psi_i) (partialf_9)/(partialpsi)|_(theta_i,phi_i,psi_i)][dtheta; dphi; dpsi]==df.
(72)

Using nonlinear least squares fitting then gives solutions which converge to (theta,phi,psi) .

SEE ALSO: Cayley-Klein Parameters, Euler Parameters, Euler's Rotation Theorem, Infinitesimal Rotation , Quaternion, Rotation, Rotation Formula, Rotation Matrix. [Pages Linking Here]

REFERENCES:

Arfken, G. Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic Press, pp. 198-200, 1985.

Bate, R. R.; Mueller, D. D.; and White, J. E. Fundamentals of Astrodynamics. New York: Dover, 1971.

Goldstein, H. "The Euler Angles" and "Euler Angles in Alternate Conventions." §4-4 and Appendix B in Classical Mechanics, 2nd ed. Reading, MA: Addison-Wesley, pp. 143-148 and 606-610, 1980.

Kraus, M. "LiveGraphics3D Example: Euler Angles." http://wwwvis.informatik.uni-stuttgart.de/~kraus/LiveGraphics3D/examples/Euler.html .

Landau, L. D. and Lifschitz, E. M. Mechanics, 3rd ed. Oxford, England: Pergamon Press, 1976.

Margenau, H. and Murphy, G. M. The Mathematics of Physics and Chemistry, 2 vols. Princeton, NJ: Van Nostrand, 1956-64.

Osgood, W. F. Mechanics. New York: Macmillan, 1937.

Tuma, J. J. Dynamics. New York: Quantum Publishers, 1974.

Varshalovich, D. A.; Moskalev, A. N.; and Khersonskii, V. K. "Description of Rotation in Terms of the Euler Angles." §1.4.1 in Quantum Theory of Angular Momentum. Singapore: World Scientific, pp. 21-23, 1988.





CITE THIS AS:

Weisstein, Eric W. "Euler Angles." From MathWorld --A Wolfram Web Resource. http://mathworld.wolfram.com/EulerAngles.html


© 1999 CRC Press LLC, © 1999-2006 Wolfram Research, Inc. | Terms of Use



--
Yi Chen
leo.c...@gmail.com

http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectType=author&objectId=1094211
Reply all
Reply to author
Forward
0 new messages