Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Hands-On Azure Digital Twins
Hands-On Azure Digital Twins

Hands-On Azure Digital Twins: A practical guide to building distributed IoT solutions

eBook
$35.99 $51.99
Paperback
$65.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Hands-On Azure Digital Twins

Chapter 1: About Digital Twins

This chapter will explore the concept of a Digital Twin. A Digital Twin is a virtual representation of the real world combined with real-world data. Digital Twins can be used for a variety of scenarios. Digital Twins can be used to visualize insights or to simulate real-life situations by using a virtual representation and real-life sensory data. Learning about Digital Twins allows you to build solutions around these scenarios.

In this chapter, we'll go through several scenarios to understand Digital Twin implementations. We'll look at Microsoft's Azure Digital Twins service and how it allows us to model a Digital Twin. We'll walk through the layout of the service and how it is incorporated into the model of a Digital Twin. Part of that is a global overview of the architecture, which includes the relationship to other Azure services. This is required to create an actual Digital Twin solution. We will finish with an overview of the available SDKs and APIs for using Azure Digital Twins to create your own Digital Twin solutions. The chapter contains a lot of introductions to different services and tools that will appear again in the following chapters.

In this chapter, we'll go through the following topics:

  • Understanding the concept of the Digital Twin
  • Exploring the Digital Twin environment
  • Looking at real-world applications
  • Azure Digital Twins
  • Understanding the components of Azure Digital Twins architecture
  • Exploring Azure Digital Twins APIs

Understanding the concept of a Digital Twin

You have probably heard someone talking about Digital Twins in the last few years. You could even say that it has been a buzzword for some time. But since 2019-2020, it's become more than just a buzzword. Organizations and people have started to understand the benefits of having a Digital Twin. There has even been a large increase in organizations that want to start and implement a Digital Twin.

But what is a Digital Twin? I get that question a lot. And every time it is difficult to come up with an answer that others will understand. And even referring to the definition on Wikipedia will not make it easy to understand. There are a lot of different definitions you can find online in articles and blog posts. To explain what a Digital Twin is requires a definition to start with followed by a more in-depth explanation of the definition itself. I use the following definition:

A Digital Twin is a digital replica of entities and their relationships in a reality

You may have noticed that this definition contains several terms: digital replica, entities, and reality. It becomes clearer when explaining each of them in more depth.

Digital replica

A digital replica is a way of storing several entities and their relationships in a specific model. Such a model is stored in a location according to your requirements and needs. An example could be a database or service. Each product on the market that is available to create a Digital Twin has its own way of storing the information that describes the model. That means that the digital replica can describe a real-life situation using definitions and parameters. Think of a machine and whether it is turned on or off. The digital replica would describe the machine and its state. But a digital replica could also be about a collection of machines and their relationships. Think of a machine that is creating a product and the machine that is packing the product. The packing machine requires products to pack anything. That relationship is also described in a digital replica.

Entities

Entities can be different things. An entity can be anything from a physical living being such as people to a physical non-living thing such as processes, machines, buildings, equipment, rooms, and devices. When we talk about physical, it means being physically part of the reality from which you create a digital replica. Each of these entities has a specific purpose within the model. An entity is described by its characteristics that are relevant to the model and what you try to achieve in your solution. An entity could be a temperature sensor installed in a room. The characteristics are then the location of that sensor, the temperature the sensor is measuring, and the notifications it is raising when the temperature gets too low or too high. The location in this case is the room where the sensor is located. That characteristic is a relationship to another entity called the room. All these characteristics when developing Digital Twins are described by properties and metadata.

Relationships

An important part of a Digital Twin is the way entities are related to each other. These relationships are important as they define the context in which the entities are depending on each other and are a part of the reality on which the model is based. A relationship itself defines a set of data based on how the relationship is defined between the entities. An example is the relationship between the temperature sensor and the room where it is installed. This relationship defines what the temperature is within the room. Business rules can be used to take certain actions based on entities and their underlying relationships. An example would be switching off the lights within the room when there is no movement for a pre-defined time. In that situation, the lights, motion sensor, and room are each an entity with underlying relationships.

Realities

Each entity is part of a reality. Normally the reality would be a part of the physical world around us, like the example of the temperature sensor in a room. In that case, we have an actual device, room, and building. But imagine a world that represents a theoretical reality. This could be a virtual, generated reality that acts as the source for the digital replica. An example would be a digital world created in virtual reality or even another Digital Twin.

