Hands-On Industrial Internet of Things - Giacomo Veneri - E-Book

Hands-On Industrial Internet of Things E-Book

Giacomo Veneri

0,0
29,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

In today's automation-driven era, precision is crucial, and the Industrial Internet of Things (IIoT) has made a remarkable impact. This updated second edition explores the technologies fueling the IIoT revolution and shares essential knowledge to enable you to establish remote-access networks.
Written by IIoT and AI experts, as well as renowned authors, this book helps you enhance your skills in emerging technologies by introducing new techniques from Azure and AWS and keeping you up to date with the latest advancements. You'll find out how Artificial Intelligence of Things (AIoT) and MLOps apply to IIoT and learn how to handle complex projects confidently. The book covers identifying and connecting industrial data sources from various sensors, advancing from foundational concepts to professional skills. You'll discover how to connect these sensors to cloud networks such as AWS IoT, Azure IoT, and open source IoT platforms, and extract data from the cloud to your devices. Through hands-on experience with tools such as Node-RED, OPC UA, MQTT, NoSQL, defense in depth, and Python, you'll develop streaming and batch-based AI algorithms.
By the end of this book, you'll have achieved a professional level of expertise in the cloud, IoT, and AI, and be able to build more robust, efficient, and reliable IoT infrastructure for your industry.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 562

Veröffentlichungsjahr: 2024

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Hands-On Industrial Internet of Things

Build robust industrial IoT infrastructure by using the cloud and artificial intelligence

Giacomo Veneri

Antonio Capasso

Hands-On Industrial Internet of Things

Copyright © 2024 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

The author acknowledges the use of cutting-edge AI, in this case Perplexity AI, with the sole aim of enhancing the language and clarity within the book, thereby ensuring a smooth reading experience for readers. It's important to note that the content itself has been crafted by the author and edited by a professional publishing team.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Preet Ahuja

Publishing Product Manager: Suwarna Rajput

Book Project Manager: Ashwin Kharwa

Senior Editors: Mudita Sonar, Runcil Rebello

Technical Editor: Irfa Ansari

Copy Editor: Safis Editing

Proofreader: Runcil Rebello

Indexer: Rekha Nair

Production Designer: Prashant Ghare

DevRel Marketing Coordinator: Rohan Dobhal

First published: November 2018

Second edition: November 2024

Production reference: 1291024

Published by Packt Publishing Ltd.

Grosvenor House

11 St Paul’s Square

Birmingham

B3 1RB, UK

ISBN 978-1-83588-746-2

www.packtpub.com

To my wife, Stefania. My lovable everything.

– Giacomo Veneri

Contributors

About the authors

Giacomo Veneri was born in Siena, Italy, in 1973. He is an expert in data processing and industrial internet of things (IIoT). Working actively as an AI and IoT manager, he is the author of several books and scientific articles. He graduated from the University of Siena with a degree in computer science in 1999 and graduated in 2014 with a PhD in neuroscience and neural computation. He has achieved more than 10 certifications in programming, AI, and the cloud. Today, Giacomo is an AI director.

Antonio Capasso graduated from the University of Naples with a degree in computer automation in 1999 and a degree in computer science in 2003. 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 IIoT infrastructure. He currently lives in Tuscany, where he enjoys trekking and swimming.

About the reviewers

Balaji Kannapan has 25 years of overall experience and 20 years in the SAP supply chain across the life science, healthcare, automotive, consumer goods, manufacturing, IS oil, chemicals, and mining industries. He has accomplished aligning technology solutions integrated with various applications with strategic business requirements for a wide range of companies. He received a Bachelor of Engineering and a Master of Business Administration from the University of Madras. He has co-authored a book on warehouse management.

I’d like to thank my family and friends who understand the time and commitment it takes to write and review books. Contributing to this field would not be possible without attaining knowledge in consulting over the last several years. I am deeply indebted to the publishing companies for having the necessary framework for peer review and the people running them.

Diwakar Reddy Peddinti is a seasoned software engineer with over 12 years of diverse experience in domains such as embedded systems, aviation, logistics, and IIoT. He holds a master’s degree in data science and currently excels as a tech lead at a pioneering IIoT start-up in Silicon Valley. Diwakar’s extensive expertise encompasses designing enterprise-grade mobile applications, developing robust backend systems, performing data analytics on vast IoT datasets, and creating innovative machine learning and deep learning models. With a commitment to advancing technology and a proven track record in his field, Diwakar is dedicated to pushing the boundaries of what is possible in the ever-evolving software engineering landscape.

Somasundaram Palaniappan is a skilled artificial intelligence and machine learning engineer, specializing in the development and deployment of advanced machine learning models. He has a strong background in software development, complemented by a post-graduate program in cloud computing from Great Lakes Executive Learning (2022-2023), a post-graduate program in artificial intelligence and machine learning from Texas McCombs, The University of Texas at Austin (2021-2022), and a Bachelor's Degree in petroleum engineering from the University of Petroleum and Energy Studies, Dehradun (2010-2014). Currently, he serves as a lead AI engineer at Baker Hughes, where he applies his expertise to drive innovation and cutting-edge solutions.

I would like to extend my sincere gratitude to the author for entrusting me with the opportunity to review this work. It has been an enriching experience to engage with the depth and insight presented throughout the book. I am also thankful to the publishing team for their support and collaboration during the review process. Special thanks to my family, friends, and colleagues for their constant encouragement and feedback.

