Classes | |
| class | sp::KF |
| class | sp::EKF |
| class | sp::UKF |
Functions | |
| sp::KF::KF (arma::uword _N, arma::uword _M, arma::uword _L) | |
| sp::KF::~KF () | |
| void | sp::KF::clear (void) |
| void | sp::KF::set_state_vec (const arma::mat &_x) |
| void | sp::KF::set_trans_mat (const arma::mat &_A) |
| void | sp::KF::set_control_mat (const arma::mat &_B) |
| void | sp::KF::set_meas_mat (const arma::mat &_H) |
| void | sp::KF::set_err_cov (const arma::mat &_P) |
| void | sp::KF::set_proc_noise (const arma::mat &_Q) |
| void | sp::KF::set_meas_noise (const arma::mat &_R) |
| void | sp::KF::set_kalman_gain (const arma::mat &_K) |
| void | sp::KF::set_trans_fcn (fcn_v _f) |
| void | sp::KF::set_meas_fcn (fcn_v _h) |
| arma::mat | sp::KF::get_state_vec (void) |
| arma::mat | sp::KF::get_err (void) |
| arma::mat | sp::KF::get_kalman_gain (void) |
| arma::mat | sp::KF::get_err_cov (void) |
| void | sp::KF::predict (const arma::mat u) |
| void | sp::KF::predict (void) |
| void | sp::KF::update (const arma::mat z) |
| void | sp::KF::rts_smooth (const arma::mat &Xf, const arma::cube &Pf, arma::mat &Xs, arma::cube &Ps) |
| sp::EKF::EKF (arma::uword _N, arma::uword _M, arma::uword _L) | |
| void | sp::EKF::set_diff_step (double _dx) |
| void | sp::EKF::set_state_jac (fcn_m _f) |
| void | sp::EKF::set_meas_jac (fcn_m _h) |
| void | sp::EKF::jacobian_diff (arma::mat &_F, fcn_v _f, const arma::mat &_x) |
| void | sp::EKF::jacobian_diff (arma::mat &_F, fcn_v _f) |
| void | sp::EKF::jacobian_analytical (arma::mat &_F, fcn_m _f_m, const arma::mat &_x) |
| void | sp::EKF::jacobian_analytical (arma::mat &_F, fcn_m _f_m) |
| void | sp::EKF::predict (const arma::mat u) |
| void | sp::EKF::predict (void) |
| void | sp::EKF::update (const arma::mat z) |
| void | sp::EKF::rts_smooth (const arma::mat &Xf, const arma::cube &Pf, arma::mat &Xs, arma::cube &Ps) |
| sp::UKF::UKF (arma::uword _N, arma::uword _M, arma::uword _L) | |
| void | sp::UKF::set_alpha (double _a) |
| void | sp::UKF::set_beta (double _b) |
| void | sp::UKF::set_kappa (double _k) |
| void | sp::UKF::set_lambda (double _l) |
| void | sp::UKF::update_weights (void) |
| void | sp::UKF::update_sigma (const arma::mat &_x, const arma::mat &_P) |
| arma::mat | sp::UKF::ut (const arma::mat &_x, const arma::mat &_P, const fcn_v _f) |
| void | sp::UKF::predict (const arma::mat u) |
| void | sp::UKF::predict (void) |
| void | sp::UKF::update (const arma::mat z) |
| void | sp::UKF::rts_smooth (const arma::mat &Xf, const arma::cube &Pf, arma::mat &Xs, arma::cube &Ps) |
Variables | |
| arma::uword | sp::KF::N |
| arma::uword | sp::KF::M |
| arma::uword | sp::KF::L |
| bool | sp::KF::lin_proc |
| bool | sp::KF::lin_meas |
| arma::mat | sp::KF::x |
| arma::mat | sp::KF::z_err |
| arma::mat | sp::KF::A |
| arma::mat | sp::KF::B |
| arma::mat | sp::KF::H |
| arma::mat | sp::KF::P |
| arma::mat | sp::KF::Q |
| arma::mat | sp::KF::R |
| arma::mat | sp::KF::K |
| fcn_v | sp::KF::f |
| fcn_v | sp::KF::h |
| fcn_m | sp::EKF::f_jac |
| fcn_m | sp::EKF::h_jac |
| double | sp::EKF::dx |
| double | sp::UKF::alpha |
| double | sp::UKF::beta |
| double | sp::UKF::kappa |
| double | sp::UKF::lambda |
| arma::mat | sp::UKF::X |
| arma::mat | sp::UKF::S |
| arma::mat | sp::UKF::C |
| arma::vec | sp::UKF::Wx |
| arma::vec | sp::UKF::Wp |
|
inline |
|
inline |
Definition at line 362 of file kalman.h.
References sp::EKF::dx.
|
inline |
Definition at line 251 of file kalman.h.
References sp::KF::z_err.
Referenced by main().
|
inline |
Definition at line 261 of file kalman.h.
References sp::KF::P.
Referenced by main().
|
inline |
Definition at line 256 of file kalman.h.
References sp::KF::K.
Referenced by main().
|
inline |
Definition at line 246 of file kalman.h.
References sp::KF::x.
Referenced by main().
|
inline |
Evaluate Jacobian matrix using analytical jacobian.
| _F | Jacobian matrix d/dx evaluated at x |
| _f_m | Jacobian function matrix |
Definition at line 455 of file kalman.h.
References sp::EKF::jacobian_analytical(), and sp::KF::x.

