Main Content

smootherJIPDA

Joint probabilistic data association smoother

Since R2023a

Description

Based on the joint integrated probabilistic data association (JIPDA) algorithm, the smootherJIPDA object creates a multi-sensor multi-object fixed-interval smoother that you can use for offline estimation of multiple objects. The smoother estimates smoothing joint data association probabilities at each time step. These smoothing joint association probabilities represent the data association between estimated tracks and detections at time step k, given information from the preceding time steps (1 to k-1) as well as succeeding time steps (k+1 to N), where N is the total number of steps. By using measurements from succeeding time steps, the smoother can estimate data associations at each step more accurately and can resolve ambiguities more efficiently than a trackerJPDA object. For more details, see Algorithms.

Creation

Description

smoother = smootherJIPDA creates a default smootherJIPDA object. Use the smooth object function to obtain smoothed tracks.

example

smoother = smootherJIPDA(Name=Value) specifies properties using name-value arguments. Unspecified properties have default values.

example

smoother = smootherJIPDA(tracker) creates a smootherJIPDA object by reusing the detection-to-track assignment properties of a trackerJPDA object. You must set the TrackLogic property of the trackerJPDA object to "Integrated".

example

Properties

expand all

Unique smoother identifier, specified as a nonnegative integer. The object uses this property as the SourceIndex in the track outputs to distinguish tracks that come from different sources in a tracking system.

Example: 1

Filter initialization function, specified as a function handle, a character vector, or a string scalar. The motion model used in the initialized filter must support backward prediction. These built-in motion models support backward prediction:

In Sensor Fusion and Tracking Toolbox™, you can use these functions as the FilterInitializationFcn of a smoother.

Initialization FunctionFunction Definition
initcvkfInitialize constant-velocity linear Kalman filter.
initcakfInitialize constant-acceleration linear Kalman filter.
initcvekfInitialize constant-velocity extended Kalman filter.
initcaekfInitialize constant-acceleration extended Kalman filter.
initctekf Initialize constant-turn-rate extended Kalman filter.

You can also write your own initialization function using the following syntax.

filter = filterInitializationFcn(detection)
The input to this function is a detection report like those created by objectDetection. The output of this function must be a trackingKF or trackingEKF object.

For guidance in writing this function, use the type command to examine the details of built-in MATLAB® functions.

type initcvekf

Note

smootherJIPDA does not accept all filter initialization functions in Sensor Fusion and Tracking Toolbox. The full list of filter initialization functions available in Sensor Fusion and Tracking Toolbox are given in the Initialization section of Estimation Filters.

Data Types: function_handle | char

Maximum number of tracks that the smoother can maintain, specified as a positive integer.

Data Types: single | double

Maximum number of sensors you can connect to the smoother, specified as a positive integer. SensorIndex is a property of an objectDetection object. The MaxNumSensors property determines how many sets of ObjectAttributes each track can have.

Data Types: single | double

Absolute time tolerance between detections of the same cluster from the same sensor in seconds, specified as a positive scalar. Ideally, smootherJIPDA expects detections from the same cluster to have identical time stamps. However, if the time stamp differences between detections from the same cluster are within the margin specified by TimeTolerance, the object uses these detections to update the track estimate based on the average time of these detections.

When the smoother determines the time stamps at which to output smoothed tracks using the smooth object function, the smoother combines time stamps whose differences are within the specified time tolerance.

Data Types: double

Threshold for assigning detections to tracks, specified as a positive scalar or 1-by-2 vector of [C1,C2], where C1C2. If specified as a scalar, the specified value, val, is expanded to [val, Inf].

Initially, the smoother executes a coarse estimation for the normalized distance between all the tracks and detections. The smoother calculates the accurate normalized distance only for the combinations whose coarse normalized distance is less than C2. Also, the tracker can assign a detection to a track only if the accurate normalized distance between them is less than C1.

  • Increase the value of C2 if there are track and detection combinations that should be calculated for assignment but are not. Decrease this value if cost calculation takes too much time.

  • Increase the value of C1 if there are detections that should be assigned to tracks but are not. Decrease this value if there are detections that are assigned to tracks they should not be assigned to (too far away).

Note

If the value of C2 is finite, the state transition function and measurement function, specified in the tracking filter used in the smoother, must be able to take an M-by-N matrix of states as input and output N predicted states and N measurements, respectively. M is the size of the state. N, the number of states, is an arbitrary nonnegative integer.

Value of k for k-best JIPDA for detection and track assignment, specified as a positive integer. This property defines the maximum number of feasible joint events for the detection and track association in each cluster. When you set this property to a finite value k, the smoother generates a maximum of k events in each cluster for detection and track association.

Data Types: single | double

