Main Content

State Estimation

Design Kalman filters, estimate states during system operation, generate code and deploy to embedded targets

State estimation techniques let you estimate state values in systems with process noise and measurement noise. Control System Toolbox™ tools let you design linear steady-state and time-varying Kalman filters. You can also estimate states of nonlinear systems using extended Kalman filters, unscented Kalman filters, or particle filters.

Online state estimation algorithms update state estimates of your system when new data is available. You can estimate the states of your system using real-time data and linear and nonlinear Kalman filter algorithms. You can perform online state estimation using Simulink® blocks, generate C/C++ code for these blocks using Simulink Coder™, and deploy this code to an embedded target. You can also perform online state estimation at the command line, and deploy your code using MATLAB® Compiler™ or MATLAB Coder.

Functions

expand all

kalmanDesign Kalman filter for state estimation
kalmdDesign discrete Kalman estimator for continuous plant
estimForm state estimator given estimator gain
extendedKalmanFilterCreate extended Kalman filter object for online state estimation
unscentedKalmanFilterCreate unscented Kalman filter object for online state estimation
particleFilterParticle filter object for online state estimation
correctCorrect state and state estimation error covariance using extended or unscented Kalman filter, or particle filter and measurements
predictPredict state and state estimation error covariance at next time step using extended or unscented Kalman filter, or particle filter
residualReturn measurement residual and residual covariance when using extended or unscented Kalman filter (Since R2019b)
initializeInitialize the state of the particle filter
cloneCopy online state estimation object
generateJacobianFcnGenerate MATLAB Jacobian functions for extended Kalman filter using automatic differentiation (Since R2023a)

Blocks

expand all

Kalman FilterEstimate states of discrete-time or continuous-time linear system
Extended Kalman FilterEstimate states of discrete-time nonlinear system using extended Kalman filter
Particle FilterEstimate states of discrete-time nonlinear system using particle filter
Unscented Kalman FilterEstimate states of discrete-time nonlinear system using unscented Kalman filter

Topics

State Estimation Basics

  • Kalman Filtering
    Perform Kalman filtering and simulate the system to show how the filter reduces measurement error for both steady-state and time-varying filters.

Online Estimation

State Estimation in Simulink

Troubleshooting

Troubleshoot Online State Estimation

Troubleshoot online state estimation performed using extended and unscented Kalman filter algorithms.