|
inline |
Evaluate Jacobian matrix using analytical jacobian.
| _F | Jacobian matrix d/dx evaluated at x |
| _f_m | Jacobian function matrix |
| _x | State vector |
Definition at line 434 of file kalman.h.
References err_handler.
Referenced by sp::EKF::jacobian_analytical(), sp::EKF::predict(), sp::EKF::rts_smooth(), and sp::EKF::update().
|
inline |
Calculate and evaluate Jacobian matrix using finite difference approximation.
| _F | Jacobian matrix d/dx evaluated at x |
| _f | Function vector [ f0(x,u,w) ... fN(x,u,w)] |
Definition at line 423 of file kalman.h.
References sp::EKF::jacobian_diff(), and sp::KF::x.

|
inline |
Calculate and evaluate Jacobian matrix using finite difference approximation.
| _F | Jacobian matrix d/dx evaluated at x |
| _f | Function vector [ f0(x,u,w) ... fN(x,u,w)] |
| _x | State vector |
Alternative: Complex Step Diff: http://blogs.mathworks.com/cleve/2013/10/14/complex-step-differentiation/
Definition at line 395 of file kalman.h.
References sp::EKF::dx, and err_handler.
Referenced by sp::EKF::jacobian_diff(), sp::EKF::predict(), sp::EKF::rts_smooth(), and sp::EKF::update().
|
inline |
|
inline |
|
inline |
Predict the internal states using a control input.
| u | Input/control signal |
Definition at line 464 of file kalman.h.
References sp::KF::A, sp::KF::B, sp::eval_fcn(), sp::KF::f, sp::EKF::f_jac, sp::EKF::jacobian_analytical(), sp::EKF::jacobian_diff(), sp::KF::lin_proc, sp::KF::P, sp::KF::Q, and sp::KF::x.

|
inline |
Predict the internal states using a control input.
| u | Input/control signal |
Definition at line 709 of file kalman.h.
References sp::KF::A, sp::KF::B, sp::KF::f, sp::KF::lin_proc, sp::KF::P, sp::KF::Q, sp::UKF::S, sp::UKF::ut(), and sp::KF::x.
Referenced by main().

|
inline |
Predict the internal states, no control.
Definition at line 279 of file kalman.h.
References sp::KF::L, and sp::KF::predict().
Referenced by sp::KF::predict().

|
inline |
Predict the internal states, no control.
Definition at line 487 of file kalman.h.
References sp::KF::L, and sp::EKF::predict().
Referenced by sp::EKF::predict().

