The Perfect Pair: Digital Twins and Predictive Maintenance

KarthiKeyan Shanmugam
12 min readApr 13, 2021

Every business needs their essential equipment to operate at peak efficiency and utilization to realize their return on capital investments.

This equipment could range from aircraft engines, turbines, elevators, or industrial chillers that cost millions to purchase.

For maintenance of this equipment, businesses follow the approaches below:

  1. Most of the businesses depend on Corrective Maintenance that ensures parts are used completely, but this costs business in downtime, labour, and unscheduled maintenance requirements, etc.
  2. Some of the businesses have gone next level by practicing Preventive Maintenance, where they determine the lifetime of each part and perform maintenance before the actual failure happens. This approach avoids unscheduled and catastrophic failures but the high costs of scheduled downtime, under-utilization of the component during its useful lifetime, and labour still remains.
  3. Now with advent of IoT & Digital Twins, businesses are moving towards building a Predictive maintenance model that optimizes maintenance cycle and balances between a corrective and preventative maintenance approach. Predictive maintenance uses just in time replacement of components. This approach not only replaces those components that are close to a failure but also extends component lifetime by reducing unscheduled maintenance and labour costs. By following this approach, businesses can achieve cost savings and competitive advantages.

Cross posted from : InfoQ

Introducing Digital Twins

Digital Twins technology brings the exact replica in digital format of a process, a product, or a service.

Basically, it takes real-world data about a physical object or system as inputs, and produces outputs in the form of predications or simulations of how that physical object or system will be affected by those inputs.

Some of the most common use case across the industry is given below:

  1. Visualization of products in use, by real users, in real-time
  2. Troubleshooting far away equipment
  3. Managing complexities and linkage within systems-of-systems
  4. Connecting disparate systems and promoting traceability

According to a recent IoT implementation survey by Gartner, Inc Digital Twins are entering mainstream use:

Devops Engineer Masters Program will make you proficient in DevOps principles like CI/CD, Continuous Monitoring and Continuous Delivery, using tools like Puppet, Nagios, Chef, Docker, Git & Jenkins. It includes training on Linux, Python, Docker, AWS DevOps Certification Training and Splunk. The curriculum has been determined by extensive research on 5000+ job descriptions across the globe.

13% of organizations implementing Internet of Things (IoT) projects already use digital twins, while 62% are either in the process of establishing digital twin use or plan to do so.

Insights from different types of Digital Twins

There are different types of Digital Twins, to choose the right digital twin, you would need to understand the needs and its benefits that you can get out of it.

Component Twin Ex. Rotor, Blade

Helps Field Services/Technicians to continuously monitor and offer predictive maintenance insights while reducing equipment downtime (planned and unplanned) and enable service-based business models.

Asset Twin Ex. Turbine, Motor

Helps Marketing & Sales team to gather knowledge on customer’s preferences and actual usage of their product and can tailor messaging to drive revenue.

System / Unit Twin Ex. Aircraft, Crude Unit

Helps Product designers, architects, and engineers to improve future product versions and engineering models to optimize product performance and efficiency, accelerating time-to-market.

Process Twin Ex. Manufacturing Process

Helps Management to get new operational data feeds into production and planning models thus paving way for strategic insights, recommendations, and road maps.

What makes up Digital Twins?

Sensors are the heart of any measurement, control, and diagnostic device. Device telemetry is collected using the smart sensors available on the hardware/software environment and then used to create the digital twin model of the physical equipment.

All of the data is then aggregated and compiled to generate actionable information. The digital twin model is then continuously updated to mirror the current state of the physical thing. It can then be used to effectively model, monitor, and manage devices from a remote location. It also enables continuous intelligence & estimated time for the next needed maintenance, which the maintenance system can use to schedule at the optimal time.

  1. Physical equipment is the actual equipment that we are interested in creating a twin for.
  2. Twin Model — Comprises of the hierarchy of systems, sub-assemblies, and components that describe the twin and its characteristics enriched by asset, operational, historical, and context data.
  3. Knowledge — Data sources that feed the twin with operational settings, domain expertise, historical data, and industry best practices.
  4. Analytics — Model gets empowered by physics-based models, statistical models, and machine learning/AI models to help describe, predict, and prescribe the behavior (current and future) of the asset, system, or process.

We can see in detail how to build digital twins in the sections below.

How to qualify use cases for predictive maintenance using Digital Twin?

Not all use cases or business problems can be effectively solved by predictive maintenance using a digital twin. Here are important qualifying criteria that need to be considered during use case qualification:

  1. The problem must be predictive in nature, meaning there should be a target or an outcome to predict.
  2. The problem should have a record of the operational history of the equipment that contains both good and bad outcomes.
  3. The recorded history should be relevant and be sufficient quality to support the use case.
  4. Finally, the business should have domain experts who have a clear understanding of the problem.

