Main Content

trackerJPDA

Joint probabilistic data association tracker

Description

ThetrackerJPDASystem object™ is a tracker capable of processing detections of multiple targets from multiple sensors. The tracker uses joint probabilistic data association to assign detections to each track. The tracker applies a soft assignment where multiple detections can contribute to each track. The tracker initializes, confirms, corrects, predicts (performs coasting), and deletes tracks. Inputs to the tracker are detection reports generated byobjectDetection,fusionRadarSensor,irSensor, orsonarSensorobjects. The tracker estimates the state vector and state estimate error covariance matrix for each track. Each detection is assigned to at least one track. If the detection cannot be assigned to any existing track, the tracker creates a new track.

Any new track starts in atentativestate. If enough detections are assigned to a tentative track, its status changes toconfirmed(see theConfirmationThresholdproperty). If the detection already has a known classification (i.e., theObjectClassIDfield of the returned track is nonzero), that corresponding track is confirmed immediately. When a track is confirmed, the tracker considers the track to represent a physical object. If detections are not assigned to the track within a specifiable number of updates, the track is deleted.

You can enable different JPDA tracking modes by specifying theTrackLogicandMaxNumEventsproperties.

  • Setting theTrackLogicproperty to'Integrated'to enable the joint integrated data association (JIPDA) tracker, in which track confirmation and deletion is based on the probability of track existence.

  • Setting theMaxNumEventsproperty to a finite integer to enable the k-best joint integrated data association (k-best JPDA) tracker, which generates a maximum of k events per cluster.

To track targets using this object:

  1. Create thetrackerJPDAobject and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, seeWhat Are System Objects?

Creation

Description

tracker= trackerJPDAcreates atrackerJPDASystem object with default property values.

example

tracker= trackerJPDA(Name,Value)sets properties for the tracker using one or more name-value pairs. For example,trackerJPDA('FilterInitializationFcn',@initcvukf,'MaxNumTracks',100)creates a multi-object tracker that uses a constant-velocity, unscented Kalman filter and allows a maximum of 100 tracks. Enclose each property name in quotes.

Properties

expand all

Unless otherwise indicated, properties arenontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and thereleasefunction unlocks them.

If a property istunable, you can change its value at any time.

For more information on changing property values, seeSystem Design in MATLAB Using System Objects.

Unique tracker identifier, specified as a nonnegative integer. This property is used as theSourceIndexin the tracker outputs, and distinguishes tracks that come from different trackers in a multiple-tracker system. You must specify this property as a positive integer to use the track outputs as inputs to a track fuser.

Example:1

Filter initialization function, specified as a function handle or as a character vector containing the name of a valid filter initialization function. The tracker uses a filter initialization function when creating new tracks.

Sensor Fusion and Tracking Toolbox™ supplies many initialization functions that you can use to specifyFilterInitializationFcnfor atrackerJPDAobject.

Initialization Function Function Definition
initcvkf Initialize constant-velocity linear Kalman filter.
initcakf Initialize constant-acceleration linear Kalman filter.
initcvabf Initialize constant-velocity alpha-beta filter
initcaabf Initialize constant-acceleration alpha-beta filter
initcvekf Initialize constant-velocity extended Kalman filter.
initcaekf Initialize constant-acceleration extended Kalman filter.
initrpekf Initialize constant-velocity range-parametrized extended Kalman filter.
initapekf Initialize constant-velocity angle-parametrized extended Kalman filter.
initctekf Initialize constant-turn-rate extended Kalman filter.
initcackf Initialize constant-acceleration cubature filter.
initctckf Initialize constant-turn-rate cubature filter.
initcvckf Initialize constant-velocity cubature filter.
initcvukf Initialize constant-velocity unscented Kalman filter.
initcaukf Initialize constant-acceleration unscented Kalman filter.
initctukf Initialize constant-turn-rate unscented Kalman filter.
initcvmscekf Initialize constant-velocity extended Kalman filter in modified spherical coordinates.
initekfimm Initialize tracking IMM 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 byobjectDetection. The output of this function must be a filter object:trackingKF,trackingEKF,trackingUKF,trackingCKF,trackingGSF,trackingIMM,trackingMSCEKF, ortrackingABF.

