Kick-starting with the basics of digital twin—what it is, how it works, and a case study that shows it in practice.
When we talk about a digital twin, think of it as a virtual magic mirror. Why a magic mirror? Just like a mirror reflects the object exactly as it is, a digital twin shows an exact copy of the real-world machine, but in a virtual space. It is a live copy that reflects the state, activity, and condition of that object in real time.

What can a digital twin do?
With the help of a digital twin, you can do many useful things: monitor live data, collect data from device sensors, run simulations, test different settings or adjustments, and see what might happen to the real machine before experimenting on the actual one. It is also used for predictive analytics, such as estimating when something might fail or when maintenance might be required. This way, you gain insights early and save both time and cost.
Digital twin and traditional IoT
It is possible to think, is this not similar to IoT? Well, not quite. IoT gives you data from sensors—that is true. But a digital twin goes beyond that. It is not just about collecting data; it is about creating a virtual version of your system where you can see, test, and predict things in advance. In simple words, the digital twin represents the combination of IoT, simulation, and control analytics. That is the difference.
Types of digital twin
There are different types of digital twins depending on the requirements of the model:
- Component twin – Focuses on one small part, like a sensor or chip inside a machine
- Asset twin – Represents a whole machine, like a fridge or motor
- System twin – Represents a group of machines working together, such as in a factory
- Process twin – Covers full workflows, such as how an entire assembly line operates
You can simulate the whole process before running it in real life.
Where are digital twins being used?
And this is not just a future idea. Industries are already using digital twins, especially in smart manufacturing, healthcare, automotive, and even smart cities. For example, in healthcare, it is possible to create a virtual model of a human and test treatment options safely. In factories, machines’ durability and performance can be tested virtually before starting production. So yes, this is real, it is working, and now with open-source tools like Eclipse Ditto, even colleges and start-ups can try it out.
A digital twin is a virtual representation of a physical device, such as a smart car or a commercial truck. Instead of testing every change directly on vehicle parts such as the engine, brake pads, or transmission—which can be risky and expensive—a digital twin can be used to simulate and experiment safely. It is usually operated via the cloud, mirrors the real system, and lets us see how it would behave under different conditions—all without touching the actual machine. |
Case study: Making the kitchen smart using Eclipse Ditto
By showing an example of a smart kitchen, it is easier to break things down, and the same setup could be scaled to factories, hospitals, or cities with many parameters and complex infrastructure.
Starting with the basics: A Docker-based installation can be used for quick setup of Ditto instead of building Ditto from source, which is a longer process. This keeps things lightweight, allows rapid tweaks, and ensures the environment is fully under control.
At the heart of Ditto is the concept of a “Thing”, the digital representation of a real-world object. In this case, the “Thing” is the smart kitchen, and within that, subcomponents were modelled: the refrigerator, the oven, and the room. Each of these devices needed a clear structure. So, we created a JSON schema (JavaScript Object Notation) that defined:
Attributes – Fixed details such as manufacturer and model number.
Features – Changing values such as temperature or on/off status that update in real time.
But creating a twin is not just about mimicking hardware—it is also about ensuring safe authorisation of who can interact with it. So, we defined policies: access rules that specify what operations are allowed. For example, an owner might have full read/write permissions, while an observer could only view the data. This becomes especially important with distributed teams or shared IoT ecosystems. Policies can be created in the Ditto Web UI or via REST API.
To connect the real-world device with the twin, we used the MQTT protocol (Message Queuing Telemetry Transport). It is a lightweight messaging protocol ideal for IoT. For example, if the oven’s temperature changes from 72°C to 85°C, the twin updates instantly.
All this runs behind the scenes, stored as clusters that are not human-readable. To make sense of the data, we added a visualisation layer using Node-RED, a low-code tool that allows you to drag and drop data flows like a flow chart. This provided a clean UI to monitor the fridge, oven, and room. Think of it as the dashboard for your twin. While Node-RED was used for simplicity, any visualisation framework (such as React or ThingsBoard) could plug into this setup.
When features change, like fridge temperature set to 6°C, oven to 85°C, and room temperature to 26°C, these updates are sent to the cloud via MQTT and shown on the Node-RED dashboard in real time.
From device simulation to digital modelling, access control, real-time communication, and visualisation, the entire flow is covered. Ditto handled data modelling and updates; MQTT carried the messages; and Node-RED provided a window into the system.
And just to clarify: Ditto does not generate this entire system automatically. Models must still be defined, integrations written, and logic built on top of them. What Ditto offers is the infrastructure to manage digital twins at scale, and this smart kitchen example demonstrates how flexible and modular that infrastructure can be.
Refer to this link for tutorial steps on working with Eclipse Ditto.
Even when using open-source software like Ditto, you still need to purchase cloud platforms such as AWS or Azure to deploy it; the data is stored in the cloud and accessed there. Open source does not mean free cloud storage. Cloud space must be provisioned separately. There can also be latency when accessing from the cloud, which is why the MQTT-SN protocol is often used. It is more lightweight than the HTTP protocol. |
This article is based on the session titled Unleashing the Power of Digital Twins: Eclipse Ditto in Action (an Eclipse IoT Project) delivered by Rajesh Sola and Sivaranjanjani S from GITAM University, Centre for Academic Innovation and Advancement (CAIA), at IEW25 in Bengaluru. The session was transcribed and curated by Janarthana Krishna Venkatesan, journalist at EFY.