You have just learned about the concept of Digital Twins and its elements. This is important since it will help you to understand how Digital Twins can be applied to different scenarios. In the next section, we will explore the different parts of the environment around a Digital Twin to implement Digital Twin solutions.

Exploring the Digital Twin environment

It is important to understand that we need to do more than just store a model of entities to use a Digital Twin. Using a Digital Twin requires us to bind information to our entities in the model and use some method of visualization to view the model and its outputs.

Figure 1.1 – High-level overview of a Digital Twin environment

Figure 1.1 – High-level overview of a Digital Twin environment

The model in Figure 1.1 shows a high-level overview of everything that is in some way used within a Digital Twin environment:

  • Entities – This part represents the entities from your reality. This is, for example, real-world assets, people, processes, and locations. Data that defines these entities is stored in some way in the Digital Twin.
  • Digital Twin – This is the digital replica model of the entities in the reality.
  • Input module – This part of the model provides data from entities into the Digital Twin model. In some situations, this is also used to dynamically generate the model-based structure of the entities. It depends heavily on actual data that flows from the entities being used in the reality.
  • Output module – The output of the model is in most cases used to visualize the data in some way. But that is not always the case. The output could also be a setting turned on based on business logic and rules that are triggered by the input.
  • Business logic and Rules modules – This is all about building logic and rules around the data in your Digital Twin. The result of this logic can resolve into setting the data of entities in the Digital Twin. You could extend this by connecting to or triggering the actual entity.
  • Visualize – It is often thought that a Digital Twin is visualized. But that is not always the case. In many situations, the data flows back to the entity itself. But in some situations, a visualization of data could enhance the experience and benefit the business process. Visualization can be reached in many ways. Think of a display at the door of a meeting room displaying availability, an Excel that is filled with output data, or using augmented glasses to create a 3D presentation based on the data from the entities.
  • Security – Each module needs to have some sort of role-based security. This can influence what data flows in and out of the Digital Twin. It could be used to only view the data that you are allowed to see based on your role in the organization. But it could also be used to view a subset of output data coming from the Digital Twin.

Now let's look at how a Digital Twin is connected to real-world entities.

A Digital Twin needs to be integrated with the physical and non-physical entities that it represents. As shown in the following figure, you will see that a Digital Twin is about being connected:

Figure 1.2 – Real-world entities are connected to a Digital Twin

Figure 1.2 – Real-world entities are connected to a Digital Twin

Any device that can generate some form of output information based on sensors, processes, or a manual action can be an input for your Digital Twin. And these same devices, if they have some form of interface, can be controlled using rules based on the received input.

Taking the example of the motion sensor, the entity representing the motion sensor needs to get the values from the actual motion sensor in the room. Then, business logic can define that the lights need to be turned off or on based on the value within that entity. The lights themselves are also an entity in the model and bound to the actual lights within the room. The business logic can then set the value on the entity of the lights.

There are Digital Twins that require no visualization. Those Digital Twins handle and set values that will cause certain physical entities to respond. Like the example with turning on and off the lights. There are situations where a Digital Twin needs to be visualized. Such situations require some sort of presentation of the information from the Digital Twin model. Presentations can be flat out a spreadsheet or a list. But they can also be a visual representation of reality on a desktop screen. And nowadays, with extended reality using augmented glasses, it is even possible to have 3D modeled presentations of your Digital Twin.

You have learned about the different modules and parts that are required when you are going to build a Digital Twins solution. In the next part, we will be looking at several real-world examples.

Looking at real-world applications

In this chapter, we have several scenarios that will help you better understand the idea behind a Digital Twin and what it can contribute to an organization. Since implementing a Digital Twin can be a costly journey to implement, it is important to address the business value for organizations:

  • Gaining insights – Digital Twins can be used to get better insights into your business operations and allow you to optimize these processes. More insights can be reached by visualizing situations that would normally not be visible or more difficult to understand. Hence, better insights and allowing you to respond differently, more quickly, or in a more streamlined process.
  • Collaboration – Using Digital Twins to view data in a collaborative way. By mimicking a real situation digitally, you can have multiple users experience and view the same data while not even being at the same location.
  • Education – Digital Twins give you the ability to create learning environments. These learning environments can be used at schools or at the start of a job to get new employees more quickly up to speed.
  • Simulation – Simulation by using Digital Twins allows you to create digital replicas of environments that are normally difficult to reach, too dangerous, or just not accessible. It also allows you to experiment with settings to see what the outcome is before changing these settings in the actual environment to prevent downtime or process disturbances.
  • Create experiences – Experience a process, environment, or other situation by digitizing using a Digital Twin. There is a very clear distinction for people between looking at a flat dashboard and having the situation visualized in three dimensions. People are used to understanding more quickly by looking at something in a three-dimensional way. It can also contribute to investors and management having a clearer overview of what they are managing.
  • Optimize operations and costs – Use Digital Twins to optimize processes in an organization to optimize operations and reduce costs. Digital Twins can deliver a return on investment in different ways. Better insights reduce time to action, getting new employees up to speed more quickly, or simulate possible optimizations before making them available in the real world.

