initcaggiwphd

Create constant acceleration ggiwphd filter

Description

phd = initcaggiwphd initializes a constant acceleration ggiwphd filter with no zeros components in the filter.

example

phd = initcaggiwphd(detections) initializes a constant acceleration ggiwphd filter based on information provided in object detections, detections. The function initializes a constant acceleration state with the same convention as constacc and cameas, [x;vx;ax;y;vy;ay;z;vz;az].

Note

This initialization function is not compatible with trackerGNN, trackerJPDA, and trackerTOMHT system objects.

Examples

collapse all

Consider an object located at position [1;2;3] with detections uniformly spread around it's extent. The size of the extent is 1.2, 2.3 and 3.5 in x, y and z directions, respectively.

detections = cell(20,1);
location = [1;2;3];
dimensions = [1.2;2.3;3.5];
rng(2018) % Reproducible results
measurements = location + dimensions.*(-1 + 2*rand(3,20));
for i = 1:20
    detections{i} = objectDetection(0,measurements(:,i));
end

Initialize a constant acceleration ggiwphd filter with the generated detections.

phd = initcaggiwphd(detections);

Check the filter has the same position estimates as the mean of measurements.

states = phd.States
states = 9×1

    1.2856
         0
         0
    1.9950
         0
         0
    2.9779
         0
         0

measurementMean = mean(measurements,2)
measurementMean = 3×1

    1.2856
    1.9950
    2.9779

Check the extent and expected number of detections.

extent = phd.ScaleMatrices/(phd.DegreesOfFreedom - 4)
extent = 3×3

    1.4603    0.0885   -0.2403
    0.0885    3.0050   -0.0225
   -0.2403   -0.0225    4.8365

expDetections = phd.Shapes/phd.Rates
expDetections = 20

Input Arguments

collapse all

Object detections, specified as a cell array of objectDetection objects. You can create detections directly, or you can obtain detections from the outputs of sensor objects, such as radarSensor, monostaticRadarSensor, irSensor, and sonarSensor.

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

ggiwphd filter, returned as a ggiwphd object.

Algorithms

  • You can use initcaggiwphd as the FilterInitializationFcn property of trackingSensorConfiguration.

  • When detections are provided as input, the function adds one component to the density which reflects the mean of the detections. When the function is called without any inputs, a filter is initialized with no components in the density.

  • The function uses the spread of measurements to describe the Inverse-Wishart distribution.

  • The function uses the number of detections to describe the Gamma distribution.

  • The function configures the process noise of the filter by assuming a unit standard deviation for the acceleration change rate.

  • The function specifies a maximum of 500 components in the filter.

Extended Capabilities

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

Introduced in R2019a