What is a digital twin? (Part 2)
Now lets understand when you should use Digital twin:
- You should use it when you have large number of digital twins to manage.
- When there is complexity in relationship
- It would be best if you can use an existing model instead of creating a new one
- You can benefit if it has flexible schema.
Couple of things which popularized digital twin in recent days:
- Cheap IOT devices
- Increased number of IOT devices in use
- Affordable internet/connectivity
- Boost in Cloud platforms
If you want to implement Digital Twin, you need to make sure your projects have below characteristics:
- Ability to establish some sort of connection between 2 devices.
- Can and should require queries to be executed based on device parameters.
- Secure integration
Lets try to build a Digital twin of a Building to understand what temperature of each room is.
In Azure Digital Twin, we have 4 types of interfaces or classes.
- Component – Temperature and humidity
- Relationship – Building has floor and then floor has rooms.
- Telemetry – Input data
- Properties – State of entity
You can download the json from MS link below:
Building : https://raw.githubusercontent.com/Azure-Samples/digital-twins-explorer/main/client/examples/Building.json
Floor : https://raw.githubusercontent.com/Azure-Samples/digital-twins-explorer/main/client/examples/Floor.json
Room : https://raw.githubusercontent.com/Azure-Samples/digital-twins-explorer/main/client/examples/Room.json
https://itfreesupport.com/wp-content/uploads/2023/02/twin9.pngBelow is 1st look of ADT with a building, Floor and room.https://itfreesupport.com/wp-content/uploads/2023/02/twin10.pngBuilding model
Here Json needs to start with dtmi with displayname as ‘Building’, next the only property of this interface is Date, It has relationship with Floor. Most important is DisplayName.https://itfreesupport.com/wp-content/uploads/2023/02/twin11.pngFloor
Here Json needs to start with dtmi with displayname as ‘Floor’, next properties of this interface is OwnershipUser and OwnershipDeparment, It has relationship with Roomhttps://itfreesupport.com/wp-content/uploads/2023/02/twin12.pngRoom
Here Json needs to start with dtmi with displayname as ‘Room, next the only property of this interface is Temperature and Humidity, It has no further relationship
Make sure you use DTDL validator while creating these Json files
https://learn.microsoft.com/en-us/samples/azure-samples/dtdl-validator/dtdl-validator/
Using this json we have multiple ways to create our scenario’s but we will use below xlsx file which has specified data to start with. You can download the excel for building scenario’s from below path:
https://github.com/Azure-Samples/digital-twins-explorer/raw/main/client/examples/buildingScenario.xlsx
https://itfreesupport.com/wp-content/uploads/2023/02/twin13.pngHere is how it looks like which has model ID, ID, Relationship, etc. Most excel will have these 5 fields for any modelhttps://itfreesupport.com/wp-content/uploads/2023/02/twin14-1.pngAfter the import, this is what you will see and you can check Model Graph as well. Process to import the Json and excel will be part of next articlehttps://itfreesupport.com/wp-content/uploads/2023/02/5twin14.png
Microsoft understands it will take a lot of efforts for one to create these models and relationships, so to ease the process Microsoft has published a few models such as space, event, document, building, etc so you can reuse them as your start point
https://github.com/WillowInc/opendigitaltwins-building
Here is basic strcture of Azure Digital Twin
1.
https://itfreesupport.com/wp-content/uploads/2023/02/twin16-1024x658.pngHere is basic structure of Azure Digital Twin:
Input : Input can be from Workflows, IOT hub or any rest Api. You can input parameter data manually as well.
Processing : Azure Digital Twin platform process the input based on business logics, understands connections and process data accordingly. Digital twin of real-world sensors can be created to predict and test results based on change in inputs.
Output : Using Time Series insights, Azure data explorer and Analytics we can better visualize data and actionable items can be driven from predictions.
Main challenges with ADT are:
Modelling is difficult and time consuming.
Delay in processing data Realtime
Inter-operability between different types of IOT devices and services.
Hard and expensive for existing systems
Privacy and confidentiality
For Part 1 : What is digital twin? - Part 1 - TechNet Articles - United States (English) - TechNet Wiki (microsoft.com)
Reference : https://itfreesupport.com/2023/02/what-is-digital-twin-part-2/