PlanetPhysics/Direction Cosine Matrix to Euler 212 Sequence

From testwiki
Jump to navigation Jump to search

Starting with a [[../DirectionCosineMatrix/|direction cosine matrix]] (DCM), we need to determine the three Euler angles. The connection is made by comparing the DCM elements with the combined [[../Euler212Sequence/|Euler 212 sequence]]. It is important to note that the 12 combinations of Euler angles for a given sequence can be found from a given DCM. The DCM [[../Matrix/|matrix]] is

DCM=[A11A12A13A21A22A23A31A32A33]

The Euler 212 sequence is

R2(ψ)R1(θ)R2(ϕ)=[cψcϕsψcθsϕsψsθcψsϕsψcθcϕsθsϕcθsθcϕsψcϕ+cψcθsϕcψsθsψsϕ+cψcθcϕ]

If we examine the element in coloum 2 row 2, then by inspection

A22=cos(θ)

Solving for θ yields

θ=cos1(A22)

Care must now be taken when evaluating the inverse cosine. It is a multivalued [[../Bijective/|function]]. Analytically, the convention is to choose the principle value such that

0θπ

If a numerical [[../SupercomputerArchitercture/|program]] is used, a function acos() usually does this for us. The next step is to analyze the ratio A21A23. Using these values from the Euler sequence we get

A21A23=sin(θ)sin(ϕ)sin(θ)cos(ϕ)

Rearranging the minus sign and using the tangent yields

tan(ϕ)=A21A23

Solving the quadrant ambiquity caused by the inverse tangent is done by examining the signs of the numerator and denominator. Denoting y as the numerator and x as the denominator, then the quadrant is chosen by:

quadrant 1 </math> \left[ \begin{matrix} y & x \\ + & + \\ \end{matrix} \right] soifxandyarebothpositive,then<math>0ϕπ/2. Similarily for the other quadrant possibilites

quadrant 2 </math> \left[ \begin{matrix} y & x \\ + & - \\ \end{matrix} \right] quadrant3 \left[ \begin{matrix} y & x \\ - & - \\ \end{matrix} \right] quadrant4 \left[ \begin{matrix} y & x \\ - & + \\ \end{matrix} \right] Ofcourse,itismuchsimpliertouseacalculatorornumericalprogramthatusestheatan2()functionwhichwillchoosetheprinciplevalue.InasimilarfashionwecanfindthefinalEuleranglebylookingattheratio<math>A12A32 which gives the [[../Bijective/|relation]] A12A32=sin(ψ)sin(θ)cos(ψ)sin(θ)

Canceling terms and rearrangeing gives us

ψ=tan1(A12A32)

which uses the same method to resolove quadrant ambiguity as above. To summarize, we will give the [[../Formula/|formulas]] for the conversion from a direction cosine matrix to the Euler 212 angles in Matlab syntax. Be careful how you implement this in other numerical programs. In Matlab it goes atan2(y,x) and in Mathematica it is ArcTan[x, y].

ϕ=atan2(A21,A23) θ=acos(A22) ψ=atan2(A12,A32)

Template:CourseCat