Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
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 eBook?

Product feature icon Instant access to your Digital eBook purchase
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
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

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 : 9781801073974
Vendor :
Microsoft
Category :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
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

Product Details

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

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

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

Most Recent
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
Most Recent

Filter reviews by




LEE SANG CHUL Mar 20, 2023
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
This book is uninteresting and boring. There are no fancy 3D or 2D graphics that other digital twin tools show. The author has written it so that readers can easily follow it. However, readers who are new to Azure digital twin will find it too difficult to use.
Amazon Verified review Amazon
Shawn Deggans Apr 23, 2022
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I'm an Azure IoT Specialist, so when I had the opportunity to read and review this book, I couldn't pass it up. Digital Twins is a concept that allows us to digitally mimic the real world using a feedback loop of sensory devices and cloud technologies. Azure Digital Twins is at the heart of these technologies on the Azure Cloud.Alexander does an excellent job of setting up the expectations for the product and provides a practical path for making use of Azure Digital Twins in the real world. Though I would have personally liked to have seen the samples in Python using VS Code, the choice of using Visual Studio and C# likely will appeal to more developers in the Microsoft development space.There is a bit of work that goes into setting up the development solution, but the author does a fair job of clearly detailing the process and code is made available in a publicly accessible GitHub repository. It's difficult to simplify these solutions much more than what Alexander has done without taking away some of the power introduced in the demonstration projects.The section covering the Digital Twin Definition Model was definitely refreshing. I believe there could be an entire book exploring this area. Microsoft creates great documentation these days, but it's still difficult to find good examples of DTDL without reverse engineering the JSON from your Digital Twin models. It great to see this covered clearly and in such detail.I would have liked more from the SDKs, but what's there is a good starting point.The solution.I liked Alexander's architectural choices for working with ADT. I think it's a practical approach that could meet many Digital Twins scenarios. And the integration with Azure Maps coverage was an excellent bonus.The use cases give you an additional taste of Digital Twins using integration with augmented reality, which is one of the many reasons to use this in a solution.I'd recommend this book to intermediate to advanced Azure developers. If you aren't familiar with programming, Azure cloud, or IoT, the subjects in this book might be tough to grasp. However, I would encourage anyone interested in IoT, Digital Twins, and Azure to give this book a read.
Amazon Verified review Amazon
Joost van Schaik Apr 21, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The best thing about this book is that I know finally have a clear picture of what a digital twin actually *is*, in very concrete terms. Most of what I previously read about this subject is either rather abstract or is more directed at marketeers. After a short introduction in general terms this book goes into "show, don't tell" mode. It shows you, in detail - and I mean DETAIL - how to set up and configure digital twins in Azure. Step by step. It reads more like a consecutive set of tech blog posts than your average book, actually. Having worked as a software engineer in Geo-ICT for 23 year, I particularly like the detailed explanation of Azure Maps integration, and how this can be used for displaying geographically locatable data. Very much recommended for tech people like me, who above all want to know *how stuff works
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
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
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.