3.5.22 · D4 · HinglishGuidance, Navigation & Control (GNC)

ExercisesKalman gain — minimizes trace of covariance

2,864 words13 min read↑ Read in English

3.5.22 · D4 · Physics › Guidance, Navigation & Control (GNC) › Kalman gain — minimizes trace of covariance

Shuru karne se pehle, yahan ek toolbox hai, ek hi jagah par, taaki koi bhi symbol unexplained na rahe.

Yahan, hamari prediction hai aur iska uncertainty (variance) hai; sensor reading hai; ek state ko woh banata hai jo sensor ko padhna chahiye; sensor noise variance hai; gain hai, mein ek dial (scalar case mein) jo batata hai ki prediction se measurement ki taraf kitna slide karna hai.

Neeche di gayi figure Problem 2.2 ke numbers use karke "slider" idea ko concrete banati hai: par ek prediction, par ek measurement, aur fused estimate par land karta hai kyunki gain hai. Dekho ki orange diamond kaise dono sources ke beech baitha hai, measurement ki taraf khicha hua.

Figure — Kalman gain — minimizes trace of covariance

L1 — Recognition

Problem 1.1

Scalar update mein, inme se kaun sa innovation hai, aur kaun sa innovation covariance hai? (a) (b) (c)

Recall Solution 1.1

WHAT: names ko formulas se match karo.

  • (a) innovation hai: measurement minus jo hum measure hone ki expect karte the.
  • (b) innovation covariance hai: prior uncertainty measurement space mein push ki gayi, plus sensor noise.
  • (c) gain hai — pucha nahi gaya, par pehchanna accha hai. WHY it matters: batata hai ki tum kitne surprised ho; batata hai ki uss size ka surprise kitna surprising hai. Tum hamesha pehle wale ko doosre se divide karte ho ( ke zariye).

Problem 1.2

Ek scalar filter mein , , (ek perfect sensor) hai. Derivatives compute kiye bina, kya hona chahiye, aur kya hoga?

Recall Solution 1.2

WHAT: ek perfect sensor () ka koi noise nahi, isliye hume use poora trust karna chahiye. . Phir . ke saath: . Estimate measurement ke barabar ho jaata hai. ✅ WHY: ka matlab hai ki slider poori tarah measurement ki taraf push ho gayi hai.


L2 — Application

Problem 2.1

Scalar: , , . , , aur compute karo.

Recall Solution 2.1

Step 1 ( banao): . Step 2 (gain): . Step 3 (posterior): optimum par, . WHY the sanity check: aur dono se chhota hai. Fusion dono sources mein se kisi ek se bhi behtar hai — yahi poora point hai.

Problem 2.2

Same numbers jaise 2.1 (). Prediction thi, sensor read karta hai. Corrected estimate nikalo.

Recall Solution 2.2

Step 1 (innovation): . Step 2 (correct): . WHY it lands where it does: answer prediction aur measurement ke beech baitha hai, sensor ke zyada paas kyunki ka matlab hai hum yahan sensor par zyada trust karte hain. Yeh exactly upar wali slider figure hai.

Problem 2.3

Verify karo ki Joseph form wohi deta hai jo Problem 2.1 mein optimal ke liye shortcut ne diya.

Recall Solution 2.3

Joseph: . ✅ Shortcut: . ✅ Dono agree karte hain — kyunki optimal hai.


L3 — Analysis

Problem 3.1

, , wale scalar case ke liye, ko ke function ke roop mein likho. Dikhao ki yeh ek parabola hai, differentiate karke iska minimum nikalo, aur confirm karo ki milta hai.

Recall Solution 3.1

Step 1 (expand): . WHAT this is: mein ek parabola jo upar ki taraf khulti hai (coefficient ), isliye iska ek unique minimum hai — yeh parent note ka "U-shaped valley" hai. Step 2 (differentiate): . Zero set karo: . ✅ Step 3 (minimum par value): . ✅ WHY differentiate here: trace ko minimize karna is is parabola ki derivative ko zero set karna hai — general matrix derivation scalar case mein exactly yahi collapse hoti hai. Coefficient positive second derivative hai jo guarantee karta hai ki yeh minimum hai, maximum nahi.

Neeche di gayi figure exactly yahi parabola plot karti hai. Violet curve trace karo: yeh orange dot (, ) par bottom out karta hai, par tak uthta hai (model par over-trusting, navy dot) aur par tak wapas uthta hai (sensor par over-trusting, magenta dot). Ek valley, ek optimum.

Figure — Kalman gain — minimizes trace of covariance

Problem 3.2