For guidance in writing this function, use thetypecommand to examine the details of built-in MATLAB®functions. For example:

typeinitcvekf

Note

trackerJPDAdoes 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 theInitializationsection ofEstimation Filters.

Data Types:function_handle|char

Value of k for k-best JPDA, specified as a positive integer. This property defines the maximum number of feasible joint events for the track and detection association of each cluster. Setting this property to a finite value enables you to run a k-best JPDA tracker, which generates a maximum of k events per cluster.

Data Types:single|double

Feasible joint events generation function, specified as a function handle or as a character vector containing the name of a feasible joint events generation function. A generation function generates feasible joint event matrices from admissible events (usually given by a validation matrix or a likelihood matrix) of a scenario. For details, seejpadEvents.

You can also write your own generation function.

  • If theMaxNumEventsproperty is set toInf, the function must have the following syntax:

    FJE = myfunction (ValidationMatrix)
    The input and out of this function must exactly follow the formats used injpdaEvents.

  • If theMaxNumEventsproperty is set to a finite value, the function must have the following syntax:

    (FJE,FJEProbs] = myfunction(likelihoodMatrix,k)
    The input and out of this function must exactly follow the formats used injpdaEvents.

For guidance in writing this function, use thetypecommand to examine the details ofjpdaEvents:

typejpdaEvents

Example:@myfunctionor'myfunction'

Data Types:function_handle|char

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

Data Types:single|double

Maximum number of sensors that can be connected to the tracker, specified as a positive integer.MaxNumSensorsmust be greater than or equal to the largest value ofSensorIndexfound in all the detections used to update the tracker.SensorIndexis a property of anobjectDetectionobject. TheMaxNumSensorsproperty determines how many sets ofObjectAttributeseach track can have.

Data Types:single|double

Maximum number of detections that the tracker can take as inputs, specified as a positive integer.

Data Types:single|double

Handling of out-of-sequence measurement (OOSM), specified as'Terminate','Neglect', or'Retrodiction'. Each detection has an associated timestamp,td, and the tracker has its own timestamp,tt, which is updated in each call to the tracker. The tracker considers a measurement as an OOSM iftd<tt.

When you specify this property as:

  • 'Terminate'— The tracker stops running when it encounters an out-of-sequence measurement.

  • 'Neglect'— The tracker neglects any out-of-sequence measurements and continues to run.

  • 'Retrodiction'— The tracker uses a retrodiction algorithm to update the tracker by either neglecting the OOSMs, updating existing tracks, or creating new tracks using the OOSM. You must specify a filter initialization function that returns atrackingKF,trackingEKF, ortrackingIMMobject in theFilterInitializationFcnproperty.

If you specify this property as'Retrodiction', the tracker follows these steps to handle the OOSMs:

  • If the OOSM timestamp is beyond the oldest correction timestamp (specified by theMaxNumOOSMStepsproperty) maintained by the tracker, the tracker discards the OOSMs.

  • If the OOSM timestamp is within the oldest correction timestamp maintained by the tracker, the tracker first retrodicts all the existing tracks to the time of the OOSMs. Then, the tracker applies the joint probability data association algorithm to try to associate the OOSMs to the retrodicted tracks.

    • If the tracker successfully associates the OOSM to at least one of the retrodicted tracks, then the tracker updates the associated, retrodicted tracks using the OOSMs by applying the retro-correction algorithm to obtain current, corrected tracks.

    • If the tracker cannot associate an OOSM to any retrodicted track, then the tracker creates a new track based on the OOSM and predicts the track to the current time.

For more details on JPDA-based retrodiction, seeJPDA-Based Retrodiction and Retro-Correction.To simulate out-of-sequence detections, useobjectDetectionDelay.