Table of Contents

Preface

Part 1: Industrial IoT

1

Introduction to Industrial IoT

Technical requirements

IoT background

History and definition

IoT enabling factors

IoT use cases

IoT key technologies

What is the IIoT?

Use cases of the IIoT

IoT and IIoT – similarities and differences

IoT analytics, AI, and AIoT

Industry environments and scenarios covered by IIoT

Summary

2

Understanding the Industrial Process and Devices

Technical requirements

The industrial process

Automation in the industrial process

Control and measurement systems

Types of industrial processes

The CIM pyramid

CIM pyramid architecture – devices and networks

CIM networks

The IIoT data flow

The Industrial IoT data flow in a factory

The edge device

The Industrial IoT data flow in the cloud

Summary

3

Industrial Data Flow and Devices

Technical requirements

The IIoT data flow in the factory

Measurements and the actuator chain

Sensors

Converters

Actuators

Controllers

Microcontrollers

PLCs

Advanced Control

DCS

Industrial protocols

The OSI/ISO model

Automation networks

The fieldbus

Supervisory control and data acquisition (SCADA)

Historian

ERP and MES

The asset model

ISA-95 equipment entities

SA-88 extensions

Summary

4

Implementing the Industrial IoT Data Flow

Discovering OPC

OPC Classic

OPC UA

The OPC UA information model

OPC UA sessions

The OPC UA security model

The OPC UA data exchange

OPC UA notifications

Understanding the IIoT edge

The IoT edge versus the IIoT edge

The fog versus the IIoT edge

The edge architecture

The edge gateway

The edge computing

The edge tools

Edge implementations

Azure IoT Edge

AWS IOT Edge

Node-RED

Edge internet protocols

Implementing the IIoT data flow

IIoT data sources and data gathering

PLC

DCS

SCADA

Historians

Edge deployment and data flow scenarios

The edge on a fieldbus setup

The edge on OPC DCOM

The edge on OPC-Proxy

The edge on OPC UA

OPC UA on the controller

Summary

5

Applying Cybersecurity

What is a DiD strategy?

Making people aware

Understanding technology

Operating modes and procedures

The DiD in an industrial control system environment

Firewalls

Common control-network-segregation architectures

Network separation with a single firewall

A firewall with a DMZ

A paired firewall with a DMZ

A firewall with DMZ and VLAN

Securing the IIoT data flow

Securing the edge on a fieldbus

Securing the edge on OPC DCOM

Securing the edge on OPC Proxy

Securing the edge on OPC UA

Securing OPC UA on a controller

Summary

6

Performing an Exercise Based on Industrial Protocols and Standards

Technical requirements

The OPC UA Simulation Server

OPC UA Server Node.js

Prosys OPC UA Simulator – optional step

The edge

Installing a simple edge client

The Node-RED edge

Node-RED

Summary

Part 2: Industrial IoT Architecture

7

Developing Industrial IoT and Architecture

Technical requirements

Introduction to the IIoT platform and architectures

Microservice, containers, and serverless computing

Docker

Microservice-oriented technologies

Software as a service

The standard IIoT flow

Understanding the time-series technologies

Not only sensors

Asset registry

Data processing and the analytics platform

Excursion monitoring analytics

Advanced analytics

Big data analytics

Hands-on with InfluxDB, Node-RED, and OPC UA

Using Docker Compose and Docker Build

Summary

8

Implementing a Custom Industrial IoT Platform

Technical requirements

An open source platform in practice

Mosquitto as a data gateway

Storing time-series data on InfluxDB

Connecting InfluxDb and MQTT Data Broker

Starting and testing the data flow

Visualizing data using Grafana

Developing our batch analytics with Airflow

Developing our online analytics with Airflow

What’s still missing here?

Building an asset registry to store asset information

Building an asset model with Neo4j

Pros and cons of the proposed platform

Other technologies

Other open source technologies for analytics

Other open source platforms

Other IIoT data beyond the time series

Summary

9

Building an AWS Industrial IoT Solution

Technical requirements

Why do we use commercial IIoT platforms?

AWS architecture

AWS IoT

Registering with AWS

Installing the AWS command-line interface client

IoT Core

Identifying the AWS MQTT endpoint

Connecting Node-RED

Using the AWS SDK

Greengrass V2

SiteWise

Summary

10

Implementing an Industrial IOT Data Flow with AWS

Technical requirements

Architecture of the exercise

AWS IoT Analytics

SageMaker and Athena

IoT Analytics

Storing data

Visualization

Workforce users

Grafana

About visualization

Summary

11

Performing a Practical Industrial IoT Solution with Azure

Technical requirements

Azure IoT ecosystem

Registering for Azure IoT

Azure IoT Hub

Registering a new device

Building a custom edge

Azure IoT Edge

Device twins

Monitoring messages sent through IoT Hub Metrics

Showing messages sent through Service Bus

Summary

12

Implementing an Industrial IoT Data Flow with Azure

Technical requirements

Architecture of the proposed exercise

Setting the data flow

Data storage

Data processing

Azure Synapse

Machine Learning analytics

Building visualizations

Azure Data Explorer

Grafana

Power BI

IoT Central

More on Azure Data Explorer

Comparing the platforms

