Main Content


Export tracking architecture to Simulink model

Since R2022a


exportToSimulink(ta) exports the tracking architecture ta as a subsystem in a new Simulink® model. The Simulink model uses a default name.


exportToSimulink(ta,Model=model) specifies the name or handle of the Simulink model that the tracking architecture ta exports to. If no Simulink model with the specified name exists, the function creates a new model with the specified name.

modelName = exportToSimulink(___) returns the name of the model that the tracking architecture exports to.


You can export a tracking architecture that contains trackerGNN, trackerJPDA, trackerTOMHT, trackerPHD, or trackFuser objects to Simulink.

You can also include customized trackers or track fusers, which inherit from the fusion.trackingArchitecture.Tracker class or the fusion.trackingArchitecture.TrackFuser class respectively, in the tracking architecture. The customized tracker or fuser object must implement an exportToSimulink object function using this syntax:

blockHandle = exportToSimulink(obj,modelName,blockName)
The function must add a block with the specified blockName to a Simulink model specified by the modelName and return the handle of the block blockHandle. The added block must have at least two input ports, one of detections or tracks (for trackers or track fuser respectively) and one of prediction time, as well as one output port of tracks.

For more information, see exportToSimulink for trackers and track fuser.


collapse all

Create a tracking architecture that has two trackers:

  • Tracker 1 — A GNN tracker that receives detections from sensors 1 and 2.

  • Tracker 2 — A JPDA tracker that receives detections from sensor 3.

The tracking architecture also contains a track fuser that receives tracks from these two trackers as well as a tracking sensor 4. Show the tracking architecture.

arch = trackingArchitecture;
addTracker(arch,trackerGNN(TrackerIndex=1),SensorIndices=[1 2])
ans=1×4 table
         System          ArchitectureInputs       FuserInputs        ArchitectureOutput
    _________________    __________________    __________________    __________________

    {'T1:trackerGNN'}         {'1  2'}         {'Not applicable'}            1         

ans=2×4 table
          System          ArchitectureInputs       FuserInputs        ArchitectureOutput
    __________________    __________________    __________________    __________________

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

fuser = trackFuser(FuserIndex=3,MaxNumSources=3, ...
    SourceConfigurations={fuserSourceConfiguration(1); ...
    fuserSourceConfiguration(2); fuserSourceConfiguration(4)});
ans=3×4 table
          System          ArchitectureInputs       FuserInputs        ArchitectureOutput
    __________________    __________________    __________________    __________________

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


Export the architecture to a Simulink model.

modelName = exportToSimulink(arch,Model='myModel')
modelName = 

A new model named myModel appears, which contains a tracking architecture subsystem name arch.


Open the subsystem to see the details of the tracking architecture in Simulink. Note that the subsystem reflects the settings of the trackingArchitecture object arch.


Input Arguments

collapse all

Tracking architecture, specified as a trackingArchitecture object.

Model name or handle, specified as a string scalar, a character vector, or a Simulink handle. You can specify a model name as a string or a character vector, or a valid Simulink handle as a double.

Example: "NewModel"

Data Types: double | string | character

Output Arguments

collapse all

Name of the Simulink model, returned as a character vector.

Version History

Introduced in R2022a