Industry 4.0 and Cyber Security

Hans-Petter Halvorsen

1 Introduction

Industry 4.0 and Cyber Security (YouTube, 50min) + PowerPoint (PDF)

Cloud services and IoT solutions are becoming increasingly popular.  Even the industry embrace IoT as Industrial Internet of Things (IIoT), which is part of the next generation Automation Systems. Industry 4.0 is the new buzzword for the combination of industry, automation and the current Internet of Things (IoT) technology. We will focus on Web Technology and modern Cloud Platforms like Microsoft Azure.

Topics: Control Engineering, OPC, Industry 4.0, Industrial Internet of Things (IIoT), DAQ, Database Systems (SQL Server), Web Technology and ASP.NET Core, Cloud Platforms and Cloud Services (Microsoft Azure), Cyber Security.

You may go through some of the resources (tutorials, videos, examples, exercises, etc.) below or you may start directly on the Lab Work. Then you can use these resources if you need help solving some of the different tasks within the delivery.

 

1.1 Hardware

You will need some of the following IoT hardware and components (depending of what you choose in the assignment):

All hardware will be available in the laboratory.

1.2 Software

You will need some of the following software (depending of what you choose in the assignment):

 

 

2 Industry 4.0

IIoT – Industrial use of IoT Technology. Industrial Internet of Things (IIoT) is another word for Industry 4.0. You could say that IoT is consumer oriented with applications like Smart Home, Home Automation, etc., while IIoT has more industrial focus and applications. The term "Industrie 4.0" was first used in 2011 in Germany. Industry 4.0 is also called the fourth industrial revolution.

 

 

3 Control Engineering

Basic Control Engineering is still the foundation for the Next Generation Control Systems and the Industry 4.0 era.

LabVIEW:

Discrete Control Systems in LabVIEW (YouTube, 56min) + PowerPoint (PDF) - Recommended! - This Tutorial goes through how to create a basic Discrete Control System in LabVIEW from scratch. Here you find different Simulation Examples in LabVIEW (PDF).

 

Visual Studio/C#:

Simulation and Control with C# and WinForms (YouTube, 1h19min) + PowerPoint (PDF)

 

Python:

Python for Control Engineering (Textbook, PDF)

Python for Control Engineering (YouTube, 1h7min) + PowerPoint (PDF) - Recommended!

Transfer Functions with Python (YouTube, 56min) + PowerPoint (PDF)

Simulation and Control with Python (YouTube, 1h3min) + PowerPoint (PDF) - Recommended!

 

3.1 Frequency Response and Stability Analysis

Python:

Frequency Response with Python (YouTube, 55min) + PowerPoint (PDF) - Recommended!

MATLAB:

Frequency Response and Stability Analysis with MATLAB Examples (PDF) - Here you also see an example using the Ziegler–Nichols Frequency Response method

 

3.2 Air Heater Control System

Control System with Python - Simulations (PDF) + Control System with Python - Real System (PDF)

 

 

4 DAQ

DAQ (Data Acquisition) is needed and used in all IoT/IIoT applications, which is about getting data from the sensors.

4.1 DAQ with LabVIEW

LabVIEW is powerful tools and hardware for DAQ applications. Here you can learn LabVIEW Fundamentals.

Resources:

DAQmx in LabVIEW (YouTube, 55min) + PowerPoint (PDF) - Communicate with NI DAQ Devices in LabVIEW. The tutorial shows different ways to use the DAQmx functionality in LabVIEW with practical LabVIEW examples.

LabVIEW DAQ and I/O Modules (Website)

 

4.2 DAQ with Visual Studio/C#

Resources:

Visual Studio/C# and DAQ (YouTube, 54min) + PowerPoint (PDF) - Communicate with NI DAQ Devices in LabVIEW. The tutorial shows different ways to use the DAQmx functionality in LabVIEW with practical LabVIEW examples.

Visual Studio/C# and DAQ (Website)

 

4.3 DAQ with Python

Resources:

DAQ with Python (YouTube, 39min) + PowerPoint (PDF) - Exemplified by reading Temperature Data using NI USB TC-01 Thermocouple

DAQ with I/O Modules in Python (YouTube, 55min) + PowerPoint (PDF) - Recommended! - Exemplified by using NI USB-6008 I/O Module

Sensors and Actuators with Python (YouTube, 40min) + PowerPoint (PDF) - Exemplified by using NI USB-6008 I/O Module and using Sensors and Actuators like LED, TMP36 Temperature, Thermistor, Push Button/Switch and Light Sensor

 

 

5 Data Communication Protocols

Popular Data Communication protocols are OPC, MQTT, Modbus, REST, AMQP, WebSocket, etc. See more details below.

5.1 OPC

OPC is a standard that defines the communication of data between devices from different manufactures. OPC UA is the "Next Generation OPC", and the OPC UA protocol is used in many IoT/IIoT applications.

 

OPC with LabVIEW

LabVIEW has built in features for OPC DA, while for OPC UA you need a separate Toolkit.

Download LabVIEW OPC UA Toolkit

Tutorials:

