Skip to Content
DEEPCRAFT™ Studio 5.16 has arrived. Read more →

Collect data from multiple sensors

A model trained on data from several sensors can be more accurate and robust than a model trained on a single sensor. In Graph UX, you can collect data from multiple sensors in a Dataset node and use the Sensor Fusion node to combine the data streams into a single data stream for training.

Why use sensor fusion?

DEEPCRAFT™ Studio trains a model on one data stream and one label stream. If you record from several sensors, you can either train a separate model for each sensor or fuse the sensor streams and train one model on the combined data.

A single sensor often captures only part of a system’s behavior. For example, a microphone captures how a machine sounds, while an IMU (inertial measurement unit) measures how it moves and vibrates. Each sensor has blind spots, but together they let the model learn patterns that neither signal shows on its own. The Drill Material Detection Studio Accelerator is one such example, audio captures changes in the drilling sound, while IMU data captures the vibration patterns. Fusing both signals helps the model identify the material being drilled more accurately.

How the Sensor Fusion node works?

The Sensor Fusion node aligns signals from up to different sensors in time, resamples each signal to the highest input sampling frequency, and combines all signals into a single output stream. You can fuse data from up to eight sensors using the Sensor Fusion node and the Dataset node. For example, if you fuse these two inputs:

  • Microphone data with shape [1] at 16000 Hz
  • IMU data with shape [2, 3] at 50 Hz

The Sensor Fusion node up samples the IMU data to 16000 Hz and combines it with the microphone data. The fused output has shape [7] at 16000 Hz: six IMU values and one microphone value per sample. Upsampling to the highest rate makes sure no data is lost.

Keep the following in mind when you fuse sensors:

  • Output size: When sampling frequencies differ widely, the fused output can become large. In the example above, the IMU data is upsampled to the microphone rate, which creates many repeated or interpolated IMU samples.
  • Downsampling: Downsampling removes data and can distort the original signal, especially wave-based signals such as audio and radar. Slow-changing signals, such as temperature, are usually safer to downsample. Consider the Nyquist frequency and the information the signal carries before you downsample.

Build the sensor fusion graph

The following steps use a PSOC™ Edge E84 AI Kit to collect microphone and IMU data. You can follow the same steps for other sensor combinations, such as microphone and radar, or radar and temperature.

  1. Connect the Infineon board to your PC. The board name appears under the Boards directory in the Node Explorer.
  2. Expand the board name and drag and drop the microphone and IMU sensor nodes onto the canvas.
  3. Double-click the canvas, or right-click the canvas and select Search for Node to open the search box. You can also press Ctrl+T when the .imunit window is active. Type Dataset in the search box, then double-click the matching result or drag and drop the node onto the canvas. This node is Dataset 1.
  4. Hold the output port of the microphone node and drag the wire to the input port of Dataset 1. Studio automatically adds a microphone track to the Dataset node.
  5. Hold the output port of the IMU node and drag the wire to the input port of Dataset 1. Studio automatically adds an IMU track to the Dataset node.
  6. To label the data, double-click Dataset 1, go to the Tracks tab, and click Add label track. Click Add a Label and enter a class name. Repeat for each class. For detailed instructions, refer to Data Labeling using Dataset.
  7. Search for Sensor Fusion on the canvas, then double-click the matching result or drag and drop the node onto the canvas. You can also go to Library > Signal Processing > Time Domain and drag and drop the Sensor Fusion node onto the canvas.
  8. Connect the microphone and IMU output ports of Dataset 1 to the input ports of the Sensor Fusion node.
  9. Hold the label output port of Dataset 1 and drag the wire to the input port of the Sensor Fusion node.
  10. Add a second Dataset node to the canvas. This node is Dataset 2. Hold the output port of the Sensor Fusion node and drag the wire to the input port of Dataset 2.

Dataset 1 stores the raw microphone and IMU data, and Dataset 2 stores the fused data.

To rename a Dataset node, click the three dots on the node panel and select Show Property Grid. Enter the name in the Node > Node Name field.

Record, label and fuse the data


  1. Double-click Dataset 1 to open the Dataset window. The window contains two tabs:

    • Sessions: Lists all the sessions you record. Use this tab to start a new recording.
    • Tracks: Lists the tracks in the dataset. In this example, the dataset contains a microphone track and an IMU track.
  2. In the Sessions tab, click + Add Session. The timeline view opens.

  3. Click Record in the toolbar to start capturing real-time data.

  4. Click Record again to stop recording. The recording is saved automatically as a session and appears in the Sessions tab. Close the timeline view.

  5. Repeat steps 2 to 4 to record more sessions.

  6. Label the recorded sessions. For more information, refer to Data Labeling using Dataset.

  7. On the canvas, click the three dots on the Dataset 2 panel and select Sync. Studio sends the sessions from Dataset 1 through the Sensor Fusion node and stores the fused data in Dataset 2.

    The wire attributes on the canvas show how the data changes. The microphone wire shows 1, 16000 (shape 1 at 16000 Hz), and the IMU wire shows 2, 3, 50 (shape [2, 3] at 50 Hz). The Sensor Fusion output wire shows 7, 16000 (shape 7 at 16000 Hz).

  8. Double-click Dataset 2 and go to the Sessions tab. All sessions from Dataset 1 appear in the list.

  9. Double-click a session to view the fused data and labels in the timeline view.

If the raw sensor signals are difficult to label, recording video alongside the sensor data makes it easier to identify events. Video support for the Dataset node is coming soon.

After you collect the fused data, you can train a model. For more information, refer to Training a Model.

How to collect data from multiple sensors?


Each Sensor Fusion node combines two input signals. To fuse data from three or more sensors, connect multiple Sensor Fusion nodes in a chain, where each node adds one more sensor signal to the output of the previous node. The graph above records data from a microphone, an IMU, a DPS sensor and an SHT4X sensor into a single Dataset node. The first Sensor Fusion node combines the microphone and IMU signals, the second adds the DPS signal, and the third adds the SHT4X signal. A second Dataset node stores the final fused data stream. You can use the same approach to fuse data from up to eight sensors.