Reader small image

You're reading from  Hands-On Industrial Internet of Things

Product typeBook
Published inNov 2018
PublisherPackt
ISBN-139781789537222
Edition1st Edition
Right arrow
Authors (2):
Giacomo Veneri
Giacomo Veneri
author image
Giacomo Veneri

Giacomo Veneri graduated in computer science from the University of Siena. He holds a PhD in neuroscience context with various scientific publications. He is Predix Cloud certified and an influencer, as well as SCRUM and Oracle Java certified. He has 18 years' experience as an IT architect and team leader. He has been an expert on IoT in the fields of oil and gas and transportation since 2013. He lives in Tuscany, where he loves cycling.
Read more about Giacomo Veneri

Antonio Capasso
Antonio Capasso
author image
Antonio Capasso

Antonio Capasso graduated in computer automation in 1999 and computer science in 2003 from the University of Naples. He has been working for twenty years on large and complex IT projects related to the industrial world in a variety of fields (automotive, pharma, food and beverage, and oil and gas), in a variety of roles (programmer, analyst, architect, and team leader) with different technologies and software. Since 2011, he has been involved in building and securing industrial IoT infrastructure. He currently lives in Tuscany, where he loves trekking and swimming.
Read more about Antonio Capasso

View More author details
Right arrow

Performing a Practical Industrial IoT Solution with Azure

In the previous chapters, we looked at how to build an I-IoT platform with AWS, GCP, and a custom solution. We have explored some of the most important concepts, including storage, time-series, microservices, protocols, and data analytics. The purpose of this chapter is to build an I-IoT solution with Azure.

In this chapter, we will discover the most popular Azure cloud components that can be applied to I-IoT. We will cover the following:

  • Azure IoT
  • Azure analytics
  • Building visualizations with Power BI
  • Time Series Insights
  • Connecting a device with IoT Edge
  • Comparing the platforms

Technical requirements

Azure IoT

Azure IoT is a platform proposed by Microsoft to connect multiple devices, enable telemetry, store measures, run and develop analytics, and visualize results. The key components of Azure IoT are the following:

  • IoT Hub
  • Stream Analytics
  • Azure Data Lake
  • Data Lake Analytics
  • Time Series Insights

The general purpose components of Azure are the following:

  • Machine Learning (ML) Analytics
  • Power BI

The following diagram shows the architecture proposed by Azure. Data is acquired through the Azure IoT Edge and sent to the Azure IoT Hub. Data can be processed with low latency Stream Analytics, stored in a time series database called Time Series Insight, or stored in Azure Data Lake. It can then processed by Azure ML Analytics or Data Lake Analytics. Finally, we can use Power BI for fast visualization of the data:

The Azure IoT architecture
...

Azure analytics

Azure provides three different frameworks that can be used to work with data—Stream Analytics, Data Lake Analytics, and ML Analytics.

Stream Analytics

Having added the data to the Azure IoT Hub, the next step is to develop an analytics job to process our data. In this example, we will extract the efficiency of the simulated compressor station, and will save the results into Data Lake Storage:

  1. From the Azure portal, search for Stream Analytics and click on Stream Analytics jobs. Then, click on the Create stream analytics job button and provide a straightforward name, such as my-iiot-job, as shown in the following screenshot:
Creating an analytics job in Azure Stream Analytics
  1. Once this is done, we...

Building visualizations with Power BI

Power BI is a suite for business analytics that provides insights and allows you to see live data. With Power BI, we can build a live dashboard with just a few clicks.

The first step is to create a Power BI account by navigating to https://app.powerbi.com/. We can activate a free 60-day account by providing our email address. We can also access Power BI from the Azure portal.

When we have registered, we need to connect our data flow from the IoT Hub to Power BI. This process is the same as we did for Stream Data Analytics, but we need to set the Power BI storage as the output of the data flow:

  1. From Data Stream Analytics, we can create a new job, called my-iiot-vis-job, with the following settings:
Input: "iiothub"
Query:
SELECT * into iiotpowerbi FROM iiothub
  1. For the output, click on the +Add button and then Power BI. We can then...

Time Series Insights (TSI)

TSI is a new-generation database that supports time series data. To get a quick preview of TSI, navigate to https://insights.timeseries.azure.com/demo. TSI reads messages from IoT Hub. It supports query search-spans (Time From-To) and several aggregate functions, such as Sum, Avg, Min, and Max.

Connecting a device with IoT Edge

Azure IoT Edge is the Edge Gateway and Edge computer of Azure. In the previous section, we implemented a simple Edge Gateway with the Azure Device SDK and Node.js. Azure IoT Edge simplifies the development process and enhances the computation capabilities of the Edge, distributing business logic to devices through standard containers and monitoring them from the cloud.

The following screenshot summarizes the main features of Azure IoT Edge from three different perspectives—computation, gateway, and development:

Azure IoT Edge reference architecture

The preceding diagram can be explained as follows:

  • Computation: With Azure IoT Edge, we can deploy Azure Stream jobs and Azure ML Analytics on the Edge to perform simple or advanced actions. Azure IoT Edge runtime supports C#, Node.js, Java, Python, and C.
  • Gateway: Azure IoT Edge can connect...

Comparing the platforms

Let's conclude our discussion by comparing the discovered platforms. To evaluate a platform, it is important to take the specific use case into account, but there are three general key points that we should consider:

  • Does the data model conform to how we acquire data?
  • Does the support for analytics conform to our needs?
  • Are the supported devices suitable for our use cases?

In the I-IoT, we acquire data when it changes, so we may need interpolation functions to fill the gaps, as we discovered with the OpenTSDB and KairosDB open-source databases in Chapter 8, Implementing a Custom Industrial IoT Platform. It is important to consider whether for our particular context it is more appropriate to use an analytical cold-path or hot-path. Microsoft has good support for the OPC DA and OPC UA acquisition standards, while AWS is currently developing support...

Summary

In this chapter, we have explored the most common functionalities of Azure IoT and looked at its advantages and disadvantages. With this, we have come to the end of our discussion on data acquisition technologies. In the next chapter, we will explore how to develop analytics in the industrial sector. We will learn about diagnostic, prognostic, and predictive analytics, and discover both physics-based and data-driven technologies. We will develop several examples using machine learning techniques and deploy our analytics on the cloud.

Questions

  1. Which of the following technologies is the most appropriate time-series database?
    1. Power BI
    2. Time Series Insights
    3. Azure Hub
  2. Which of the following technologies is a big data technology?
    1. Azure TSI
    2. Azure Data Lake
    3. Azure Hub
  3. Which technology can we use for fast data processing and low latency analytics?
    1. Data Lake Analytics
    2. Azure ML Analytics
    3. Azure Analytics Stream

Further reading

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Industrial Internet of Things
Published in: Nov 2018Publisher: PacktISBN-13: 9781789537222
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Authors (2)

author image
Giacomo Veneri

Giacomo Veneri graduated in computer science from the University of Siena. He holds a PhD in neuroscience context with various scientific publications. He is Predix Cloud certified and an influencer, as well as SCRUM and Oracle Java certified. He has 18 years' experience as an IT architect and team leader. He has been an expert on IoT in the fields of oil and gas and transportation since 2013. He lives in Tuscany, where he loves cycling.
Read more about Giacomo Veneri

author image
Antonio Capasso

Antonio Capasso graduated in computer automation in 1999 and computer science in 2003 from the University of Naples. He has been working for twenty years on large and complex IT projects related to the industrial world in a variety of fields (automotive, pharma, food and beverage, and oil and gas), in a variety of roles (programmer, analyst, architect, and team leader) with different technologies and software. Since 2011, he has been involved in building and securing industrial IoT infrastructure. He currently lives in Tuscany, where he loves trekking and swimming.
Read more about Antonio Capasso