Main Content

Define and Test Tracking Architectures for System-of-Systems in Simulink

Since R2022a

This example shows how to define architectures for a tracking system-of-systems in MATLAB and export them to a Simulink model. You compare various tracking system designs that includes multiple detection-level multi-object trackers and track fusers in Simulink. You use Simulink Variant systems to realize different architecture solutions for your system. This example closely follows the Define and Test Tracking Architectures for System-of-Systems MATLAB example.

Introduction

The Simulate and Track En-Route Aircraft in Earth-Centered Scenarios example shows how to track aircraft using multiple long-range radars and fuse data from Automatic Dependent Surveillance Broadcast (ADS-B) transponders to get more accurate air situation picture. In the example, a tracker fuses radar detections centrally before these tracks are fused with tracks from the ADS-B reports.

The architecture described above is only one possible architecture and you may want to explore other tracking architectures. There are many factors to consider when designing a tracking architecture:

  1. Sensor outputs: Some radars output detections while other radars may track objects internally and only provide sensor tracks as outputs.

  2. Communication networks: Reporting tracks instead of detections can reduce the amount of data required to be transmitted over a communication network. Additionally, latency, physical distance, and other limitations may require a sensor to report tracks.

  3. Computational resources: Processing all the detections in a single central tracker usually requires more memory and computation resources than processing data in a distributed fashion at each tracker.

However, there are also reasons to select centralized architectures over decentralized architectures. First, centralized tracking systems can be more accurate, because all the available data is processed in one place and there are no constraints on the data being processed. In addition, the architecture is much simpler as there is only one tracker.

Centralized Air Surveillance Architecture

As a baseline, you define an architecture that follows the centralized tracking system described in the Simulate and Track En-Route Aircraft in Earth-Centered Scenarios example. You first define the same centralized trackerGNN processing all the radar detections as the example. Note that the radars update every 12 seconds and the ADS-B receiver updates every second. To accommodate the different update rates, you define the tracker inside a helperScheduledTracker object. The helperScheduledTracker class inherits from the fusion.trackingArchitecture.Tracker interface class and implements an exportToSimulink method to export the customized tracker as an equivalent block in Simulink.

gnn = trackerGNN( ...
    TrackerIndex=2, ...
    FilterInitializationFcn=@initfilter, ...
    ConfirmationThreshold=[3 5], ...
    DeletionThreshold=[5 5], ...
    AssignmentThreshold=[1000 Inf]);

tracker = helperScheduledTracker(gnn, 12);

You define the tracker and the ADS-B as two sources fused by a trackFuser. Note that the SourceIndex values for the two fuserSourceConfiguration objects, specified in the SourceConfigurations property of the trackFuser object, must match the TrackerIndex value of the tracker and the SourceIndex value of the ADS-B track respectively. Additionally, the FuserIndex value, which must be unique is set it to 3.

sources = {...
    fuserSourceConfiguration(SourceIndex=2) ... % Tracker
    fuserSourceConfiguration(SourceIndex=1);... % ADS-B
    };

fuser = trackFuser( ...
    FuserIndex=3, ...
    MaxNumSources=2, ...
    SourceConfigurations=sources, ...
    AssignmentThreshold=[1000 Inf], ...
    StateFusion="Intersection", ...
    StateFusionParameters="trace", ...
    ProcessNoise=10*eye(3));

Next, you define the trackingArchitecture object. You add the tracker to the architecture, and, sensors 1, 2, and 3 all report to the tracker. You also add the track fuser to the architecture. The trackingArchitecture object directs fuser sources to the fuser based on SoucreConfigurations property of the fuser. You use the show object function to display the architecture in a figure.

centralizedArchitecture = trackingArchitecture;
addTracker(centralizedArchitecture,tracker,Name="Tracker",SensorIndices=[1 2 3],ToOutput=false);
addTrackFuser(centralizedArchitecture,fuser,Name="Fuser",ToOutput=true);
show(centralizedArchitecture);

Figure contains an axes object. The axes object with title Tracking Architecture: centralizedArchitecture contains 30 objects of type rectangle, text, line, patch.

Once you have verified the architecture in MATLAB, you use the exportToSimulink object function to export it to a Simulink model.

model = exportToSimulink(centralizedArchitecture);

The architecture is exported as a Subsystem (Simulink) which contains blocks that build up the architecture. For each tracker or track fuser object in the MATLAB architecture, an equivalent block is added in the Simulink model. Detection Concatenation and Track Concatenation blocks are used when there are more than one input source to a tracker block and a track-to-track fuser block, respectively.

In the architecture, the GNN tracker is customized to accommodate the different update rates of sensors and ADS-B reports. The helperScheduledTracker class implements exportToSimulink function to add a customized block in the model. In the above diagram, the T2:Tracker block is a customized GNN tracker block. The tracker block updates every 12 seconds, while the rest of the model updates every 1 second. The tracker block is subsystem block which expands into the diagram below, where a Using Triggered Subsystems (Simulink) block is used to update the underlying tracker block whenever a trigger signal is received. The Pulse Generator (Simulink) block is used to generate a trigger signal every 12 seconds. Implemented using MATLAB Function (Simulink) block, the helperGetTracks block acts as a switch for the track output. When the tracker is updated, it outputs the generated tracks. Otherwise, it outputs an empty track bus. See the exportToSimulink method in the helperScheduledTracker class for more details.

The Scheduled GNN Tracker block expands into the underlying Global Nearest Neighbor Multi Object Tracker block.

You connect the architecture with inputs and simulate the model to get the output tracks from the architecture. In this example you use a preconfigured model which contains configured inputs and scenario visualization blocks.

close_system(model,0);
open_system('TestTrackingArchitecturesInSimulink');

You use the data recorded from the Simulate and Track En-Route Aircraft in Earth-Centered Scenarios example. The Helper Scenario Data Generator block generates aircraft position, detections from three sensors, ADS-B tracks, and prediction time. Implemented using the MATLAB System (Simulink) block, the code for the block is defined in the HelperScenarioDataGenerator class. The Helper Globe Viewer block visualizes the scenario using the trackingGlobeViewer object. Implemented using the MATLAB System block, the code for the block is defined in the HelperGlobeVisualization class. The Tracking Systems block is a Variant subsystem block that includes one subsystem for each tracking architecture.

You can select the specific tracking architecture by changing the value of the workspace variable ARCH. The default value of ARCH is 1, corresponding to the centralized tracking architecture.

ARCHTracking Architecture1Centralized2Decentralized3Regional

ARCH = 1;
sim('TestTrackingArchitecturesInSimulink');

In the above snapshot, the aircraft is detected by multiple radars, and is within the ADS-B communication range. The radar tracker establishes a track corresponding to the aircraft. The radar track is fused with the ADS-B track, which improves the accuracy of the fused track.

Decentralized Architecture

You want to explore how the system behaves when each radar reports sensor-level tracks and a track fuser fuses those tracks with the ADS-B tracks.

Define the trackingArchitecture object.

decentralizedArchitecture = trackingArchitecture;

Next, you define a tracker for each radar. There are three radar sensors in the original example, and thus you define three trackers. You define each tracker in a similar way as the centralized case. Since the SourceIndex of the ADS-B tracks is 1, you define the TrackerIndex of the three trackers as 2, 3, and 4, respectively. Meanwhile, the SensorIndex for the detections from the three radars are 1, 2, and 3, respectively.

sensorTracker = trackerGNN(...
    TrackerIndex=2, ...
    FilterInitializationFcn=@initfilter, ...
    ConfirmationThreshold=[3 5], ...
    DeletionThreshold=[5 5], ...
    AssignmentThreshold=[1000 Inf]);

% Add one tracker to each radar.
for i = 2:4
    tracker = helperScheduledTracker(clone(sensorTracker),12);
    tracker.TrackerIndex = i; % Specify each radar tracker with a different index.
    addTracker(decentralizedArchitecture,tracker,Name=strcat('Radar',num2str(i-1)),SensorIndices= i-1,ToOutput=false); % Connect the tracker to the correct radar index. 
end

You add a trackFuser that fuses tracks from four sources, the three radar trackers and the ADS-B, and export the architecture into a Simulink model.

% Define the sources.
sources = {...
    fuserSourceConfiguration(2);... % Tracker for radar 1
    fuserSourceConfiguration(3);... % Tracker for radar 2
    fuserSourceConfiguration(4);... % Tracker for radar 3
    fuserSourceConfiguration(1);... % ADS-B
    };

% Add the fuser.
fuser = trackFuser( ...
    FuserIndex=5, ...
    MaxNumSources=4, ...
    SourceConfigurations=sources, ...
    AssignmentThreshold=[1000 Inf],...
    StateFusion="Intersection", ...
    StateFusionParameters="trace", ...
    ProcessNoise=10*eye(3));
addTrackFuser(decentralizedArchitecture, fuser, Name="Fuser");

% Show the tracking architecture in a figure.
ax2 = show(decentralizedArchitecture);
ax2.Parent.Position = [680 456 484 522];

Figure contains an axes object. The axes object with title Tracking Architecture: decentralizedArchitecture contains 38 objects of type rectangle, text, line, patch.

Export the architecture into a Simulink model.

model = exportToSimulink(decentralizedArchitecture);

The decentralized architecture subsystem when expanded, shows following block diagram:

You set the workspace variable ARCH to 2, which enables, the decentralized architecture in the preconfigured model.

close_system(model,0);
ARCH = 2; %#ok<*NASGU> 
sim('TestTrackingArchitecturesInSimulink');

In the above snapshot, each radar tracker establishes a track corresponding to the aircraft. Radar closest to the aircraft estimates the track position more accurately. Fusing the radar reported tracks with the ADS-B track improves the accuracy of the fused track.

Regional Air Surveillance Architecture

Another possible configuration that falls between the centralized and decentralized architectures above is a regional surveillance architecture. In many cases, an air traffic control center may only need to track aircraft that are close to it. By using these regional control centers, you can construct a regional tracking architecture.

You define the trackingArchitecture object and define trackers for each radar, similar to the decentralized architecture.

regionalArchitecture = trackingArchitecture;
for i = 2:4
    tracker = helperScheduledTracker(clone(sensorTracker),12);
    tracker.TrackerIndex = i; % Specify each radar with a different index.
    addTracker(regionalArchitecture,tracker,Name=strcat('Radar',num2str(i-1)),SensorIndices=i-1,ToOutput=false);
end

You define two regions and attach two radar sensors to each regional fuser. Additionally, each regional fuser only fuses ADS-B tracks if the reporting aircraft is close enough.

region1Fuser = trackFuser( ...
    FuserIndex=5, ...
    MaxNumSources=3, ...
    SourceConfigurations=sources([1,2,4]), ... % Two radars and ADS-B
    AssignmentThreshold=[1000 Inf], ... 
    StateFusion="Intersection", ...
    StateFusionParameters="trace", ...
    ProcessNoise=10*eye(3)); 
region2Fuser = trackFuser( ...
    FuserIndex=6, ...
    MaxNumSources=3, ...
    SourceConfigurations=sources([4,2,3]), ... % ADS-B and Two radars
    AssignmentThreshold=[1000 Inf],... 
    StateFusion="Intersection", ...
    StateFusionParameters="trace", ...
    ProcessNoise=10*eye(3));
addTrackFuser(regionalArchitecture, region1Fuser, Name="Region1");
addTrackFuser(regionalArchitecture, region2Fuser, Name="Region2");

% Show the tracking architecture in a figure.
clf reset;
ax3 = show(regionalArchitecture);
ax3.Parent.Position = [680 403 558 575];

Figure contains an axes object. The axes object with title Tracking Architecture: regionalArchitecture contains 48 objects of type rectangle, text, line, patch.

Export the architecture into a Simulink model.

model = exportToSimulink(regionalArchitecture);

The regional architecture subsystem when expanded, shows following block diagram:

You set the workspace variable ARCH to 3, which enables the regional architecture in the preconfigured model. In the regional architecture you have 2 architecture track outputs for the same object.

close_system(model,0);
ARCH = 3;
sim('TestTrackingArchitecturesInSimulink');

In the above snapshot, the radar reported tracks are fused with the ADS-B tracks regionally and you see two fused tracks corresponding to the aircraft.

close_system('TestTrackingArchitecturesInSimulink',0);

Summary

In this example, you learned how to define different tracking architectures and how to export them to Simulink. You also learned how to use variant systems to realize different tracking system designs.