Main Content

Detection Concatenation

Combine detection reports from different sensors

  • Detection Concatenation block

Libraries:
Automated Driving Toolbox
Sensor Fusion and Tracking Toolbox / Utilities

Description

The Detection Concatenation block combines detection reports from multiple sensors onto a single output bus. Concatenation is useful when detections from multiple sensor blocks are passed into a tracker block such as the Multi-Object Tracker block. You can accommodate additional sensors by changing the Number of input sensors to combine parameter to increase the number of input ports.

Examples

Ports

Input

expand all

Sensor detections to combine, where each detection is a Simulink bus containing a MATLAB structure. See Create Nonvirtual Buses (Simulink) for more details.

The structure has the form:

FieldDescriptionType
NumDetectionsNumber of detectionsinteger
DetectionsObject detectionsArray of object detection structures. The first NumDetections of these detections are actual detections.

The fields of Detections are:

FieldDescriptionType
TimeMeasurement timesingle or double
MeasurementObject measurementssingle or double
MeasurementNoiseMeasurement noise covariance matrixsingle or double
SensorIndexUnique ID of the sensorsingle or double
ObjectClassIDObject classification IDsingle or double
MeasurementParametersParameters used by initialization functions of tracking filtersSimulink Bus
ObjectAttributesAdditional information passed to trackerSimulink Bus

By default, the block includes two ports for input detections. To add more ports, use the Number of input sensors to combine parameter.

Output

expand all

Combined sensor detections from all input buses, returned as a Simulink bus containing a MATLAB structure. See Create Nonvirtual Buses (Simulink).

The structure has the form:

FieldDescriptionType
NumDetectionsNumber of detectionsinteger
DetectionsObject detectionsArray of object detection structures. The first NumDetections of these detections are actual detections.

The fields of Detections are:

FieldDescriptionType
TimeMeasurement timesingle or double
MeasurementObject measurementssingle or double
MeasurementNoiseMeasurement noise covariance matrixsingle or double
SensorIndexUnique ID of the sensorsingle or double
ObjectClassIDObject classification IDsingle or double
MeasurementParametersParameters used by initialization functions of tracking filtersSimulink Bus
ObjectAttributesAdditional information passed to trackerSimulink Bus

The Maximum number of reported detections output is the sum of the Maximum number of reported detections of all input ports. The number of actual detections is the sum of the number of actual detections in each input port. The ObjectAttributes fields in the detection structure are the union of the ObjectAttributes fields in each input port.

Parameters

expand all

Number of input sensor ports, specified as a positive integer. Each input port is labeled In1, In2, …, InN, where N is the value set by this parameter.

Data Types: double

Source of output bus name, specified as Auto or Property.

  • If you select Auto, the block automatically generates a bus name.

  • If you select Property, specify the bus name using the Specify an output bus name parameter.

Dependencies

To enable this parameter, set the Source of output bus name parameter to Property.

  • 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/C++ code. The first time you run a simulation, Simulink generates C/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.

Extended Capabilities

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

Version History

Introduced in R2017b

expand all