Variable time step in Kalman Filter

I am using the Kalman opencv filter library to use the Kalman evaluation features.

My program does not provide real-time recursion. My question is, when the transition matrix has elements that depend on the time step, do I need to update the transition matrix every time it is used (in prediction or correctly) to reflect the time elapsed since the last recursion?

Edit: the reason I'm asking about this is because the filter works well, without adjustments to the transition matrix, but this does not happen when I update the time steps.

+7
opencv kalman-filter
source share
1 answer

Many Kalman filter descriptions write the transition matrix as F , as if it were a constant. As you found out, you should update it (along with Q ) for each update in some cases, for example, using the timestep variable.

Consider a simple position and velocity system with

 F = [ 1 1 ] [ x ] [ 0 1 ] [ v ] 

So, at each step x = x + v (the position is updated by speed) and v = v (without changing the speed).

This is great if your speed is in units of length / time. If your timestep changes, or if you express your speed in a more typical unit, such as length / s, you need to write F as follows:

 F = [ 1 dt ] [ x ] [ 0 1 ] [ v ] 

This means that you must calculate a new value for F whenever your timestep changes (or every time if there is no schedule defined).

Keep in mind that you also add process noise Q for each update, so it can also be scaled over time.

+10
source share

All Articles