Main Content

Track-To-Track Fuser

Track-to-Track Fusion

Since R2021a

  • Track-to-Track-Fuser

Libraries:
Sensor Fusion and Tracking Toolbox / Multi-Object Tracking Algorithms

Description

The Track-to-Track Fuser Simulink® block is a multi-source, multi-object, track-level fuser that uses the global nearest neighbor (GNN) association to maintain a single hypothesis about the tracks it fuses. The inputs to the block are tracks from sources that already track multiple objects, like multi-object tracker blocks or other track-to-track fuser blocks. The input tracks are called source or local tracks, whereas the tracks maintained in the fuser are called central tracks.

Examples

Ports

Input

expand all

Track list, specified as a Simulink bus containing a MATLAB structure. The structure has the form:

FieldDescription
NumTracksNumber of tracks
TracksArray of track structures

The fields of the track structure are shown in Track Structure.

Track update time, specified as a real scalar in seconds. The fuser updates all tracks to this time. The update time must increase with each invocation of the block. The update time must be at least as large as the largest UpdateTime specified in the Tracks input port.

If this port is not enabled, the simulation clock managed by Simulink determines the update time.

Dependencies

To enable this port, on the Port Setting tab, set Prediction time source to Input port.

Source configuration list, specified as a Simulink bus containing a MATLAB structure. The structure has the form:

FieldDescription
NumConfigurationsNumber of non-default source configurations. The field value must be less than the value specified in the Maximum number of source configurations parameter.
ConfigurationsArray of source configuration structures.

The fields of the source configuration structure are:

Field NameDescription
SourceIndexUnique index for the source system, specified as a positive integer.
IsInternalSourceIndicate if the source is internal to the fuser, specified as true or false. An internal source is a source that the fuser directly fuses tracks from even if the tracks are not self reported. For example, if the fuser is at the vehicle level, a tracking radar installed on the associated vehicle is considered internal, while another vehicle that reports fused tracks is considered external.
IsInitializingCentralTracksIndicate if the source can initialize a central track in the fuser, specified as true or false. A central track is a track maintained in the fuser.
LocalToCentralTransformFcnFunction to transform a track from local to central state space, specified as a string or character vector containing the name of the transform function.
CentralToLocalTransformFcnFunction to transform a track from central to local state space, specified as a string or character vector containing the name of the transform function.

Dependencies

To enable this port, on the Fuser Management tab, select the Update source configurations with time parameter.

Track state parameters, specified as a Simulink bus containing a MATLAB structure. The structure has the form:

FieldDescription
NumParametersNumber of non-default state parameters, specified as a nonnegative integer
ParametersArray of state parameter structures

The block uses the value of the Parameters field for the StateParameters field 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 NameValue
Frame"Rectangular"
Position[10 10 0]
Velocity[2 -2 0]

Dependencies

To enable this port, in the Tracker Configuration tab, select the Update track state parameters with time parameter.

Output

expand all

Confirmed tracks, returned as a Simulink bus containing a MATLAB structure. The structure has the form:

FieldDescription
NumTracksNumber of tracks.
TracksArray of track structures of a length set by the Maximum number of central tracks parameter. Only the first NumTracks of these are actual tracks.

The fields of the track structure are shown in Track Structure.

A track is confirmed if it satisfies the threshold specified in the Confirmation threshold parameter on the Tracks tab.

Tentative tracks, returned as a Simulink bus containing a MATLAB structure. A track is tentative before it is confirmed.

The structure has the form:

FieldDescription
NumTracksNumber of tracks.
TracksArray of track structures of a length set by the Maximum number of central tracks parameter. Only the first NumTracks of these are actual tracks.

The fields of the track structure are shown in Track Structure.

Dependencies

To enable this port, on the Port Setting tab, select Enable tentative tracks output.

Combined list of confirmed and tentative tracks, returned as a Simulink bus containing a MATLAB structure.

The structure has the form:

FieldDescription
NumTracksNumber of tracks.
TracksArray of track structures of a length set by the Maximum number of central tracks parameter. Only the first NumTracks of these are actual tracks.

The fields of the track structure are shown in Track Structure.

Dependencies

To enable this port, on the Port Setting tab, select Enable all tracks output.

Additional information for analyzing track updates, returned as a Simulink bus containing a MATLAB structure.

This table shows the fields of the info structure:

FieldDescription
BranchIDsAtStepBeginning

Branch IDs when the update began.

CostMatrix

Cost of assignment matrix.

Assignments

Assignments returned from the assignTOMHT function.

UnassignedTracks

IDs of unassigned branches returned from the tracker.

UnassignedDetections

IDs of unassigned detections returned from the tracker.

InitialBranchHistory

Branch history after branching and before pruning.

InitialBranchScores

Branch scores before pruning.

KeptBranchHistory

Branch history after initial pruning.

KeptBranchScores

Branch scores after initial pruning.

Clusters

Logical array mapping branches to clusters. Branches belong in the same cluster if they share detections in their history or belong to the same track either directly or through other branches.

TrackIncompatibility

Branch incompatibility matrix. The (i,j) element is true if the i-th and j-th branches have shared detections in their history or belong to the same track.

GlobalHypotheses

Logical matrix mapping branches to global hypotheses. Compatible branches can belong in the same hypotheses.

GlobalHypScoresTotal score of global hypotheses.
PrunedBranches

Logical array of branches that the pruneTrackBranches function determines to prune.

GlobalBranchProbabilities

Global probability of each branch existing in the global hypotheses.

BranchesDeletedByPruning

Branches deleted by the tracker.

BranchIDsAtStepEnd

Branch IDs when the update ended.

Dependencies

To enable this port, on the Port Setting tab, select Enable information output.

Parameters

expand all

Fuser Management

Unique index for the fuser, specified as a positive integer. Use this property to distinguish different fusers in a multiple-fuser environment.

Example: 2

Assignment algorithm, specified as MatchPairs, Munkres, Jonker-Volgenant, Auction, or Custom. Munkres is the only assignment algorithm that guarantees an optimal solution, but it is also the slowest, especially for large numbers of detections and tracks. The other algorithms do not guarantee an optimal solution but can be faster for problems with 20 or more tracks and detections. Use Custom to define your own assignment function and specify its name in the Name of 'Custom' assignment function parameter.

Data Types: char

Name of 'Custom' assignment function, specified as a function name. An assignment function must have the following syntax:

 [assignments,unassignedCentral,unassignedLocal] = myfun(cost,costNonAssignment)
For an example of an assignment function and a description of its arguments, see assignmunkres.

Example: myfun

Dependencies

To enable this property, set the Assignment algorithm name parameter to Custom.

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

Initially, the fuser executes a coarse estimation for the normalized distance between all the source and central tracks. The fuser only calculates the accurate normalized distance for the source and central combinations whose coarse normalized distance is less than C2. Also, the fuser can only assign a local track to a central track if their accurate normalized distance is less than C1. See Algorithms for an explanation of the normalized distance.

Tip

  • Increase the value of C2 if there are combinations of source and central tracks that should be calculated for assignment but are not. Decrease it if the calculation takes too much time.

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

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

Maximum number of source configurations that the fuser can maintain, specified as a positive integer.

Configuration of source systems, specified as an array of source configuration structures. The fields of a source configuration structure are:

Field NameDescription
SourceIndexUnique index for the source system, specified as a positive integer.
IsInternalSourceIndicate if the source is internal to the fuser, specified as true or false. An internal source is a source that the fuser directly fuses tracks from even if the tracks are not self reported. For example, if the fuser is at the vehicle level, a tracking radar installed on the associated vehicle is considered internal, while another vehicle that reports fused tracks is considered external.
IsInitializingCentralTracksIndicate if the source can initialize a central track in the fuser, specified as true or false. A central track is a track maintained in the fuser.
LocalToCentralTransformFcnFunction to transform a track from local to central state space, specified as a string or character vector containing the name of the transform function.
CentralToLocalTransformFcnFunction to transform a track from central to local state space, specified as a string or character vector containing the name of the transform function.

