Digital Twin Platform

Enabling 3D Simulation in ThingsBoard: a First Step Towards a Digital Twin Platform

Thingsboard is an open-source IoT platform that allows users to connect and manage IoT devices, collect and analyze data from them, and create dashboards and reports to visualize that data. With Thingsboard, we can create custom rules and workflows to automate tasks and trigger actions based on data coming from the IoT devices.

Thingsboard provides additional UI modules called widgets that can be easily integrated into any dashboard, offering end-users functions such as data visualization, remote device control, alarms management, and static custom HTML content. You can also develop and integrate customized widgets to add functionalities beyond those provided by default.

Thingsboard is highly scalable and can handle thousands of devices and millions of messages, making it ideal for large-scale IoT deployments. Additionally, Thingsboard is highly customizable, with a flexible data model and a wide range of APIs and integrations available.

The Extended Thingsboard enables the creation of 3D simulations for Cyber-Physical Systems (CPS) scenarios, which combine physical and digital components. The goal is to provide an easy-to-use tool for building 3D simulations of CPS, such as a smart classroom with IoT sensors for presence detection.

How it works

The 3D simulation widget that we developed allows a Simulation Designer, with some programming skills, especially with some knowledge of the Three.js and the cannon-es libraries, to design a 3D scene and add Digital Entities.

After defining the Digital Entities and the rule-chains representing the Digital Device’s behavior, the designer selects the Digital Devices and the Simulated Digital Devices he wants to include in a simulation. This is done to avoid that simulated telemetries override real telemetries from the physical world. The Simulated Digital Devices and the simulation widget that runs the simulation, exchange data using a Communication Bus.

The simulation generates Simulated Events, for instance, if we consider an IoT device, an event could be a physical change (If we consider a PIR Sensor, an event could be the detection of presence). The Simulated Events are published on the communication bus and received by the corresponding Simulated Digital Device, which updates its attributes.

If a rule-chain that predicates on that attribute is available, then the rule-chain fires, and the simulated behavior of the Simulated Digital Device starts. During the execution of the rule-chain, telemetries associated with the Simulated Digital Device might be updated. These updated telemetries are then published on the virtual bus and received by the simulation widget, which reflects the updates in the simulated environment