Now that we have see how to qualify use cases for predictive maintenance using the digital twin approach, the next step is to explore the various options to build/deploy them.

Options to build/deploy Digital Twins

#1. Vendor Agnostic Frameworks

This section summarizes the different frameworks available for building digital twins.

1. Eclipse Ditto — Digital twins can be built by leveraging pre-built capabilities, for example, routing requests to hardware, applying policies, etc.

  • a. Positives:
  • Based on Docker, Client SDK’s are available for Java/Python.
  • API abstraction for the hardware.
  • Routes requests between hardware and customer apps.
  • b. Negatives:

2. Swim OS — Integrated solution for building scalable, end-to-end streaming applications.

  • a. Positives:
  • Distributed OS.
  • Built-in stateful process execution scheduler.
  • The right choice for building stateful data-driven applications.
  • b. Negatives:

3. iModel JS — Platform for creating, accessing, leveraging, and integrating infrastructure digital twins.

  • a. Positives:
  • b. Negatives:

#2. Cloud Vendors

This section lists the various public cloud vendors offering digital twins.

1. Azure Digital Twins

  • a. Azure Device twin is automatically created when a device is connected to the IoT Hub.
  • b. Azure Device twin is implemented via JSON file that stores the device state information that can be used to synchronize device information with back-end processes.

Key concepts:

  • a. Spatial intelligence graph, or spatial graph, is a virtual representation of the physical environment. Same can be used to model the relationships between people, places, and devices.
  • b. Digital twin object models are predefined device protocols and data schema. Same can be aligned to solution’s domain-specific needs.
  • c. Solutions can scale securely and be reused for multiple tenants.
  • d. Azure Digital Twins instance can be connected to Azure services such as Azure Stream Analytics, Azure AI, Azure Storage, Azure Maps, Microsoft Mixed Reality, Dynamics 365, or Office 365.

2. AWS Digital Twins

  • a. Implemented via device shadow JSON file that contains the state information, meta-data, timestamp, unique client token, and version of a device connected to the device shadow service.
  • b. There are three basic REST APIs that can be used to interact with the device shadow: GET, UPDATE, DELETE. You can also interact with device shadows using MQTT messages.

3. IBM Digital Twins

  • a. Watson IoT has data management for definition, managing Device Twin.
  • b. Recent announcements of new lab services for Maximo that bring Augmented Reality (AR) into asset management.
  • c. Digital Twins has been enabled on the following IBM products
  • i. IBM Maximo Enterprise Asset Management
  • ii. IBM Maximo Asset Performance Management
  • d. Through IBM Digital Twin Exchange, manufacturers, OEMs, and third-party providers can share digital resources as digital twins.

#3. Industrial Vendors

This section lists the various industrial vendors offering digital twins.

1. GE Predix concentrates mostly on asset-centric digital twins.

2. Bosch’s digital twin solution Bosch IoT Things has detailed technical documentation, including developer guides, demo applications, and hosted dashboard.

3. S iemens MindSphere platform for developing new digital business models for industrial companies.

Walkthrough: Example of how to build Digital Twin

In this walkthrough section, we are going to build a digital twin model of an Intel NUC kit so that we can:

  • a. Predict whether it may fail in the near future.
  • b. Estimate the remaining useful life.

Some of the parameters that determine the health of the Intel NUC Kit are (this forms the basis for building digital twins):

  1. State of the CPU can be monitored via analyzing:
  • a. CPU Core Sensors
  • b. Mainboard Sensors
  1. System-wide CPU utilization
  2. Hard Drives Temperature
  3. SSD wear level, host reads/writes, etc., by SSD Hard Drive Sensors
  4. Disk usage statistics
  5. Disk I/O statistics
  6. Fan controllers
  7. Total physical memory (exclusive swap).
  8. Connection States

For building a digital twin of the Intel NUC kit, we are going to leverage the Eclipse Ditto framework that enables us to work with, and manage, the state of digital twins.

Following are the key capabilities of the Ditto Framework:

  1. Provides capabilities (APIs) to interact with digital twins.
  • Live Channel architecture — routes a command/message towards an actual device.
  • Twin channel connects to the digital representation of a Thing and its state and properties can be read and updated.
  1. Ensures that access to twins can only be done by authorized parties.
  2. Allows to not only interact with single twins but also with populations of many of them.
  3. Integrates into other back-end infrastructure (like messaging systems, brokers)

Step #1. Definition of Twin model — Things and Features

The first step is to define things and features. Things are generic entities and can be used to depict multiple features belonging to a thing. For example, physical devices like lawnmowers, sensors. In the below example, we are going to treat the entire Intel NUC Kit as a Thing.

Feature is used to manage all data and functionality of a thing that can also be grouped based on technical context. In the below example, we have CPU, Memory, etc.

Step #2. Use the client SDK to pull the sensor values and publish them to eclipse ditto

Once we have defined Things/Features, we can now use any of the client SDK (ex. Python) to pull the respective sensor values and publish them to Eclipse Ditto.

