3.5.12 · D2 · HinglishGuidance, Navigation & Control (GNC)

Visual walkthroughAttitude estimation — triad method (two vector measurements)

2,101 words10 min read↑ Read in English

3.5.12 · D2 · Physics › Guidance, Navigation & Control (GNC) › Attitude estimation — triad method (two vector measurements)

Line one se pehle, teen saaf-saaf promises:

  • Ek arrow (yaani vector) bas ek direction hai jisme length bhi hoti hai. Ek unit vector ek aisa arrow hai jis ki length exactly hai — hume sirf yeh pata hona chahiye ki woh kis taraf point kar raha hai. Unit vectors ke upar ek chhota hat likhte hain: .
  • Ek frame teen arrows ka ek set hota hai jo ek doosre ke right angles par hote hain, sab ki length hoti hai — jaise ek kamre ke kone mein teen deewarein milti hain. Aise set ko hum orthonormal kehte hain (ortho = right-angled, normal = length ek).
  • Ek rotation matrix ek machine hai: ise ek arrow do, woh wohi arrow wapas nikalti hai lekin ek fixed amount se ghuma hua. Woh kuch bhi stretch ya flip nahi karti.

Step 1 — Kachcha maal: do arrows, do jagah

KYA. Hum do known directions se shuru karte hain space mein — maano Sun aur Earth ka magnetic field. Dono do coordinate systems mein jaani jaati hain:

  • Reference frame mein (sky ka ek fixed map): aur .
  • Body frame mein (tumbling spacecraft ke sensors jo actually padhte hain): aur .

Yahan = map par Sun kahan hona chahiye, aur = sensor abhi Sun kahan bata raha hai. Wohi physical Sun, do alag descriptions.

KYUN. Ek akela arrow ek gap chhod deta hai: spacecraft tab bhi us arrow ke around spin kar sakta hai aur har sensor wohi padh raha hoga. Figure dekho — yellow arrow ke around spin karna poori craft ko slide karta hai lekin woh arrow kabhi nahi hilta. Doosra arrow (blue) woh hai jo us bacha hua spin ko pin karta hai.

PICTURE.

Figure — Attitude estimation — triad method (two vector measurements)

Step 2 — Pehla axis anchor karo (ek arrow ko poora trust karo)

KYA. Hum apna pehla frame-axis sirf sabse trusted arrow ki copy banate hain:

KYUN. Real sensors mein noise hoti hai. TRIAD ka poora philosophy yeh hai: error ko idhar-udhar mat failao — ek sensor ko perfectly trust karo aur doosre ko sirf "kaun sa side upar hai" ke liye use karo. Toh axis-1 ban jaata hai bina kisi chhed-chhaad ke. Jitni bhi chhoti error usme hai woh rahegi; doosre arrow ki jo bhi error hai, hum abhi usका zyaadatar hissa phenk dene wale hain.

PICTURE. Yellow arrow ko promote karke hamare "kamre ke kone" ki pehli deewar bana diya jaata hai.

Figure — Attitude estimation — triad method (two vector measurements)

Step 3 — Cross product ek perpendicular axis banata hai

KYA. Hume ek doosra axis chahiye jo pehle se bilkul right angle par ho. Hum ise cross product se paate hain:

Aao dono hisso ko decode karein:

  • cross product ek aisa arrow output karta hai jo dono inputs ke perpendicular hota hai. Yahi property hume right-angled frame ke liye chahiye.
  • — double bars ka matlab hai length. Cross product ki length hoti hai (jahan do arrows ke beech ka angle hai), isliye woh unit length nahi hoti. Us length se divide karne par woh wapas length par aa jaati hai.

Yeh tool kyun, koi aur kyun nahi? Hum "overlap subtract karo" (Gram–Schmidt) try kar sakte the, lekin cross product hume ek hi step mein perpendicular de deta hai AUR ek handedness (left-vs-right choice) bhi automatically fix kar deta hai — jo Step 4 mein kaam aayegi. Sabse important baat: cross product ki direction sirf us plane par depend karti hai jisme do arrows hain, exact angle par nahi unke beech. Yahi secret sauce hai — ka noisy angle discard ho jaata hai, sirf uska "plane ka kaun sa side" survive karta hai.

PICTURE. Dekho kaise pink arrow do flat arrows ke plane se seedha bahar nikalta hai.

Figure — Attitude estimation — triad method (two vector measurements)

Step 4 — Ek teesre cross product se frame complete karo

KYA. Do perpendicular axes aa gaye; teesra force ho jaata hai:

