Industrial IoT MQTT Sparkplug solution based on EMQX and Neuron

introduction

Sparkplug is an MQTT-based communication protocol designed specifically for industrial automation and IoT applications. To build a Sparkplug solution, two core components are needed: one is the MQTT Broker, which is responsible for message distribution and management; the other is the edge node, which is responsible for connecting local devices to the Broker for real-time data processing and analysis.

In this article, we will use the open source distributed MQTT Broker EMQX, and the edge industrial protocol gateway software Neuron to build a scalable and robust platform for implementing Sparkplug solutions. We will explore the architecture of the Sparkplug solution in detail and gain an in-depth look at the roles played by EMQX and Neuron in it.

The role of EMQX in Sparkplug

EMQX is used to create the MQTT topic namespace that conforms to the Sparkplug specification. The Sparkplug namespace defines the structure and content of MQTT messages published and subscribed by devices. Through EMQX, we can ensure that all messages sent to and received from the Sparkplug namespace are properly formatted and conform to the Sparkplug specification.

Neuron's role in Sparkplug

Neuron is used to connect edge devices to the Sparkplug namespace on EMQX Broker. It acts as a gateway responsible for collecting data from local sensors and controllers and publishing it to EMQX using the Sparkplug payload format. At the same time, Neuron also subscribes to messages in the Sparkplug namespace and forwards them to the local device as needed.

The new role played by EMQX and Neuron

By synergistically using EMQX and Neuron, a unified namespace can be created for Industrial IoT applications. This is a common naming method based on MQTT topics, so that devices and applications can communicate with each other using any protocol in any location. All devices and applications use the same MQTT topic hierarchy, based on a common set of naming conventions and data models. This enables automatic discovery and communication between devices without complex routing or translation mechanisms.

Industrial IoT

EMQX implements support for a unified namespace by defining a topic hierarchy that conforms to device and application naming conventions and data models. Such a topic hierarchy can include topics such as device data, control commands, alarms and events, all organized in a standardized manner. This unified namespace design enables devices and applications to discover and interact with each other.

Neuron supports a unified namespace by using the same naming rules and data model as MQTT Broker. This allows Neuron to seamlessly integrate with other components of an IoT system, allowing devices to communicate across different protocols in different locations.

Sparkplug Solution Architecture

Using EMQX and Neuron's MQTT Sparkplug solution can be built into a three-tier architecture. As shown in the figure below, all devices and applications connected to the unified namespace can be divided into two levels, the bottom data producer or the top data consumer. EMQX and Neuron are located in the middle layer, playing the role of data exchange and realizing the communication between data producers and consumers.

Sparkplug Solution Architecture

  • Automation layer : In the automated production process, the automation layer consists of various devices and applications that generate large amounts of raw and unstructured data. Most of these devices and applications are deployed on factory floors or data centers.
  • Unified Namespace Layer : This layer consists of EMQX MQTT Broker and Neuron Gateway, which are responsible for data transmission and conversion. Neuron helps publish sensor or device data to EMQX in Sparkplug message format, and EMQX forwards the data from producers to subscribers. EMQX is also responsible for maintaining the status information of the system, including equipment and its related data.
  • Application layer : This is the layer composed of applications, which obtain data from the unified namespace layer and use it for functions such as analysis, monitoring, and control. These applications can be deployed locally or in the cloud according to system requirements.

Next, we will introduce the situation of each level separately.

automation layer

The automation layer can provide information on the entire automated production process of the factory. This information comes from the following types of devices or systems:

  • Field Devices: Devices that perform data collection and control in the physical world, such as CNC machine tools, sensors, and actuators.
  • Control equipment: Various controllers used to control the operation of field equipment, such as PLC, PAC, DCS, etc. They execute control algorithms and communicate with field devices.
  • Supervisory systems: devices such as human-machine interface (HMI) and supervisory control and data acquisition (SCADA) systems.
  • Information systems: Software applications such as databases, data historians, manufacturing execution systems (MES), enterprise resource planning (ERP), etc., used to store and analyze data acquired from the above-mentioned equipment or systems.

In daily production, field devices are responsible for collecting data from the physical world and sending it to control devices. The control device processes the data and sends commands to the field devices to control their behavior. The monitoring system monitors the operating status of the control equipment and feeds back information to the operator and the information system. The information system is responsible for collecting and storing data from various low-level devices and systems, and providing information query services to other enterprise systems. This flow of information enables automated systems to operate efficiently and reliably. However, this information is raw, unstructured data that needs to be normalized and given contextual semantics before it can be used for deeper analysis.

Unified Namespace Layer

The unified namespace layer integrates all unstructured and raw data generated by the automation layer and performs contextual semantic processing. It is a data normalization and contextualization process that brings together data from a variety of disparate sources into a unified, time-stamped source of information. This data is organized and accessed in a consistent and standardized manner, regardless of source or format.

This normalized and contextualized data contains all the information relevant for a specific purpose, such as equipment performance, environmental conditions, production output and other indicators important to industrial operations. That is, giving contextual semantics provides a single, meaningful, and unified view of all data within an organization. Industrial organizations can leverage this contextualized data to gain a complete and holistic view of their operations, enabling them to make more informed decisions and optimize their processes for greater efficiency and profitability.

application layer

The application layer is where applications leverage data with contextual semantics for analysis, such as artificial intelligence/machine learning and predictive maintenance, and optimize plant operations based on the analysis results. These applications can subscribe to data points or equipment nodes of interest and obtain updated information in real time, enabling factories to respond to changes in the production process in a timely manner.

Data with contextual semantics can improve the quality of data used by artificial intelligence and machine learning models. These models can leverage additional contextual information and metadata to better understand and interpret data, reduce errors and increase accuracy. In addition, data with contextual semantics also improves the predictive power of artificial intelligence and machine learning models. Models can make more precise predictions about future events or outcomes based on more contextual information.

epilogue

In summary, by using both EMQX and Neuron in a Sparkplug solution, contextual analysis can be easily achieved and data can be shared in an accurate and consistent manner across the system. This solution not only enables discovery and communication between devices and applications of different naming systems, but also supports various analytical applications such as artificial intelligence/machine learning, BI business analysis, and predictive control. This allows decision makers to gain more precise insights and actionable results to make informed decisions based on trusted data and analytics.

Copyright statement: This article is original by EMQ, please indicate the source for reprinting.
Original link: https://www.emqx.com/zh/blog/mqtt-sparkplug-solution-for-industrial-iot-using-emqx-and-neuron

Guess you like

Origin blog.csdn.net/emqx_broker/article/details/131706781