Summary

Part 3: Industrial Artificial Intelligence of Things

13

Performing Diagnostic, Maintenance, and Predictive Analytics

Technical requirements

Jupyter

IIoT analytics

The different classes of analytics

Descriptive analytics

Diagnostic analytics

Predictive analytics

Prescriptive analytics

IIoT analytics technologies

Rule-based analytics

Model-based analytics

Building IIoT analytics

Step 0 – problem statement

Step 1 – dataset acquisition

Step 2 – EDA

Step 3 – building the model

Step 4 – packaging and deploying (MLOps)

Step 5 – monitoring

Understanding the role of the infrastructure

Deploying analytics

Streaming versus batch analytics

Condition-based analytics

Interactive analytics

Analytics on the cloud

Analytics on the edge

Analytics on the controller

Advanced analytics

OSA

Analytics in practice

Anomaly detection in practice

Anomaly detection with unsupervised ML

Anomaly detection with supervised ML

Predictive production analytics in practice

Prescription using language models

Summary

14

Implementing a Digital Twin – Advanced Analytics

Technical requirements

Digital twins

Digital twins in practice

Implementing a digital twin in IIoT

AI and IoT

ML

DL

GenAI

AGI

Developing a digital twin

Preparing the development environment

Evaluating the RUL of 100 engines

Monitoring a wind turbine

Platforms for digital twins

Digital twins platforms

Advanced modeling

Other kinds of IIoT data

Summary

15

Deploying an Analytics Model

Technical requirements

Understanding model-as-a-service

Developing our first MaaS with MLflow

Starting MLflow

Developing our ML model

Understanding Airflow integration

Working with the Azure ML service

Starting with the Azure ML service

Understanding the Azure ML workspace

Developing wind turbine digital twins with Azure ML

Cleaning the resources

IoT Hub integration

Azure IoT Edge

Implementing analytics on Amazon SageMaker

Accessing SageMaker Studio

Preparing an S3 bucket to store data

Developing a digital twin with SageMaker

Consuming the model from AWS IoT Core

Understanding the advanced features of SageMaker

Understanding GCP and multi-cloud solutions

Summary

Index

Other Books You May Enjoy

Part 1:Industrial IoT

This part introduces IoT and industrial IoT, explains industrial processes and protocols, and introduces Edge, MES, SCADA, PLC, DCS, and standards. In the last chapter of this part, we will gain practical experience with these technologies through hands-on exercises.

This part includes the following chapters:

Chapter 1, Introduction to Industrial IoTChapter 2, Understanding the Industrial Process and DevicesChapter 3, Industrial Data Flow and DevicesChapter 4, Implementing the Industrial IoT Data FlowChapter 5, Applying CybersecurityChapter 6, Performing an Exercise Based on Industrial Protocols and Standards

1

Introduction to Industrial IoT

This chapter introduces the reader to the IoT world, highlighting the key factors driving its growth and the main technologies behind it. We will go through the basic concepts of the IoT and how these have been applied, tailored, and specialized to fit Industrial Internet of Things (IIoT) scenarios. We will then look at the similarities and differences between the IoT and the IIoT, and consider some of the key use cases and expected outcomes of the IIoT. The reader will become familiar with some of the key concepts related to the IIoT, such as operational efficiency, preventive and predictive maintenance, and cost optimization. In this chapter, we will also clarify the kind of IIoT that will be dealt with in this book.

We will cover the following topics:

IoT backgroundIoT key technologiesWhat is the IIoT?Use cases of the IIoT and IoT—similarities and differencesIoT analytics and Artificial Intelligence of Things (AIoT)Industrial environments and scenarios involving IIoT

Technical requirements

In this book, we will work with several open source and proprietary technologies. To simplify the tests that we will carry out, we will use Docker to deploy databases and frameworks.

IoT background

IoT is the most recent stage in the evolution of the internet: from Internet of Content, through Internet of Services (Web 2.0), to IoT:

Figure 1.1 – Evolution of the internet: from social to machine-to-machine

In the last five years, IoT has reached widespread diffusion and a high level of maturity; with over 15 billion devices installed, the IoT has entered our homes, offices, and industries.

This is because the IoT is more than just a new technology that impacts a restricted range of people or a specific market. It can be better understood as a set of technologies that impacts us all, and will change markets, even creating new ones. The IoT is changing our lives, feelings, and perceptions of the physical world daily, by modifying how we interact with it. The development of the IoT is a crucial moment in the history of humanity because it is changing our mindset, culture, and way of living.

You might currently be able to regulate your heating system remotely, but if it lived in the cloud and received information from your car, your calendar, your geolocation, and the weather, then your heating system would be able to regulate itself. When an object lives in the cloud and interacts with other digital images in a web of Artificial Intelligence (AI), that object becomes a smart object.

These developments might seem to be paving the way for a new and perfect world, but there is a dark side to the IoT as well. A lot of personal data and information is stored in the cloud, such that AI can extrapolate information about us and profile our behaviors and preferences. From a different perspective, therefore, the cloud could also be seen as a sort of Big Brother, as in George Orwell’s novel 1984. There is the possibility that our data and profiles could be used not just to enhance our lifestyles but also for more malicious purposes, such as political or economic influence on a large scale.

In this book, we will learn how to implement an end-to-end IoT for industry and how to leverage the IoT data to build AI analytics.

