Main Content

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. For more details, see Algorithms and trackingIMM.

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}
     HasMeasurementWrapping: [1 1 1]
           MeasurementNoise: [4x4 double]

         ModelConversionFcn: @switchimm
    TransitionProbabilities: [3x3 double]
         ModelProbabilities: [3x1 double]

            MaxNumOOSMSteps: 0

            EnableSmoothing: 0

Input Arguments

collapse all

Detection report, specified as an objectDetection 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.

Algorithms

  • The function initializes a trackingIMM object. The state of the filter is defined as [x; vx; y; vy; z; vz], in which x, y, z are the position coordinates. vx, vy, vz are the corresponding velocities.

  • The TrackingFilters property of the initialized trackingIMM object contains these trackingEKF filter objects.

    • The first filter, initialized by using the initcvekf function, is a trackingEKF object based on the constant velocity motion model. See the Algorithm section of the initcvekf function page for more details.

    • The second filter, initialized by using the initcaekf function, is a trackingEKF object based on the constant acceleration motion model. See the Algorithm section of the initcaekf function page for more details.

    • The third filter, initialized by using the initctekf function, is a trackingEKF object based on the constant turn-rate motion model. See the Algorithm section of the initctekf function page for more details.

  • You can use this function as the FilterInitializationFcn property of a tracker object, such as a trackerGNN object.

Extended Capabilities

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

Version History

Introduced in R2018b