|
inline |
Predict the internal states, no control. Convenient function.
Definition at line 732 of file kalman.h.
References sp::KF::L, and sp::UKF::predict().
Referenced by sp::UKF::predict().

|
inline |
Rauch-Tung-Striebel smoother. See https://users.aalto.fi/~ssarkka/course_k2012/full_course_booklet_2012.pdf.
Definition at line 307 of file kalman.h.
References sp::KF::A, sp::KF::N, and sp::KF::Q.
Referenced by main().
|
inline |
Rauch-Tung-Striebel smoother. See https://users.aalto.fi/~ssarkka/course_k2012/full_course_booklet_2012.pdf.
Definition at line 533 of file kalman.h.
References sp::KF::A, sp::eval_fcn(), sp::KF::f, sp::EKF::f_jac, sp::EKF::jacobian_analytical(), sp::EKF::jacobian_diff(), sp::KF::lin_proc, sp::KF::N, and sp::KF::Q.

|
inline |
Rauch-Tung-Striebel smoother. See https://users.aalto.fi/~ssarkka/course_k2012/full_course_booklet_2012.pdf.
Definition at line 784 of file kalman.h.
References sp::KF::A, sp::UKF::C, sp::KF::f, sp::KF::lin_proc, sp::KF::N, sp::KF::Q, sp::UKF::S, and sp::UKF::ut().
Referenced by main().

|
inline |
Definition at line 621 of file kalman.h.
References sp::UKF::alpha.
|
inline |
Definition at line 626 of file kalman.h.
References sp::UKF::beta.
|
inline |
|
inline |
Definition at line 370 of file kalman.h.
References sp::EKF::dx.
|
inline |
Definition at line 214 of file kalman.h.
References sp::KF::P.
Referenced by main().
|
inline |
|
inline |
Definition at line 631 of file kalman.h.
References sp::UKF::kappa.
|
inline |
Definition at line 636 of file kalman.h.
References sp::UKF::lambda.
|
inline |
Definition at line 240 of file kalman.h.
References sp::KF::h, and sp::KF::lin_meas.
Referenced by main().
|
inline |
Definition at line 380 of file kalman.h.
References sp::EKF::h_jac.
|
inline |
Definition at line 209 of file kalman.h.
References sp::KF::H.
Referenced by main().
|
inline |
Definition at line 224 of file kalman.h.
References sp::KF::R.
Referenced by main().
|
inline |
Definition at line 219 of file kalman.h.
References sp::KF::Q.
Referenced by main().
|
inline |
Definition at line 375 of file kalman.h.
References sp::EKF::f_jac.
|
inline |
Definition at line 194 of file kalman.h.
References sp::KF::x.
Referenced by main().
|
inline |
Definition at line 234 of file kalman.h.
References sp::KF::f, and sp::KF::lin_proc.
|
inline |
Definition at line 199 of file kalman.h.
References sp::KF::A.
Referenced by main().
|
inline |
Definition at line 604 of file kalman.h.
References sp::UKF::alpha, sp::UKF::beta, sp::UKF::kappa, sp::UKF::lambda, sp::UKF::Wp, sp::UKF::Wx, and sp::UKF::X.
|
inline |
|
inline |
Correct and update the internal states. EKF.
Definition at line 496 of file kalman.h.
References sp::eval_fcn(), sp::KF::H, sp::KF::h, sp::EKF::h_jac, sp::EKF::jacobian_analytical(), sp::EKF::jacobian_diff(), sp::KF::K, sp::KF::lin_meas, sp::KF::M, sp::KF::N, sp::KF::P, sp::KF::R, sp::KF::x, and sp::KF::z_err.

|
inline |
Correct and update the internal states. UKF.
Definition at line 741 of file kalman.h.
References sp::UKF::C, sp::KF::H, sp::KF::h, sp::KF::K, sp::KF::lin_meas, sp::KF::M, sp::KF::N, sp::KF::P, sp::KF::R, sp::UKF::S, sp::UKF::ut(), sp::KF::x, and sp::KF::z_err.
Referenced by main().