History and definition

The IoT as a concept wasn’t officially named until 1999. One of the first examples of the IoT was a Coca-Cola machine, located at Carnegie Mellon University in the early 1980s. Local programmers would connect, through the internet, to the refrigerated appliance, checking to see whether there was a drink available and whether it was cold before making a trip to the appliance.

Kevin Ashton, the executive director of Auto-ID Labs at MIT, was the first to describe the IoT in a presentation for Procter and Gamble. During his 1999 speech, Mr. Ashton stated the following:

“Today, computers, and therefore the Internet, are almost wholly dependent on human beings for information. Nearly all of the roughly 50 petabytes (a petabyte is 1,024 terabytes) of data available on the Internet was first captured and created by human beings by typing, pressing a record button, taking a digital picture, or scanning a bar code. The problem is, people have limited time, attention, and accuracy, all of which means they are not very good at capturing data about things in the real world. If we had computers that knew everything there was to know about things, using data they gathered without any help from us, we would be able to track and count everything and greatly reduce waste, loss and cost. We would know when things needed replacing, repairing or recalling and whether they were fresh or past their best.”

Kevin Ashton believed that Radio-Frequency Identification (RFID) was a prerequisite for the IoT, and that if all devices were tagged, computers could manage, track, and inventory them. In the first decade of the 21st century, several projects were developed to try to implement and translate the IoT philosophy and Ashton’s innovative approach into the real world. These first attempts, however, were not so successful. One of the most famous and emblematic cases was the Walmart mandate (2003). By placing RFID tags with embedded circuits and radio antennas on pallets, cases, and even individual packages, Walmart was supposed to be able to reduce inefficiencies in its massive logistics operations and slash out-of-stock incidents, thus boosting same-store sales.

In 2003, Walmart started this pilot project to put RFID tags, carrying electronic product codes, on all pallets and cases involving all its suppliers. In 2009, Procter and Gamble, one of the main suppliers involved in the project, stated that it would exit from the pilot project after validating and checking the benefits of RFID in merchandising and promotional displays.

The unsuccessful story of the Walmart RFID project was caused by various factors:

Most of the technologies used were in their initial stages of development and their performance was poor. They had sensors with little information and Wi-Fi or LAN connectivity with high power and bandwidth usage.The sensors and connectivity devices were expensive due to the small market size.There were no common standards for emerging technologies, and there was a lack of interoperability between legacy systems.Business cases were not very accurate.The technology infrastructure and architecture were organized in vertical silos with legacy hardware and middleware, and a lack of interactions between each silo.Technology infrastructure and software architecture were based on a client-server model that still belonged to the so-called second digital platform.

From 2008, several changes were introduced to deal with the preceding issues, which were led mainly by the mobile market. These included the following:

New higher-performing processors were produced on a large scale at lower cost. These processors supported commercial and/or open operating systems.New sensors, which were much more developed, with computation capabilities and high performance, were embedded at a low cost.New network and wireless connectivity, which allowed the user to interconnect the devices with each other and to the internet by optimizing bandwidth, power consumption, latency, and range.Sensors and devices using Commercial off-the-Shelf (COTS) components were included.New power computational capabilities were included.Cloud-based, digital platforms were included.

Due to these changes, the IoT evolved into a system that used multiple technologies. These included the internet, wireless communication, micro-electromechanical systems, and embedded systems such as the automation of public buildings, homes, factories, wireless sensor networks, GPS, control systems, and so on.

The IoT consists of any device with an on/off switch that is connected to the internet. If it has an on/off switch, then it can, theoretically, be part of a system. This includes almost anything you can think of, from cell phones to building maintenance, to the jet engine of an airplane. Medical devices, such as a heart monitor implant or a bio-chip transponder in a farm animal, are also part of the IoT because they can transfer data over a network. The IoT is a large digital network of things and devices connected through the internet. It can also be thought of as a horizontal technology stack, linking the physical world to the digital world. By creating a digital twin of the physical object in the cloud, the IoT makes the object more intelligent thanks to the interaction of the digital twin with the other digital images living in the cloud.

IoT enabling factors

What has changed from the Walmart scenario to make companies support the advent of the IoT? There is no one specific new technology or invention, but rather a set of already existing technologies that have been developed. These have created an ecosystem and a technology environment that makes the connection of different things possible, efficient, easy from a technical perspective, profitable from a market perspective, and attractive from a production-cost perspective.

The technologies that have led to the evolution of IoT ecosystems are as follows:

A crucial component is new sensors that are much more mature, have more capabilities, and offer high performance at a lower cost. These smart sensors are natively designed to hide the complexity of the signal processing, and they interact easily through a digital interface. The smart sensor is a system itself, with a dedicated chip for signal processing. The hardware for signal processing is embedded in each sensor and miniaturized to the point that it is part of the sensor package. Smart sensors are defined by the IEEE 1451 standard as sensors with small memory and standardized physical connections to enable communication with the processor and the data network. As well as this, smart sensors are a combination of a normal sensor with signal conditioning, embedded algorithms, and a digital interface. The principal catalyst for the growth of smart-sensing technology has been the development of microelectronics at reduced cost. Many silicon manufacturing techniques are now being used to make not only sensor elements but also multilayered sensors and sensor arrays that are able to provide internal compensation and increase reliability. The smart sensors market is expected to reach 100 billion USD by 2027 from 45 billion USD in 2022.New networks and wireless connectivity, such as Personal Area Networks (PANs) or Low-Power Networks (LPNs), interconnect sensors and devices to optimize their bandwidth, power consumption, latency, and range. In PANs, several small devices connect directly or through a main device to a LAN, which has access to the internet. Low-Power Wide-Area Networks (LPWANs) are wireless networks designed to allow long-range communications at a low bit rate among battery-operated devices. Their low power, low bit rate, and intended use distinguish these types of networks from the already existing wireless WAN, which is designed to connect users and businesses and carry more data, using more power.New processors and microprocessors are now coming from the world of mobile devices. These are very powerful and very cheap. They have produced a new generation of sensors and devices based on standardized and cheap hardware that is driven by open and generic operating systems. These use common software frameworks as an interface, allowing you to transition from a legacy solution, with strictly coupled hardware and software, to a platform built on the COTS component and the adoption of an open software framework.The battle of the Real-Time Operating System (RTOS) to gain a larger slice of new markets between the big market players. This places more sophisticated and powerful integrated development platforms at the maker’s disposal.Virtualization technology divides naturally into the data center, big data, and the cloud. This leads to the following features:CPUs and GPUs, memory, storage, infrastructures, platforms, and software frameworks are available as services on demand, with flexible and tailored sizing. These are cheap and available without Capital Expenditure (CAPEX) investment.Elastic repositories are great for storing and analyzing the onslaught of data.The profitable and flexible Operational Expenditure (OPEX) model per CPU, memory, storage, and IT maintenance services is also useful. This creates a business case for migrating the legacy data, infrastructure, and applications to the cloud and making the collection of big data and subsequent analytics possible.The convergence of IT and Operational Technology (OT). This has led to the increasing adoption of COTS components in sectors in which hardware was traditionally developed with specific requirements, as is the case in industrial plants.The diffusion of mobile devices and social networks has created a culture and a generic mindset with an embedded expectation for the market consumers to encounter the world through an app that shares related information.

The preceding factors are making it possible to transition from a vertical, legacy platform with an application organized hierarchically, with the data confined in silos, to a horizontal, modular, and cloud-based platform. This new platform uses a standardized API layer that provides high interoperability capabilities and the ability to share data and information between applications.

Let’s consider what might happen if the Walmart project was carried out now. In 2003, the only RFID technology that existed was active RFID systems. Active RFID systems use battery-powered RFID tags that continuously broadcast their own signals. They provide a long-read range, but they are also expensive and consume a lot of power. Passive RFID systems, on the other hand, use tags with no internal power source and are instead powered by the electromagnetic energy transmitted from an RFID reader. They have a shorter read range, but they are unembeddable, printable, and much cheaper, which makes them a better choice for many industries. Also, at the time of the Walmart project, there were no PANs or LPNs to capture and transmit the label data, meaning the developers had to adopt an expensive, wired connection to transfer the information. The data was then stored in a legacy database and processed by a custom application. If the Walmart project were to be carried out now, instead of in 2003, the tracking information could be carried out by passive RFIDs. The data could be captured by a PAN and transmitted via the cloud to be processed by an application built on top of a common API and framework. This means that all data and information could be easily shared between the project partners.

According to Gartner, the IoT and connected devices market is expected to grow strongly in the next year:

The IT Services for IoT market will represent a 58-billion-dollar opportunity in 2025.

IoT use cases

As previously discussed, the IoT is not just a specific technological innovation, but a radical change that will impact the whole of human society. This means that the IoT will affect nearly every aspect of our personal and professional lives and any sector of the economy, including the following:

Industrial and manufacturingSupply chainRetailFinancial and marketingHealthcareTransportation and logisticsAgricultural and environmentalEnergySmart cities and smart gridsSmart homes and buildingsGovernment and military security forcesEducationSports and fitness

All of these are already involved in the digital transformation that has been caused by the IoT and are likely to play a greater role in this in the future. Across all uses of the IoT, the common feature is the smart object.

From a qualitative perspective, a smart object is a multidisciplinary object that includes the following elements:

The physical productSensors, microprocessors, data storage, controls, and software managed by an embedded operating systemWired or wireless connectivity, including interfaces and protocols

This is used to connect the product to its user, all instances of the product to its vendor, or the product to other types of products and external data sources. In another definition, the article How Smart, Connected Products Are Transforming Competition, written by Michael E. Porter and James E. Heppelmann, details four increasing levels that classify the smartness of an object or product:

Monitoring: This refers to the monitoring of product conditions, external operation, and usage. This enables alerts and notifications of changes.Control: Software embedded in the product or in the cloud enables control of product functions, and/or personalization of the user experience.Optimization: The previous capabilities are used to create algorithms to optimize the product’s operation and use. They enhance product performance, and/or allow features such as predictive diagnostics, service, repair, and so on.Autonomy: The combination of the previous capabilities produces a product with autonomous control for self-coordination with other systems and/or self-diagnosis or services.

IoT key technologies

The IoT is sometimes used as a synonym for big data or smart sensors, is sometimes confused with the cloud, and is sometimes linked to machine learning and AI.

All of these things are partially true:

