filterpy icon indicating copy to clipboard operation
filterpy copied to clipboard

Improve IMM to handle EKF, and perhaps UKF

Open rlabbe opened this issue 8 years ago • 4 comments

Right now the IMM hard codes in the predict step, which makes it suitable only for linear process models.

At the minimum, make a predict() function that can be overloaded. This will allow easy implementation of an EIMM via derivation and overloading, but ideally think about it a bit and come up with a scheme that works for UKFs as well.

rlabbe avatar Dec 11 '17 19:12 rlabbe

Was this solved? Does filterpy allow for EIMM / UIMM or just IMM with linear Kalman filters?

ramondalmau avatar Jun 27 '20 10:06 ramondalmau

It looks like this was solved but there are no callbacks for operations on x yet. So if you're working with things like angles it's not gonna work.

M1cha avatar Jan 02 '21 13:01 M1cha

@M1cha I am curious why we could not get things working if we have angles? I am trying to feed a Constant Velocity (CV) and a Coordinated Turn (CT) model. The CT model deals with turn rate (angle) and it is non-linear but I might try using the examples in this notebook to design a class for the CT model. Is there something I missed?

wang701 avatar Jan 18 '21 19:01 wang701

@wang701 that's because they wrap around or in Rogers words "are modular" https://nbviewer.jupyter.org/github/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/10-Unscented-Kalman-Filter.ipynb#Implementation You can also check the *_fn arguments to the UKF code.

Angular velocities and angular accelerations should not be a problem because they don't wrap(you can have millions of rad/s), only angular positions are a problem.

M1cha avatar Jan 18 '21 20:01 M1cha