3.5.6 · Physics › Guidance, Navigation & Control (GNC)
3D mein ek rotation ke sirf 3 degrees of freedom hote hain (yaw, pitch, roll). Lekin rotations likhne ka har simple tarika toot jaata hai:
Rotation matrices 9 numbers use karti hain 6 constraints ke saath → wasteful aur drift-prone.
Euler angles 3 numbers use karte hain lekin gimbal lock suffer karte hain (ek singularity jahan do axes align ho jaate hain aur ek degree of freedom kho jaata hai).
Ek quaternion yeh 4 numbers aur 1 constraint se solve karta hai. Yeh "sweet spot" hai: koi singularities nahi, store karna sasta, normalize karna sasta. Yahi wajah hai ki har spacecraft attitude system (GNC) inhe use karta hai.
Ek quaternion ek 4-number object hai
q = ( q 0 , q 1 , q 2 , q 3 ) = q 0 + q 1 i + q 2 j + q 3 k
jahan q 0 scalar (real) part hai aur ( q 1 , q 2 , q 3 ) vector part q v hai.
Imaginary units Hamilton ke rules follow karte hain:
i 2 = j 2 = k 2 = ij k = − 1
jisse ij = k , j k = i , k i = j milta hai (aur reverse mein sign flip ho jaata hai — multiplication non-commutative hai).
Hum ise aksar compactly q = ( q 0 , q v ) likhte hain.
Intuition KYUN chaar numbers kaam karte hain
Ek rotation hai "angle θ se axis n ^ ke around spin karo". Yeh genuinely 4 pieces of information hai (angle + 3-component axis), lekin axis ek unit vector hai isliye uske sirf 2 free numbers hain. 2 + 1 = 3 DOF. Quaternion angle aur axis ko ek saath pack karta hai, aur bacha hua redundancy ek normalization constraint se remove ho jaata hai.
Hum sirf yeh assume karte hain ki units ij k = − 1 satisfy karti hain aur har ek − 1 pe square hoti hai. Baaki sab kuch follow hota hai.
Yeh step kyun? ij k = − 1 se, right-multiply karo k se:
ij k ⋅ k = − k ⇒ ij ( k 2 ) = − k ⇒ ij ( − 1 ) = − k ⇒ ij = k .
Yeh step kyun? ij = k ko i se left-multiply karo:
i ( ij ) = ik ⇒ ( i 2 ) j = ik ⇒ − j = ik ⇒ k i = j (after cycling) .
Do quaternions ka full multiplication phir term-by-term expand karke milta hai:
p × q term hi wajah hai ki quaternion multiplication (jaise rotation composition) non-commutative hai.
Definition Norm aur unit quaternion
Norm hai
∥ q ∥ = q 0 2 + q 1 2 + q 2 2 + q 3 2 .
q ek unit quaternion hai jab
q 0 2 + q 1 2 + q 2 2 + q 3 2 = 1
Sirf unit quaternions rotations represent karte hain.
Intuition KYUN constraint = 1 hai (geometry)
Angle θ se unit axis n ^ = ( n x , n y , n z ) ke around rotation encode hota hai aise:
q = ( cos 2 θ , n ^ sin 2 θ ) .
Iska norm-squared compute karo:
cos 2 2 θ + ( = 1 n x 2 + n y 2 + n z 2 ) sin 2 2 θ = cos 2 2 θ + sin 2 2 θ = 1.
Toh constraint kisi bhi real rotation ke liye automatic hai. Ek unit quaternion unit 3-sphere S 3 ki surface pe rehta hai jo 4D mein embedded hai — yahi wajah hai ki yeh kabhi gimbal-lock singularity nahi hit karta.
KYUN half-angle θ /2 ? Kyunki kisi vector ko rotate karne ke liye sandwich v ′ = q ⊗ v ⊗ q − 1 use hota hai, jo q effectively do baar apply karta hai, isliye har factor ko sirf aadha angle carry karna chahiye. (Iska matlab yeh bhi hai ki q aur − q same rotation dete hain — "double cover".)
Intuition KYUN yeh GNC mein powerful hai
Ek rotation matrix invert karna = mehenga transpose/checks. Ek unit quaternion invert karna = sirf 3 signs negate karo. Limited compute wale spacecraft mein onboard, yeh ek bada faayda hai.
Worked example 1 — Identity (koi rotation nahi)
θ = 0 set karo: q = ( cos 0 , n ^ sin 0 ) = ( 1 , 0 , 0 , 0 ) .
Yeh step kyun? θ = 0 ka matlab hai "kuch mat karo"; ⊗ karna ( 1 , 0 ) se kisi bhi quaternion ko unchanged chhodta hai, jaise 1 se multiply karna. Norm = 1 . ✔
Worked example 2 — z-axis ke around 90° rotation
θ = 9 0 ∘ , n ^ = ( 0 , 0 , 1 ) .
q = ( cos 4 5 ∘ , 0 , 0 , sin 4 5 ∘ ) = ( 2 2 , 0 , 0 , 2 2 ) .
Yeh step kyun? Half-angle: 9 0 ∘ /2 = 4 5 ∘ . Norm check karo: ( 2 2 ) 2 + ( 2 2 ) 2 = 2 1 + 2 1 = 1 . ✔
Worked example 3 — Drift ke baad renormalizing
Maano numerical integration se q = ( 0.9 , 0.1 , 0.2 , 0.3 ) mila.
Norm2 = 0.81 + 0.01 + 0.04 + 0.09 = 0.95 , toh ∥ q ∥ = 0.95 ≈ 0.9747 .
Fix: q ← q / ∥ q ∥ = ( 0.9233 , 0.1026 , 0.2052 , 0.3078 ) .
Yeh step kyun? Integration rounding error accumulate karta hai aur q dheere dheere S 3 se bahar ho jaata hai. Norm se divide karna use unit sphere pe wapas project karta hai — sasta hai aur ek valid rotation restore karta hai. Har flight controller yeh har timestep karta hai.
Common mistake "Rotation angle
θ hai, toh q = ( cos θ , n ^ sin θ ) ."
KYUN sahi lagta hai: baaki har formula (rotation matrix, complex numbers e i θ ) full angle use karta hai, isliye θ natural lagta hai.
Fix: quaternions half-angle θ /2 use karte hain kyunki rotation ek double-sided product q v q − 1 hai, jo q do baar apply karta hai. Hamesha cos 2 θ .
q aur − q alag rotations hain."
KYUN sahi lagta hai: yeh alag 4-tuples hain, toh zaroor alag results honge.
Fix: Sandwich mein, dono signs cancel ho jaate hain: ( − q ) v ( − q ) − 1 = q v q − 1 . Yeh same physical rotation hai (double cover S 3 → S O ( 3 ) ).
Common mistake "Quaternion multiplication commutative hai jaise normal numbers."
KYUN sahi lagta hai: scalars aur complex numbers commute karte hain.
Fix: p × q term swap karne par sign flip karta hai, isliye p ⊗ q = q ⊗ p generally — yeh match karta hai ki rotations bhi commute nahi karte.
Common mistake Renormalize karna bhool jaana.
KYUN sahi lagta hai: "Maine unit quaternion se start kiya, yeh unit rehna chahiye."
Fix: discrete integration S 3 se drift karta hai. Har step mein renormalize karo (Example 3).
Recall Cover me: ek unit quaternion mein kitne free parameters hote hain?
4 numbers − 1 constraint = 3 , jo 3 rotational DOF se match karta hai.
Recall Cover me: unit constraint aur identity quaternion likho.
q 0 2 + q 1 2 + q 2 2 + q 3 2 = 1 ; identity = ( 1 , 0 , 0 , 0 ) .
Recall Feynman: quaternions ko ek 12-saal ke bachche ko explain karo.
Socho tum ek khilona ghuma rahe ho. Ghuman describe karne ke liye tumhe kehna hoga: spinning stick kis taraf point kar raha hai (yeh ek arrow hai, 3 numbers) aur kitna twist kiya tumne (1 number). Ek quaternion 4 numbers ka ek neat chhota dibba hai jo dono ko hold karta hai. Ek rule hai: agar tum chaaron numbers ko square karke add karo, tumhe exactly 1 milna chahiye — jaise kehna "yeh arrow exactly ek meter lamba hai." Agar dibba add-up mistakes se thoda galat ho jaaye, tum sirf usse shrink ya stretch karo taaki total 1 ho jaaye. Phir yeh hamesha ek real spin describe karta hai, aur yeh kabhi "jam" nahi karta jaise purane methods karte hain.
"Scalar cos, Vector sin, squares ka sum ONE hona chahiye."
q = ( cos 2 θ , n ^ sin 2 θ ) , aur ∑ q i 2 = 1 .
What are the four components of a quaternion? Scalar part q 0 aur vector part ( q 1 , q 2 , q 3 ) : q = q 0 + q 1 i + q 2 j + q 3 k .
State the unit-quaternion constraint. q 0 2 + q 1 2 + q 2 2 + q 3 2 = 1 .
Why 4 numbers for a 3-DOF rotation? 4 params − 1 unit constraint = 3 DOF; extra number gimbal-lock singularity remove karta hai.
How is a rotation of angle θ about unit axis n̂ encoded? q = ( cos 2 θ , n ^ sin 2 θ ) .
Why the half-angle θ/2? Vector ko rotate karne mein double product q v q − 1 use hota hai, jo q do baar apply karta hai, isliye har factor aadha angle carry karta hai.
Do q and −q represent the same rotation? Haan — q v q − 1 mein signs cancel ho jaate hain; yeh SO(3) ka double cover hai.
Give the quaternion conjugate. q ∗ = ( q 0 , − q 1 , − q 2 , − q 3 ) .
Inverse of a unit quaternion? q − 1 = q ∗ (kyunki ∥ q ∥ = 1 ).
Hamilton's fundamental relation? i 2 = j 2 = k 2 = ij k = − 1 .
Scalar part of p ⊗ q ? Vector part of p ⊗ q ? Is quaternion multiplication commutative? Nahi —
p × q term ise non-commutative banata hai.
Geometrically, where do unit quaternions live? 4D space mein unit 3-sphere S 3 pe.
How do you fix drift after integration? Renormalize karo: q ← q / ∥ q ∥ .
Identity quaternion? ( 1 , 0 , 0 , 0 ) — "kuch mat karo" wala rotation.
Euler Angles and Gimbal Lock — woh problem jo quaternions solve karte hain.
Rotation Matrices SO(3) — 9 numbers, 6 constraints wala alternative.
Quaternion Kinematics — dq/dt — q kaise evolve karta hai angular velocity ω ke saath.
Axis-Angle Representation — half-angle form ka direct source.
Spacecraft Attitude Determination — jahan GNC yeh sab use karta hai.
Complex Numbers as 2D Rotations — quaternions e i θ ke 3D analogue hain.
solves 4 nums 1 constraint
Rotation matrix 9 nums 6 constraints
Unit constraint sum of squares = 1
Axis-angle form cos and n sin