|
inline |
Calculate sigma points around a reference point.
| _x | State matrix |
| _P | Covariance matrix |
Definition at line 665 of file kalman.h.
References sp::UKF::lambda, sp::KF::N, and sp::UKF::X.
Referenced by sp::UKF::ut().
|
inline |
Calculate sigma point weights.
Definition at line 644 of file kalman.h.
References sp::UKF::alpha, sp::UKF::beta, sp::UKF::kappa, sp::UKF::lambda, sp::KF::N, sp::UKF::Wp, and sp::UKF::Wx.
Referenced by sp::UKF::ut().
|
inline |
Calculate unscented transform.
Definition at line 678 of file kalman.h.
References sp::UKF::C, sp::eval_fcn(), sp::KF::N, sp::UKF::S, sp::UKF::update_sigma(), sp::UKF::update_weights(), sp::UKF::Wp, sp::UKF::Wx, and sp::UKF::X.
Referenced by sp::UKF::predict(), sp::UKF::rts_smooth(), and sp::UKF::update().

|
protected |
State transition matrix.
Definition at line 134 of file kalman.h.
Referenced by sp::KF::KF(), sp::KF::predict(), sp::EKF::predict(), sp::UKF::predict(), sp::KF::rts_smooth(), sp::EKF::rts_smooth(), sp::UKF::rts_smooth(), and sp::KF::set_trans_mat().
|
protected |
Spread factor of sigma points.
Definition at line 593 of file kalman.h.
Referenced by sp::UKF::set_alpha(), sp::UKF::UKF(), and sp::UKF::update_weights().
|
protected |
Input matrix.
Definition at line 135 of file kalman.h.
Referenced by sp::KF::KF(), sp::KF::predict(), sp::EKF::predict(), sp::UKF::predict(), and sp::KF::set_control_mat().
|
protected |
x distr. prior knowledge factor
Definition at line 594 of file kalman.h.
Referenced by sp::UKF::set_beta(), sp::UKF::UKF(), and sp::UKF::update_weights().
|
protected |
Cross covariance input-output.
Definition at line 600 of file kalman.h.
Referenced by sp::UKF::rts_smooth(), sp::UKF::update(), and sp::UKF::ut().
|
protected |
Finite difference approximation step size.
Definition at line 360 of file kalman.h.
Referenced by sp::EKF::EKF(), sp::EKF::jacobian_diff(), and sp::EKF::set_diff_step().
|
protected |
Vector of Kalman state transition functions.
Definition at line 141 of file kalman.h.
Referenced by sp::EKF::predict(), sp::UKF::predict(), sp::EKF::rts_smooth(), sp::UKF::rts_smooth(), and sp::KF::set_trans_fcn().
|
protected |
Matrix of Extended Kalman state transition jacobian.
Definition at line 358 of file kalman.h.
Referenced by sp::EKF::predict(), sp::EKF::rts_smooth(), and sp::EKF::set_state_jac().
|
protected |
Measurement matrix.
Definition at line 136 of file kalman.h.
Referenced by sp::KF::KF(), sp::KF::set_meas_mat(), sp::KF::update(), sp::EKF::update(), and sp::UKF::update().
|
protected |
Vector of Kalman measurement functions.
Definition at line 142 of file kalman.h.
Referenced by sp::KF::set_meas_fcn(), sp::EKF::update(), and sp::UKF::update().
|
protected |
Matrix of Extended Kalman measurement transition jacobian.
Definition at line 359 of file kalman.h.
Referenced by sp::EKF::set_meas_jac(), and sp::EKF::update().
|
protected |
Kalman gain vector.
Definition at line 140 of file kalman.h.
Referenced by sp::KF::clear(), sp::KF::get_kalman_gain(), sp::KF::KF(), sp::KF::set_kalman_gain(), sp::KF::update(), sp::EKF::update(), and sp::UKF::update().
|
protected |
Scaling par.
Definition at line 595 of file kalman.h.
Referenced by sp::UKF::set_kappa(), sp::UKF::UKF(), and sp::UKF::update_weights().
|
protected |
Number of measurements/observations.
Definition at line 129 of file kalman.h.
Referenced by sp::KF::KF(), sp::KF::predict(), sp::EKF::predict(), and sp::UKF::predict().
|
protected |
Definition at line 596 of file kalman.h.
Referenced by sp::UKF::set_lambda(), sp::UKF::UKF(), sp::UKF::update_sigma(), and sp::UKF::update_weights().
|
protected |
Linearity flag for measurement.
Definition at line 131 of file kalman.h.
Referenced by sp::KF::KF(), sp::KF::set_meas_fcn(), sp::EKF::update(), and sp::UKF::update().
|
protected |
Linearity flag for process.
Definition at line 130 of file kalman.h.
Referenced by sp::KF::KF(), sp::EKF::predict(), sp::UKF::predict(), sp::EKF::rts_smooth(), sp::UKF::rts_smooth(), and sp::KF::set_trans_fcn().
|
protected |
Number of inputs.
Definition at line 128 of file kalman.h.
Referenced by sp::KF::KF(), sp::EKF::update(), and sp::UKF::update().
|
protected |
Number of states.
Definition at line 127 of file kalman.h.
Referenced by sp::KF::KF(), sp::KF::rts_smooth(), sp::EKF::rts_smooth(), sp::UKF::rts_smooth(), sp::KF::update(), sp::EKF::update(), sp::UKF::update(), sp::UKF::update_sigma(), sp::UKF::update_weights(), and sp::UKF::ut().
|
protected |
Error covariance matrix (estimated accuracy)
Definition at line 137 of file kalman.h.
Referenced by sp::KF::clear(), sp::KF::get_err_cov(), sp::KF::KF(), sp::KF::predict(), sp::EKF::predict(), sp::UKF::predict(), sp::KF::set_err_cov(), sp::KF::update(), sp::EKF::update(), and sp::UKF::update().
|
protected |
Process noise.
Definition at line 138 of file kalman.h.
Referenced by sp::KF::KF(), sp::KF::predict(), sp::EKF::predict(), sp::UKF::predict(), sp::KF::rts_smooth(), sp::EKF::rts_smooth(), sp::UKF::rts_smooth(), and sp::KF::set_proc_noise().
|
protected |
Measurement noise.
Definition at line 139 of file kalman.h.
Referenced by sp::KF::KF(), sp::KF::set_meas_noise(), sp::KF::update(), sp::EKF::update(), and sp::UKF::update().
|
protected |
Output covariance.
Definition at line 599 of file kalman.h.
Referenced by sp::UKF::predict(), sp::UKF::rts_smooth(), sp::UKF::update(), and sp::UKF::ut().
|
protected |
Weights covariance.
Definition at line 602 of file kalman.h.
Referenced by sp::UKF::UKF(), sp::UKF::update_weights(), and sp::UKF::ut().
|
protected |
Weights states.
Definition at line 601 of file kalman.h.
Referenced by sp::UKF::UKF(), sp::UKF::update_weights(), and sp::UKF::ut().
|
protected |
State vector.
Definition at line 132 of file kalman.h.
Referenced by sp::KF::clear(), sp::KF::get_state_vec(), sp::EKF::jacobian_analytical(), sp::EKF::jacobian_diff(), sp::KF::KF(), sp::KF::predict(), sp::EKF::predict(), sp::UKF::predict(), sp::KF::set_state_vec(), sp::KF::update(), sp::EKF::update(), and sp::UKF::update().
|
protected |
Sigma points.
Definition at line 598 of file kalman.h.
Referenced by sp::UKF::UKF(), sp::UKF::update_sigma(), and sp::UKF::ut().
|
protected |
Prediction error.
Definition at line 133 of file kalman.h.
Referenced by sp::KF::get_err(), sp::KF::KF(), sp::KF::update(), sp::EKF::update(), and sp::UKF::update().