Classes | Typedefs | Enumerations

sc_ukf.h File Reference

Unscented Kalman Filter object. More...

Classes

class  UKF
 Unscented Kalman Filter. More...

Typedefs

typedef ml_matrix(* state_func )(ml_matrix x, double t, void *context)
 A function used to propagate the state vector.
typedef ml_matrix(* integ_func )(state_func state_fun, ml_matrix &x, double h, double t, void *context)
 A function used to integrate the state vector.
typedef ml_matrix(* meas_func )(const ml_matrix &state, void *context)
 A function used to provide the measurement vector.

Enumerations

enum  UKF_mode { UKF_mode_unset = -1, UKF_mode_state, UKF_mode_parameter }
 

Determines in which state the filter operates.



Detailed Description

Implements an unscented Kalman filter (UKF). Operates in two modes: state and parameter.

To create and use a filter, do the following:

  1. Construct a UKF object.
  2. Set the filter mode (state or parameter).
  3. Set the filter parameters.
  4. Set the integrator time information (time and time step).
  5. Set the initial state, covariance, and (only in parameter mode) parameters.
  6. Set the noise covariance matrices (process and measurement).
  7. Set the update functions (state, integrator (for state), and measurement).
  8. Set the context data if needed by the state or measurement functions
  9. Use the filter:
    1. get the current state/parameter/covariance,
    2. set the integrator current time, and
    3. update the filter based on new measurements, as appropriate.
  10. When finished with it, destroy the UKF object.

Note: I'm not crazy about the way parameter mode operates; it currently mimics the Matlab version in the toolbox. But the way that there are several versions of the parameters, and how these need to be carefully maintained across calls to the RHS function, is an area of concern; it's not nearly as clean as I'd like it.