Smart building

A smart building involves including intelligence in the processes of maintaining a building and its services. In this example, we have the Contoso office building, which has several meeting rooms. These rooms are maintained by facilities. Since this office building is a smart building, several sensors are installed in each room. We have sensors for temperature, humidity, motion, and light. Each of these sensors can be read out through a smart network. Additionally, things such as light can also be controlled by that same smart network.

Figure 1.3 – Example of a 2D map interface used for a smart building

Figure 1.3 – Example of a 2D map interface used for a smart building

The facilities team is responsible for the state of these rooms. One of their responsibilities is, for example, keeping the rooms at a standard temperature. There are several conditions that can influence the temperature in the rooms:

  • Room usage – The room being used or not for a specific amount of time
  • Group size – The number of people that are in the room when it is in use
  • Devices – Devices such as laptops, wall screens, projectors, and the use of light

Another responsibility is to provide a booking system for the meeting rooms. This booking system shows the availability on a small screen at the door and allows employees to book a meeting room through an app or service, such as Outlook.

A Digital Twin can be used to monitor and act based on business logic and rules. It can automatically switch off the lights when there is no movement in the room for a specific period. It can change the temperature based on the conditions mentioned earlier. But it is also used to update the small screen at the door with the latest information and bookings, maintaining availability by freeing up rooms that were booked but do not have someone inside, since we monitor light and movement.

There are many other features that are provided by using a Digital Twin for a smart building.

Education

In this example, we are at the Contoso Water company. Water is coming in from natural sources and goes through a filter system into large reservoirs where it is transported to households. The system needs to be in harmony for optimal performance.

This water company uses large pumps that transport incoming water into the filter system. The configuration of these pumps and their throughput needs to be adjusted over time. It is a delicate task to make changes. With the wrong configurations, the filter system could be overloaded and bring the whole water plant to a stop. The engineers who are allowed to perform these tasks must have many years of experience to perform these tasks without worry.

What happens with a junior engineer who just came from school? The junior engineer needs to learn these tasks too. But you don't want the junior engineer to practice on the actual water pump.

A Digital Twin can help with this. By replicating the important, key parts of the water plant, simulating and visualizing the assets using augmentation or virtual reality, the junior engineer can learn how to execute these tasks. The student engineer can view the digital pump and learn how to control this pump. And by tweaking the values in the model, it is possible to see the influence on the other assets in the plant. For example, by changing the throughput of the water, the student engineer can learn what the effect is on the filter system. This can be achieved by enriching the Digital Twin model using historical data and specifications of the real-world assets such as the water pump and the filter system.

Simulation

Simulation is one of the most powerful features you can create with Digital Twins. Just like the teaching example, you can simulate almost anything in a digital world. Simulation can be used for areas that are normally very dangerous to be in, such as an oil rig or areas that are not easily accessible, such as an operating room in a hospital. But it can also be used to optimize processes, which will in time create more margin.

In this example, we have the Contoso oil plant. Most of the areas in an oil plant are dangerous due to the threat of explosions and fire hazards. Oil plants contain large quantities of assets, each with its own configuration and real-time sensor devices.

For an oil plant, it is important to have the plant running as close to optimal as possible. The more oil produced, the better.

Now assume we use a Digital Twin to create a digital replica of the oil plant. We add the configuration information and real-time IoT data from sensors to the Digital Twin. This digital replica allows us now to change configuration settings for the plant and see what effect this has on oil production. Since we don't know the results upfront, the simulation will help us decide which asset configurations are required to have a positive effect on oil production.

Historical data