Figure 14: Intel NUC Board from Sensors — DetectBelow is a sample JSON format that is being used to represent the thing (here it Intel NUC Kit)

Each thing has a unique thingId and set of features that we discussed in the earlier section. We can also have attributes that describe the thing in more detail.

Also, we can find access control lists on who can perform read/write or use administer permissions.

{ "thingId": "org.eclipse.ditto.example:demothing", "acl": { "ditto": { "READ": true, "WRITE": true, "ADMINISTRATE": true } }, "attributes": { "manufacturer": "Demo Manfacturer", "hostname": "Demohost" }, "features": { "TemperatureSensor": { "properties": { "temperatureValue": 20.5, "lastUpdate": "2019-10-16 15:07:31.436733", "samplingRate": 1 } }, ..... } } }

The features section holds the current temperature value of the Temperature Sensor.

Step#3. Use prebuilt Ditto APIs to Retrieve & Modify the state of the Thing/Feature/Attribute

Once we have the data about features/attributes from the sensors we can use Ditto APIs to retrieve or modify the state of Thing/Feature/Attribute. All the state and properties can be read, updated, and collated.

There is also an option to route a command/message towards an actual device.

Step #4. Build ML model based on Digital Twin to predict failure

Now we have the time-series data available and stored in our Digital Twin Server, our next step is to build an ML model based on the data collected to predict failure based on core attributes such as CPU, Memory, Disk Space, connection state, or the performance of external interfacing systems.

Data for predictive maintenance model is time series data collected from the digital twin model.

Classification approach — predicts whether there is a possibility of failure in the next n-steps. Suited for Greater accuracy with less data.

Sample Data Set for Intel NUC core attributes:

This classification model is based on a decision tree classification approach where it offers a flowchart-like tree structure where an internal node represents a feature (or attribute), the branch represents a decision rule, and each leaf node represents the outcome.

After many iterations, below is the model’s confusion matrix & precise score. A highlight of the decision tree classification approach is it learns to partition based on the attribute value & also partitions the tree in recursively.

From the confusion matrix and our precision score, we are able to achieve ~96% accuracy in the determination of the possibility of failure.

Regression approach — predicts how much time (RUL) is left before the next failure. We need more data but it provides more information about when the failure will happen.

  • Input: Static and historical data are available, and every event is labeled. Several events of each type of failure are present in the dataset.
  • Sample dataset with 3 operational settings, 21 sensor measurements, and cycles to depict. The system under observation is operating normally at the start of each time series and develops a fault at some point during the series.
  • Output: How many days/cycles are left before the system fails?

In order to predict the RUL for each engine, we are classifying it like below.

Category labeled as 2 is the most economically valuable. If we predict this class with good performance, it will permit us to operate an adequate program of maintenance, avoiding future faults and saving money.

Next step is to transform timeseries data to Recurrence Plots and run the model.

From the below confusion matrix, we can see that our model can well discriminate when the system is close to failure (2 labels: <16 cycles remaining) or when it works normally (0 label: >45 cycles).

We are satisfied to achieve the result with the 2D CNN model for the prediction of class 2 — i.e., near to failure. Congrats! we now have built Digital Twin and ran a predictive maintenance model to predict the failures.

Key challenges while building Digital Twins

This section lists some of the challenges that should be handled while building digital twins.

  1. Establishing Real-time communication of data and latency — Real-time communication is the key requirement for building digital twins, it should always reflect the status of the physical equipment.
  2. Sourcing Quality Data (Data Management, Data quality, etc.), Realistic Model and future projections & Data-driven modeling — All of these are interrelated because when you have quality data then only you can build a model and future projects/predictions would be accurate. Data for ex. operational settings, domain expertise, best practices, etc must be sourced with greater quality because this becomes a knowledge base for your digital twin. All the predictions are directly based on the quality data you source.
  3. Data Security, Privacy & Ethical Issues — How to ensure the privacy of data communications? How can the collected data remain private? How much data should a particular user see? Access control is one of the key challenges that should be handled effectively.
  4. Large data volume, data generation rate, variety of data — Sensors on the field (physical equipment) is going to send large volume of data and each device could generate a variety of data in different formats. IoT Infrastructure that is collecting the data and the big data processing should be equipped enough to handle these kinds of volume and variety.
  5. Consider using AR/VR visual Interaction with Physical asset — Some kinds of Twin for ex. inspection of an equipment where visual interaction is required consider using AR/VR type of interaction. Interaction with Physical assets need not be only with web applications it can also differ based on the scenario.


Businesses are moving towards developing a predictive maintenance model using digital twins that optimizes the maintenance cycle with the advances in IoT space, extending the life of the part by reducing unplanned maintenance and labor costs. By using digital twins and the predictive maintenance strategy, companies gain cost savings and strategic advantages in the industry.

Originally published at on April 13, 2021.