Class UKF

Class Documentation

class UKF

Unscented Kalman Filter (UKF) implementation for nonlinear state estimation.

The UKF uses a set of sigma points to estimate the mean and covariance of a nonlinear system. This implementation allows customization of parameters such as alpha, beta, kappa, and fading.

UKF Hyperparameter Getters

inline double get_alpha() const
inline double get_beta() const
inline double get_fading() const
inline double get_kappa() const

UKF Noise Covariance Getters

inline arma::mat get_q() const
inline arma::mat get_r() const

UKF Hyperparameter Setters

inline void set_alpha(double _alpha)
inline void set_beta(double _beta)
inline void set_fading(double _fading)
inline void set_kappa(double _kappa)

UKF Noise Covariance Setters

inline void set_q(arma::mat _Q)
inline void set_r(arma::mat _R)

Public Functions

UKF()

Constructs a UKF object with default parameters.

void filter(std::function<void(const arma::colvec&, arma::colvec&)> hf, arma::colvec &x, arma::mat &xvar, const arma::colvec &z)

Executes one iteration of the UKF (predict + update).

Parameters:
  • hf – Nonlinear process model function

  • x – State vector to be updated

  • xvar – Covariance matrix to be updated

  • z – Measurement vector

inline double get_residual() const

Gets the residual norm from the last update.

Returns:

Residual as a double