Main Content

initctgmphd

Create constant turn-rate gmphd filter

Description

phd = initctgmphd initializes a constant turn-rate gmphd filter with zero components in the filter. By default, the data type of the filter is double.

example

phd = initctgmphd(detections) initializes a constant turn-rate gmphd 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 turn-rate state with the same convention as constturn and ctmeas, [x vx y vy ω z vz], where ω is the turn-rate.

Note

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

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

Examples

collapse all

Consider a point target located at [1;2;3]. Create detection for the target using objectDetection.

detection = objectDetection(0,[1;2;3]);

Initialize a constant turn-rate gmphd filter using initctgmphd.

phd = initctgmphd(detection);

Display the initial state and the extent setup of the filter.

state = phd.States
state = 7×1

     1
     0
     2
     0
     0
     3
     0

extent = phd.HasExtent
extent = logical
   0

Consider an extended object located at [1;2;3]. The object's detections are uniformly distributed in x-, y-, and z-directions with dimensions of 1.2, 2.3, and 3.5, respectively. Generate 20 randomly distributed detections for the object using objectDetection.

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

Initialize a constant turn-rate gmphd filter using initctgmphd.

phd = initctgmphd(detections);

The initial state of the filter is same as the mean of the measurements.

state = phd.States
state = 7×1

    1.1034
         0
    2.5597
         0
         0
    2.4861
         0

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

    1.1034
    2.5597
    2.4861

By default, the function sets the HasExtent property to true if the number of measurements is greater than 1.

extent = phd.HasExtent
extent = logical
   1

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 and "Double" for double-precision. When specified as "single", the initialized filter does not use any double-precision variables.

Data Types: single | double

Output Arguments

collapse all

Gaussian mixture PHD filter, returned as a gmphd object.

Algorithms

  • You can use initctgmphd 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 specify the positional covariance.

  • The function configures the process noise of the filter by assuming a unit acceleration standard deviation and a unit angular acceleration standard deviation.

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

  • The function sets the HasExtent property of the filter to true if the number of input detections are greater than one.

Extended Capabilities

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

Version History

Introduced in R2019b

expand all