An interesting use case is the ability to view historical data using a Digital Twin. The amount of data stored by organizations is phenomenal. But that data is almost never used in a way that the organization could benefit from.

For this example, we will use Contoso Events. Contoso Events is a large organizer that organizes events in big cities. One of their main concerns is handling security and safety. This involves the government, police, health, and fire department. They will need to prove that they have taken enough precautions to manage it. Contoso Events needs to determine what is required to achieve a certain level of security and safety. Part of this is closing roads and defining health points in the city. The organization uses smart cameras during the event to monitor issues and crowd density. They have been collecting this data and data from various access, check, information, and health points.

In this case, the Digital Twin is a digital replica of the city map enriched with the collected data. All data is visualized on a city map. The Digital Twin contains a slider to move through time to view everything that is happening during the event. Based on these insights, their own experiences, and using machine learning, they are able to determine what the best locations are for placing roadblocks, information points, access points, and health points. The information is shared with all the government agencies.

Insight and control

Having better insights into and control over processes can help an organization. It is all about empowering workers at any level, improving and optimizing processes, and getting insights and end-to-end telemetry.

We have a company called Contoso Construction. This company performs construction work on existing facilities worldwide. Their work involves adding and updating new assets. They use large equipment such as trucks and cranes to perform their work. Several workers are onsite performing different tasks to get the job done. Contoso Construction wants to have more insights and control over the work process and the safety of their employees. While they try to prevent incidents, when those incidents happen, they require a command center to monitor and assist from a global level. Each assignment they have gives them asset data. This asset data contains the location of the asset and real-time data from sensors that are connected to the asset. An asset can be anything from a simple machine to a storage location.

By combining all this data into a Digital Twin and connecting it to backend systems containing the assets, Contoso Construction can create a visual representation of the site using augmented glasses, as shown:

Figure 1.4 – Command and control center of a construction site

Figure 1.4 – Command and control center of a construction site

When an issue occurs, the facility manager can view the issue in real time on a 3D map of the site. The visualization shows which alerts are generated based on sensor data and which cases and tasks are created. It is even possible to assign a task to an engineer. That data flows back into the Digital Twin and updates the connected backend systems.

You have learned about the different scenarios of using a Digital Twin. These examples have shown you how to solve scenarios around gaining insights, education, simulation, and creating experiences with Digital Twins. In the next part, we will explain how Digital Twins reside within Microsoft Azure.

Azure Digital Twins

Microsoft has built a comprehensive cloud platform in the last 10 years called Microsoft Azure. Every year, new services are released on the platform. One of them is Azure Digital Twins. Azure Digital Twins is part of the Internet of Things (IoT) platform and is called the next-generation IoT solution that models the real world.

The Azure Digital Twins service

The Azure Digital Twins service is a platform as a service (PaaS) that enables you to create digital replicas of an environment. PaaS is a cloud model where a provider delivers hardware and software tools enabling you to build your solutions without worrying about purchasing, installing, and maintaining hardware infrastructure.

It has a robust setup that provides a scalable and secure environment. It is part of IoT-connected solutions within Azure that allow it to connect to assets such as IoT devices as other Azure services and backend systems. The Azure Digital Twins service uses an event system to allow you to build your own business logic and data processing as routing. And it integrates with Azure services such as Azure Storage, Analytics, and Azure Machine Learning to extend the platform with predictiveness. The service can be created through the Azure portal.

Important terminology

Before we move forward, it is important to understand the different terminology used within Azure Digital Twins. Without it, it could become very confusing when explaining how Azure Digital Twins works:

  • Azure Digital Twins instance – This represents the complete digital replica of reality.
  • Model – A model is seen as the noun in a description within reality. It is like a class within programming and defines a part of that reality. Examples of a model are Room, Engineer, Asset, MotionSensor, and Device. Each model is described by properties, relationships, telemetry, components, and commands.
  • Digital Twin – An instance of a model to represent a certain entity. An example is CoffeeRoom based on the Room model.
  • Twin graph – A representation of Digital Twins and their underlying relationships.

Open modeling language

Models used in Azure Digital Twins are based on the Digital Twins Definition Language (DTDL). DTDL is used as a definition language for Azure Digital Twins and IoT Plug and Play. It is part of the IoT space and helps to describe the model's ability to support provisioning and configuration across the different IoT resources. DTDL uses a variant of JavaScript Object Notation (JSON) and is named JavaScript Object Notation for Linked Data (JSON-LD).