Threshold for assigning forward predicted tracks to backward predicted tracks, specified as a positive scalar. You can observe the forward and backward tracks by using an analysis function through the AnalysisFcn property. Increase this threshold if there are more than expected track fragmentations in the smoother output.

Data Types: single | double

Value of k for k-best JIPDA for assignment between forward tracks and backward tracks, specified as a positive integer. This property defines the maximum number of feasible joint events for the forward-to-backward track association in each cluster. When you set this property to a finite value k, the smoother generates a maximum of k events in each cluster considered for forward-to-back track association.

Data Types: single | double

The probability threshold to initialize a new track, specified as a scalar in the range [0,1). If the probabilities of associating a detection with any of the existing tracks are all smaller than InitializationThreshold, the object uses the detection to initialize a new track. This allows detections that are within the validation gate of a track but have an association probability lower than the initialization threshold to spawn a new track.

Example: 0.1

Data Types: single | double

Probability of detection, specified as a scalar in the range [0,1]. The object uses this property to evaluate the marginal posterior probabilities of association and the probability of track existence when initializing and updating a track.

Example: 0.85

Data Types: single | double

Spatial density of clutter measurements, specified as a positive scalar. The clutter density describes the expected number of false positive detections per unit volume. It is used as the parameter of a Poisson clutter model. The object also uses ClutterDensity to calculate the initial probability of track existence for both forward and back JIPDA.

Example: 1e-5

Data Types: single | double

Spatial density of new targets, specified as a positive scalar. The new target density describes the expected number of new tracks per unit volume in the measurement space. You can use this value to calculate the probability of track existence during track initialization for forward and backward JIPDA.

Example: 1e-3

Data Types: single | double

Time rate of target deaths, specified as a scalar in the range [0,1]. DeathRate describes the probability with which true targets disappear. It is related to the propagation of the probability of track existence (PTE) :

PTE(t+δt)=(1DeathRate)δtPTE(t)

where δt is the time interval since the previous update time t.

Data Types: single | double

Threshold for track confirmation, specified as a scalar in the range (0,1). The object confirms a track if its probability of existence at any time instant is greater than or equal to the confirmation threshold.

Example: 0.89

Data Types: single | double

Threshold for track deletion, specified as a scalar in the range (0,1). The object deletes a track if its probability of existence drops below the threshold.

Example: 0.2

Data Types: single | double

Class fusion method, specified as one of these options:

  • "None" — The smoother does not fuse classification information from detections. When the smoother initializes a tentative track from a detection that has a nonzero class ID, the smoother assigns the class ID of the detection to the track. In the subsequent updates to the track, the smoother assigns only detections with the same class ID or a class ID of 0 to the track. As a result, the track classification cannot change once established.

  • "Bayes" — The smoother fuses classification information from detections. When the smoother initializes a tentative track from detections, the smoother determines the class probability of the track based on the a priori class distribution and the class information of the detections. In the subsequent updates, the smoother uses both class and kinematic information from the detection for detection-to-track assignment as well as track-to-track assignment. The smoother also smoothes the classification of tracks.

Data Types: char | string

Prior class probability distribution for new tracks, specified as an N-element vector of nonnegative scalars that sum to 1. N must be equal to the total number of classes.

For each objectDetection object specified through the detectons input of the smooth object function, the ObjectClassID property of the objectDetection object must be less than or equal to N.

Example: [0.2 0.8]

Data Types: single | double

Weight factor of class fusion for detections, specified as a scalar in the range [0,1]. When you set the ClassFusionMethod property to "Bayes", the smoother calculates the mixed likelihood of association between a detection m and a track t as:

Λ(m,t)=Λk1α(m,t)Λcα(m,t)

where

  • α — Weight factor of class fusion for detections

  • Λk — Likelihood of assigning a detection to a track based on the kinematic states

  • Λc — Likelihood of assigning a classified detection to a track based on the class information

Using the mixed likelihoods between detections and tracks in each cluster, the smoother performs joint probabilistic data association between tracks and detections.

Data Types: single | double

Weight factor of class fusion for tracks, specified as a scalar in the range [0,1]. When you set the ClassFusionMethod property to "Bayes", the smoother calculates the mixed likelihood of association between a backward track b and a forward track t as:

Γ(b,t)=Γk1β(f,b)Γcβ(f,b)

where

  • β — Weight factor of class fusion for tracks

  • Γk — Likelihood of assigning a forward track to a backward track based on the kinematic states

  • Γc — Likelihood of assigning a forward track to a backward track based on the class information

Using the mixed likelihoods between backward tracks and forward tracks in each cluster, the smoother performs joint probabilistic data association between backward and forward tracks.

Data Types: single | double