Maano ek engineer (sensor par poora trust) hard-code karta hai chahe , , ho. Joseph form use karke actual resulting compute karo aur optimal se compare karo.

Recall Solution 3.2

Joseph zaroori hai ( optimal nahi hai): . Compare karo: optimal ne diya tha. Toh sensor par over-trusting se milta hai — worse, kyunki humne sensor noise sab absorb kar liya aur prediction ki help throw away kar di. WHY: par parabola deta hai , valley ke bottom se aage (figure mein magenta dot). Extra gain ab prediction error remove karne se zyada tezi se noise add karta hai.


L4 — Synthesis

Problem 4.1

Do sensors same scalar state read karte hain, independently: variance ke saath aur variance ke saath. Ek "flat" prior se shuru karke (infinite , matlab koi useful prediction nahi), unhe dono baar sequentially Kalman update apply karke fuse karo aur final variance nikalo. Phir classic inverse-variance-weighting result se compare karo.

Recall Solution 4.1

Step 1 — infinite prior ke saath pehla measurement. Savdhan rehna hoga: ke saath shortcut indeterminate form hai, isliye hum Joseph form use karte hain (kisi bhi ke liye valid, koi cancellation assumed nahi). Optimal gain hai. Substitute karo: Ab lo: top aur bottom ko se divide karo, milta hai . Toh step 1 ke baad, — pehla measurement simply estimate ban jaata hai, par Joseph form ne hume ki koi bhi trickery ke bina wahan pahuncha diya. Step 2 — fuse karo: ab , , use karo. , , . Inverse-variance weighting se cross-check: . ✅ WHY this is beautiful: Kalman filter, recursively apply kiya, optimal least-squares / sensor fusion weighting reproduce karta hai. Har measurement ek ek karke fold in hoti hai, phir bhi answer unhe ek saath process karne se match karta hai.

Problem 4.2

Ek 2-state filter position aur velocity track karta hai. Prior covariance aur measurement model hain Sirf position measure ki jaati hai (toh yahan ek single scalar hai). , gain (ek vector), aur posterior compute karo.

Recall Solution 4.2

Step 1 (): . Step 2 (): . Step 3 (): , toh . Step 4 (): yahan identity hai. , toh . . WHY velocity untouched rehti hai: ki doosri entry hai, toh velocity variance par rehti hai. Ek position sensor velocity ko directly improve nahi kar sakta jab dono mein uncorrelated hain (off-diagonals zero hain). Position variance tak girti hai. Dekho Covariance Matrices and Uncertainty.


L5 — Mastery

Problem 5.1

Scalar case ke liye prove karo ki optimal ( lete hue) hamesha finite positive ke liye satisfy karta hai, aur ki . Dono facts interpret karo.

Recall Solution 5.1

Bound on : ke saath, . Kyunki aur , numerator positive hai aur strictly denominator se chhota hai, toh . Jaise , ; jaise , . Dial strictly ke andar rehta hai — kabhi bhi kisi ek source par over-trust nahi karta. ✅ Posterior: . Yeh harmonic-style combination hai (product over sum). Kyunki (numerator aur denominator insight multiply karo: ) aur symmetrically , hume milta hai. ✅ Interpretation: do independent estimates fuse karna hamesha strictly akele best single ek se behtar hai — certainty parallel resistors ki tarah add hoti hai: .

Problem 5.2

, use karke, numerically confirm karo ki parallel-resistor identity holds karta hai, aur batao ki yeh kaafi saare sensors stack karne ke liye kya matlab rakhta hai.

Recall Solution 5.2

. Toh . ✅ Problem 2.1 ke se match karta hai. Meaning: har naya independent measurement apni precision (information kehlaati hai) add karta hai. identical sensors of noise stack karo aur fused precision ho jaati hai — uncertainty badhne ke saath zero ki taraf shrink hoti hai. Yeh "information adds" view EKF aur saari recursive fusion ke neeche hai.


Recall Poori ladder ka Feynman recap

L1: parts (, , ) ko naam do taaki koi bhi symbol stranger na rahe. L2: numbers plug in karo aur dekho kaise dono sources ke beech land karta hai, gain ki size se khicha hua. L3: dekho ka trace ek U-shaped parabola hai jiska exactly ek bottom hai — optimum ek balance hai, extreme nahi. L4: measurements ek ek karke fold in karo aur classic inverse-variance (least-squares) weighting recover karo. L5: prove karo ki fusion hamesha ek win hai kyunki precisions (information) parallel resistors ki tarah add hoti hain, toh sirf shrink ho sakta hai. Same slider, paanch depths — "pieces pehchaano" se "prove karo ki yeh kabhi hurt nahi kar sakta" tak.


Connections