3.5.10 · D3 · HinglishGuidance, Navigation & Control (GNC)

Worked examplesConverting between DCM, quaternions, Euler angles

3,140 words14 min read↑ Read in English

3.5.10 · D3 · Physics › Guidance, Navigation & Control (GNC) › Converting between DCM, quaternions, Euler angles

Is page mein parent topic ke conversions ko itna drill karenge ki koi bhi case surprise na kar sake. Har quadrant, har sign, har degenerate input, aur do exam traps jo sab ko pakad lete hain — sab cover karenge. Prereqs jinpe hum rely karte hain: Euler's Rotation Theorem, Rodrigues Rotation Formula, Direction Cosine Matrix Properties, Gimbal Lock, Rotation Sequences (3-2-1 vs 3-1-3), Quaternion Kinematics & Propagation.

Numbers touch karne se pehle, ek reminder plain words mein. Ek DCM ek table of numbers hai jo ek vector ko doosre mein badalta hai; ek quaternion 4 numbers hain jo ek twist ka axis aur half the angle store karte hain; Euler angles teen ordinary turn-amounts (roll, pitch, yaw) hain. Teeno ek hi same physical turn describe karte hain.


The scenario matrix

Har conversion problem jo tumhe di ja sakti hai, in mein se kisi ek cell mein aati hai. Neeche ke worked examples us cell ke saath tagged hain jo woh cover karta hai.

Cell Isme kya tricky hai Covered by
A. Cardinal axis, small angle clean numbers, machinery seekho Ex 1
B. Off-diagonal signs (which sign of ?) Rodrigues sign bookkeeping Ex 2
C. Quadrant II/III/IV Euler angle atan2 vs atan — bada trap Ex 3
D. Zero rotation (identity) degenerate: axis undefined Ex 4
E. rotation () Shepperd division-by-zero branch Ex 5
F. Gimbal lock () ek DOF vanishes — dono signs Ex 6
G. Sign ambiguity vs same attitude, do 4-tuples Ex 7
H. Real-world word problem ek story se rotation build karo Ex 8
I. Exam twist: wrong convention (transpose) reversed rotation Ex 9
J. Composite / limiting behaviour half-angle limit, Ex 10

Example 1 — Cell A: cardinal axis, small clean angle

  1. Pehle half-angle. Kyun yeh step? Quaternion hamesha store karta hai (sandwich twist ko do baar apply karta hai; halving us doubling ko cancel karta hai). .
  2. Chaar slots bharo. Kyun? , aur . ke saath sirf bachta hai:
  3. build karo. Toolbox mein plug in kyun? Yeh neutral hub hai jiske through har representation convert hoti hai. ke saath Toolbox matrix ki har wo term jo ya carry karti hai woh zero ho jaati hai, sirf yeh bachta hai:
Figure — Converting between DCM, quaternions, Euler angles

Verify: ✓ aur ✓. Norm ✓.


Example 2 — Cell B: off-diagonal signs, tilted axis

  1. Rodrigues ke pieces. Kyun? Toolbox formula ko , , chahiye.
  2. Outer product term. Kyun? ki har entry hai, se multiply karne par har jagah milta hai.
  3. Cross-product term . Sign kyun yahan hai? Antisymmetric with ko se scale karne par off-diagonal milte hain.
  4. Jodo. Diagonal: . Hamare body-from-inertial, column convention mein teeno terms mil ke woh cyclic permutation deti hain jo bheji hai:

Verify: , (orthonormal), aur ✓ (trace-angle identity ).


Example 3 — Cell C: quadrant II/III/IV Euler extraction

  1. Pehle pitch. Kyun? Toolbox se, (minus, mein baithe ko undo karta hai). Yahan — koi gimbal lock nahi, aage badhna safe hai.
  2. Yaw atan2 se. atan kyun nahi? Toolbox deta hai . Plain galat quadrant (ratio ke andar dono minus signs cancel ho gaye). atan2 dono signs alag alag rakhta hai: Dono arguments negative ⇒ third quadrant, jo (range ) kabhi reach nahi kar sakta.
  3. Roll. Kyun? .
Figure — Converting between DCM, quaternions, Euler angles

Verify: ✓, ✓ ( ke liye, row 1 hai ).


Example 4 — Cell D: identity / zero rotation (degenerate axis)

  1. Trace branch. Kyun? .
  2. Vector part. Zero kyun? Off-diagonal differences , isliye . Toh .
  3. Axis undefined hai — aur yeh theek hai. Kyun? se, , toh chahe kuch bhi ho. Euler's theorem kehta hai "axis exist karta hai" sirf tab jab koi turn ho; turn ka koi unique axis nahi hota. Quaternion isko sidestep karta hai — woh vector part mein store karta hai aur kabhi nahi puchta ki axis kaun sa tha.
  4. Euler. , , .

Verify: ke saath deta hai ✓. Norm ✓.


