# IMM Estimator¶

needs documentation….

Copyright 2015 Roger R Labbe Jr.

FilterPy library. http://github.com/rlabbe/filterpy

Supporting book at: https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python

class filterpy.kalman.IMMEstimator(filters, mu, M)[source]

Implements an Interacting Multiple-Model (IMM) estimator.

Parameters: filters : (N,) array_like of KalmanFilter objects List of N filters. filters[i] is the ith Kalman filter in the IMM estimator. Each filter must have the same dimension for the state x and P. mu : (N,) ndarray of float mode probability: mu[i] is the probability that filter i is the correct one. M : (N,N) ndarray of float Markov chain transition matrix. M[i,j] is the probability of switching from filter j to filter i.

References

Bar-Shalom, Y., Li, X-R., and Kirubarajan, T. “Estimation with Application to Tracking and Navigation”. Wiley-Interscience, 2001.

Crassidis, J and Junkins, J. “Optimal Estimation of Dynamic Systems”. CRC Press, second edition. 2012.

Labbe, R. “Kalman and Bayesian Filters in Python”. https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python

Examples

See my book Kalman and Bayesian Filters in Python https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python

Attributes: x : numpy.array(dim_x, 1) Current state estimate. Any call to update() or predict() updates this variable. P : numpy.array(dim_x, dim_x) Current state covariance matrix. Any call to update() or predict() updates this variable. N : int number of filters in the filter bank mu : (N,) ndarray of float mode probability: mu[i] is the probability that filter i is the correct one. M : (N,N) ndarray of float Markov chain transition matrix. M[i,j] is the probability of switching from filter j to filter i.
__init__(filters, mu, M)[source]

” Create an IMM estimator from a list of filters.

update(z, u=None)[source]

Add a new measurement (z) to the Kalman filter. If z is None, nothing is changed.

Parameters: z : np.array measurement for this update. u : np.array, optional u[i] contains the control input for the ith filter