Kalman Filter
Kalman filtering routines for a linear Gaussian state space model.
StateSpace.kalman_filter!
— Functionkalman_filter!(filter, sys)
Compute predicted states $a$ and forecast errors $v$ with corresponding variances $P$ and $F$ and Kalman gain $K$ for a linear Gaussian State Space model with system matrices sys
using the Kalman filter, storing the results in filter
.
Arguments
sys::StateSpaceSystem
: state space system matrices
Returns
filter::MultivariateFilter
: Kalman filter output
kalman_filter!(filter, sys)
Compute predicted states $a$ and forecast errors $v$ with corresponding variance $P$ and precision $F⁻¹$ and Kalman gain $K$ for a linear Gaussian State Space model with system matrices sys
using the Kalman filter based on Woodbury's Identity, storing the results in filter
.
Woodbury's Identity allows direct computation of the inverse variance (precision) $F⁻¹$.
Arguments
sys::StateSpaceSystem
: state space system matrices
Returns
filter::WoodburyFilter
: Kalman filter output
kalman_filter!(filter, sys)
Compute predicted states $a$ and forecast errors $v$ with corresponding variances $P$ and $F$ and Kalman gain $K$ for a linear Gaussian State Space model with system matrices sys
using the equation-by-equation or univariate version of the Kalman filter, storing the results in filter
.
Arguments
sys::StateSpaceSystem
: state space system matrices
Returns
filter::UnivariateFilter
: Kalman filter output