PlanetPhysics/Direction Cosine Matrix to Euler 321 Angles

From testwiki
Revision as of 03:21, 3 February 2024 by 165.91.13.177 (talk) (Fixed matrix entry (3,1). Fixed spelling)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 [[../Euler321Sequence/|Euler 321 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 321 sequence is

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

If we examine the element in column 3 row 1, then by inspection

A13=sin(θ)

Solving for θ yields

θ=sin1(A13)

Care must now be taken when evaluating the inverse sine. It is a multivalued [[../Bijective/|function]], which will have values of θ and πθ. Analytically, the convention is to choose the principle value such that

π/2θπ/2

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

A12A11=sin(ϕ)cos(θ)cos(ϕ)cos(θ)

Rearranging the minus sign and using the tangent yields

tan(ϕ)=A12A11

Solving the quadrant ambiguity 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 [yx++]

so if x and y are both positive, then 0ϕπ/2. Similarly for the other quadrant possibilities

quadrant 2 [yx+]

quadrant 3 [yx]

quadrant 4 [yx+]

Of course, it is much simpler to use a calculator or numerical program that uses the atan2() function which will choose the principle value. In a similar fashion we can find the final Euler angle by looking at the ratio A23A33 which gives the [[../Bijective/|relation]] A23A33=sin(ψ)cos(θ)cos(ψ)cos(θ)

Canceling terms and rearranging gives us

ψ=tan1(A23A33)

which uses the same method to resolve quadrant ambiguity as above. To summarize, we will give the [[../Formula/|formulas]] for the conversion from a direction cosine matrix to the Euler 313 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(A12,A11) θ=asin(A13) ψ=atan2(A23,A33)

Template:CourseCat