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

Worked examplesDirection cosine matrix (DCM) — construction from Euler angles

2,448 words11 min read↑ Read in English

3.5.3 · D3 · Physics › Guidance, Navigation & Control (GNC) › Direction cosine matrix (DCM) — construction from Euler angl


Scenario matrix

Har DCM problem in cells mein se ek (ya blend) hoti hai. Neeche ke worked examples mein har ek kaunsa cell cover karta hai yeh announce kiya gaya hai.

Cell Kya special hai Trouble kahan chhupa hai Example
A. Zero input saare angles identity milni chahiye — ek sanity anchor Ex 1
B. Single axis, positive ek angle , baaki ka sign convention Ex 2
C. Single axis, negative ek angle kya se right off-diagonal flip hoti hai? Ex 3
D. Quadrant / large angle angle (e.g. ) signs; kaunsa quadrant Ex 4
E. Full 3-2-1, all nonzero yaw, pitch, roll sab active matrix-multiply order, cross terms Ex 5
F. Inverse problem given , angles nikalo atan2 quadrants, range Ex 6
G. Degenerate: gimbal lock pitch angles unique nahi rehte; Ex 7
H. Word problem (real GNC) ek sensor vector rotate karo frame direction; forward vs inverse Ex 8
I. Exam twist: orthonormality prove/exploit karo pe trust karo re-inverting ki jagah Ex 9

Hum parent ki shorthand use karte hain: , . Angles: yaw axis 3 ke baare mein, pitch axis 2 ke baare mein, roll axis 1 ke baare mein. Saari matrices inertial → body transform karti hain: .


Example 1 — Cell A: zero rotation

Forecast: padhne se pehle guess karo — agar body bilkul nahi mudi, toh DCM kya honi chahiye, aur vector ka kya hoga?

  1. Har elementary matrix mein plug karo. Jab har angle ho: , toh (identity). Yeh step kyun? Elementary matrices identity mein reduce ho jaati hain kyunki unke entries vanish ho jaate hain aur entries ban jaate hain — yeh baseline hai jiske against baaki saare cases measure hote hain.
  2. Multiply karo. . Yeh step kyun? Identity se multiply karne se kuch nahi badalta; "no turn" attitude ka matlab hi hona chahiye.
  3. Apply karo. .

Verify: agar frames coincide karte hain, toh same physical vector ke components dono mein same hote hain. Yahan hain bhi. ✔


Example 2 — Cell B: single-axis positive yaw

Forecast: body ko left turn karne ke baad, kya old North axis body ko thoda right ( direction mein) dikhega ya left?

  1. Sirf bachega. jahan , . Yeh step kyun? Pitch aur roll matrices identity hain, isliye product ek hi yaw block mein collapse ho jaata hai.
  2. pe apply karo. Row by row: , , . Yeh step kyun? Transform batata hai "inertial ka kitna hissa har body axis ke along hai." Negative bolta hai purana North ab body ke saath kuch angle banata hai.
Figure — Direction cosine matrix (DCM) — construction from Euler angles

Figure: Gray axes () fixed inertial frame hain; blue axes () body hain, counter-clockwise ghuma hua. Kya notice karna hai: fixed North arrow ka pe ek bada positive projection hai (orange dashed, ) aur pe ek negative projection hai (red dashed, ). Body ko CCW ghumane se fixed vector doosri taraf — body ke half mein — lean karta dikhai deta hai.

Verify: length preserved? . ✔ Signs figure se match karte hain: body (CCW) turn karti hai, toh fixed North vector ke body-frame coordinates rotate ho jaate hain. ✔


Example 3 — Cell C: single-axis NEGATIVE roll

Forecast: parent ke mein lower block ke top-right mein hai. Negative angle ke saath, kaunsa off-diagonal entry negative ho jaayega?

  1. substitute karo. (cosine is even), (sine is odd). Yeh step kyun? Cosine angle ki sign ignore karta hai; sine flip karta hai. Isliye ke do entries ke relative sign swap kar lete hain.
  2. Matrix likho. Yeh step kyun? Row 2 ko teesre slot mein milta hai; row 3 ko milta hai.
  3. pe apply karo. , , .

Verify: length . ✔ Negative roll body ko is tarah tip karta hai ki inertial ko component milta hai — "up" direction ko apni taraf roll karne ke consistent. ✔


Example 4 — Cell D: obtuse-angle yaw (quadrant care)

Forecast: second quadrant mein hai. Compute karne se pehle aur ke signs guess karo.

  1. Trig evaluate karo. (second quadrant: cosine negative), (sine positive). Yeh step kyun? ke baad cosine negative ho jaata hai — ek aisa case jo single-axis-small-angle intuition miss kar sakti hai. Quadrant sahi karna is cell ka poora point hai.
  2. Matrix. .
  3. pe apply karo. , , .

Verify: length ✔. Old North ab body ke third quadrant () mein point karta hai — exactly wahan jahan body turn usse bhejni chahiye. ✔


Example 5 — Cell E: full 3-2-1, saare angles nonzero

Forecast: parent ne note kiya tha ki yaw aur roll se untouched hai. Compute karne se pehle predict karo.

  1. Closed form se padho. Parent ke full matrix se, . Yeh step kyun? Yeh entry sirf pitch pe depend karti hai — ek free sanity anchor jo messy cross terms se independent hai.
  2. padho. . Yeh step kyun? sirf roll aur pitch mix karta hai (koi yaw nahi) — multiply errors pakadne ke liye ek doosra, independent anchor.
  3. Multiply karke cross-check karo. Pehle banao, phir se premultiply karo, aur wohi do entries padho. Yeh step kyun? Agar closed-form shortcut aur brute-force product agree karte hain, toh hamara order-of-multiplication (last rotation leftmost) sahi hai.