Important note

Azure Digital Twins uses DTDL version 2. While it uses DTDL as its modeling language, it does not currently implement DTDL commands.

Tools

There are several tools that are needed when you start working on Azure Digital Twins. First, you will require an Azure environment. The Azure environment allows us to create the Azure Digital Twins service and to monitor all the other services that we will be using throughout the book.

We will be using Azure Digital Twins Explorer to view an Azure Digital Twin that is created. The tool connects to an instance of the Azure Digital Twins service and allows you to query models.

In most cases, Azure resources such as Azure Functions, Azure Service Hub, and others are used to connect to the Azure Digital Twins service. Throughout the book, we will be using Microsoft Visual Studio to create code and deploy services to build Digital Twin examples.

In most scenarios, an Azure Digital Twins instance contains digital replicas of devices. These devices generate IoT data. While normally devices are connected and routed using Azure IoT Hub, you could also make use of IoT Central.

Azure IoT Hub is a managed cloud-hosted service that operates as a message hub for bi-directional communication between an IoT application and IoT devices.

IoT Central is a web-based service that allows you to connect a variety of different devices. But it is also possible to mimic these devices. You will get the available telemetry, which instead now generates demo IoT data. This allows you easily to test your Azure Digital Twins instance without the need for actual devices.

Costs

The Azure Digital Twins service does not have any upfront cost or termination fees. You only pay for your consumption. The service has billing at three levels:

Table 1

You have learned about the Azure Digital Twins service and how this represents a Digital Twin within Microsoft Azure. We also talked about the modeling language and the costs of the service. In the next part, you will learn about the different Azure components that act as input and output services when building solutions with the Azure Digital Twins service.

Understanding the components of Azure Digital Twins architecture

A Digital Twin Graph is created based on instances of those models and their relationships. The service provides several ways of managing the models and the Digital Twin Graph. But it depends on other Azure services to create an Azure Digital Twins instance.

Figure 1.5 – An overview of input and output services that are used with Azure Digital Twins

Figure 1.5 – An overview of input and output services that are used with Azure Digital Twins

In Figure 1.5, you see some of the Azure services available to interact with Azure Digital Twins. Some of these services can be used for different parts of your Azure Digital Twins instance.

Managing Azure Digital Twins

Managing is all about defining and creating models, creating instances of models, and laying out relationships between those instances to create a Digital Twins Graph. To access the Azure Digital Twins service, you have REST APIs available. The creation of models is done by defining the models using the DTLD. There are several ways of managing Azure Digital Twins:

  • Azure Digital Twin Explorer – A tool to manage, view, and upload models, create instances of models, and set relationships.
  • Client App – A custom application that makes use of available REST APIs and client SDKs to access the service.
  • Power App – The Power Platform, a platform that provides several applications and services to build low-code/no-code solutions and allows you to create a Canvas app that can connect to an Azure Digital Twins service.
  • Azure services – Different services such as Logic Apps, Azure Functions, and Azure Service Bus provide a way of connecting to Azure Digital Twins to manage the models. We will go into more depth about these services and how to use them in the next section.

Azure Functions

Azure Functions is a serverless compute service that runs event-triggered code. Azure Functions simplifies the development and provisioning of small applications without the concern of setting up an infrastructure. It is also called "compute on-demand." This means that it only runs when requested and automatically upscales when the number of requests increases.

Azure Functions makes it easy to handle different roles and tasks around an Azure Digital Twins instance. The following is a list of different tasks performed by Azure Functions.

Table 2

Azure IoT Hub

This is a managed service that acts as a central messaging hub between devices and IoT applications such as the Azure Digital Twins service. Any device can be connected to Azure IoT Hub. The hub provides a secure way of communicating with the attached devices. It can route device telemetry to multiple endpoints. It integrates with other services, such as Azure Event Grid, Azure Logic Apps, Azure Machine Learning, and Azure Stream Analytics.

In production solutions, you will mostly rely on Azure IoT Hub as the hub for connecting your application against real-world IoT sensors.

Azure IoT Hub Device Provisioning Service

This service, also called DPS, is a provisioning service for Azure IoT Hub. It enables the provisioning and connection of millions of devices in a secure and scalable way to Azure IoT Hub – scenarios such as zero-touch provisioning, load-balancing, and connecting devices to different IoT solutions within your IoT platform.

Azure Logic Apps

