Main Content

Linear Kalman filter for object tracking

A `trackingKF`

object is a discrete-time linear
Kalman filter used to track the positions and velocities of target platforms.

A Kalman filter is a recursive algorithm for estimating the evolving state of a process when measurements are made on the process. The filter is linear when the evolution of the state follows a linear motion model and the measurements are linear functions of the state. The filter assumes that both the process and measurements have additive noise. When the process noise and measurement noise are Gaussian, the Kalman filter is the optimal minimum mean squared error (MMSE) state estimator for linear processes.

You can use this object in these ways:

Explicitly set the motion model. Set the motion model property,

`MotionModel`

, to`Custom`

, and then use the`StateTransitionModel`

property to set the state transition matrix.Set the

`MotionModel`

property to a predefined state transition model:Motion Model `'1D Constant Velocity'`

`'1D Constant Acceleration'`

`'2D Constant Velocity'`

`'2D Constant Acceleration'`

`'3D Constant Velocity'`

`'3D Constant Acceleration'`

`filter = trackingKF`

creates a linear Kalman filter object for a
discrete-time, 2-D, constant-velocity moving object. The Kalman filter uses default
values for the `StateTransitionModel`

,
`MeasurementModel`

, and `ControlModel`

properties. The function also sets the `MotionModel`

property to
`'2D Constant Velocity'`

.

specifies the state transition model, `filter`

= trackingKF(`F`

,`H`

)`F`

, and the measurement
model, `H`

. With this syntax, the function also sets the
`MotionModel`

property to `'Custom'`

.

also specifies the control model, `filter`

= trackingKF(`F`

,`H`

,`G`

)`G`

. With this syntax, the
function also sets the `MotionModel`

property to
`'Custom'`

.

sets the motion model property, `filter`

= trackingKF(`'MotionModel'`

,`model`

)`MotionModel`

, to
`model`

.

configures the properties of the Kalman filter by using one or more
`filter`

= trackingKF(___,`Name`

,`Value`

)`Name`

,`Value`

pair arguments and any of the
previous syntaxes. Any unspecified properties take default values.

`predict` | Predict state and state estimation error covariance of linear Kalman filter |

`correct` | Correct state and state estimation error covariance using tracking filter |

`correctjpda` | Correct state and state estimation error covariance using tracking filter and JPDA |

`distance` | Distances between current and predicted measurements of tracking filter |

`likelihood` | Likelihood of measurement from tracking filter |

`clone` | Create duplicate tracking filter |

`residual` | Measurement residual and residual noise from tracking filter |

`smooth` | Backward smooth state estimates of tracking filter |

`initialize` | Initialize state and covariance of tracking filter |

The Kalman filter describes the motion of an object by estimating its state. The state generally consists of object position and velocity and possibly its acceleration. The state can span one, two, or three spatial dimensions. Most frequently, you use the Kalman filter to model constant-velocity or constant-acceleration motion. A linear Kalman filter assumes that the process obeys the following linear stochastic difference equation:

$${x}_{k+1}={F}_{k}{x}_{k}+{G}_{k}{u}_{k}+{v}_{k}$$

*x _{k}* is the state at step

In the Kalman filter, the measurements are also linear functions of the state,

$${z}_{k}={H}_{k}{x}_{k}+{w}_{k}$$

where *H _{k}* is the measurement
model matrix. This model expresses the measurements as functions of the state. A
measurement can consist of an object position, position and velocity, or its position,
velocity, and acceleration, or some function of these quantities. The measurements can also
include noise perturbations,

These equations, in the absence of noise, model the actual motion of the object and the actual measurements. The noise contributions at each step are unknown and cannot be modeled. Only the noise covariance matrices are known. The state covariance matrix is updated with knowledge of the noise covariance only.

For a brief description of the linear Kalman filter algorithm, see Linear Kalman Filters.

[1] Brown, R.G. and P.Y.C. Wang.
*Introduction to Random Signal Analysis and Applied Kalman
Filtering*. 3rd Edition. New York: John Wiley & Sons, 1997.

[2] Kalman, R. E. "A New Approach to
Linear Filtering and Prediction Problems." *Transaction of the ASME–Journal of
Basic Engineering*, Vol. 82, Series D, March 1960, pp. 35–45.

[3] Blackman, Samuel.
*Multiple-Target Tracking with Radar Applications*. Artech House.
1986.

`trackerGNN`

|`trackerTOMHT`

|`trackingABF`

|`trackingCKF`

|`trackingEKF`

|`trackingGSF`

|`trackingIMM`

|`trackingMSCEKF`

|`trackingPF`

|`trackingUKF`