Note

  • When you select'Retrodiction', you cannot use thecostMatrixinput.

  • The benefits of using retrodiction decreases as the number of targets that move in close proximity increases.

  • The tracker requires all input detections that share the sameSensorIndexhave theirTimedifferences bounded by theTimeToleranceproperty. Therefore, when you set theOOSMHandlingproperty to'Neglect', you must make sure that the out-of-sequence detections have timestamps strictly less than the previous timestamp when running the tracker.

Tunable:Yes

Maximum number of out-of-sequence measurement (OOSM) steps, specified as a positive integer.

Increasing the value of this property requires more memory, but enables you to call the tracker with OOSMs that have a larger lag relative to the last timestamp. However, as the lag increases, the impact of the OOSM on the current state of the track diminishes. The recommended value for this property is3.

Dependencies

To enable this argument, set theOOSMHandlingproperty to'Retrodiction'.

Parameters of the track state reference frame, specified as a structure or a structure array. The tracker passes itsStateParametersproperty values to theStateParametersproperty of the generated tracks. You can use these parameters to define the reference frame in which the track is reported or other desirable attributes of the generated tracks.

For example, you can use the following structure to define a rectangular reference frame whose origin position is at(10 10 0]meters and whose origin velocity is [2 -2 0] meters per second with respect to the scenario frame.

Field Name Value
Frame "Rectangular"
Position (10 10 0]
Velocity (2 -2 0]

Tunable:Yes

Data Types:struct

Detection assignment threshold (or gating threshold), specified as a positive scalar or 1-by-2 vector of [C1,C2], whereC1C2. If specified as a scalar, the specified value,val, is expanded to [val,Inf].

Initially, the tracker executes a coarse estimation for the normalized distance between all the tracks and detections. The tracker only calculates the accurate normalized distance for the combinations whose coarse normalized distance is less thanC2. Also, the tracker can only assign a detection to a track if the accurate normalized distance between them is less thanC1. See thedistancefunction used with tracking filters (such astrackingCKFandtrackingEKF) for explanation of the distance calculation.

  • Increase the value ofC2if 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 ofC1if 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 ofC2is finite, the state transition function and measurement function, specified in the tracking filter used in the tracker, must be able to take anM-by-Nmatrix of states as input and outputNpredicted states andNmeasurements, respectively.Mis the size of the state.N, the number of states, is an arbitrary nonnegative integer.

Probability of detection, specified as a scalar in the range [0,1]. This property is used in calculations of 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

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 thanInitializationThreshold, the detection will be used 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

Confirmation and deletion logic type, specified as:

  • 'History'– Track confirmation and deletion is based on the number of times the track has been assigned to a detection in the latest tracker updates.

  • 'Integrated'– Track confirmation and deletion is based on the probability of track existence, which is integrated in the assignment function. Selecting this value enables the joint integrated data association (JIPDA) tracker.

阈值进行跟踪确认,指定为一个年代calar or a 1-by-2 vector. The threshold depends on the type of track confirmation and deletion logic you set with theTrackLogicproperty:

  • 'History'– Specify the confirmation threshold as 1-by-2 vector [MN]. A track is confirmed if it recorded at leastMhits in the lastNupdates. ThetrackerJPDAregisters a hit on a track’s history logic according to theHitMissThrehold. The default value is(2 3].

  • 'Integrated'– Specify the confirmation threshold as a scalar. A track is confirmed if its probability of existence is greater than or equal to the confirmation threshold. The default value is0.95.

Data Types:single|double

Threshold for track deletion, specified as a scalar or a real-valued 1-by-2 vector. The threshold depends on the type of track confirmation and deletion logic you set with theTrackLogicproperty:

  • 'History'– Specify the confirmation threshold as [PR]. If, inPof the lastRtracker updates, a confirmed track is not assigned to any detection that has a likelihood greater than theHitMissThresholdproperty, then that track is deleted. The default value is(5,5].

  • 'Integrated'– Specify the deletion threshold as a scalar. A track is deleted if its probability of existence drops below the threshold. The default value is0.1.

Example:0.2or(5,6]

Data Types:single|double