IoT uses sensors and devices to acquire dataIoT uses big data technology to store dataIoT is normally deployed on the cloud to improve scalabilityIoT uses advanced analytics and AI to process data

However, on the flip side, there’s this to consider:

IoT is focused on a data stream, rather than having huge amounts (petabytes) of data storageIoT can use on-premises solutions through virtualization technology

In this book, we will explore the most common IoT cloud solutions, such as AWS and Azure. We will also look at other common open source technologies.

These technologies can be used to build an IoT platform from scratch or to integrate with an existing one. We will also consider other commonly used commercial software in the industrial environment. We will discover the new generation of edge computing and the edge gateway, and, finally, we will deal with machine learning and AI. This journey is also the journey of the IoT from the cloud to the big revolution of general AI expected around 2030:

Figure 1.2 – From cloud to AI – the landscape of the evolution of cloud AI and IoT

What is the IIoT?

After the advent of the steam engine in 1760, steam was used to power everything from agriculture to textile manufacturing. This caused the First Industrial Revolution and the age of mechanical production. At the end of the 19th century came the arrival of electricity, new modes of labor organization, and mass production, which started the Second Industrial Revolution. In the second half of the 20th century, the development of semiconductors and the introduction of electronic controllers produced the beginning of the automation era and the Third Industrial Revolution. In the Hannover exhibition of 2011, Henning Kagermann, Wolf-Dieter Lukas, and Wolfgang Wahlster coined the term Industry 4.0 for the project of renewing the German manufacturing system using the capabilities of the latest digital technology.

Industry 4.0 is able to do the following:

Connect or merge production with information and communication technologyMerge customer data with machine dataHarness the capability of machines communicating with machinesManage production autonomously in a flexible, efficient, and resource-saving manner

Industry 5.0 is the completion of Industry 4.0, which focuses on sustainability and resilience. Industry 5.0 is a collaborative industry characterized by human-machine cooperation. Industry 5.0 is based on the rapid development of increasingly powerful 4.0 technologies: the IT, AI, and robotics sectors, which are leading to the creation of Cyber Physical Systems (CPSs) and increasingly powerful IoT devices.

Figure 1.3 – From the First Industrial Revolution to the next generation of Industry 5.0

The IoT is almost, by definition, the key to further development of the manufacturing industry by including technologies such as big data analytics, the cloud, robotics, and most importantly, the integration and convergence between IT and OT. Generally speaking, the term IIoT refers to the industrial subset of the IoT. The IIoT, like the IoT, is not just a specific new technology but instead refers to the whole chain of value of a product. Similarly, the IIoT impacts all sectors of the industrial world by significantly modifying the processes at each stage of the life cycle of a product, including how it is designed, made, delivered, sold, and maintained.

Use cases of the IIoT

In few other industries are there so many opportunities to use the IIoT as in manufacturing. In this field, it can be used to connect the physical and the digital, and to build assets such as machines or production and non-production objects. It can also be used to create a variety of product and manufacturing process parameters as part of a vast information network. With manufacturing, we typically tend to think about goods and products, but the bigger opportunity for manufacturers lies in cyber-physical systems, a service economy model, and the opportunities that are presented through exploring data.

The following is a list of several IIoT use cases in manufacturing and their benefits:

Manufacturing operations: This includes all operations typically performed by the Manufacturing Execution System (MES) that can take advantage of end-to-end visibility, such as planning, production optimization, and supplier management.Asset management: This includes production-asset monitoring, as well as tracking and monitoring parameters areas, such as quality, performance, potential damage or breakdowns, bottlenecks, and so on.Field service organizations: These are an important driver of growth and, obviously, margin. It’s clear that having a hyper-connected, hyper-aware, digitized, and IoT-enabled manufacturing ecosystem marks a company out.Remote monitoring and operation: This optimizes flow, eliminates waste, and avoids unnecessary work in the process inventory to save energy and costs.Condition-based maintenance: This is important to optimize machine availability, minimize interruption, and increase throughput.AI: AI can be used to monitor the quality and the makeup of services and enhance the outcome of this data.

Ultimately, all of these use cases highlight the fact that data plays a key role. In the next few chapters, we will see how the data that comes from sensors and other industrial equipment is gathered and how big that data can be. Manufacturers who use this data can bridge the gaps between the planning, design, supply chain, and customers of a particular product. In addition, thanks to this strong integration, shared data and information islands of automation can easily be linked together.

IoT and IIoT – similarities and differences

There are many similarities between the IoT and the IIoT. The IIoT, however, is strictly related to industry and so it has some specific features, as highlighted in the following list:

Cybersecurity is a critical topic for any digital solution, but its implementation in the industrial world requires special attention. This is because the OT systems and devices in the industry have a much longer life cycle and are often based on legacy chips, processors, and operating systems that are not designed to be connected over the internet. This means they live in an isolated LAN, protected from the external world by a firewall.It is critical to ensure that industrial digital devices stay running; any temporary disruption can imply a large economic loss.IIoT solutions must co-exist in an environment with a significant amount of legacy operation technologies. They must also co-exist with different devices acting as data sources, including SCADA, PLCs, DCS, various protocols and datasets, and back-office Enterprise Resource Planning (ERP) systems.Industrial networks are specialized and deterministic networks, supporting tens of thousands of controllers, robots, and machinery.IIoT solutions deployed into these networks must scale tens of thousands of sensors, devices, and controllers seamlessly.Physical objects in the industrial world are more complex and have a wider range of typologies when compared to the consumer world.In the industrial world, robustness, resilience, and availability are key factors. Usability and user experience, however, are not as relevant as they are in the consumer world.Industrial and OT systems, from programmable logic controllers to machining equipment, are frequently reprogrammed and reconfigured to support new processes.IIoT solutions must support and provide the same flexibility and adaptability to support operations.Intellectual Property (IP) is a sensitive and important topic in the industrial world. Consider, for example, the design of a new machine, engine, or food or drink recipe. The IP is often what differentiates a company in the market, and this cannot be lost or violated, since it is often managed by the company as a trade secret rather than covered through a patent.

