log_likelihood : float Log likelihood of last measurment update. likelihood : float Likelihood of last measurment update. Probably not very useful, but it is here if you want it. Projected into measurement space (z - Hx) S : ndarray System uncertainty projected into measurement space.
I.e., theĭifferent between the measurement and the current estimated state y : ndarray Residual calculated in the most recent update() call. Read-only Instance Variables K : ndarray Kalman gain that was used in the most recent update() call. x : ndarray (dim_x, 1), default = filter state estimate P : ndarray (dim_x, dim_x), default eye(dim_x) covariance matrix Q : ndarray (dim_x, dim_x), default eye(dim_x) Process uncertainty/noise R : ndarray (dim_z, dim_z), default eye(dim_x) measurement uncertainty/noise H : ndarray (dim_z, dim_x) measurement function F : ndarray (dim_x, dim_x) state transistion matrix B : ndarray (dim_x, dim_u), default 0 control transition matrixĪssign a value > 1.0 to turn this into a fading memory filter. You will have to assign reasonable values to all of these before These are the matrices (instance variables) which you must specify.Īll are of type numpy.array (do NOT use numpy.matrix) If dimensionalĪnalysis allows you to get away with a 1x1 matrix you may also use a This will beĬlearer in the example below. Overwrite them rather than assign to each element yourself. Midstream just use the underscore version of the matrices to assignĭirectly: your_filter._R = a_3x3_matrix.)Īfter construction the filter will have default matrices created for you,īut you must specify the values for each.
(If for whatever reason you need to alter the size of things Measurement noise matrix you will get an assert exception because R Specified dim_z=2 and then try to assign a 3x3 matrix to R (the When you assign values to the various matrices. These are mostly used to perform size checks State vector with dim_x and the size of the measurement vector that you
In brief, you will first construct this object, specifying the size of the The test files in this directory also give you a basic idea of use,
Is my free book Kalman and Bayesian Filters in Python