rlabbe / Kalman-and-Bayesian-Filters-in-Python

Kalman Filter book using Jupyter Notebook. Focuses on building intuition and experience, not formal proofs. Includes Kalman filters,extended Kalman filters, unscented Kalman filters, particle filters, and more. All exercises include solutions.
Other
16.72k stars 4.2k forks source link

Include Delayed Measurement Example #286

Closed Soccertrash closed 4 years ago

Soccertrash commented 5 years ago

Hi Roger,

I really like your book. It helped me a lot understanding and designing Kalman Filters. One thing I'm missing: How to handle Delayed Measurments? Assume you have to sensors. Sensor A and Sensor B. Sensor A has a update rate of 10 Hz. Sensor B has a Update rate of 4 Hz. But Sensor B has a latency of 150 ms, meaning that when Sensor Value B arrives for Statet there is a Sensor Value of A for State(t+1) already available. To express the problem as a real-world problem one could use a Image Recognition System (high latency) and and a infrared sensor (low latency, high sampling rate).

Thank you, Manfred

da-phil commented 5 years ago

Hi Manfred,

a common approach for delayed measurements is to augment the state vector by a copy of the current state vector at timestamp t1 when the sensor measurement from sensor A was taken, this is called "stochastic cloning". At timestamp t2, when the processed measurement from sensor A is ready to be processed in the kalman filter update step the state vector copy from timestamp t1 is being used and the state vector copy is marginalized out of the current state vector. However, this only works if you can measure the sensor processing delay.

An in-depth example is given in the following paper, where delayed visual odometry measurements are fused together with IMU measurements on a flying robot. In this paper the time delay is measured by a camera hardware trigger at image acquisition time and the time when the visual odometry measurement is finished processing. https://mediatum.ub.tum.de/doc/1285770/564159.pdf

Cheers Phil

Soccertrash commented 5 years ago

Thank you Phil for this detailed explanation.

dhirajdhule commented 5 years ago

@Soccertrash could you get any insight from the referenced paper? Did you get to a implementation that works?

Soccertrash commented 4 years ago

@Soccertrash could you get any insight from the referenced paper? Did you get to a implementation that works?

I haven't implement this yet, sorry. Did you?