Skip to content

ELEC 5650 - Kalman Filter

"We have decided to call the entire field of control and communication theory, whether in the machine or in the animal, by the name Cybernetics, which we form from the Greek ... for steersman."

 -- by Norbert Wiener

This is the lecture notes for "ELEC 5650: Networked Sensing, Estimation and Control" in the 2024-25 Spring semester, delivered by Prof. Ling Shi at HKUST. In this session, we will deviate Kalman Filter from three different perspectives: Geometric, Probabilistic, and Optimization approaches. Each perspective provides unique insights into understanding and implementing the Kalman Filter algorithm.

  1. Mathematic Tools
  2. Estimation Theory
  3. Kalman Filter <--
  4. Linear Quadratic Regulator

Takeaway Notes

Consider an LTI system with initial conditions x^0|0 and P^0|0

xk+1=Axk+Buk+ωk,ωkN(0,Q)yk=Cxk+νk,νkN(0,R)

Find the estimation of xk given {u0,u1,uk} and {y0,y1,yk}.

Assumptions

  1. (A,B) is controllable and (A,C) is observable
  2. Q0,R0,P00
  3. ωk, νk and x^0 are mutually uncorelated
  4. The future state of the system is conditionally independent of the past states given the current state

Time Update

x^k|k1=Ax^k1|k1+BukP^k|k1=AP^k1|k1AT+Q

Measurement Update

Kk=P^k|k1CT(CP^k|k1CT+R)1x^k|k=x^k|k1+Kk(ykCx^k|k1)P^k|k=P^k|k1KkCP^k|k1=(P^k|k11+CTR1C)1

Geometric Perspective (LMMSE Estimation)

The Geometric perspective views Kalman Filter as a Linear Minimum Mean Square Error (LMMSE) estimator, which is rooted in orthogonal projection theory in Hilbert space. The key insight is that the Kalman Filter's innovation term ek is orthogonal to all past observations Yk1, ensuring the new information being incorporated is statistically independent of previous measurements, thus maintaining the estimator's optimality.

Time Update

x^k|k1=projYk1(xk)=projYk1(Axk1+Buk+ωk)=AprojYk1(xk1)+BprojYk1(uk)+projYk1(ωk)=Ax^k1|k1+Bukx~k|k1=xkx^k|k1P^k|k1=E[x~k|k1x~k|k1T]=E[(xkx^k|k1)(xkx^k|k1)T]=E[(Ax~k1|k1+ωk)(Ax~k1|k1+ωk)T]=AE[x~k1|k1x~k1|k1T]AT+2AE[x~k1|k1ωkT]+E[ωkωkT]=AP^k1|k1AT+Q

Measurement Update

ek=yky^k|k1=ykprojYk1(yk)=ykprojYk1(Cxk+νk)=ykCprojYk1(xk)projYk1(νk)=ykCx^k|k1x^k|k=projYk(xk)=x^k|k1+Kkek=x^k|k1+Kk(ykCx^k|k1)x~k|k=xkx^k|kP^k|k=E[x~k|kx~k|kT]=E[(xkx^k|k)(xkx^k|k)T]=E[(x~k|k1Kkek)(x~k|k1Kkek)T]=E[x~k|k1x~k|k1T]2KkE[ekx~k|k1T]+KkE[ekekT]KkT=P^k|k12KkE[(ykCx^k|k1)x~k|k1T]+KkE[(ykCx^k|k1)(ykCx^k|k1)T]KkT=P^k|k12KkCP^k|k1+Kk(CP^k|k1CT+R)KkTtr(P^k|k)Kk=2CP^k|k1+2Kk(CP^k|k1CT+R)=0Kk=P^k|k1CT(CP^k|k1CT+R)1

Probabilistic Perspective (Bayesian Estimation)

The filter maintains a Gaussian belief state that gets refined through sequential application of Bayes' rule, where prediction corresponds to Chapman-Kolmogorov propagation and update implements Bayesian conditioning.

p(xk|y1:k,u1:k)=p(xk|yk,y1:k1,u1:k)=p(yk|xk,y1:k1,u1:k)p(xk|y1:k1,u1:k)p(yk|y1:k1,u1:k)=ηp(yk|xk)observation modelp(xk|y1:k1,u1:k)prior belief=ηp(yk|xk)p(xk,xk1|y1:k1,u1:k) dxk1=ηp(yk|xk)p(xk|xk1,y1:k1,u1:k)p(xk1|y1:k1,u1:k) dxk1=ηp(yk|xk)p(xk|xk1,uk)motion modelp(xk1|y1:k1,u1:k1)previous belief dxk1=ηN(yk;Hkxk,Rk)N(xk;Axk1+Buk,Qk)N(xk1;x^k1,P^k1) dxk1=ηN(yk;Hkxk,Rk)N(xk;x^k|k1,P^k|k1) N(xk;x^k,P^k)

Applying Bayesian Rule and Markov Assumptions to p(xk|y1:k,u1:k), then the time update and the measurement update becomes very explicit.

Optimization Perspective (MAP Estimation)

The Kalman Filter solves a weighted least-squares problem where the optimal state estimate minimizes a cost function balancing prediction fidelity against measurement consistency, with covariance matrices acting as natural weighting matrices.

By Bayesian Rule, we know that

p(xk|y1:k,u1:k)p(yk|xk)measurementp(xk|y1:k1,u1:k)prior

To maximize the posterior probability, it is equivalent to minimizing its negative logarithmic posterior.

lnp(xk|y1:k,u1:k)=lnp(yk|xk)lnp(xk|y1:k1,u1:k)+C

Applying Gaussian probability distribution

Jxk=12||zkCxk||Rk12+12||xkx^k|k1||P^k|k12+Cx^k|k1=argminxk(||xkx^k|k1||P^k|k12+|zkCxk||Rk12)

Prior is given by

x^k|k1=E[xk|y1:k1,u1:k]P^k|k1=Cov(xk|y1:k1,u1:k)