Main Content

trackingMSCEKF

Extended Kalman filter for object tracking in modified spherical coordinates (MSC)

Description

ThetrackingMSCEKFobject represents an extended Kalman filter (EKF) for object tracking in modified spherical coordinates (MSC) using angle-only measurements from a single observer. Use the filter to predict the future location of an object in the MSC frame or associate multiple object detections with their tracks. You can specify the observer maneuver or acceleration required by the state-transition functions (@constantvelmscand@constantvelmscjac) by using theObserverInputproperty.

The following properties are fixed for thetrackingMSCEKFobject:

  • StateTransitionFcn-@constvelmsc

  • StateTransitionJacobianFcn-@constvelmscjac

  • MeasurementFcn-@cvmeasmsc

  • MeasurementJacobianFcn-@cvmeasmscjac

  • HasAdditiveProcessNoise-false

  • HasAdditiveMeasurementNoise-true

Creation

Description

mscekf= trackingMSCEKFreturns an extended Kalman filter to use the MSC state-transition and measurement functions with object trackers. The defaultStateimplies a static target at 1 meter from the observer at zero azimuth and elevation.

example

mscekf= trackingMSCEKF(Name,Value)specifies the properties of the filter using one or moreName,Valuepair arguments. Any unspecified properties take default values.

Properties

expand all

Filter state, specified as a real-valuedM-element vector.

  • For 2-D tracking,Mis equal to four and the four-dimensional state is:[az;azRate;1/r;rDot/r].

    For 3-D tracking,Mis equal to six and the six-dimensional state is:[az;azRate;el;elRate;1/r;rDot/r].

azandelare the azimuth and elevation angle in radians.azRateandelRateare the azimuth and elevation angular rate in radians per second.ris the range in meters, andrDotis the range rate in meters per second.

If you want a filter with single-precision floating-point variables, specifyStateas a single-precision vector variable. For example,

filter = trackingMSCEKF('State',single([10;.2;13;.4]))

Data Types:single|double

State error covariance, specified as anM-by-Mmatrix whereMis the size of the filter state. A scalar input is extended to anM-by-Mmatrix. The covariance matrix represents the uncertainty in the filter state.Mis either4for 2-D tracking or6for 3-D tracking.

Example:eye(6)

This property is read-only.

State transition function, specified as a function handle. This function calculates the state vector at time stepkfrom the state vector at time stepk–1. For thetrackingMSCEKFobject, the transition function is fixed to@constvelmsc.

Data Types:function_handle

This property is read-only.

The Jacobian of the state transition function, specified as a function handle. This function has the same input arguments as the state transition function. For thetrackingMSCEKFobject, the transition function Jacobian is fixed to@constvelmsc.

Data Types:function_handle

Process noise covariance, specified as aQ-by-Qmatrix.Qis either2or3. The process noise represents uncertainty in the acceleration of the target.

SpecifyProcessNoisebefore any call to thepredictfunction. In later calls topredict, you can optionally specify the process noise as a scalar. In this case, the process noise matrix is a multiple of theQ-by-Qidentity matrix.

Example:[1.0 0.05; 0.05 2]

Acceleration or maneuver of the observer, specified as a three-element vector. To specify an acceleration, use anM/2vector, whereMis either4for 2-D tracking or6for 3-D tracking. To specify a maneuver, give anM-element vector.

Example:[1;2;3]

This property is read-only.

Model additive process noise, specified asfalse. For thetrackingMSCEKFobject, this property is fixed tofalse.

This property is read-only.

Measurement model function, specified as a function handle,@cvmeasmsc. Input to the function is theM-element state vector. The output is theN-element measurement vector. For thetrackingMSCEKFobject, the measurement model function is fixed to@cvmeasmsc.

Data Types:function_handle

This property is read-only.

Jacobian of the measurement function, specified as a function handle. The function has the same input arguments as the measurement function. For thetrackingMSCEKFobject, the Jacobian of the measurement function is fixed to@cvmeasmscjac.

Data Types:function_handle

Measurement noise covariance, specified as a positive scalar or positive-definite real-valued matrix. When specified as a scalar, the matrix is a multiple of theN-by-Nidentity matrix.Nis the size of the measurement vector.

SpecifyMeasurementNoisebefore any call to thecorrectfunction.

Example:0.2

This property is read-only.

Model additive process noise, specified astrue. For thetrackingMSCEKFobject, this property is fixed totrue.

启用状态平滑,指定为falseortrue. Setting this property totruerequires the Sensor Fusion and Tracking Toolbox™ license. When specified astrue, you can:

  • Use thesmoothfunction, provided in Sensor Fusion and Tracking Toolbox, to smooth state estimates in the previous steps. Internally, the filter stores the results from previous steps to allow backward smoothing.

  • Specify the maximum number of smoothing steps using theMaxNumSmoothingStepsproperty of the tracking filter.

Maximum number of backward smoothing steps, specified as a positive integer.

Dependencies

To enable this property, set theEnableSmoothingproperty totrue.

Object Functions

predict Predict state and state estimation error covariance of tracking 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
smooth Backward smooth state estimates of tracking filter

Examples

collapse all

This example shows how to make an extended Kalman filter (EKF) for object tracking in modified spherical coordinates (MSC). Create the filter, predict the state, and correct the state estimate using measurement observations.

Create the filter for a 3-D motion model. Specify the state estimates for the MSC frame.

az = 0.1;% in radiansazRate = 0; r = 1000; rDot = 10; el = 0.3;% in radianselRate = 0; omega = azRate*cos(el); mscekf = trackingMSCEKF('State',[az;omega;el;elRate;1/r;rDot/r]);

Predict the filter state using a constant observer acceleration.

mscekf.ObserverInput = [1;2;3]; predict(mscekf);% Default time 1 second.predict(mscekf,0.1);% Predict using dt = 0.1 second.

Correct the filter state using an angle-only measurement.

meas = [5;18];% measured azimuth and elevation in degreescorrect(mscekf,meas);

References

[1] Aidala, V. and Hammel, S., 1983.Utilization of modified polar coordinates for bearings-only tracking.IEEE Transactions on Automatic Control, 28(3), pp.283-294.

Introduced in R2018b