Main Content

trackingArchitecture

Tracking system-of-system architecture

Since R2021a

Description

The trackingArchitecture System object™ enables you to systematically model the architecture of a tracking system consisting of trackers and track fusers.

To build and run a tracking architecture:

  1. Create the trackingArchitecture object and set its properties.

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

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

Creation

Description

example

ta = trackingArchitecture creates a trackingArchitecture System object that enables you to design a tracking system-of-system composed of sensors, trackers, and track fusers.

  • Use the addTracker function to add trackers to the architecture and connect the added tracker with architecture inputs.

  • Use the addTrackFuser function to add track fusers to the architecture and connect the added track fuser with trackers and architecture inputs.

  • Use the summary function to list all the trackers and fusers in the architecture and show how they are connected with architecture inputs and outputs.

  • Use the show function to visualize the architecture.

  • Use the exportToSimulink function to export the architecture to Simulink®.

Properties

expand all

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

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

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

Name of the tracking architecture, specified as a string or a character vector.

Example: "myArchitecture"

List of trackers, specified as a cell array of trackers. Each cell element is one of these tracker objects:

You can also use a customized tracker inheriting from the fusion.trackingArchitecture.Tracker class.

List of track fusers, specified as a cell array of trackFuser objects.

You can also use a customized track fuser inheriting from the fusion.trackingArchitecture.TrackFuser class.

Usage

Description

example

[tracks1,...,tracksN] = ta(detections,sourceTracks,time) runs the trackingArchitecture object, ta, and returns the confirmed tracks.

Input Arguments

expand all

Detection list, specified as an array of objectDetection objects, a cell array of objectDetection objects, or an array of structures. If specified as structures, the field names of each structure must be the same as the property names of the objectDetection object. The architecture routes a detection to the tracker whose corresponding ArchitectureInputs values in the architecture contain the SensorIndex value of the detection.

Source tracks, specified as an array of objectTrack objects or an array of structures. If specified as structures, the field names of each structure must be the same as the property names of the objectTrack object. The architecture routes a source track to the fuser whose corresponding FuserInputs values in the architecture contain the SourceIndex value of the track.

Use the SourceConfigurations property of the trackFuser to specify the input sources of the fuser.

Time of update, specified as a scalar. The architecture updates all trackers and fusers to this time. Units are in seconds.

time must be greater than or equal to the largest Time value in the arrays of detections and sourceTracks inputs. time must increase in value with each update to the architecture.

Output Arguments

expand all

Tracks from the Nth architecture output, returned as an array of objectTrack objects in MATLAB®, and returned as an array of structures in code generation. In code generation, the field names of the returned structure are the same as the property names of objectTrack. tracksN is generated from the tracker or track fuser whose corresponding ArchitectureOutput value in the architecture is equal to N.

Data Types: struct | object

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 named obj, use this syntax:

release(obj)

expand all

addTrackerAdd tracker to tracking architecture
addTrackFuserAdd track fuser to tracking architecture
summaryGenerate tabular summary of tracking architecture
showShow tracking architecture in figure
exportToSimulinkExport tracking architecture to Simulink model
stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
isLockedDetermine if System object is in use
cloneCreate duplicate System object
resetReset internal states of System object

Examples

collapse all

Create a tracking architecture.

ta = trackingArchitecture;

Create a trackerGNN object. The tracker takes detection inputs from sensors 1 and 2. Add the tracker to the tracking architecture.

tracker1 = trackerGNN('TrackerIndex',1);
addTracker(ta,tracker1,'SensorIndices',[1,2]);

Create a trackerPHD object. The tracker takes detection inputs from sensors 3 and 4. Add the tracker to the tracking architecture and disable its direct output.

tracker2 = trackerPHD('TrackerIndex',2,'SensorConfigurations',...
    {trackingSensorConfiguration(3),trackingSensorConfiguration(4)});
addTracker(ta,tracker2,'ToOutput',false); % Disable output

Create a trackFuser object. The track fuser takes track inputs from the two trackers.

