/AutonomousRobots-Kalman-Filter

AutonomousRobots Series

Primary LanguagePythonMIT LicenseMIT

Autonomous Robots Kalman Filters

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.

Predict

alt text

Measure and Update

alt text

Matrices

State Matrix

•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  

Uncertainty Matrix

•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

•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

•Measurement Matrix is implemented as H.
•H is size  n(measure) x n(state)
•n(measure) = 2
•n(state)=4

Measurement Uncertainty

•R is size n x n
•n(measure)=2

You can see result of algorithm "kalmanfilter.py" :
IMAGE ALT TEXT HERE

TO DO:

  • 2D Kalman Filter
  • Kalman Filter Prediction