Verify: brute-force multiply , deta hai — steps 1–2 se match karta hai. Poora matrix (Example 6 mein dobara use hoga) hai


Example 6 — Cell F: inverse problem (angles recover karo)

Forecast: kaunsi entry directly pitch deti hai, aur plain ki jagah atan2 kyun use karna chahiye?

  1. se pitch. . Yeh step kyun? , toh usse invert karta hai. return karta hai — 3-2-1 ke liye valid pitch range, toh yahan koi quadrant ambiguity nahi.
  2. se yaw. . Yeh step kyun? Plain aur mein distinguish nahi kar sakta (tan har pe repeat karta hai). atan2 dono numerator aur denominator signs leta hai, sahi quadrant pin karta hai.
  3. se roll. . Yeh step kyun? aur ; unka ratio hai, aur shared positive factor matlab hai atan2 seedha sahi quadrant padhta hai. Dono entries positive ⇒ first-quadrant roll ⇒ .

Verify: recovered triple exactly Example-5 ka input hai. Round-trip closed. ✔


Example 7 — Cell G: gimbal lock (degenerate pitch)

Forecast: ke saath, matrix mein kitne independent numbers bach sakte hain — teen angles ke barabar, ya kam?

  1. ke saath matrix collapse karo. Parent ke full 3-2-1 form mein substitute karne se har woh term kill ho jaati hai jo factor carry karti hai. Jo bachta hai woh yaw aur roll par sirf unke difference ke through depend karta hai. (3-2-1 mein ke liye surviving off-diagonal entries aur hain.) Yeh step kyun? Jab hota hai toh yaw axis (3) aur roll axis (1) ek hi physical direction ke saath line up kar lete hain, isliye sirf ek combined turn observable hota hai.
  2. Case : yahan . Plug in karne par milta hai Yeh step kyun? Actual numbers likhne se hum collapse dekh sakte hain: poori first row hai, sirf pitch se fix.
  3. Case : yahan — alag! Isliye lo taaki . Same difference ke saath: Yeh step kyun? Do alag angle pairs, aur , ka difference same hai, toh woh identical matrix produce karte hain. Ek matrix, bahut saare labels ⇒ parameterization singular hai. DCM bilkul theek hai; sirf Euler names break hote hain. Isliye GNC attitude ko quaternions ke roop mein store karta hai.

Verify: ki har entry corresponding entry of ke barabar hai. ✔


Example 8 — Cell H: real GNC word problem

Forecast: pitch nose ko bilkul upar tip kar deta hai. Compute karne se pehle guess karo ki seedha-upar wala star body coordinates mein kahan land karega.

  1. banao. ke saath: ; ke saath: ; . Yeh step kyun? Sensors body frame mein rehte hain; guidance star ko inertial mein deti hai. DCM translator hai, forward direction mein apply hota hai.
  2. ko pe apply karo. ka third column hi woh hai jo -component se multiply karta hai; woh ke barabar hai. Yeh step kyun? Kisi matrix ko se multiply karna sirf uska third column pick karta hai — ek shortcut yaad rakhne layak hai.
  3. Result padho. : star body axis ke along hai.

Verify: length ✔. Physically: nose ko upar pitch karne se body -axis wahan point karne lag jaati hai jahan "upar" tha, toh up-star ke along baithta hai (nose direction ke peeche). ✔


Example 9 — Cell I: exam twist, exploit karo

Forecast: naive move Gaussian elimination on hai. Parent ne ek shortcut diya tha — woh kya hai?

  1. Property yaad karo. Kisi bhi DCM ke liye, (orthonormality). Toh . Yeh step kyun? Transpose karna free hai (rows/columns swap karo); ek general ko invert karna real kaam hai. Orthonormality pe trust karna poora exam trick hai.
  2. transpose karo. . Yeh step kyun? aur positions swap karte hain — yeh IS inverse rotation hai, jo sense banata hai: yaw undo karna yaw hai.
  3. Apply karo. .

Verify: confirm karo : ? Row1: ✔; Row2: ✔. Round-trip holds. ✔


Recall Har cell ke liye one-line self-test

Zero input → identity ::: , vector unchanged. Negative angle → kaunsi entries flip hoti hain? ::: sirf do entries (cos even hai, sin odd hai). Obtuse yaw () → ka sign? ::: negative (second quadrant). Inverse problem → atan2 kyun, arctan kyun nahi? ::: tan har pe repeat karta hai; atan2 dono signs use karke quadrant fix karta hai. Gimbal lock condition ::: pitch , toh aur yaw & roll ek axis pe merge ho jaate hain — sirf bachta hai. DCM saste mein undo karo ::: use karo, kyunki .

Connections

  • 3.5.03 Direction cosine matrix (DCM) — construction from Euler angles (Hinglish)
  • Quaternions — avoiding gimbal lock
  • Euler angles — kinematic differential equations
  • Rotation group SO(3) and orthogonal matrices
  • Attitude determination — TRIAD & QUEST
  • Kalman filter — linearized attitude error state
  • Angular velocity and skew-symmetric matrices