Azure Logic Apps is an Azure service that allows you to build automated, scalable workflows. It incorporates the basic elements of the Azure platform, such as user roles, security, and more. It supports hundreds of connectors to connect to any Microsoft service or external well-known service in the cloud or on-premises. And if there is no connector available, you can directly call the service or create your own custom connector. It provides a visual web interface allowing you to build these workflows quickly. These workflows can then be integrated into applications such as your Azure Digital Twins instance.

Azure Logic Apps can be used to define processes around your instance. These processes will be able to create and update Digital Twins. Processes can act upon certain values that are read from the Digital Twins.

Azure Storage

In principle, a Digital Twin can store information in its properties. But as soon as new values are set, the old values are overwritten. Data can be preserved by connecting the Azure Digital Twins service to Azure Storage. Depending on your requirements, you could choose simple storage such as storage accounts. But in most cases, your Azure Digital Twins instance depends on IoT data. Azure Data Lake provides storage for these large amounts of data.

Azure Analytics

Azure Digital Twins is part of the IoT platform. In almost any Azure Digital Twins instance, IoT data is involved such as sensor data. The IoT platform provides several ways to perform analytics.

One of them is called Azure Time Series Insights Gen2. This is an open and scalable end-to-end IoT Analytics service. The service can be used for collecting, processing, storing, and querying IoT data to analyze trends and anomalies. It does not require any lines of code to use this service.

It provides APIs to integrate it into your solution. But it can also be integrated into the workflows defined around your solution.

Together with the Azure Digital Twins service, it can be used to monitor the health, usage, and performance of devices. This allows you to optimize operational efficiency.

Azure Service Bus

Azure Service Bus is cloud messaging as a service (MaaS). It simplifies cloud messaging on an enterprise level by delivering a scalable cloud messaging solution. The service acts as a message broker by using message queues and topics. When you built large IoT solutions including Azure Digital Twins, this service can support the routing of messages from IoT devices to a Digital Twin. Backend systems can be loosely coupled by using Azure Logic Apps. Azure Functions is used to get messages from the message queue into an Azure Digital Twins instance.

Exploring the Azure Digital Twins REST API

As you will have noticed, it is possible to use a large set of different Azure services to connect to Azure Digital Twins as an input, output, management, or compute service. While in some cases, no code is required to make the connection, some services require a more tailormade approach. Azure Functions is such an example. It requires the use of the REST API of the Azure Digital Twins service to access the Digital Twin Graph.

The REST API is divided into two different API models.

Table 3

Each of these REST APIs is available through different SDKs. This gives you the ability to manage and access the Azure Digital Twins instance from various sources.

The following SDKs are available:

  • .NET SDK – A C# SDK provided through NuGet. This allows you to easily create Azure Functions and other Azure services via Visual Studio by adding the required NuGet packages.
  • Java SDK – A Java SDK to support Maven projects. Maven is an automation tool that is primarily used for building Java projects.
  • JavaScript SDK – A JavaScript SDK available to create web-based solutions that require access to Azure Digital Twins.
  • Python SDK – A Python Package Index (PyPi) SDK that allows you to access the Azure Digital Twins instance by using Python. Python is often used when building intelligent applications with, for example, Azure Machine Learning.

In this book, we will primarily focus on code examples on the .NET SDK.

Summary

In this chapter, you have learned and understood the concept of a Digital Twin and viewed a high-level overview of a Digital Twin environment. Based on several use cases and scenarios, we have shown how a Digital Twin can be used. We followed up with Azure Digital Twins, an Azure service that allows you to build a Digital Twin. At a global level, we explained the terminology, tools, architecture, and related Azure services. The final part of this chapter went into the availability of SDKs and APIs and in which languages they are available.

In the next chapters, we will go more into detail about each of the functionalities we have discussed in this chapter. We will guide you, step by step, in designing, creating, and building your own Digital Twin.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Build and design simple to complex digital twins solutions
  • Create end-to-end solutions with Azure Digital Twins
  • Integrate the Azure Digital Twins service with other Azure services to provide even richer solutions

Description