Function for iterative analysis of the smoother, specified as a function handle, a string scalar, or a character vector. Using an analysis function, you can iteratively analyze the results of the smoother.

The analysis function must use this syntax:

analysisFcn(detectionAssignInfo)
The detectionAssignInfo input, provided by the smoother as a structure, contains association information between detections and tracks. The structure has these fields.

Field NameDescription
TimeCurrent time stamp, returned as a nonnegative scalar.
DetectionsDetections at the current time stamp, returned as a cell array of objectDetection objects.
TracksSmoothed corrections at the current time stamp, returned as a cell array of objectTrack objects.
DataAssociationData association at the current time stamp, returned as a structure.

The DataAssociation structure has these fields:

Field NameDescription
ClustersClusters of detections and tracks, returned as an array of cluster structures.
UnassignedDetectionsIndices of unassigned detections, returned as a vector.
UnassignedTracksTrack IDs of unassigned detections, returned as a vector.

Each cluster structure has the following field:

FieldDescription
DetectionIndices

Indices of clustered detections, returned as an M-element vector.

TrackIDs

Track IDs of clustered tracks, returned as an N-element vector.

ValidationMatrixValidation matrix of the cluster, returned as an M-by-(N+1) matrix. See the validationMatrix input of the jpdaEvents function for more details.
SensorIndex

Index of the originating sensor of detections in the cluster.

TimeStampMean time stamp of clustered detections.
MarginalProbabilitiesMatrix of marginal posterior joint association probabilities, returned as an (M+1)-by-N matrix. In the upper M-by-N matrix, the (i,j) element represents the ratio of the probability that the i-th detection (specified in the DetectionIndices field) is assigned to the j-th track (specified in the TrackIDs field) over the probability that the j-th track exists. The elements in the M+1 row represents the ratio of the probability that the corresponding track in the TrackIDs field is unassigned with any detection over the probability that the track exists.
Likelihood

Individual association likelihoods based on kinematic information, returned as an (M+1)-by-(N+1) matrix. See the likelihoodMatrix input of the jpdaEvents function for more details.

ClassLikelihood

Individual association likelihoods based on classification information, returned as an (M+1)-by-(N+1) matrix. See the likelihoodMatrix input of the jpdaEvents function for more details.

The structure has this field when you set the ClassFusionMethod property to "Bayes".

The analysis function can also take a second input argument as following.

analysisFcn(detectionAssignInfo,trackAssignmentInfo)
The trackAssignmentInfo input provided by the smoother contains association information between forward predictions and backward predictions. The structure has these fields.

Field NameDescription
ForwardPredictionTracks in forward predictions, returned as an array of objectTrack objects.
BackwardPredictionTracks in backward predictions, returned as an array of objectTrack objects.
SmoothingPredictionSmoothed predictions by JIPDA fusion of forward and backward predicted tracks, returned as a cell array of objectTrack objects.
DataAssociationData association between forward tracks and backward tracks at the current time stamp, returned as a structure.

The DataAssociation structure has these fields:

Field NameDescription
Likelihood

Individual association likelihoods based on kinematic information, returned as an (M+1)-by-(N+1) matrix. M is the number of backward tracks and N is the number of forward tracks. See the likelihoodMatrix input of the jpdaEvents function for more details.

CostMatrix

Cost of kinematic assignment matrix, in which the (i, j) element denotes the cost of assigning forward track i to backward track j.

MarginalProbabilitiesMatrix of marginal posterior joint association probabilities, returned as an (M+1)-by-N matrix. M is the number of backward tracks and N is the number of forward tracks. In the upper M-by-N matrix, the (i,j) element represents the probability that the i-th backward track (specified in the BackwardPrediction field) is assigned to the j-th forward track (specified in the ForwardPrediction field). The elements in the M+1 row represents the probability that the corresponding forward tracks are not assigned with any backward tracks.

Example: analysisFcn

Object Functions

smoothSmooth track estimates using JIPDA

Examples

collapse all

Load recorded detections and truth log.

load("smootherDetectionData.mat","detectionLog","timestamps","truthLog")

Create a smootherJIPDA object and set its FilterInitializtionFcn property to initialize a trackingEKF object with a constant velocity model.

smoother = smootherJIPDA(FilterInitializationFcn="initcvekf");

Obtain the smoothed tracks by using the smooth object function. Use the time stamps input to let the smoother output smoothed tracks at these stamps.

smoothTracks = smooth(smoother,detectionLog,timestamps);

To compare the smoothed results with an online tracking JIPDA algorithm, create a trackerJPDA object, update the tracker with detections, and obtain tracks.

tracker = trackerJPDA("TrackLogic","Integrated","FilterInitializationFcn","initcvekf");