Select this parameter to enable the input of source configurations through the Source configurations input port.

Specify the parameters of the track state reference frame as a structure or a structure array. The block passes the value of this parameter to the StateParameters field 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 NameValue
Frame"Rectangular"
Position[10 10 0]
Velocity[2 -2 0]

You can update the track state parameters through the State Parameters input port by selecting the Update track state parameters with time parameter.

Data Types: struct

Select this parameter to enable the input port for track state parameters through the State Parameters input port.

Select a simulation type from these options:

  • Interpreted execution — Simulate the model using the MATLAB interpreter. This option shortens startup time. In Interpreted execution mode, you can debug the source code of the block.

  • Code generation — Simulate the model using generated C code. The first time you run a simulation, Simulink generates C code for the block. The C code is reused for subsequent simulations as long as the model does not change. This option requires additional startup time.

Tracks

Threshold for central track confirmation, specified as a positive integer, M, or a real-valued 1-by-2 vector of positive integers, [M N]. A central track is confirmed if it is assigned to local tracks at least M times in the last N updates. If specified as a positive integer, M, the confirmation threshold is expanded to [M M].

Threshold for central track deletion, specified as a positive integer, P, or a 1-by-2 vector of positive integers [P Q] with P Q. A central track is deleted if the track is not assigned to local tracks at least P times in the last Q updates. If specified a positive integer P, the confirmation threshold is expanded to [P P].

Central track state size, specified as a positive integer.

Central track object attributes, specified as a structure. The tracker passes the value of this parameter to the ObjectAttributes field of the track output.

State transition function, specified as a function name. This function calculates the state at time step k based on the state at time step k–1.

  • If the Enable additive process noise parameter on the Tracks tab is enabled, the function must use the following syntax:

    x(k) = f(x(k-1),dt)
    
    where:

    • x(k) — The estimated state at time k, specified as a vector or a matrix. If specified as a matrix, then each column of the matrix represents one state vector.

    • dt — The time step for prediction.

  • If the Enable additive process noise parameter on the Tracks tab is not enabled, the function must use this syntax:

    x(k) = f(x(k-1),w(k-1),dt)
    where:

    • x(k) — The estimated state at time k, specified as a vector or a matrix. If specified as a matrix, then each column of the matrix represents one state vector.

    • w(k) — The process noise at time k.

    • dt — The time step for prediction.

Example: @constacc

Jacobian of the state transition function, specified as a function name. If not specified, the Jacobian is numerically computed, which may increase processing time and numerical inaccuracy. If specified, the function must support one of these two syntaxes:

  • If the Enable additive process noise parameter on the Tracks tab is enabled, the function must use this syntax:

    Jx(k) = statejacobianfcn(x(k),dt)
    
    where:

    • x(k) — The estimated state at time k, specified as an M-by-1 vector of real values.

    • dt — The time step for prediction.

    • Jx(k) — The Jacobian of the state transition function with respect to the state, df/dx, evaluated at x(k). The Jacobian is returned as an M-by-M matrix.

  • If the Enable additive process noise parameter on the Tracks tab is not enabled, the function must use this syntax::

    [Jx(k),Jw(k)] = statejacobianfcn(x(k),w(k),dt)
    
    where:

    • x(k) — The (estimated) state at time k, specified as an M-by-1 vector of real values.

    • w(k) — The process noise at time k, specified as a W-by-1 vector of real values.

    • dt — The time step for prediction.

    • Jx(k) — The Jacobian of the state transition function with respect to the state, df/dx, evaluated at x(k). The Jacobian is returned as an M-by-M matrix.

    • Jw(k) — The Jacobian of the state transition function with respect to the process noise, df/dw, evaluated at x(k) and w(k). The Jacobian is returned as an M-by-W matrix.