In today’s world, clients are using more and more IoT sensors to monitor their business processes and assets. Think about collecting information such as pressure in an engine, the temperature, or a light switch being turned on or off in a room. The data collected can be used to create smart solutions for predicting future trends, creating simulations, and drawing insights using visualizations. This makes it beneficial for organizations to make digital twins, which are digital replicas of the real environment, to support these smart solutions. This book will help you understand the concept of digital twins and how it can be implemented using an Azure service called Azure Digital Twins. Starting with the requirements and installation of the Azure Digital Twins service, the book will explain the definition language used for modeling digital twins. From there, you'll go through each step of building digital twins using Azure Digital Twins and learn about the different SDKs and APIs and how to use them with several Azure services. Finally, you'll learn how digital twins can be used in practice with the help of several real-world scenarios. By the end of this book, you'll be confident in building and designing digital twins and integrating them with various Azure services.

Who is this book for?

This book is for Azure developers, Azure architects, and anyone who wants to learn more about how to implement IoT solutions using Azure Digital Twins and additional Azure services. Prior experience using the Azure Portal and a clear understanding of building applications using .NET will be helpful.

What you will learn

  • Understand the concept and architecture of Azure Digital Twins
  • Get to grips with installing and configuring the service and required tools
  • Understand the Digital Twin Definition Language (DTDL) and digital twin models
  • Explore the APIs and SDKs available to access the Azure Digital Twins services
  • Monitor, troubleshoot, and secure digital twins
  • Discover how to build, design, and integrate applications with various Azure services
  • Explore real-life scenarios with Azure Digital Twins
Estimated delivery fee Deliver to Ecuador

Standard delivery 10 - 13 business days

$19.95

Premium delivery 3 - 6 business days

$40.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 03, 2022
Length: 446 pages
Edition : 1st
Language : English
ISBN-13 : 9781801071383
Vendor :
Microsoft
Category :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Ecuador

Standard delivery 10 - 13 business days

$19.95

Premium delivery 3 - 6 business days

$40.95
(Includes tracking information)

Product Details

Publication date : Mar 03, 2022
Length: 446 pages
Edition : 1st
Language : English
ISBN-13 : 9781801071383
Vendor :
Microsoft
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 221.97
The Machine Learning Solutions Architect Handbook
$89.99
Building Industrial Digital Twins
$65.99
Hands-On Azure Digital Twins
$65.99
Total $ 221.97 Stars icon
Banner background image

Table of Contents

24 Chapters
Section 1: Azure Digital Twin Essentials Chevron down icon Chevron up icon
Chapter 1: About Digital Twins Chevron down icon Chevron up icon
Chapter 2: Requirements and Installation Chevron down icon Chevron up icon
Section 2: Getting Started with Azure Digital Twins Chevron down icon Chevron up icon
Chapter 3: Digital Twin Definition Model Chevron down icon Chevron up icon
Chapter 4: Understanding Models Chevron down icon Chevron up icon
Chapter 5: Model Elements Chevron down icon Chevron up icon
Chapter 6: Creating Relationships between Azure Digital Twin Models Chevron down icon Chevron up icon
Chapter 7: Querying Digital Twins Chevron down icon Chevron up icon
Chapter 8: Building Models Using Ontologies Chevron down icon Chevron up icon
Section 3: Digital Twins Advanced Techniques Chevron down icon Chevron up icon
Chapter 9: APIs and SDKs Chevron down icon Chevron up icon
Chapter 10: Building a Digital Twin Pipeline Chevron down icon Chevron up icon
Chapter 11: Updating the Model Chevron down icon Chevron up icon
Chapter 12: Event Routing Chevron down icon Chevron up icon
Chapter 13: Setting up Azure Maps Chevron down icon Chevron up icon
Chapter 14: Integrating Azure Maps Chevron down icon Chevron up icon
Chapter 15: Monitoring and Troubleshooting Chevron down icon Chevron up icon
Section 4: Digital Twin Implementations in Real-world Scenarios Chevron down icon Chevron up icon
Chapter 16: Facility of the Future Chevron down icon Chevron up icon
Chapter 17: Creating Digital Twins for Smart Building Chevron down icon Chevron up icon
Chapter 18: Simulations Using a Digital Twin Chevron down icon Chevron up icon
Assessments Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4
(8 Ratings)
5 star 75%
4 star 12.5%
3 star 0%
2 star 0%
1 star 12.5%
Filter icon Filter
Top Reviews

Filter reviews by