KYUN. Do arrows ko cross karna jo pehle se unit length hain aur pehle se perpendicular hain, ek teesra arrow deta hai jo automatically unit length aur dono ke perpendicular hota hai — is baar koi normalizing nahi chahiye ( kyunki). Is order mein karna () guarantee karta hai ki frame right-handed hai: apne right hand ki ungliyaan axis-1 se axis-2 ki taraf curl karo aur thumb axis-3 ki taraf point karega. Ek right-handed frame ka determinant hota hai, aur yahi ise ek proper rotation banata hai (ek turn, kabhi mirror-flip nahi).

PICTURE. Blue arrow kamre-ke-kone ko complete karta hai.

Figure — Attitude estimation — triad method (two vector measurements)

Teeno axes ko side-by-side ek matrix ke columns mein stack karo:

construction se orthonormal hai — iske columns unit length aur mutually perpendicular hain.


Step 5 — Body arrows ke saath bilkul wohi recipe karo

KYA. Wohi teen steps, ab sensor readings feed karke:

\hat{\mathbf t}_2^{(b)}=\frac{\hat{\mathbf b}_1\times\hat{\mathbf b}_2}{\lVert \hat{\mathbf b}_1\times\hat{\mathbf b}_2\rVert},\quad \hat{\mathbf t}_3^{(b)}=\hat{\mathbf t}_1^{(b)}\times\hat{\mathbf t}_2^{(b)}$$ $$M_b = \big[\,\hat{\mathbf t}_1^{(b)}\ \ \hat{\mathbf t}_2^{(b)}\ \ \hat{\mathbf t}_3^{(b)}\,\big]$$ **KYUN.** Yahan deep point yeh hai: $M_r$ aur $M_b$ **wohi physical kamre-ka-kona** hain, bas do alag coordinate languages mein likhe gaye hain. Reference frame ise $M_r$ likhta hai; body frame ise $M_b$ likhta hai. Kyunki dono *wohi* do physical directions se *wohi* recipe se banaye gaye the, woh ek hi triad describe karte hain. **PICTURE.** Left: map-language mein triad ($M_r$). Right: wohi triad, tumbled, sensor-language mein ($M_b$). ![[deepdives/dd-physics-3.5.12-d2-s05.png]] --- ## Step 6 — Frames match karo aur rotation padh lo **KYA.** Attitude $A$ (dekho [[Rotation Matrices and SO(3)]]) *defined* hai "har reference axis ko uske body twin par ghuma do": $$A\,\hat{\mathbf t}_i^{(r)} = \hat{\mathbf t}_i^{(b)} \quad\text{for } i=1,2,3 \qquad\Longleftrightarrow\qquad A\,M_r = M_b$$ Arrow-version padho: $A$, $M_r$ ka column $i$ leta hai aur use exactly $M_b$ ke column $i$ par land karta hai. Teeno columns stack karna ek single matrix equation $AM_r = M_b$ hai. **Transpose se multiply kyun karte hain?** $A$ ko isolate karne ke liye hume right side par $M_r$ ko undo karna hoga — yaani uske **inverse** $M_r^{-1}$ se multiply karna hoga. Lekin $M_r$ orthonormal hai, aur orthonormal matrices mein ek magic shortcut hai: unka inverse **unka transpose hi hota hai** $M_r^{\mathsf T}$ (rows aur columns flip karo — koi division nahi, koi determinant nahi). Isliye *hi* hum Step 3 mein normalizing par itna zor dete the. Toh: $$A = M_b\,M_r^{-1} = M_b\,\underbrace{M_r^{\mathsf T}}_{\text{transpose = inverse, kyunki orthonormal}}$$ > [!formula] TRIAD attitude matrix — derive kiya, dump nahi kiya > $$\boxed{A = M_b\,M_r^{\mathsf T}}$$ > $M_b$ = body coordinates mein physical triad; $M_r^{\mathsf T}$ = reference coordinates mein wohi triad ka *inverse*. "Body mein ghusna, reference se nikalna" exactly reference se body ki taraf turn hai. **Check karo ki yeh real rotation hai.** Dono ke liye $M M^{\mathsf T}=I$ use karke: $$A A^{\mathsf T} = M_b M_r^{\mathsf T} M_r M_b^{\mathsf T} = M_b\,I\,M_b^{\mathsf T} = I, \qquad \det A = (+1)(+1) = +1 \ \checkmark$$ **PICTURE.** Ek single machine $A$ jo poore left corner ko poore right corner par le jaati hai. ![[deepdives/dd-physics-3.5.12-d2-s06.png]] --- ## Step 7 — Degenerate case: jab TRIAD toot jaata hai **KYA.** Kya hoga agar do arrows *lagbhag ek hi direction* mein point kar rahe hon? Maano unke beech ka angle $\theta$ shrink hokar $0$ ki taraf ja raha ho. **KYUN fail hota hai.** Cross-product ki length $\sin\theta$ hai. Jaise $\theta \to 0$, $\sin\theta \to 0$, toh Step 3 mein hum ek aisa number se divide karte hain jo zero ki taraf chhurra raha hai. Numerator mein koi bhi chhoti si measurement ki hichkichaahat **bahut zyaada blow up** ho jaati hai — perpendicular axis wildly kaanpne lagta hai. Geometrically do arrows ka "plane" ill-defined ho jaata hai jab woh ek doosre ke upar lie karte hain, toh jo spin unhe lock karna tha woh unknowable ban jaata hai. $$\lVert \hat{\mathbf r}_1 \times \hat{\mathbf r}_2 \rVert = \sin\theta \;\xrightarrow[\ \theta\to 0\ ]{}\; 0 \quad\Rightarrow\quad \text{noise } \div \text{ tiny} = \text{disaster}$$ **Fix:** aisi sensors chunno jinki directions well separated hoon — best $90^\circ$ ke paas, jahan $\sin\theta = 1$ aur frame maximally stable ho. Yahi reason hai ki smarter [[QUEST algorithm|QUEST]] aur [[Wahba's Problem|Wahba]] approaches tab exist karti hain jab tum separation guarantee nahi kar sakte. **PICTURE.** Left: healthy $90^\circ$ split, crisp perpendicular. Right: near-parallel, perpendicular fail ho raha hai. ![[deepdives/dd-physics-3.5.12-d2-s07.png]] --- ## Ek-picture summary Is poore page ki cheez ek single flow mein: do arrows → ek corner banao → do baar karo → corners match karo → $A$ bahar aata hai. Aur ek reminder escape hatch ka jab arrows bahut close hon. ![[deepdives/dd-physics-3.5.12-d2-s08.png]] ```mermaid flowchart LR R["two ref arrows"] --> MR["reference triad Mr"] B["two body arrows"] --> MB["body triad Mb"] MR --> A["A equals Mb times Mr transpose"] MB --> A A --> OUT["attitude matrix"] ``` > [!recall]- Feynman retelling — poori walkthrough simple shabdon mein > Tumhare paas do arrows hain jo tum sky mein dekh sakte ho — maano Sun aur ek compass field. Tum jaante ho ki dono ko ek fixed star-map par kahan *hona chahiye*, aur tumhara spinning spacecraft ki aankhein unhe *actually* kahan dekh rahi hain. **Step one:** jis arrow par tumhe sabse zyaada trust hai use pakdo aur use apne chhote kamre-ke-kone ki "deewar number ek" keh do. **Step two:** use doosre arrow ke saath cross karo — cross product ek perfect right angle par ek deewar nikaalti hai, aur (yahi trick hai) use sirf fikr hai ki doosra arrow kis *side* par hai, toh us arrow ki zyaadatar sloppiness phenk di jaati hai. **Step three:** woh do deewaarein cross karo aur zameen bana lo — ab tumhare paas ek pura kamre-ka-kona hai, aur woh guaranteed right-handed hai. **Step four:** bilkul *wohi corner* do baar banao — ek baar star-map arrows se, ek baar sensor arrows se. Woh do languages mein wohi physical corner hain. **Step five:** woh rotation jo map-corner ko sensor-corner par le jaati hai *woh* tumhare spacecraft ka attitude hai, aur kyunki ek kamre-ka-kona orthonormal hota hai, uski rows aur columns flip karna use undo kar deta hai — jisse $A = M_b M_r^{\mathsf T}$ milta hai. **Ek warning:** kabhi bhi aisi do arrows mat chunna jo lagbhag ek hi direction mein point kar rahi hon, warna right-angle wali deewar ek jittery mess ban jaayegi. > [!recall]- Quick checks > Cross product sensor-2 ka angle kyun discard kar deta hai? ::: Uski direction sirf do arrows ke *plane* par depend karti hai, unke beech ke angle par nahi. > General inverse ki jagah transpose kyun? ::: $M_r$ orthonormal hai, isliye $M_r^{-1}=M_r^{\mathsf T}$. > Degenerate case mein kaun si quantity vanish hoti hai? ::: $\lVert\hat{\mathbf r}_1\times\hat{\mathbf r}_2\rVert=\sin\theta\to 0$, toh hum almost zero se divide karte hain.