OPC UA in LabVIEW (YouTube, 51min) + PowerPoint (PDF)

 

OPC with Visual Studio/C#

There exists lots of software that can be used to create OPC connectivity in Visual Studio and C#.

For OPC DA connectivity, you can use the Measurement Studio add on, but lots of other possibilities exists.

Tutorials:

OPC UA with Visual Studio and C# (YouTube, 50min)+ PowerPoint (PDF) - Recommended!

 

OPC with Python

Both OPC DA and OPC UA libraries are available for Python.

OPC UA in Python (YouTube, 37) + PowerPoint (PDF) - Recommended!

 

5.2 MQTT

Message Queueing Telemetry Transport (MQTT) is an IoT protocol MQTT is used in applications with thousands of sensors. MQTT is efficient in terms of bandwidth, battery, and resources. MQTT uses a publish/subscribe model. MQTT has become the defacto IoT communication protocol. This means if you want to work with IoT projects, you will sooner or later need to use this protocol.

MQTT (YouTube, 51min) + PowerPoint (PDF)

MQTT with Python (YouTube, 51min) + PowerPoint (PDF) - Recommended!

MQTT with LabVIEW (YouTube, 52min) + PowerPoint (PDF)

 

5.3 Modbus

Modbus is a serial communications protocol. It is mainy used for connecting industrial electronic devices. Many PLCs and other process equipment have built-in support for Modbus.

Modbus with Practical LabVIEW Examples (YouTube, 46min) + PowerPoint (PDF)

 

5.4 REST

REST and REST APIs is popular in IoT applications and it is an easy way to transfer data over internet.

 

 

6 Database Systems

A Database System is the corner stone of any IoT or IIoT solution. We have many different types of database systems and we can use and communicate wit hdifferent database ssytems in many different programming languages like Visual Studio/C#, Python and LabVIEW. For many of those systems and programming languages you need to deal with Structred Query Language (SQL).

Tutorials:

Structured Query Language (SQL) (PDF)

SQL Tutorial - Basic SQL Training from w3schools.com

 

6.1 SQL Server

SQL Server is a Database System from Microsoft. SQL Server comes in different editions, for basic, personal use SQL Server Express is recommended because it is simple to use and it is free.

Tutorials:

SQL Server and Structured Query Language (SQL) (YouTube, 1h14min) + PowerPoint (PDF)

SQL Server Express Installation (YouTube, 15min) + PowerPoint (PDF)

Database Views, Stored Procedures and Triggers in SQL Server (YouTube, 1h16min) + PowerPoint (PDF)

 

LabVIEW and SQL Server:

Database Communication using LabVIEW (YouTube, 33min) + PowerPoint (PDF)

LabVIEW Database Connectivity Toolkit is included with LabVIEW professional, but it is cumbersome to use. We should use the LabVIEW SQL Toolkit instead. This Toolkit is very simple to use.

 

Python and SQL Server:

Python and SQL Server (YouTube, 59min) + PowerPoint (PDF) - Recommended!

 

Visual Studio/C# and SQL Server:

SQL Server with C# Windows Forms App (YouTube, 1h9min) + PowerPoint (PDF) - This Tutorial goes through how to create a basic Windows Forms Database Application in Visual Studio/C# that communicates with an SQL Server.

Datalogging using SQL Server with C# (YouTube, 56min) + PowerPoint (PDF) - This Tutorial goes through how to create a basic Datalogging Windows Forms Application in Visual Studio/C# that Save Data inside a SQL Server Database.

 

6.2 Azure Cosmos DB

Did you like NoSQL and MongoDB? Azure Cosmos DB is a NoSQL alternative from Microsoft. You can run it in Microsoft Azure together with your ASP.NET Web Application.

 

 

7 Web Programming and ASP.NET Core

Learning Web Technology is essential today because Internet has become the number one source to information, and many of the traditional software applications have become Web Applications. Web Applications have become more powerful and can fully replace desktop application in most situations. Web and Web Technology is part of any IoT/IIoT solution. Thats why you need to know basic Web Programming, including HTML, CSS and JavaScript, and a server-side framework like ASP.NET Core.

ASP.NET Core is open source web framework, created by Microsoft, for building web applications and web services.

 

Web Programming Resources:

Web Programming (YouTube Playlist) + PowerPoint (PDF)

W3 Schools (Website) - Web Development Tutorials

 

ASP.NET Core Resources:

ASP.NET Core with Razor (YouTube, 40min) + PowerPoint (PDF)

ASP.NET Core with Razor and SQL Server (YouTube, 46min) + PowerPoint (PDF) - Recommended!

 

Additional Resources:

ASP.NET Core - Get Data from Database (YouTube, 34min) + PowerPoint (PDF) - Here you learn the basics when it comes to how to get/retrieve data from a SQL Server database.

ASP-NET Core - Charts (YouTube, 21min) + PowerPoint (PDF) - Here we will use Google Charts to present data from the database in a Chart/Plot on your webpage.

 

 

8 Cloud Computing and Hosting

There are 3 large Cloud Platform providers, namely Amazon Web Services (AWS), Google Cloud Platform (GCP), and Microsoft Azure.