Example 5 — Cell E: rotation, Shepperd branch

  1. Khatre ko dekho. Kyun? . Toolbox ka zero se divide karta hai.
  2. Sabse bada diagonal chuno — general leading-component formula use karke. Kyun? Shepperd ka rule: us se lead karo jo provably sabse bada ho, taaki denominator zero se door rahe. Sabse bada diagonal entry hai, jo ki taraf point karta hai. Toolbox formula apply karo ke saath:
  3. Baaki bharo — index order spell out karke. Kyun? Jab hum se lead karte hain, baaki slots cyclic triple ko se divide karke aate hain. Concretely: , , (plus signs isliye kyunki -led rows symmetric off-diagonal pair use karti hain). Inke saare numerators yahan hain, isliye . Toh .

Verify: ke saath deta hai ✓.


Example 6 — Cell F: gimbal lock DONO aur par

Case (a): .

  1. Pitch. Kyun? . Pitch seedha upar hai.
  2. Lock detect karo. Undefined kyun? par Toolbox row 1 hai , isliye aur undefined hai. Yaw aur roll axes parallel ho gayi hain — Gimbal Lock.
  3. Determined combination par collapse karo. Yahan kyun bachta hai? () ko mein substitute karo, aur . Toh par matrix sirf difference par depend karta hai. Convention se set karo, phir:

Case (b): .

  1. Doosre pole par pitch. Sign flip kyun? , isliye . Row-1 zeros () abhi bhi hold karte hain — yeh phir se lock hai.
  2. Fused combination ab hai. Difference nahi, sum kyun? ko same entries mein daalo: aur . Toh par sirf determined hai. set karo:
  3. Loss report karo (dono poles). Zabar se kyun kehna padega? Sirf ek combined number real hai: at , at . Ise ek specific aur mein todna ek arbitrary choice hai. Representation ka ek DOF kissi bhi pole par chala jaata hai; physical attitude bilkul theek hai.
Figure — Converting between DCM, quaternions, Euler angles

Verify: (a) : ✓, ✓. (b) : ✓, ✓.


Example 7 — Cell G: vs same attitude hain

  1. Dono build karo. Kyun? Toolbox ki har entry do -components ka product hai (quadratic). Har sign flip karne par hota hai — koi change nahi.
  2. Concretely : se yeh hai; se hai. Identical.
  3. Unique representative. enforce kyun karein? "Shortest-arc" twist pick karne ke liye aur ek database mein ek attitude ke do naam avoid karne ke liye.

Verify: entrywise; dono Example 1 ki -about- matrix ke barabar hain ✓.


Example 8 — Cell H: real-world word problem

  1. Do elementary quaternions. Compose karne ke liye quaternions kyun? Quaternion multiplication rotations ko cleanly compose karta hai ( ambiguity nahi). Yaw about : . Pitch about : .
  2. Sahi order mein multiply karo. kyun? Ek 3-2-1 chain ke liye total (pitch yaw ke baad apply hoti hai); matching quaternion product hai Hamilton product use karke.
  3. Compute karo. Scalar: . Vector: . Cross term . Sum vector .

Verify: ✓ (unit quaternions ka composite unit hota hai).


Example 9 — Cell I: exam twist, transpose trap

  1. Convention mismatch pehchano. Kyun care karna? Hamara locked convention (definition box dekho) body-from-inertial hai ke saath. Ek inertial-from-body matrix uska transpose hota hai. Galat wala feed karne par har rotation reverse ho jaati hai.
  2. Transpose karo. Kyun? .
  3. nikalo. Toolbox -branch use karke: ; . Toh — ek yaw, woh reverse jo un-transposed matrix se milta.

Verify: un-transposed ne diya tha (Ex 1-style); transposed ne diya. Angles exact negatives hain ✓; ✓.


Example 10 — Cell J: limiting behaviour, half-angle jab

  1. Exact quaternion. , .
  2. Small-angle limit. Taylor-expand kyun? ke liye, aur . Toh . Yeh linearised form hai jo Quaternion Kinematics & Propagation mein use hoti hai.
  3. Limit ki sanity. Propagation ke liye yeh kyun matter karta hai? Ek integration step pe update lagbhag hoti hai; use match karna propagator ko first-order accurate rakhta hai aur dikhata hai ki renormalization kyun zaroori hai (exact norm ko drift karta hai).

Verify: vs approximation — relative error , tiny as claimed ✓. ✓.


Recall Self-test: cell ka naam bolo

Sirf diya ho toh kaunsa extraction branch use karoge? ::: Shepperd's largest-diagonal branch (Cell E) — , sabse bade se lead karo ke zariye. Tumne yaw padha aur dono atan2 arguments negative hain — kaunsa quadrant? ::: Third (Cell C); plain atan -galat first-quadrant answer deta. vs par, kaun sa Euler combination bachta hai? ::: at , at (Cell F, gimbal lock — dono poles). Kya aur kabhi alag DCMs dete hain? ::: Nahi — mein quadratic hai (Cell G).