Extended Kalman Filters

Use an extended Kalman filter when object motion follows a nonlinear state equation or when the measurements are nonlinear functions of the state. A simple example is when the state or measurements of the object are calculated in spherical coordinates, such as azimuth, elevation, and range.

State Update Model

The extended Kalman filter formulation linearizes the state equations. The updated state and covariance matrix remain linear functions of the previous state and covariance matrix. However, the state transition matrix in the linear Kalman filter is replaced by the Jacobian of the state equations. The Jacobian matrix is not constant but can depend on the state itself and time. To use the extended Kalman filter, you must specify both a state transition function and the Jacobian of the state transition function.

Assume there is a closed-form expression for the predicted state as a function of the previous state, controls, noise, and time.

xk+1=f(xk,uk,wk,t)

The Jacobian of the predicted state with respect to the previous state is

F(x)=fx.

The Jacobian of the predicted state with respect to the noise is

F(w)=fwi.

These functions take simpler forms when the noise enters linearly into the state update equation:

xk+1=f(xk,uk,t)+wk

In this case, F(w) = 1M.

Measurement Model

In the extended Kalman filter, the measurement can be a nonlinear function of the state and the measurement noise.

zk=h(xk,vk,t)

The Jacobian of the measurement with respect to the state is

H(x)=hx.

The Jacobian of the measurement with respect to the measurement noise is

H(v)=hv.

These functions take simpler forms when the noise enters linearly into the measurement equation:

zk=h(xk,t)+vk

In this case, H(v) = 1N.

Extended Kalman Filter Loop

This extended kalman filter loop is almost identical to the linear Kalman filter loop except that:

  • The exact nonlinear state update and measurement functions are used whenever possible and the state transition matrix is replaced by the state Jacobian

  • The measurement matrices are replaced by the appropriate Jacobians.

Predefined Extended Kalman Filter Functions

Sensor Fusion and Tracking Toolbox™ provides predefined state update and measurement functions to use in the extended Kalman filter.

Motion ModelFunction NameFunction Purpose
Constant velocityconstvelConstant-velocity state update model
constveljacConstant-velocity state update Jacobian
cvmeasConstant-velocity measurement model
cvmeasjacConstant-velocity measurement Jacobian
Constant accelerationconstaccConstant-acceleration state update model
constaccjacConstant-acceleration state update Jacobian
cameasConstant-acceleration measurement model
cameasjacConstant-acceleration measurement Jacobian
Constant turn rateconstturnConstant turn-rate state update model
constturnjacConstant turn-rate state update Jacobian
ctmeasConstant turn-rate measurement model
ctmeasjacConstant-turnrate measurement Jacobian

See Also

Objects