Here you can rent Cloud based services like Virtual Machines (Computers with OS running in the Cloud), Web Server, Database Systems, etc. based on a monthly fee.

 

8.1 Microsoft Azure

Microsoft Azure (YouTube video showing how to deploy a SQL Database and an ASP.NET Core Web Application) is a Cloud Computing and Hosting Platform from Microsoft. You could say Microsoft Azure is "Windows running in the Cloud". Microsoft Azure is a Cloud Platform from Microsoft, here you can create Virtual Machines (VMs), Databases and host Web Applications like ASP.NET + many other things. The focus here are SQL Databases and App Services (hosting ASP.NET Core Web Applications).

Microsoft Azure for Students - Students and staff at the University can get free (but limited) access to Microsoft Azure through the Microsoft Azure Dev Tools for Teaching.

Microsoft Azure - SQL Databases and App Services (YouTube, 39min) +  PowerPoint (PDF) - Recommended!

 

Additional Resources:

Python, MQTT, SQL Server and Microsoft Azure (PDF)

 

Azure Data Studio

Azure Data Studio is a lightweight multi-platform (Windows, macOS and Linux) version of SQL Server Management Studio. You can use it to create or manage your Databases created in Azure.

Download Azure Data Studio

 

 

9 IIoT and Cyber Security

IIoT (Industrial Internet of Things) solutions and Data Security? How can we make sure our applications and data are safe? Security is crucial in IoT/IIoT Applications. Read more about Cyber Security.

Cyber Security Resources:

Cyber Security Overview (PDF) - Recommended!

Cyber Security (Textbook) (PDF)

 

The following textbook about Cybersecurity is recommended:

Cybersecurity - Technology and Governance - Textbook by Audun Jøsang - Recommended! - Free PDF download access provided by University of South-Eastern Norway Library. The book is also available in Norwegian: Cybersikkerhet - Teknologier og styring av Audun Jøsang (Note! The Norwegian edition is not free for USN students).

 

Additional Cyber Security Resources:

Cyber Security Tutorial (Website)

Cyber Security Tutorial Library (Website)

Kali Linux (Software) - Kali Linux has hundreds of pre-installed software hacking tools and penetration-testing tools.

 

9.1 Security and Passwords

Here are some security and password related topics that we should know about discussed. Some examples are: Authentication vs Authorization, Encryption and Decrypting, Hashing and Salting, and finally 2-Factor Authentication.

Security and Passwords in Software Development (YouTube, 23min) + PowerPoint (PDF)

 

9.2 SQL Injection

SQL injection is a code injection technique that might destroy your database or expose information, such as passwords, etc. SQL injection is one of the most common web hacking techniques.

SQL Injection (YouTube, 44min) + PowerPoint (PDF)

 

9.3 Cyber Security in IACS Systems

IACS – Industrial Automation and Control Systems.

IEC62443 – Cyber Security standard for IACS systems.

Lab Work

Introduction

In this lab work we will create the Next Generation Industry 4.0 Control System using OPC UA, MQTT and Cloud Services like Microsoft Azure, Cloud Computing and Analysis using modern Web Technology, including ASP.NET Core. Industry 4.0 is the new term for the combination of industry, automation and the current Internet of Things (IoT) technology. Industry 4.0 is also referred to as Industrial Internet of Things (IIoT).

We will use the Air Heater system, which is a small-scale industrial process.

You should start your work by creating a System sketch. In that way you will get an overview of the system you are going to create. Make System Sketch in PowerPoint (YouTube, 15min).

Note! All parts and tasks (requirements) should finally be put together and presented as one final working system. Pretend you make this for a given customer/client.

An example of a use case may be that you want to control and monitor one or more process(es):

 

The following Tasks (requirements given by the customer) should be done as part of the delivery:

Part 1: Industry 4.0 Control System

Note! The GUIs should be userfriendly and intuitive, and the code should be well structured. See the video LabVIEW Programming Guidelines (YouTube, 57min), much of the contents are general and not only valid for LabVIEW. We have focused a lot on this in other courses, so this must be in place in order to get this part approved. If you make a C# Desktop Application, you can use, e.g., ScottPlot for creating charts.

Make also be sure to discuss your choice of programming language and choice of communication protocol.

 

Part 2: ASP.NET Core and Microsoft Azure

Note! You can use another Web Framework than ASP.NET and/or Cloud service than Microsft Azure if you prefer. Also, when it comes to ASP.NET you have different options.

 

Additional Information

Integration with other Systems? Feel free to integrate your solution with existing industrial software like OPC software, PLC software or SCADA software. You can integrate with a system that your company is using today or systems that you want to learn more about or have special interest for. An example of existing industrial SCADA software is Ignition. Ignition has support for different protocols like OPC UA, Modbus and MQTT.

Note!:

 

Additional Examples (Voluntary)

Feel free to Explore! Make sure to Add Value and Creativity to your Applications! Try to add some extra value and be creative compared to the simplified examples given by me, in that way you learn so much more.

"Explore and Add Value" Examples (Voluntary, if you have some spare time):