Example: @constaccjac

Process noise covariance matrix, specified as a positive real scalar or a positive definite matrix.

  • When the Enable additive process noise parameter on the Tracks tab is enabled, specify the process noise covariance as a positive real scalar or a positive definite M-by-M matrix. M is the dimension of the state vector. When specified as a scalar, the matrix is an M-by-M diagonal matrix with each diagonal element equal to the scalar.

  • When the Enable additive process noise parameter on the Tracks tab is not enabled, specify the process noise covariance as a W-by-W matrix. W is the dimension of the process noise vector.

Example: [1.0 0.05; 0.05 2]

Enable additive process noise, specified as on or off. When it is on, process noise is added to the state vector. Otherwise, noise is incorporated into the state transition function.

Fusion

State fusion function, specified as one of those options:

  • Cross — Uses the cross-covariance fusion algorithm

  • Intersection — Uses the covariance intersection fusion algorithm

  • Custom — Enables you to specify a customized fusion function using the Name of 'Custom' fusion function parameter

Use the State fusion parameters source parameter to specify additional parameters used by the state fusion algorithm.

Name of custom assignment function, specified as a string or function name.

The state fusion function must support one of the following syntaxes:

[fusedState,fusedCov] = f(trackState,trackCov)
[fusedState,fusedCov] = f(trackState,trackCov,fuseParams)
where:

  • trackState is specified as an N-by-M matrix. N is the dimension of the track state, and M is the number of tracks.

  • trackCov is specified as an N-by-N-by-M matrix. N is the dimension of the track state, and M is the number of tracks.

  • fuseParams is the optional parameters defined in the State fusion parameters source parameter.

  • fusedState is returned as an N-by-1 vector.

  • fusedCov is returned as an N-by-N matrix.

Dependencies

To enable this property, set the State fusion function parameter to Custom.

State fusion parameters source, specified as one of these options:

  • Auto — The block uses the default value fusion parameters for each sate fusion algorithm. See Cross covariance factor, Optimize covariance based on, and State fusion custom algorithm parameters for more details.

  • Property — Set state fusion parameters using

    • Cross covariance factor parameter when State fusion function is selected as Cross.

    • Optimize covariance based on parameter when State fusion function is selected as Intersection.

    • State fusion custom algorithm parameters parameter when State fusion function is selected as Custom.

Cross covariance factor, specified as a scalar in the range (0,1). See fusexcov for more details.

Intersection algorithm criteria, specified as det or trace. See fusecovint for more details.

State fusion custom algorithm parameters, specified in any variable type, as long as it matches the setup of the optional fuseParams input of the custom state fusion function, specified in the Name of 'Custom' assignment function parameter.

Fuse only confirmed source tracks, specified as on or off. Set this parameter to off if you want to fuse all source tracks regardless of their confirmation status.

Fuse coasted source tracks, specified as off or on. Set this parameter to on if you want to fuse coasted source tracks. Set it to off if you want to only fuse source tracks that are not coasted.

Port Setting

Source for prediction time, specified as Input port or Auto. Select Input port to input an update time by using the Prediction Time input port. Otherwise, the simulation clock managed by Simulink determines the update time.

Select this parameter to enable the output of tentative tracks through the Tentative Tracks output port.

Select this parameter to enable the output of all the tracks through the All Tracks output port.

Select this parameter to enable the output port for analysis information through the Info output port.

Source of the output track bus name, specified as:

  • Auto — The block automatically creates an output track bus name.

  • Property — Specify the output track bus name by using the Specify an output bus name parameter.

Source of the output info bus name, specified as one of these options:

  • Auto — The block automatically creates an output info bus name.

  • Property — Specify the output info bus name by using the Fuser info bus name parameter.

Algorithms

expand all

Extended Capabilities

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

Version History

Introduced in R2021a

expand all