James Apr 04, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I've been working with Digital Twins for almost 10 years and as simple as the concept is, ontologies get in the way of implementations. The big deal is how can you implement, how does one actually create a digital twin and deploy it to your users.Let's be honest though, the Azure Digital Twin service/product is complex and requires a ton of work. It isn't an upload CAD drawing and connect some data sources. In this case Meijers does a great job of walking through how to get started. But it isn't for beginners, you'll need to have previous experience with Azure Cloud services, Microsoft Visual Studio and the ability to debug code. But if you've got even a general understand of this, the walk throughs are detailed enough to learn the idiosyncrasies of the Azure Digital Twin process.The book does take you through the process of understanding what an Azure Digital Twin model is, how to upload them, developing relationships between models and how to query them. After you have an understanding on this, Meijers dives into connecting the model to services, updating the Azure Digital Twin models and then connecting to Microsoft Azure Maps to view the model on maps. Finally he showcases how these Digital Twins can become smart buildings which is the hopeful outcome of doing all the work.The book has a lot of code examples and ability to download it all from a Github repository. Knowledge of JSON and JavaScript, Python and .NET or Java is probably required. BUT, even if you don't know how to code, this book is a good introduction to Azure Digital Twins. While there are pages of code examples, Meijers does a good job of explaining the how and why you would use Azure Digital Twins. If you're interesting in how you can use a hosted Digital Twin service that is managed by a cloud service, this is a great resource.I felt like I knew Azure Digital Twins before reading this book, but it taught me a lot about how and why Microsoft did what they did with the service. Many aspects that caused me to scratch my head became clearer to me and I felt like this book gave me additional background that I didn't have before. I debated between 4 and 5 star rating, mostly because this book requires an undemanding of programming but after finishing it I felt like Meijers' ability to describe the process outside of code makes the book well worth it to anyone who wants to understand the concept and architecture of Azure Digital Twins.Thoroughly enjoyed the book.
Amazon Verified review Amazon
Jack Raifer Mar 04, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Having a digital representation of reality is becoming more common and more important to solve today’s problems. Alexander Meijers does a great job at explaining the Digital Twins technology and takes you step by step through a journey of building them using the Azure Digital Twins Architecture. Highly recommended for anyone who wants to work on or simply learn more about Digital Twins.
Amazon Verified review Amazon
Savitha Manojna Mar 03, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Working a Solutions architect i have been part of teams implementing Digital Twin projects for a range of customers mainly from Healthcare and Manufacturing,though this is an evolving space with no single native platform offering all the tools and solutions needed by the use case this book by Alexander makes an honest attempt by bringing an approach to the madness of implementing a Digital twin on Microsoft Azure platform.Some of the features which enhnace the quality of the conetent are:a) Code based approach to building a digital Twin using Azure services and VS Code.b) Building Models which are the essential part of any Digital twin , teh models are the ones which decide if the implementaion is a success or failure.c) Detailed explanation of the azure services, concepts through diagrams and charts.d) Confidence building measures provided through actual blocks of code in the book and online supporting content.And many more practical industry based examples ..This book is a must for all Product leaders,Architects,Leads & developers who are working on Digital Twin projects. Could portentially save a lot of time and help avoid pitfalls.
Amazon Verified review Amazon
Shyam Apr 11, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I would recommend this book on Azure Digital Twins to Software Development Managers and Senior Developers. Would also recommend reading "Building Industrial Digital Twins" by same publisher Packt for Techno-Functional knowledge of Digital Twins, and then read this book for complete hands-on skills.
Amazon Verified review Amazon
David G Apr 14, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book provides a practical guide for working with Digital Twins for a virtual representation of the real world. Having a virtual representation allows you to provide data to the virtual representation to helps visualize insights or to simulate real-life situations to gain insight, for collaboration or optimize operations and costs. It is designed around building distributed IoT solutions targeted at Azure developers, solutions architects to learn about how to implement IoT solutions using Azure Digital Twins and additional Azure services.The book has sections for starting to build and define the model using features of the service: structured language to define model, model templates, adding telemetry and relationships with other digital twins, and ultimately querying to obtain data from the models and their relationships. Along with more advanced features using APIs and SDKs for management and control of digital twins, building a pipeline to converge data from different Azure services. The book will also provide examples for event routing to other services and using Azure Maps to create location-aware application based on geospatial information. And then finally providing scenarios of various examples to include future facilities and smart buildings as well as simulation in order to improve you modeling process and achieve better results.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact [email protected] with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at [email protected] using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on [email protected] with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on [email protected] within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on [email protected] who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on [email protected] within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela