Digital Twins become one of the most powerful technologies, which can empower modern IoT and AI solutions to reach the bring additional value for the business and and society.
In my previous article Essential Digital Twins for Modern Industry we considered the concepts, main use-cases, business value and applied areas where Digital Twins can be implemented. For any implementation it is important to know the main platforms, offering solutions based on Digital Twins concept to be able to chose the best solution for specific use case.
In this article will be discussed different solutions with main focus on cloud platforms, which can be used to implement Digital Twins.
A digital twins platform can be considered as a part of analytics platforms, related to big data and artificial intelligence (AI) , applicable for IoT. All it needs is sufficient storage support to save the current status of the model and to manage the life cycle of the digital twin. In other words, digital twins require the model to be tuned initially. They also require the real asset and the digital asset to be synchronized periodically:
Figure 1. The components of digital twins 
The platforms that can support digital twins today include Microsoft Azure, AWS, IBM Cloud, Predix, and Google Cloud Platform (GCP).
Let see what these platforms offer for Advanced Analytics with Digital Twins:
AWS IoT Device Shadows
Amazon Web Services (AWS) offers Device Shadow Service for AWS IoT as simplified Digital Twins service, focused on device management (similar to Azure IoT Hub Device Twins)
AWS IoT Device Shadows main features:
- Enable Internet-connected devices to connect to the AWS Cloud and let application in the cloud interact with internet-connected devices
- Devices report their state by publishing messages in JSON format on MQTT topics
- Each MQTT topic has a hierarchical name that identifies the device whose state is being updated
Figure 2. AWS IoT Device Shadows –Cloud
AWS based analytics with Digital Twins solutions
Actually AWS does not offer Digital Twins Service like SaaS. There are options to create own custom solution using Amazon AI and IoT Core services in integration with services for 3D modelling (remember – it is not ready solution and need custom development and configuration).
AWS recommends that we use SageMaker as the main platform for ML. With SageMaker, we can define our model to train parameters and hyper-parameters. We can also store the model to deploy it later either on the cloud or on-premise. The basic idea of SageMaker is to train the model that is coding it on Jupyter and later deploy the model as a microservice to get the results during normal operation. A high level of computation is required during training.
One possible implementation cold be a custom solution, including AWS IoT Core, Sumerian and Sage Maker
Figure 3 Sumerian features 
Figure 4. Sumerian integration 
Amazon SageMaker is a fully managed service that provides every developer and data scientist with the ability to build, train, and deploy machine learning (ML) models quickly. SageMaker removes the heavy lifting from each step of the machine learning process to make it easier to develop high quality models.
Figure 5. SageMaker components 
Predix (known as Predix Platform is an industrial IoT software platform from GE Digital) implements digital twins in a very similar way to SageMaker. It builds analytics as microservices that are accessible through the REST API. Predix Analytics uses Predix Asset to access metadata about the assets.
Google has all the essential building blocks for developing and deploying IoT solutions in its cloud platform. However, it lacked the glue that helps to connect the existing services to deliver an end-to-end device management and data processing pipeline.
Cloud IoT Core
Google exposes an industry-standard MQTT broker and a device registry to onboard connected devices and sensors. The device registry acts as a central repository of all the devices connected to the platform. It contains device metadata such as serial number, make, model, location, asset id and more. Applications can query the device’s to get the metadata and latest data.
One side of the registry exposes MQTT and REST endpoints while the other end is connected to the Cloud Pub/Sub service. Devices send messages to each other via secure MQTT or REST endpoints. These messages are delivered to other GCP services through the Pub/Sub topics.
Cloud IoT Core supports industry standard MQTT broker that needs no changes to existing code. Developers familiar with any MQTT client library can target Cloud IoT Core without modifying the code.
Figure 6. Google IoT Platform
Analytics with Digital Twins on Google Cloud Platform
GCP recommends that we use its cloud ML engine with TensorFlow to deploy and train digital twins.
Actually GCP does not offer a specific solution. Similar to AWS solutions, providing analytics with Digital Twins should be based on existing IoT and AI components with custom development and configuration.
Azure cloud components that can be applied to I-IoT, covering the following:
- Azure IoT
- Azure Data Platform
- Building visualizations with Power BI
- Time Series Insights
- Connecting a device with IoT Edge
- Azure AI
- Azure Digital Twins Service
Azure IoT is a platform proposed by Microsoft to connect multiple devices, enable telemetry, store measures, run and develop analytics, and visualize results. The key components of Azure IoT are the following:he key components of Azure IoT are the following:
- Azure IoT Hub
- Azure IoT Edge
- Stream Analytics
- Azure Data Lake
- Data Lake Analytics
- Time Series Insights.
- Azure AI (ML, Cognitive Services)
- Power BI
- Cosmos DB
- Event Hub
- IoT Hub DPS
- Azure Digital Twins Service
Microsoft Azure IoT Hub –Device Twins
Device twins are JSON documents that store device state information including metadata, configurations, and conditions. Azure IoT Hub maintains a device twin for each device that you connect to IoT Hub.
- Microsoft’ Device Twin is an abstraction of a device state using properties and a set of tags, containing metadata values
- Actions and events are not of the model, but are handled by application code
- Messages are rather lightweight and the content can be selected by the application down to property level
- The format of the messages is defined by applications only
- The Device Twin model does not define a ‘template’ or a mechanism to aggregate multiple devices into a combined device model
Device Twins Concept.
- Use device twins to:
- Store device-specific metadata in the cloud. For example, the deployment location of a vending machine.
- Report current state information such as available capabilities and conditions from your device app. For example, a device is connected to your IoT hub over cellular or WiFi.
- Synchronize the state of long-running workflows between device app and back-end app. For example, when the solution back end specifies the new firmware version to install, and the device app reports the various stages of the update process.
- Query your device metadata, configuration, or state.
Figure 7. Device Twins and Azure IoT Hub 
The Azure IoT Hub registry:
Store key/value flat data to the device
Figure 8.. IoT Hub Device Registry
Figure 9. Azure IoT Hub vs AWS IoT
Azure Digital Twins Service
Microsoft Azure – the Microsoft Public cloud offers Azure Digital Twins Service (still in preview), which simplifies a lot the implementation of solutions, based on Digital Twins concept. It provides a specific extendable object model, focused on problems in building industry. This is the only one public cloud providing complete SaaS Digital Twins Currently, which can be used very easily without expensive additional development, integration and deep knowledge on several different technologies.
Digital Twins object models describe domain-specific concepts, categories, and properties. Models are predefined by users who want to tailor the solution to their specific needs. Together, these predefined Digital Twins object models make up an ontology. A smart building’s ontology describes regions, venues, floors, offices, zones, conference rooms, and focus rooms. An energy grid ontology describes various power stations, substations, energy resources, and customers. With Digital Twins object models and ontologies, diverse scenarios and needs can be customized.
With Digital Twins object models and an ontology in place, you can populate a spatial graph. Spatial graphs are virtual representations of the many relationships between spaces, devices, and people that are relevant to an IoT solution. This diagram shows an example of a spatial graph that uses a smart building’s ontology
Azure Digital Twins important features:
- Twin object models
- Spatial intelligence graph
- Advanced compute capabilities
- Data isolation via multi-and nested-tenancy capabilities
- Security through access control and Azure AD
- Integration with other services
Azure Digital Twins place in the whole Azure IoT Stack is described with the schema below
Figure 10. Azure Digital Twins and Azure IoT 
Digital Twins object model
- Other categories:
- Resources, Extended Types, Ontologies, Property Keys and Values, Roles/Roles Assignments, Security Key Stores, UDFs, Matchers, Endpoints
Figure 11: Azure Digital Twins Object Model 
Azure Digital Twins Graph Viewer:
One very important feature is the ability very easy to visualize and edit digital twins models.
Azure Digital Twins Graph Viewer is an OSS project, hosted in GitHub. It is used to manage and visualize your digital space:
The solution supports:
Figure 12: Azure Digital Twins Graph Viewer
Azure Digital Twins Service in Modern IoT Solutions
There are many areas in IoT solutions, where Digital Twins technology can be used:
- Device Configuration Management System
- Device monitoring
- Device provisioning
- Software update
- Integration with other solution
- Raise alarms (event driven design)
Device Twin vs Digital Twin
Twin is a cloud based representation of something that is remote
- Device Twin is
- A key/value flat representation of
- Desired configuration
- Reported configuration v
- Keys to match to an external database
- Digital Twin is
- A graph (tree…someone asking for graph)
- Richer semantics
- Also not only devices
Providers of modern IoT solutions use digital twins mostly in 2 different ways:
- Simplified option for device state management (Device Twins, Device Shadows)
- Fully functional Digital Twins solutions for advanced analytics
- From major cloud providers nowadays on Microsoft offers ready to use SaaS for advanced analytics: Azure Digital Twins Service.
- Other providers offer options to build custom solutions with significant additional effort for development and configuration
- This overview is focused on the major providers of cloud services excluding some specific solutions from companies focused mostly on Digital Twins.
Expecting soon the next article on Digital Twins where will have a deep dive into Azure Digital Twins service.
- Veneri, G. and Capasso, A., n.d. Hands-On Industrial Internet Of Things.
- Masat, M., 2020. Create Digital Twins Using AWS Iot Core And Amazon Sumerian. [online] AWS re:Invent 2019. Available at: <https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=96106> [Accessed 28 March 2020].
- Amazon Web Services, Inc. 2020. Amazon Sagemaker. [online] Available at: <https://aws.amazon.com/sagemaker/> [Accessed 28 March 2020].
- MSV, J., 2020. Google Cloud Iot Core Focuses On Simplicity And Scale. [online] Forbes. Available at: <https://www.forbes.com/sites/janakirammsv/2017/10/01/google-cloud-iot-core-focuses-on-simplicity-and-scale/#637770160760> [Accessed 28 March 2020].
- Docs.microsoft.com. 2020. Understand Azure Iot Hub Device Twins. [online] Available at: <https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-device-twins> [Accessed 28 March 2020].
- Docs.microsoft.com. 2020. Overview – Azure Digital Twins. [online] Available at: <https://docs.microsoft.com/en-us/azure/digital-twins/about-digital-twins> [Accessed 29 March 2020].
- Docs.microsoft.com. 2020. Understand Object Models And Spatial Intelligence Graph – Azure Digital Twins. [online] Available at: <https://docs.microsoft.com/en-us/azure/digital-twins/concepts-objectmodel-spatialgraph> [Accessed 29 March 2020].
If you want more information feel free to contact me at email@example.com Follow my blog : https://mmateev.wordpress.com/ .
You can learn more also if you follow me on Twitter @mihailmateev , and stay in touch on Facebook, Google+, LinkedIn and Bulgarian BI and .Net User Group !