Threshold for registering a hit or miss, specified as a scalar in the range [0,1]. The track history logic will register a miss and the track will be coasted if the sum of the marginal probabilities of assignments is below theHitMissThreshold. Otherwise, the track history logic will register a hit.

Example:0.3

Dependencies

To enable this argument, set theTrackLogicproperty to'History'.

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. WhenTrackLogicis set to'Integrated',ClutterDensityis also used in calculating the initial probability of track existence.

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. It is used in calculating the probability of track existence during track initialization.

Example:1e-3

Dependencies

To enable this argument, set theTrackLogicproperty to'Integrated'.

Data Types:single|double

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

P T E ( t + δ t ) = ( 1 D e a t h R a t e ) δ t P T E ( t )

whereδt上次更新的时间间隔是蒂姆et.

Dependencies

To enable this argument, set theTrackLogicproperty to'Integrated'.

Data Types:single|double

This property is read-only.

Initial probability of track existence, specified as a scalar in the range [0,1] and calculated asInitialExistenceProbability = NewTargetDensity*DetectionProbability/(ClutterDensity + NewTargetDensity*DetectionProbability).

Dependencies

To enable this property, set theTrackLogicproperty to'Integrated'. When theTrackLogicproperty is set to'History', this property is not available.

Data Types:single|double

Enable a cost matrix, specified asfalseortrue. Iftrue, you can provide an assignment cost matrix as an input argument when calling the object.

Data Types:logical

使检测到的输入追踪id在每个object update, specified asfalseortrue. Set this property totrueif you want to provide a list of detectable track IDs. This list informs the tracker of all tracks that the sensors are expected to detect and, optionally, the probability of detection for each track.

Data Types:logical

This property is read-only.

Number of tracks maintained by the tracker, returned as a nonnegative integer.

Data Types:single|double

This property is read-only.

Number of confirmed tracks, returned as a nonnegative integer. If theIsConfirmedfield of an output track structure istrue, the track is confirmed.

Data Types:single|double

Absolute time tolerance between detections for the same sensor, specified as a positive scalar. Ideally,trackerJPDAexpects detections from a sensor to have identical time stamps. However, if the time stamps differences between detections of a sensor are within the margin specified byTimeTolerance, these detections will be used to update the track estimate based on the average time of these detections.

Data Types:double

Enable memory management properties, specified as a logical1(true) orfalse(0). Setting this property totrueenables you to use these four properties to specify bounds for certain variable-sized arrays in the tracker, as well as determine how the tracker handles cluster-size violations:

  • MaxNumDetectionsPerSensor

  • MaxNumDetectionsPerCluster

  • MaxNumTracksPerCluster

  • ClusterViolationHandling

Specifying bounds for variable-sized arrays enables you to manage the memory footprint of the tracker in the generated C/C++ code.

Data Types:logical

Maximum number of detections per sensor, specified as a positive integer. This property determines the maximum number of detections that each sensor can pass to the tracker during each call of the tracker.

Set this property to a finite value if you want the tracker to establish efficient bounds on local variables for C/C++ code generation. Set this property toInfif you do not want to bound the maximum number of detections per sensor.

Dependencies

To enable this property, set theEnableMemoryManagementproperty totrue.

Data Types:single|double

Maximum number of detections per cluster during the run-time of the tracker, specified as a positive integer.

Setting this property to a finite value allows the tracker to bound cluster sizes and reduces the memory footprint of the tracker in generated C/C++ code. Set this property toInfif you do not want to bound the maximum number of detections per cluster.

If, during run-time, the number of detections in a cluster exceeds the specifiedMaxNumDetectionsPerCluster, the tracker reacts based on theClusterViolationHandlingproperty.

Dependencies

To enable this property, set theEnableMemoryManagementproperty totrue.

Data Types:single|double

Maximum number of tracks per cluster during the run-time of the tracker, specified as a positive integer.

Setting this property to a finite value enables the tracker to bound cluster sizes and reduces the memory footprint of the tracker in generated C/C++ code. Set this property toInfif you do not want to bound the maximum number of tracks per cluster.

