# trackingKF

Linear Kalman filter for object tracking

## Description

A `trackingKF`

object is a discrete-time linear
Kalman filter used to track states, such as positions and velocities of objects that can be encountered in an automated driving
scenario. Such objects include automobiles, pedestrians, bicycles, and stationary
structures or obstacles.

A Kalman filter is a recursive algorithm for estimating the evolving state of a process when measurements are made on the process. The filter assumes the state-space model, including the state model and the measurement model, is linear. When the process noise and measurement noise are Gaussian and the motion model is linear, the Kalman filter is optimal. For a brief description of the linear Kalman filter algorithm, see Linear Kalman Filters.

You can use a `trackingKF`

object in these ways:

Set the

`MotionModel`

property to one of predefined state transition models. See the`MotionModel`

property for details on these models.`"1D Constant Velocity"`

`"1D Constant Acceleration"`

`"2D Constant Velocity"`

`"2D Constant Acceleration"`

`"3D Constant Velocity"`

`"3D Constant Acceleration"`

Explicitly set the motion model. Set the

`MotionModel`

property to`"Custom"`

, and then use the`StateTransitionModel`

and`MeasurementModel`

properties to specify the state transition matrix and measurement matrix, respectively. Optionally, you can specify control inputs by specifying the`ControlModel`

property.

## Creation

### Syntax

### Description

`filter = trackingKF`

creates a discrete-time linear Kalman filter object
for estimating the state of a 2-D, constant-velocity, moving object. The function
sets the `MotionModel`

property of
the filter to `"2D Constant Velocity"`

.

sets the `filter`

= trackingKF(`"MotionModel"`

,`model`

)`MotionModel`

property to a predefined motion model,
`model`

. In this case, the filter initializes the state as a
double-precision zero vector based on the dimension of the motion model. The filter
also configures the `MeasurementModel`

property so that the
measurement model returns position measurements.

specifies the `filter`

= trackingKF(`A`

,`H`

)`StateTransitionModel`

and the `MeasurementModel`

properties to `A`

and `H`

, respectively. The
function sets the `MotionModel`

property to
`"Custom"`

.

sets the `filter`

= trackingKF(`A`

,`H`

,`B`

)`ControlModel`

property to the specified
`B`

. The function sets the `MotionModel`

property to `"Custom"`

.

configures the properties of the Kalman filter by using one or more name-value
arguments and any of the previous syntaxes. Any unspecified properties take default
values. Enclose each property name in quotes.`filter`

= trackingKF(___,`Name`

,`Value`

)

## Properties

## Object Functions

`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 |

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

`tunableProperties` (Sensor Fusion and Tracking Toolbox) | Get tunable properties of filter |

`setTunedProperties` (Sensor Fusion and Tracking Toolbox) | Set properties to tuned values |

## Examples

## References

[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.

## Extended Capabilities

## Version History

**Introduced in R2017a**