Main Content

initcakf

Create constant-acceleration linear Kalman filter from detection report

Since R2021a

Description

example

filter = initcakf(detection) creates and initializes a constant-acceleration linear Kalman filter from information contained in a detection report. For more information about the linear Kalman filter, see trackingKF.

The function initializes a constant acceleration state with the same convention as constacc and cameas, [x vx ax y vy ay z vz az].

Examples

collapse all

Create and initialize a 2-D constant-acceleration linear Kalman filter object from an initial detection report.

Create the detection report from an initial 2-D measurement, (10,−5), of the object position. Assume uncorrelated measurement noise.

detection = objectDetection(0,[10;-5],'MeasurementNoise',eye(2), ...
    'SensorIndex',1,'ObjectClassID',1,'ObjectAttributes',{'Car',5});

Create the new filter from the detection report.

filter = initcakf(detection);

Show the filter state.

filter.State
ans = 6×1

    10
     0
     0
    -5
     0
     0

Show the state transition model.

filter.StateTransitionModel
ans = 6×6

    1.0000    1.0000    0.5000         0         0         0
         0    1.0000    1.0000         0         0         0
         0         0    1.0000         0         0         0
         0         0         0    1.0000    1.0000    0.5000
         0         0         0         0    1.0000    1.0000
         0         0         0         0         0    1.0000

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

Linear Kalman filter, returned as a trackingKF object.

Algorithms

  • The function computes the process noise matrix assuming a one-second time step and an acceleration rate standard deviation of 1 m/s3.

  • You can use this function as the FilterInitializationFcn property of a radarTracker object.

Extended Capabilities

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

Version History

Introduced in R2021a