If, during run-time, the number of tracks in a cluster exceeds the specifiedMaxNumTracksPerCluster, the tracker reacts based on theClusterViolationHandlingproperty.

Dependencies

To enable this argument, set theEnableMemoryManagementproperty totrue.

Data Types:single|double

Handling of run-time violation of cluster bounds, specified as:

  • 'Teminate'— The tracker reports an error if, during run-time, any cluster violates the cluster bounds specified in theMaxNumDetectionsPerClusterandMaxNumTracksPerClusterproperties.

  • 'Split and warn'— The tracker splits the size-violating cluster into smaller clusters using a suboptimal approach. The tracker also reports a warning to indicate the violation.

  • 'Split'— The tracker splits the size-violating cluster into smaller clusters by using a suboptimal approach. The tracker does not report a warning.

In the suboptimal approach, the tracker separates out detections or tacks that have the smallest likelihood of association to other tracks or detections until the cluster bounds are satisfied. These separated-out detections or tracks can form one or many new clusters depends on their association likelihoods with each other and theAssignmentThresholdproperty.

Dependencies

To enable this property, set theEnableMemoryManagementproperty totrue.

Data Types:char|string

Usage

To process detections and update tracks, call the tracker with arguments, as if it were a function (described here).

Description

confirmedTracks= tracker(detections,time)returns a list of confirmed tracks that are updated from a list of detections at the update time. Confirmed tracks are corrected and predicted to the update time,time.

confirmedTracks= tracker(detections,time,costMatrix)also specifies a cost matrix.

To enable this syntax, set theHasCostMatrixInputproperty totrue.

confirmedTracks= tracker(___,detectableTrackIDs)also specifies a list of expected detectable tracks given bydetectableTrackIDs. This argument can be used with any of the previous input syntaxes.

To enable this syntax, set theHasDetectableTrackIDsInputproperty totrue.

(confirmedTracks,tentativeTracks,allTracks] = tracker(___)also returns a list of tentative tracks and a list of all tracks. You can use any of the input arguments in the previous syntaxes.

(confirmedTracks,tentativeTracks,allTracks,analysisInformation] = tracker(___)also returns analysis information that can be used for track analysis. You can use any of the input arguments in the previous syntaxes.

Input Arguments

expand all

Detection list, specified as a cell array ofobjectDetectionobjects. TheTimeproperty value of eachobjectDetectionobject must be less than or equal to the current update time,time, and greater than the previous time value used to update the tracker. Also, theTimedifferences between differentobjectDetectionobjects in the cell array do not need to be equal.

Time of update, specified as a scalar. The tracker updates all tracks to this time. Units are in seconds.

timemust be greater than or equal to the largestTimeproperty value of theobjectDetectionobjects in the inputdetectionslist.timemust increase in value with each update to the tracker.

Data Types:single|double

Cost matrix, specified as a real-valuedM-by-Nmatrix, whereMis the number of existing tracks in the previous update, andNis the number of current detections. The cost matrix rows must be in the same order as the list of tracks, and the columns must be in the same order as the list of detections. Obtain the correct order of the list of tracks from the third output argument,allTracks, when the tracker is updated.

在第一次更新的tracker or when the tracker has no previous tracks, specify the cost matrix to be empty with a size of(0,numDetections]. Note that the cost must be given so that lower costs indicate a higher likelihood of assigning a detection to a track. To prevent certain detections from being assigned to certain tracks, you can set the appropriate cost matrix entry toInf.

Dependencies

To enable this argument, set theHasCostMatrixInputproperty totrue.

Data Types:double|single

Detectable track IDs, specified as a real-valuedM-by-1 vector orM-by-2 matrix. Detectable tracks are tracks that the sensors expect to detect. The first column of the matrix contains a list of track IDs that the sensors report as detectable. The optional second column allows you to add the detection probability for each track.

Tracks whose identifiers are not included indetectableTrackIDsare considered undetectable. In this case, the track deletion logic does not count the lack of detection for that track as a missed detection for track deletion purposes.

Dependencies

To enable this input argument, set thedetectableTrackIDsproperty totrue.