IoT analytics, AI, and AIoT

With 15 billion industrial IoT devices deployed in 2023 and 29 billion expected for 2030, the volume of data generated is likely to reach 100 zettabytes (1021 bytes) per year.

A single jet engine produces about a terabyte of data in five hours. Given these assumptions, we need a fast and efficient way to analyze data through data analytics. In the last five years, big data technologies have been improved to scale computational capabilities. Analytics can analyze large datasets in order to discover value and hidden data and gain valuable information. The applications of these analytics are as follows:

Diagnostic: Understanding the cause of a fault or issueMaintenance: Predicting and adjusting maintenance intervals to optimize schedulingEfficiency: Improving the performance of the production or the utilization of resourcesPrognostic: Providing insight to avoid faults or to maintain efficiencyOptimization: Optimizing resource consumption or compliance with local government regulationLogistic and supply chain: Monitoring and optimizing the movement of goods and services from manufacturing to consumer via various means of optimized transportation

In the IoT, from a technical point of view, we can identify two broad categories of analytics:

Physics-based: Based on mathematical formulas or knowledge expertiseData-driven (AI and machine learning): The model is built using past dataHybrid Model: Physics-based and data-driven analytics can be combined to build a reliable hybrid model

The introduction of deep learning (a branch of machine learning) in the contexts of image and text processing has brought a lot of attention to data-driven technologies.

Moreover, new generative AI technologies have brought further attention to AI.

“Artificial intelligence is nothing without data; the IoT is nothing but data” – Antonio Capasso, in the first edition of this book

Expanding the application of deep learning and in general AI to the IIoT is called AIoT. AIoT is the application of AI to IoT infrastructure to reach more powerful insights and IoT operations.

