Connecting the IIoT
Friday, 10 November, 2017
Implementing an IIoT solution is not without its challenges, so before beginning it is necessary to understand some of the basic IoT infrastructure concepts.
The world economy will greatly change in the next decade as new internet-enabled applications are rolled out. Some of these applications are likely to be disruptive and innovative as well as have a large economic impact. This will affect many industries and sectors, as already seen in consumer sectors like hotels (Airbnb) and taxis (Uber).
This trend is also noticeable in the manufacturing industry — for example, Germany’s Industry 4.0 initiative. Within Industry 4.0 or the Industrial IoT (IIoT), the focus is on integration and better use of existing technologies. In this sense, industry, machines, products and people are all digitally connected. Manufacturers will be producing bespoke products in quantities of one. Intelligent software in the cloud will connect enterprise IT systems with the operational world, machines, devices and sensors to control and optimise production flow.
Because of the decrease in the cost of connectivity, the adoption of IIoT capabilities by processing devices and sensors has grown tremendously. Sensor data can be captured and pre-processed close to the machines by a smart edge device. The edge device can send the data in real time to the virtual world (IT cloud platform) where it can be stored, monitored and analysed or trigger an action.
The value of the IIoT is not in the connectivity of the devices, but in what a company unlocks from the stream of data the smart devices supply. Cloud computing platforms and their services help provide this insight.
Many significant challenges need to be taken into account when implementing an IoT solution: challenges such as standardisation, interoperability, ‘big data’ handling, security and privacy. It is important to be aware of these challenges and pay special attention to security. Security is a crucial component for any IoT application, and IIoT devices should enforce a strong security policy and be updated regularly with the latest security patches. All cloud computing platforms securely send and receive data, use strong authentication and authorisation methods, and use encryption. The majority also have audit capabilities.
Cloud computing refers to a flexible way of delivering hardware, software or data resources via the network on a user’s request. This is the opposite to the use of a software application on a local computer. Table 1 shows three service levels of cloud computing that are commonly encountered: software as a service (SaaS), platform as a service (PaaS) and infrastructure as a service (IaaS).
Clouds can be deployed as public (all services run in a secure environment hosted in the cloud, where servers may be shared with others) or private, which is available only to the user’s organisation and may exist on- or off-premises. In addition, clouds can be deployed as hybrids, where parts are on-premises and other services are in the cloud.
IoT application protocols
Communication protocols are responsible for the network connectivity to the server. Protocols like Wi-Fi, Ethernet, cellular and LoRaWAN are all communication protocols that provide this level of connectivity. Application protocols sit on top of them to communicate application-specific messages.
Multiple standards handle the communication between devices and the cloud. As application requirements differ, specific IoT protocols have been developed and therefore some confusion is understandable. Protocols may even have multiple implementations and IoT platforms may have proprietary IoT solutions. To provide a universal solution, devices, applications and platforms need to be interoperable.
At a high level, there are three main use cases for the application protocols: device to device (D2D or M2M), device to server (D2S) and server to server (S2S) communication. Different IoT application protocols have different levels of real-time behaviour and other characteristics. Table 2 provides an overview.
The most common protocols are MQTT, AMQP and DDS.
Message Queueing Telemetry Transport (MQTT) is an IoT connectivity protocol. MQTT is used in applications with thousands of sensors, including power usage monitoring and oil pipeline monitoring. MQTT is efficient in terms of bandwidth, battery and resources, and uses a publish/subscribe model. The IoT devices publish data to an MQTT broker over TCP as a topic. An authorised client can subscribe to any topic and receive the value from the broker as they arrive from the publisher.
The publisher (device) does not need to know about any of the subscribers, which makes the management easier at the device level. The broker can support multiple concurrent connections from many devices. A topic is a simple string that can have hierarchical levels and also supports wildcards. An example of a topic is GothamCityPlant/Building1/Pump7/Power. The message data is transmitted in JSON format and may be specific to the cloud platform’s IoT service.
MQTT can be implemented using standard HTTP calls and supports three quality-of-service levels:
- QoS 0: At most once
- QoS 1: At least once
- QoS 2: Exactly once
To debug MQTT communications, a MQTT client can be installed on a local computer. A popular free MQTT client is MQTTfx, available at mqttfx.org.
Several MQTT brokers are available on the internet for testing communications. One of the most popular is mosquitto. To test the communication, you can publish topics to test.mosquitto.org. The mosquitto broker is open source and can also be used in-house for sandbox testing or production use of MQTT communication.
Advanced Message Queuing Protocol (AMQP) is an open message protocol that can send transactional messages between servers, and from devices to servers and vice versa. Advantages of AMQP are interoperability and reliable communication (data is received reliably exactly once at the receiving end). AMQP uses a broker to receive data from a client. The client (or publisher) then publishes the message to the broker, where it is processed and routed to a queue. From the queue, the message is sent to any client that has subscribed to this data.
AMQP focuses on tracking all messages and ensuring each is delivered as intended, even if a device is temporarily offline. Devices that generate large amounts of data can stream to AMQP servers, which is then consumed by receivers to perform monitoring and analytics. An example application for AMQP is the analysis of automotive driving behaviour at a data centre. Some cloud development platforms support device connectivity to AMQP or AMQP over WebSocket. Popular open-source AMQP brokers are RabbitMQ, ActiveMQ and Kafka.
The main use case for Data Distribution Service (DDS) is to distribute data directly to other devices, although it can also distribute data to enterprise systems and mobile devices. Applications are found in wind farms, automotive testing, asset tracking, defence and big physics. Devices often need each other’s data in close to real time (measured in milliseconds). All of this needs to happen reliably, and usually with large data streams. DDS offers a detailed quality of service control, with configurable reliability, redundancy and filtering, and selects exactly which data goes where. To do so, DDS uses a device-to-device bus communication, which can deliver the data to thousands of devices.
Cloud development platforms
Amazon AWS IoT
Amazon Web Services (AWS) offers IT infrastructure as cloud computing, database storage, content delivery and other services. AWS IoT is a managed cloud platform that enables devices to connect and interact with other AWS cloud applications and services through a rules engine. It also provides a device gateway and device shadows. The device gateway is the service that manages the device connectivity to AWS IoT and supports MQTT, WebSocket and HTTP protocols. Device shadows can create a virtual device that retain the device’s latest state, even when it is offline. Applications within AWS can publish to the virtual device and, when the device is back online, the state is synchronised. AWS provides open-source IoT SDKs to help connecting hardware devices with AWS IoT.
AWS uses an IoT rules engine that applies a SQL-like syntax to select data received from a device and perform actions. The rules engine makes it possible to build IoT applications that can gather, analyse, process and act on the data received from the device. The rules engine can route the message to AWS endpoints like AWS Lambda (a compute service to run your uploaded code), Amazon Kinesis (to process a large stream of data in real time), Amazon S3 (simple storage service), Amazon Machine Learning and Amazon DynamoDB, among others.
IBM Watson IoT for Bluemix
Bluemix, IBM’s cloud development platform, is a PaaS. With Bluemix, you can access IBM software for services like big data analytics, storage, databases, security, IoT and cognitive applications.
Watson IoT for Bluemix lets an application communicate with the connected devices and consumes data received from those devices and device gateways. MQTT is used to communicate with the devices and gateways. Devices can securely connect to Watson IoT using MQTT over TLS.
The device needs to be registered with IBM Bluemix before an MQTT connection can be established with the Watson IoT MQTT broker. Rules and logic to handle the data can be defined in any of the languages that IBM Bluemix supports, such as node.js (Node-RED), Java and Python.
ThingWorx is a model-based IoT application development platform that provides a complete application design, run time and environment. ThingWorx provides components for connectivity, analytics, collaboration, and visualisation including augmented reality. The core development features of the platform are:
- Composer: An application modelling environment to model the ‘things’, logic, visualisation, data storage and security
- Mashup builder: A web page is called a mashup with ThingWorx, and visualisation of web pages can be created using the mashup builder tool
- SQUEAL: A search feature that allows searching through all the data in a model
- Execution engine and storage: An event-driven platform for execution and storage to store, relate and expose big data to make it valuable and actionable
ThingWorx supports device connectivity in several ways: direct network connections, MQTT and AMQP, third-party device clouds, and OPC-UA connectivity through PTC Kepware software.
Microsoft Azure IoT Suite
The Azure IoT Suite allows data collection from devices and provides a set of services such as data analysis, data storage, real-time and historical data visualisation, and integration with back-office systems. The Azure IoT hub receives the data from IoT devices. The device data can then be stored or passed on for further processing, analytics and management. Devices can communicate with the IoT hub over HTTP, MQTT or AMQP protocols. Microsoft offers a set of Azure IoT device SDKs through GitHub.
Other cloud platforms are available, such as Google Cloud Platform, GE Predix and many more. For more information, see the vendor’s specific product web pages.
- Schneider S 2013, “Understanding the Protocols Behind the Internet of Things”, Electronic Design, <http://www.electronicdesign.com/iot/understanding-protocols-behind-internet-things>
- Kumar P 2016, Internet of Things (IoT) Development Platforms – A case of IBM Bluemix, University of Koblenz-Landau, <https://kola.opus.hbz-nrw.de/frontdoor/index/index/docId/1373>
- Postscapes, IoT Standards and Protocols, <https://www.postscapes.com/internet-of-things-protocols/>
- M&S Consulting 2016, Industrial Internet of Things Platform Comparison, updated June 2017, <https://www.mandsconsulting.com/industrial-iot-platform-comparison>
- Vermeend A and Timmer JW 2016, Internet of Things, W. Vermeend, J.W. Timmer, 2016, ISBN 97890821993-4-5
- Balani N 2015, Enterprise IoT: A Definitive Handbook, ISBN 9781535505642
- Amazon AWS IoT: <https://aws.amazon.com>
- IBM Watson IoT for BlueMix: <http://www.ibm.com>
- PTC ThingWorx: <http://www.ptc.com/internet-of-things/technology-platform-thingworx>
Response times are faster when implementing predictive models in embedded systems, as data does...
Australian manufacturers face significant challenges in the years to come and need to consider...
Implementing an IIoT solution is not without its challenges, so before beginning it is necessary...