Data Types:single|double

Output Arguments

expand all

Confirmed tracks, returned as an array ofobjectTrackobjects in MATLAB, and returned as an array of structures in code generation. In code generation, the field names of the returned structure are same with the property names ofobjectTrack.

A track is confirmed if it satisfies the confirmation threshold specified in theConfirmationThresholdproperty. In that case, theIsConfirmedproperty of the object or field of the structure istrue.

Data Types:struct|object

Tentative tracks, returned as an array ofobjectTrackobjects in MATLAB, and returned as an array of structures in code generation. In code generation, the field names of the returned structure are same with the property names ofobjectTrack.

A track is tentative if it does not satisfy the confirmation threshold specified in theConfirmationThresholdproperty. In that case, theIsConfirmedproperty of the object or field of the structure isfalse.

Data Types:struct|object

All tracks, returned as an array ofobjectTrackobjects in MATLAB, and returned as an array of structures in code generation. In code generation, the field names of the returned structure are same with the property names ofobjectTrack. All tracks consists of confirmed and tentative tracks.

Data Types:struct|object

Additional information for analyzing track updates, returned as a structure. The fields of this structure are:

Field Description
OOSMDetectionIndices

Indices of out-of-sequence measurements at the current step of the tracker

TrackIDsAtStepBeginning

Track IDs when step began.

CostMatrix

Cost matrix for assignment.

UnassignedTracks

IDs of unassigned tracks.

UnassignedDetections

Indices of unassigned detections in thedetectionsinput.

Clusters

Cell array of cluster reports.

InitiatedTrackIDs

IDs of tracks initiated during the step.

DeletedTrackIDs

IDs of tracks deleted during the step.

TrackIDsAtStepEnd

Track IDs when the step ended.

MaxNumDetectionsPerCluster The maximum number of detections in all the clusters generated during the step. The structure has this field only when you set theEnableMemoryManagementproperty to'on'.
MaxNumTracksPerCluster The maximum number of tracks in all the clusters generated during the step. The structure has this field only when you set theEnableMemoryManagementproperty to'on'.
OOSMHandling

Analysis information for out-of-sequence measurements handling, returned as a structure. The structure returns this field only when theOOSMHandlingproperty of the tracker is specified as'Retrodiction'.

TheClustersfield can include multiple cluster reports. Each cluster report is a structure containing:

Field Description
DetectionIndices

Indices of clustered detections.

TrackIDs

Track IDs of clustered tracks.

ValidationMatrix Validation matrix of the cluster. SeejpadEventsfor more details.
SensorIndex

Index of the originating sensor of the clustered detections.

TimeStamp Mean time stamp of clustered detections.
MarginalProbabilities Matrix of marginal posterior joint association probabilities.

TheOOSMHandlingstructure contains these fields:

Field Description
DiscardedDetections Indices of discarded out-of-sequence detections. An OOSM is discarded if it is not covered by the saved state history specified by theMaxNumOOSMStepsproperty.
CostMatrix

assignm成本ent matrix for the out-of-sequence detections.

Clusters

Clusters that are only related to the out-of-sequence detections.

UnassignedDetections Indices of unassigned out-of-sequence detections. The tracker creates new tracks for unassigned out-of-sequence detections.

Data Types:struct

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object namedobj, use this syntax:

release(obj)

expand all

predictTracksToTime Predict track state
getTrackFilterProperties Obtain track filter properties
setTrackFilterProperties Set track filter properties
initializeTrack Initialize new track
deleteTrack Delete existing track
exportToSimulink Export tracker or track fuser to Simulink model
step RunSystem objectalgorithm
release Release resources and allow changes toSystem objectproperty values and input characteristics
isLocked Determine ifSystem objectis in use
clone Create duplicateSystem object
reset Reset internal states ofSystem object

Examples

collapse all

Construct atrackerJPDAobject with a default constant velocity Extended Kalman Filter and 'History' track logic. SetAssignmentThreshold100允许共同跟踪相关。