fuser = trackFuser('FuserIndex',3,'SourceConfigurations',...
    {fuserSourceConfiguration(1),fuserSourceConfiguration(2)});
addTrackFuser(ta,fuser);

Display the summary of the tracking architecture.

sum = summary(ta)
sum=3×4 table
         System          ArchitectureInputs       FuserInputs        ArchitectureOutput
    _________________    __________________    __________________    __________________

    {'T1:trackerGNN'}        {'1  2'  }        {'Not applicable'}       {[       1]}   
    {'T2:trackerPHD'}        {'3  4'  }        {'Not applicable'}       {0x0 double}   
    {'F3:trackFuser'}        {0x0 char}        {'1  2'          }       {[       2]}   

Show the tracking architecture.

show(ta)

This architecture has two trackers:

  • Tracker 1: a trackerGNN that receives detections from sensors 1 and 2.

  • Tracker 2: a trackerJPDA that receives detections from sensor 3.

Both trackers pass tracks to a trackFuser that also receives tracks directly from a tracking sensor 4.

Create a trackingArchitecure object. Add two trackers with the specified sensor indices.

ta = trackingArchitecture; 
addTracker(ta,trackerGNN('TrackerIndex',1),'SensorIndices',[1 2]);
addTracker(ta,trackerJPDA('TrackerIndex',2),'SensorIndices',3);

Create a trackFuser. Specify its sources using the SourceConfigurations property. Add the fuser to the tracking architecture.

fuser = trackFuser('FuserIndex',3,'MaxNumSources',3, ...
     'SourceConfigurations',{fuserSourceConfiguration(1); ...
     fuserSourceConfiguration(2); fuserSourceConfiguration(4)});
addTrackFuser(ta,fuser);

Review the architecture summary.

disp(summary(ta))
          System          ArchitectureInputs       FuserInputs        ArchitectureOutput
    __________________    __________________    __________________    __________________

    {'T1:trackerGNN' }         {'1  2'}         {'Not applicable'}            1         
    {'T2:trackerJPDA'}         {'3'   }         {'Not applicable'}            2         
    {'F3:trackFuser' }         {'4'   }         {'1  2'          }            3         

Show the architecture in a figure.

figure
show(ta)

Create a display using theaterPlot to visualize the tracks generated by the trackingArchitecture later.

figure
ax1 = subplot(3,1,1);
p1 = theaterPlot('Parent',ax1,'XLimits',[-100 150],'YLimits',[-5 15]);
view(2) 
title('GNN tracks')
t1 = trackPlotter(p1,'ConnectHistory','on','ColorizeHistory','on','DisplayName','Tracks');

ax2 =subplot(3,1,2);
p2 = theaterPlot('Parent',ax2,'XLimits',[-100 150],'YLimits',[-5 15]);
t2 = trackPlotter(p2,'ConnectHistory','on','ColorizeHistory','on','DisplayName','Tracks');
view(2)
title('JPDA tracks')

ax3 =subplot(3,1,3);
p3 = theaterPlot('Parent',ax3,'XLimits',[-100 150],'YLimits',[-5 15]);
t3 = trackPlotter(p3,'ConnectHistory','on','ColorizeHistory','on','DisplayName','Tracks');
view(2)
title('Fused tracks')

Load sample data into the workspace, then running it through the tracking architecture.

load('archInputs','detections','tracks');
positionSelector = [1 0 0 0 0 0; 0 0 1 0 0 0;0 0 0 0 1 0];
for i = 1:numel(detections)
    [gnnTrks,jpdaTrks,fusedTrks] = ta(detections{i},tracks{i},i);
    plotTrack(t1, getTrackPositions(gnnTrks,positionSelector),string([gnnTrks.TrackID]));
    plotTrack(t2, getTrackPositions(jpdaTrks,positionSelector),string([jpdaTrks.TrackID]));
    plotTrack(t3, getTrackPositions(fusedTrks,positionSelector),string([fusedTrks.TrackID]));
end

Version History

Introduced in R2021a