Personal Development Category (English)728x90

How to build Digital Twin using Eclipse Ditto?

Disclosure: This page uses affiliate links.When you click an affliate link,we get a small compensation at no cost to you.Thanks for your support!Learn more

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 predictions or simulations of how that physical object or system will be affected by those inputs.

Some of the most common use cases across the industry are 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

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.

Image – Elements of Digital Twin

  1. Physical equipment is the actual equipment that we are interested in creating a twin for.
  2. Twin Model – Comprises of a 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 next section.

Subscribe to Emails

More than 100,000 subscribers across the world trust & read Upnxtblog articles. Subscribe to emails updates!
* indicates required

How to build Digital Twin?

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

  1. Predict whether it may fail in the near future.
  2. Estimate the remaining useful life.

Image – Digital Twin of Intel NUC Kit

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

Advertisement:
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.
Generic Category (English)728x90
  1. State of the CPU can be monitored via analyzing:
      • CPU Core Sensors
      • Mainboard Sensors
  2. System-wide CPU utilization
  3. Hard Drives Temperature
  4. SSD wear level, host reads/writes, by SSD Hard Drive Sensors
  5. Disk usage statistics
  6. Disk I/O statistics
  7. Fan controllers
  8. Total physical memory (exclusive swap).
  9. 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.

Image – Ditto Framework to build Digital Twin

Recover over 700 unique file formats. Fully recover documents, emails, photos, videos, audio files and more. Supports 8 different data lost scenarios: deleted files recovery, recycle bin recovery, formatted drive recovery, lost partition recovery, externa

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)
  4. Based on Docker, Client SDK’s are available for Java/Python.

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 the lawnmower, a sensor. 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.,

Image – Things & Features

Step #2. Use the Ditto 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.

Before that use pre-built images of Ditto and start the server. You can also choose from several options to deploy Ditto.

Image – CPU Core Sensors – Sample values

Image – HDD Temperature Sensors – Sample values

Career Category (English)640x480

Image – SSD S.M.A.R.T Sensors – Sample values

Image – Intel NUC Board from Sensors- Detect

The Ditto Protocol defines a JSON-based text protocol for communicating with digital twins and the actual physical devices they mirror. Below is a sample JSON format that is being used to represent the thing (here its 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.

Google IT Support Professional Certificate by Grow with Google (300x600) - 2

{
    "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.

Image – Things/Attributes/Features

Ditto has hosted a sandbox server that may be used by anyone to try out Ditto without starting it locally.

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 states and properties can be read, updated, and collated.

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

Image – Example Web Application that is built to view/modify sensor values.

Congrats! we have successfully built Digital Twin using Ditto!

More examples can be located here.

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.

Start your future with a Data Analysis Certificate.

We can use any of the ML algorithms to build a model that can predict failures based on the attributes.

Looking forward

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.

Like this post? Don’t forget to share it!

Additional Resources :

Summary
How to build Digital Twin using Eclipse Ditto?
Article Name
How to build Digital Twin using Eclipse Ditto?
Description
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.
Author
Publisher Name
Upnxtblog
Publisher Logo

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: