Extended Kalman Filter Explained with Python Code

In the following code, I have implemented an Extended Kalman Filter for modeling the movement of a car with constant turn rate and velocity. The code is mainly based on this work (I did some bug fixing and some adaptation such that the code runs similar to the Kalman filter that I have earlier implemented).

Extended Kalman filter
Trajectory of the car, click on the image for large scale

References: [1] [2] [3] [4] [5]

4.3 4 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

11 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
deb0ch
2 years ago

Hi, first of all thank you for you amazing video series that is helping me so much understanding the Kalman filter !

In this video, what is the C function and Ck matrix at the end, in the Update State equations ?

Jonathon Walker
1 year ago

Any way to get the /home/behnam/Kalman/2014-03-26-000-Data.csv file?

syamsibnu
syamsibnu
1 year ago

Hi, I like your explanation, in the video.
Actually I try to practice EKF by simulating a simple pendulum and using python code.
however I got a problem, How can I have further discussion about it. ?
If you don’t mind, would you send me your email, so I can share my short python code about my problem.
Thanks

Vijay
Vijay
1 year ago

Hello!
Amazing work.
I just have one doubt, in the given dataset, latitude and logitude values are in range of 111 and 13 respectively. Then how come output is in range from 0-100? Please explain this? I just need co-ordinates of ekf plot in terms of lat and long,so i can see how much difference when compared to gps values. If you know piece of code to get these co-ordinates, please share.
Thankyou
 

Last edited 1 year ago by Vijay
Stephen Nguyen
Stephen Nguyen
7 months ago

Hi. Firstly, thank you for your video and source code in python. It’s very useful for me. However, could you plz explain the motion equation when the car does not drive straight and especially the Jacobian matrix?

Stephen Nguyen
Stephen Nguyen
7 months ago

In addition, in your source code, Does JA*P_t_1*JA.T + Q_t means np.dot or just np.mul?

Alexandr
Alexandr
5 months ago

Traceback (most recent call last):
  File “e:\Python_Test\test4efk.py”, line 157, in <module>
    converters={1:bytespdate2num(‘%H%M%S%f’),
  File “e:\Python_Test\test4efk.py”, line 149, in bytespdate2num
    strconverter = mdates.strpdate2num(fmt)
AttributeError: module ‘matplotlib.dates’ has no attribute ‘strpdate2num’
how fix it?

Last edited 5 months ago by Alexandr
11
0
Would love your thoughts, please comment.x
()
x