According to Artificial Intelligence of Things: A Survey (https://dl.acm.org/doi/10.1145/3690639),

“The integration of the Internet of Things (IoT) and modern Artificial Intelligence (AI) has given rise to a new paradigm known as the Artificial Intelligence of Things (AIoT).”

However, there are two drawbacks:

The (semi-justified) fear of companies of the potential pitfalls of AIThe fact that traditional companies do not always trust the outcomes of AI

Resolving both of these issues will ensure that an abundance of caution is built into machine learning models used in industrial applications. We need to not only create better algorithms but also make sure that people with domain expertise understand machine learning suggestions. We also need to build systems that take in feedback and are aware of the end user and the effects of a good or bad response.

Industry environments and scenarios covered by IIoT

The industrial world is a very large category. It includes manufacturing, but also many other sectors, such as power and energy, renewable energies, health care, and so on. Within manufacturing itself, there is a large variety of sectors, including the automotive industry, chemicals, food and drink, and pharmaceuticals. Production is also only one phase of the product life cycle. Besides this, we have design, provision, delivery (with its own supply chain), and the aftermarket phase.

In this book, we will focus on the manufacturing environment by considering factory processes and strictly tailoring our analysis to the data. We will look at how data is produced, stored, processed, enriched, and exchanged between different OT systems inside industrial plants, and also at how it can be gathered, transferred, stored, and processed in the cloud. We will consider a scenario in which we have a specialized device, the edge device, which is responsible for collecting the data from the OT systems of the factory and transferring it to the cloud on a very large scale. We will also cover scenarios in which each edge device gathers and manages thousands of signals coming from sensors with a sampling rate starting from 1 Hz. The analysis and proposed solutions of these scenarios are also applicable to less complex cases in which there is no factory and/or fewer signals to manage. For example, consider a wind turbine, where you need to monitor a piece of industrial equipment. In this book, we will not cover scenarios in which there are too few signals to be collected for each data source to justify the need for an edge device.

Summary

In this chapter, we have analyzed the origin of the IoT and looked at how it came about through a combined set of technologies. We then learned about the key technologies that underlie the IoT, going into its use cases and business models. We defined the IoT as a technological layer that creates a digital twin of a physical object in the cloud, making the object more intelligent due to the interaction of its digital twin with other digital images living in the cloud. We also identified four levels to define the smartness of a product or object. We then looked at how the IoT can be applied to the industrial world, thereby beginning the Fourth Industrial Revolution and Industry 4.0. We looked at the key transformation elements that mark out the IIoT. We also highlighted some of the main use cases of the IIoT and the main differences between the IoT and the IIoT. We then listed and explored the different types of analytics that apply to industrial data. Finally, we clarified and defined the industrial scenarios that will be covered in the rest of the book.

In the following chapter, we are going to look at how a factory is structured and organized from an OT perspective. We will consider who produces, processes, and enriches the data. We will also explore some key concepts, including deterministic systems, real-time, closed-loop, sensor, fieldbus, PLCs, CNC, RTU, SCADA, HISTORIANS, MES, and ERP.

2

Understanding the Industrial Process and Devices

In this chapter, you will learn about how industrial data is generated, gathered, and transferred to the cloud. We will look at continuous or discrete processes and how they work, becoming familiar with the model of Computer-Integrated Manufacturing (CIM) from its origin in the factories of the 1980s to the current day. You will learn about industrial equipment, networks, and protocols, and come to understand terms such as Distributed Control System (DCS), Programmable Logic Controllers (PLCs), Supervisory Control and Data Acquisition (SCADA), Historian, Manufacturing Execution System (MES), Enterprise Resources Planning (ERP), and Fieldbus. We will also look at how the industrial world interacts with the cloud, as well as the devices and protocols that allow this to happen. Related to this, we will learn terms including OPC-Proxy, store and forward, edge, and IoT gateway. All the concepts that are sketched in this chapter will be further explained and analyzed over the next few chapters. We will provide a high-level, but all-encompassing, vision of the IIoT from a data perspective. We will look at the path of industrial signals, from their generation by the sensors to their processing in the cloud.

In this chapter, we will cover the following topics:

The industrial processesThe CIM pyramidThe IIoT data flow

Technical requirements

In this chapter, we will present concepts related to industrial processes and equipment. Basic knowledge of analogical signal processing and analogical/digital and digital/analogical conversion is required. You will also need to be aware of elements of control theory, as well as LAN and WAN networking.

The industrial process

An industrial process can be defined as a set of operations that transforms, with a predetermined objective, the properties of one or more materials, types of energy, or pieces of information. A typical example of an industrial process might be the production of products and goods through a continuous or discrete manufacturing process, or the production of electricity, including its transportation and distribution. The industrial process also includes the collection, elaboration, and sharing of information along all production phases and steps. The industrial process is represented in the following diagram:

Figure 2.1 – Industrial process

This transformation from raw materials to a product requires the following:

EnergyMachinesToolsHuman work

The industrial process is a sequential process. It can be split into a further set of sequential production steps, transforming the raw materials into the desired state along the way, as shown in the following diagram:

Figure 2.2 – Steps in the industrial process

Each production process is made up of a sequence of simple operations:

Making: This involves changing the material properties by means of energy.Assembly: This involves combining one or more parts to make a new entity.Transport and storage: Moving and storing parts, unfinished products, and products happens in this operation.Testing: Checking the product to verify its functionality and capabilities against the design or the requirements is the key aspect of this operation.Coordination and control: This involves coordinating and controlling the different operations and steps along the production process.

Automation in the industrial process

Factory automation can be defined as a discipline that studies the methods and technologies that allow the control of flows of energy, materials, and information needed for the realization of production processes.

The importance of automation in a modern production process derives from a multiplicity of factors, not just economic ones, among which are the following:

The improvement of the quality of the productsThe opportunity to use the same production system for different products in a concept known as flexibility of the plantShorter production timesThe opportunity to reduce the number of incoming and outgoing warehousesThe drastic reduction of processing wasteThe lowered cost of productionThe need to comply with laws or regulationsThe opportunity to reduce the environmental impact and save energyThe improvement of the competitiveness of the company in an automated system.

We can identify the physical processes and the control system, as shown in the following diagram:

Figure 2.3 – Elements of an automated industrial system

Physical processes can be defined as the sum of the operations that act on entities belonging to the physical world and which change some of their characteristics. Operations that fit this definition include material or part movements, mechanical processing, or chemical reactions. These physical processes can be considered objects of automation. Pure and simple information, on the other hand, does not make changes to the real world, and so cannot be considered a physical process.

A physical process receives raw materials and energy as inputs. It also receives information, which can be in the form of electric voltage, current values, or fluid pressure, or which can be coded in sequences of binary values. It produces output materials, such as finished products and waste, and sends information. The noises coming from the environment that act on the process can also be considered as inputs to the process itself.

The outgoing information is provided by appropriate devices made by the following:

Sensor: Transforms the variable to be measured into the type necessary for measurementTransducer: Accepts information in the form of a physical or chemical variable, and converts it into a magnitude of a different nature—typically electric

Very often, sensors and transducers coincide in the same physical component. We generally call a device a sensor (or a transducer) if it measures a magnitude and gives an output as a signal, typically an electrical one. The incoming information is used by the actuators to set the value of the control variables for the process. Usually, the real actuator is built by a pre-actuator, which processes the information to convert it into a power signal. Sensors, actuators, and pre-actuators carry out part of the physical process and act as interfaces to the control system.

A control system receives information on the status of the process from the sensors and processes them according to the specified algorithms. It then sends information related to actions that provide the desired control of the physical process to the actuator. The control system also receives information from one or more external entities, such as human operators or other control systems that are hierarchically higher. It is also able to provide information about its own status and the controlled process to the external entities.

Control and measurement systems

A more rigorous definition of what a process control and data acquisition system is has been provided by the International Electrotechnical Commission (IEC)-61131 standard. According to this standard, a control and measurement system of an industrial process can be described as a set of interconnected devices communicating with each other by means of one or more communication networks, as shown in the following diagram:

Figure 2.4 – The control and measurement system model

The communication networks might be also structured hierarchically: