initekfimm

Initialize trackingIMM object

Description

example

imm = initekfimm(detection) initializes a constant velocity (CV), constant acceleration (CA), and a constant turn (CT) trackingIMM (imm) object based on information provided in an objectDetection object, detection.

Examples

collapse all

A 3-D position measurement in rectangular frame is provided. For example, x = 1, y = 3, and z = 0. Use a 3-D position measurement noise [1 0.4 0; 0.4 4 0; 0 0 1].

detection = objectDetection(0, [1;3;0], 'MeasurementNoise', [1 0.4 0; 0.4 4 0; 0 0 1]);

Use initekfimm to create a trackingIMM filter initialized at the provided position and using the measurement noise defined above.

imm = initekfimm(detection);

Check the values of the state and measurement noise. Verify that the filter state, imm.State, has the same position components as detection measurement, detection.Measurement.

imm.State
ans = 6×1

     1
     0
     3
     0
     0
     0

Verify that the filter measurement noise, imm.MeasurementNoise, is the same as the detection.MeasurementNoise values.

imm.MeasurementNoise
ans = 3×3

    1.0000    0.4000         0
    0.4000    4.0000         0
         0         0    1.0000

A 3-D position measurement in spherical frame is provided. For example: az = 40, el = 6, r = 100, rr = 5. Measurement noise is diag([2.5, 2.5, 0.5, 1].^2).

meas = [40;6;100;5];
measNoise = diag([2.5,2.5,0.5,1].^2);

Use the MeasurementParameters to define the frame. You can leave out other fields of the MeasurementParameters struct, and they will be completed by default values. In this example, sensor position, sensor velocity, orientation, elevation, and range rate flags are default.

measParams = struct('Frame','spherical');
detection = objectDetection(0,meas,'MeasurementNoise',measNoise,...
     'MeasurementParameters', measParams); 

Use initekfimm to create a trackingIMM filter initialized at the provided position and using the measurement noise defined above.

imm = initekfimm(detection)
imm = 
  trackingIMM with properties:

                      State: [6x1 double]
            StateCovariance: [6x6 double]

            TrackingFilters: {3x1 cell}
         ModelConversionFcn: @switchimm
    TransitionProbabilities: [3x3 double]

           MeasurementNoise: [4x4 double]
         ModelProbabilities: [3x1 double]

Input Arguments

collapse all

Detection report, specified as an Object Detections object.

Example: detection = objectDetection(0,[1;4.5;3],'MeasurementNoise', [1.0 0 0; 0 2.0 0; 0 0 1.5])

Output Arguments

collapse all

Constant velocity (CV), constant acceleration (CA), and a constant turn (CT) trackingIMM (imm) object based on information provided in detection, returned as a trackingIMM object.

Extended Capabilities

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

Introduced in R2018b