Kalman Filter

Design and use Kalman filters in MATLAB and Simulink

The Kalman filter is an algorithm that estimates the state of a system from measured data. It was primarily developed by the Hungarian engineer Rudolf Kalman, for whom the filter is named. The filter’s algorithm is a two-step process: the first step predicts the state of the system, and the second step uses noisy measurements to refine the estimate of system state.

There are now several variants of the original Kalman filter. These filters are widely used for applications that rely on estimation, including computer vision, guidance and navigation systems, econometrics, and signal processing.

Guidance, Navigation, and Control

Kalman filters are commonly used in GNC systems, such as in sensor fusion, where they synthesize position and velocity signals by fusing GPS and IMU (inertial measurement unit) measurements. The filters are often used to estimate a value of a signal that cannot be measured, such as the temperature in the aircraft engine turbine, where any temperature sensor would fail. The filters are also used together with LQR (linear-quadratic-regulator) compensators for LQG (linear-quadratic-Gaussian) control.

Using the Kalman filter to estimate the position of an aircraft. See example for details.

Computer Vision

In computer vision applications, Kalman filters are used for object tracking to predict an object’s future location, to account for noise in an object’s detected location, and to help associate multiple objects with their corresponding tracks.

Tracking the trajectory of a ball. The output of the Kalman filter is denoted by the red circles and the object detection is denoted in black. Notice when the ball is occluded and there are no detections; the filter is used to predict its location. See example for details.

Software Reference

Control Systems

  • Kalman Filter: Estimate states of discrete-time or continuous-time linear system - Block
  • Extended Kalman Filter: Estimate states of discrete-time nonlinear system using extended Kalman filter - Block
  • Unscented Kalman Filter: Estimate states of discrete-time nonlinear system using unscented Kalman filter - Block
  • kalman: Kalman Filter Design, Kalman Estimator - Function
  • kalmd: Design discrete Kalman estimator for continuous plant - Function
  • extendedKalmanFilter: Create extended Kalman filter object for online state estimation - Function
  • unscentedKalmanFilter: Create unscented Kalman filter object for online state estimation - Function

Computer Vision

Signal Processing

See also: Control System Toolbox, DSP System Toolbox, Computer Vision System Toolbox, object recognition, video processing, PID control, parameter estimation, point cloud