The Kalman Filter is an easy topic. However, many tutorials are not easy to understand. Most require extensive mathematical background which makes them difficult to understand. Also, most lack practical numerical examples.
I tried to make practical applications of Kalman filters.
We have to implement 5 matrices go through the following 2 steps.
•State Matrix is implemented as x
•Matrix defined as [Row x Column]
•Define n = number of state
•x is size n x 1
•n = 4
•Populate matrix with initial Uncertainty of each state.
•Uncertainty Matrix is implemented as P
•P is size n x n
•n = 4
•State Transition Matrix is implemented as F.
•F is size n x n.
•n=4
•Populate matrix so that x(t+1)=Fx(t
•Measurement Matrix is implemented as H.
•H is size n(measure) x n(state)
•n(measure) = 2
•n(state)=4
•R is size n x n
•n(measure)=2
You can see result of algorithm "kalmanfilter.py"
:
- 2D Kalman Filter
- Kalman Filter Prediction