tracker = trackerJPDA('TrackLogic','History','AssignmentThreshold', 100,...'ConfirmationThreshold', [4 5],...'DeletionThreshold', [10 10]);

Specify the true initial positions and velocities of the two objects.

pos_true = [0 0 ; 40 -40 ; 0 0]; V_true = 5*[cosd(-30) cosd(30) ; sind(-30) sind(30) ;0 0];

Create a theater plot to visualize tracks and detections.

tp = theaterPlot('XLimits',[-1 150],'YLimits',[-50 50]); trackP = trackPlotter(tp,'DisplayName','Tracks','MarkerFaceColor','g','HistoryDepth',0); detectionP = detectionPlotter(tp,'DisplayName','Detections','MarkerFaceColor','r');

Figure contains an axes object. The axes object contains 2 objects of type line. These objects represent Tracks, Detections.

To obtain the position and velocity, create position and velocity selectors.

positionSelector = [1 0 0 0 0 0; 0 0 1 0 0 0; 0 0 0 0 0 0];% [x, y, 0]velocitySelector = [0 1 0 0 0 0; 0 0 0 1 0 0; 0 0 0 0 0 0 ];% [vx, vy, 0]

Update the tracker with detections, display cost and marginal probability of association information, and visualize tracks with detections.

dt = 0.2;fortime = 0:dt:30% Update the true positions of objects.pos_true = pos_true + V_true*dt;% Create detections of the two objects with noise.detection(1) = objectDetection(time,pos_true(:,1)+1*randn(3,1)); detection(2) = objectDetection(time,pos_true(:,2)+1*randn(3,1));% Step the tracker through time with the detections.(confirmed,tentative,alltracks,info] = tracker(detection,time);% Extract position, velocity and label info.(pos,cov] = getTrackPositions(confirmed,positionSelector); vel = getTrackVelocities(confirmed,velocitySelector); meas = cat(2,detection.Measurement); measCov = cat(3,detection.MeasurementNoise);% Update the plot if there are any tracks.ifnumel(confirmed)>0 labels = arrayfun(@(x)num2str([x.TrackID]),confirmed,'UniformOutput'、假);trackP.plotTrack (pos、或者、浸、标签);enddetectionP.plotDetection(meas',measCov); drawnow;% Display the cost and marginal probability of distribution every eight% seconds.if时间> 0 & & mod(时间,8)= = 0 disp (['At time t = 'num2str(time)' seconds,']);disp('The cost of assignment was: ') disp(info.CostMatrix); disp(['Number of clusters: 'num2str(numel(info.Clusters))]);ifnumel(info.Clusters) == 1 disp('The two tracks were in the same cluster.') disp('Marginal probabilities of association:') disp(info.Clusters{1}.MarginalProbabilities)enddisp('-----------------------------')endend
At time t = 8 seconds,
The cost of assignment was:
1.0 e + 03 * 0.0020 1.1523 1.22770.0053
Number of clusters: 2
-----------------------------
At time t = 16 seconds,
The cost of assignment was:
1.3968 4.5123 2.0747 1.9558
Number of clusters: 1
The two tracks were in the same cluster.
Marginal probabilities of association:
0.8344 0.1656 0.1656 0.8344 0.0000 0.0000
-----------------------------
At time t = 24 seconds,
The cost of assignment was:
1.0e+03 * 0.0018 1.2962 1.2664 0.0013
Number of clusters: 2
-----------------------------

Figure contains an axes object. The axes object contains 6 objects of type line, patch, text. These objects represent Tracks, Detections.

Algorithms

expand all

References

(1] Fortmann, T., Y. Bar-Shalom, and M. Scheffe. "Sonar Tracking of Multiple Targets Using Joint Probabilistic Data Association."IEEE Journal of Ocean Engineering.Vol. 8, Number 3, 1983, pp. 173-184.

(2] Musicki, D., and R. Evans. "Joint Integrated Probabilistic Data Association: JIPDA."IEEE transactions on Aerospace and Electronic Systems .Vol. 40, Number 3, 2004, pp 1093-1099.

Extended Capabilities

Version History

Introduced in R2019a