Main Content

initcvggiwphd

Create constant velocity ggiwphd filter

Description

phd = initcvggiwphd initializes a constant velocity ggiwphd filter. By default, the components are empty and the data type of the filter is double.

phd = initcvggiwphd(detections) initializes a constant velocity ggiwphd filter based on information provided in object detections, detections. The data type of the filter is the same as the data type of measurement in the detections.

The function initializes a constant velocity state with the same convention as constvel and cvmeas, [x vx y vy z vz].

Note

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

example

phd = initcvggiwphd(___,dataType) specifies the data type of the filter as single or double.

Examples

collapse all

Consider an object located at position [1;2;3] with detections uniformly spread around its 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 velocity ggiwphd filter with the generated detections.

phd = initcvggiwphd(detections);

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

states = phd.States
states = 6×1

    1.2856
         0
    1.9950
         0
    2.9779
         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])

Data type of variables used in the filter, specified as "single" for single-precision or "Double" for double-precision. When specified as "single", the initialized filter does not produce any double-precision output and may use some double variables during intermediate steps.

Data Types: single | double

Output Arguments

collapse all

ggiwphd filter, returned as a ggiwphd object.

Algorithms

  • You can use initcvggiwphd 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 acceleration standard deviation.

  • 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™.

Version History

Introduced in R2019a

expand all