detectionTimes = cellfun(@(x)x.Time,detectionLog);
onlineTracks = cell(numel(timestamps),1);

for i = 1:numel(timestamps)
    detections = detectionLog(detectionTimes == timestamps(i));
    onlineTracks{i} = tracker(detections,timestamps(i));
end

Compare tracking performances using the OSPA(2) metric. In this case, the smoother results have a much lower OSPA(2) metric and thus show better tracking performance than online tracking.

ospaOnlineCalc = trackOSPAMetric(Metric="OSPA(2)");
ospaSmoothCalc = trackOSPAMetric(Metric="OSPA(2)");
ospaOnline = zeros(numel(timestamps),1);
ospaSmooth = zeros(numel(timestamps),1);
for i = 1:numel(timestamps)
    ospaOnline(i) = ospaOnlineCalc(onlineTracks{i},truthLog{i});
    ospaSmooth(i) = ospaSmoothCalc(smoothTracks{i},truthLog{i});
end

% Plot OSPA(2) metrics
plot(timestamps, [ospaOnline ospaSmooth],"LineWidth",2);
xlabel("time");
ylabel("OSPA(2)");
legend({"Online","Smooth"});

Figure contains an axes object. The axes object with xlabel time, ylabel OSPA(2) contains 2 objects of type line. These objects represent Online, Smooth.

Create a trackerJPDA object and set it track logic to "Integrated". Set its MaxNumEvents property to 50.

tracker = trackerJPDA(TrackLogic="Integrated",MaxNumEvents=50);

Create a smootherJIPDA object based on the tracker. From the results, the MaxNumDetectionAssignmentEvents property is 50 as expected.

smoother = smootherJIPDA(tracker)
smoother = 
  smootherJIPDA with properties:

                      SmootherIndex: 0
                        AnalysisFcn: ''
            FilterInitializationFcn: 'initcvekf'
                       MaxNumTracks: 100
                      MaxNumSensors: 20
                      TimeTolerance: 1.0000e-05

       DetectionAssignmentThreshold: [30 Inf]
           TrackAssignmentThreshold: 100
    MaxNumDetectionAssignmentEvents: 50
        MaxNumTrackAssignmentEvents: Inf
            InitializationThreshold: 0

               DetectionProbability: 0.9000
                     ClutterDensity: 1.0000e-06
                   NewTargetDensity: 1.0000e-05
                          DeathRate: 0.0100
              ConfirmationThreshold: 0.9500
                  DeletionThreshold: 0.1000

                  ClassFusionMethod: 'None'

Algorithms

The smootherJIPDA object goes through multiple steps to obtain the smoothed tracks. Consider a time period from time t0 to tN. In this period, the smoother is provided with detections at each k-th step, where k = 0, 1, …, N.

JIPDA Smoother

To obtain the smoothed tracks for all the time stamps:

  1. The smoother first performs forward JIPDA tracking by using detections from t0 to tk-1 to obtain tracks at tk-1. The smoother then predicts those tracks to time tk to get forward predictions at tk.

  2. The smoother then performs backward JIPDA tracking from tN to tk+1 to obtain tracks at tk+1. The smoother also predicts those tracks backward to time tk to get backward predictions at tk.

  3. Next, for time step tk, the smoother performs JIPDA between forward predictions and backward predictions and obtain smoothing (merged) predictions at time tk. The smoother also maintains track identities when merging forward and backward predictions.

  4. Again for time step tk, the smoother performs JIPDA between the obtained smoothing predictions at tk and the detections at tk. The smoother saves the association results called smoothing data associations for later use.

  5. The smoother repeats steps 1 to 4 for all k = 0, 1, …, N.

  6. Next, the smoother updates the forward predictions to from time t0 to tk. In the process, the smoother exactly follows the smoothing data associations when associating tracks to detections.

  7. The smoother repeats step 6 for all k = 0, 1, …, N.

  8. Finally, the smoother performs Rauch-Tung-Striebel (RTS) smoothing for all the obtained tracks in the time period of [t0, tN] and outputs the smoothed tracks.

References

[1] Song, Taek Lyul, and Darko Mušicki. “Smoothing Innovations and Data Association with IPDA.” Automatica, vol. 48, no. 7, July 2012, pp. 1324–29.

[2] Kim, Tae Han, et al. “Smoothing Joint Integrated Probabilistic Data Association.” IET Radar, Sonar & Navigation, vol. 9, no. 1, Jan. 2015, pp. 62–66.

[3] Memon, Sufyan, et al. “Efficient Smoothing for Multiple Maneuvering Targets in Heavy Clutter.” 2016 International Conference on Control, Automation and Information Sciences (ICCAIS), IEEE, 2016, pp. 249–54.

Version History

Introduced in R2023a

See Also