This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

trackingGSF

Guassian-sum filter for object tracking

Description

The trackingGSF object represents a Gaussian-sum filter designed for object tracking. You can define the state probability density function by a set of finite Gaussian-sum components. Use this filter for tracking objects that require a multi-model description due to incomplete observability of state through measurements. For example, this filter can be used as a range-parameterized extended Kalman filter when the detection contains only angle measurements.

Creation

Syntax

gsf = trackingGSF
gsf = trackingGSF(trackingFilters)
gsf = trackingGSF(trackingFilters,modelProbabilities)
gsf = trackingGSF(___,'MeasurementNoise',measNoise)

Description

gsf = trackingGSF returns a Gaussian-sum filter with two constant velocity extended Kalman filters (trackingEKF) with equal initial weight.

example

gsf = trackingGSF(trackingFilters) specifies the Gaussian components of the filter in trackingFilters. The initial weights of the filters are assumed to be equal.

gsf = trackingGSF(trackingFilters,modelProbabilities) specifies the initial weight of the Gaussian components in modelProbabilities and sets the ModelProbabilties property.

gsf = trackingGSF(___,'MeasurementNoise',measNoise) specifies the measurement noise of the filter. The MeasurementNoise property is set for each Gaussian component.

Properties

expand all

This property is read-only.

Weighted estimate of filter state, specified as a real-valued M-element vector. This state is estimated based on the weighted combination of filters in TrackingFilters. Use ModelProbabilities to change the weights.

Example: [200;0.2]

Data Types: single | double

This property is read-only.

State error covariance, specified as a positive-definite real-valued M-by-M matrix, where M is the size of the filter state. The covariance matrix represents the uncertainty in the filter state. This state covariance is estimated based on the weighted combination of filters in TrackingFilters. Use ModelProbabilities to change the weights.

Example: [20 0.1; 0.1 1]

Data Types: single | double

List of filters, specified as a cell array of tracking filters. Specify these filters when creating the object. By default, the filters have equal probability. Specify modelProbabilities if the filters have different probabilities.

Note

The state of each filter must be the same size and have the same physical meaning.

Data Types: cell

Weight of each filter, specified as a vector of probabilities from 0 to 1. By default, the weight of each component of the filter is equal.

Data Types: single | double

Measurement noise covariance, specified as a positive scalar or positive-definite real-valued matrix. The matrix is a square with side lengths equal to the number of measurements. A scalar input is extended to a square diagonal matrix.

Specify MeasurementNoise before any call to the correct method. After the first call to correct, you can optionally specify the measurement noise as a scalar. In this case, the measurement noise matrix is a multiple of the R-by-R identity matrix, where R is the number of measurements.

Example: 0.2

Data Types: single | double

Object Functions

predictPredict state and state estimation error covariance
correctCorrect state and state estimation error covariance
correctjpdaCorrect state and state estimation error covariance using JPDA
distanceDistances between measurements and predicted measurements
residualMeasurement residual and residual noise
cloneCopy filter for object tracking
initializeInitialize state and covariance of filter

Examples

collapse all

This example shows how to create and run a trackingGSF filter. Specify three extended Kalman filters (EKFs) as the components of the Gaussian-sum filter. Call the predict and correct functions to track an object and correct the state estimate based on measurements.

Create three EKFs each with a state distributed around [0;0;0;0;0;0] and running on position measurements. Specify them as the input to the trackingGSF filter.

filters = cell(3,1);
filter{1} = trackingEKF(@constvel,@cvmeas,rand(6,1),'MeasurementNoise',eye(3));
filter{2} = trackingEKF(@constvel,@cvmeas,rand(6,1),'MeasurementNoise',eye(3));
filter{3} = trackingEKF(@constvel,@cvmeas,rand(6,1),'MeasurementNoise',eye(3));
gsf = trackingGSF(filter);

Call predict to get the predicted state and covariance of the filter. Use a 0.1 sec time step.

[x_pred, P_pred] = predict(gsf,0.1);

Call correct with a given measurement.

meas = [0.5;0.2;0.3];
[xCorr,pCorr] = correct(gsf,meas);

Compute the distance between the filter and a different measurement.

d = distance(gsf,[0;0;0]);

References

[1] Alspach, Daniel, and Harold Sorenson. "Nonlinear Bayesian estimation using Gaussian sum approximations." IEEE Transactions on Automatic Control. Vol 17, No. 4, 1972, pp. 439-448.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2018b