A Comparability of IIoT Protocols: MQTT Sparkplug vs. OPC-UA


A Comparison of IIoT Protocols: MQTT Sparkplug vs OPC-UA
Illustration: © IoT For All

Industrial programs rely closely on environment friendly and safe communication protocols to alternate knowledge seamlessly. Two outstanding contenders on this area are MQTT Sparkplug and OPC UA. We’ll comprehensively evaluate MQTT Sparkplug and OPC UA, and their successors, providing a clearer understanding of which protocol aligns finest together with your particular necessities.

“Industrial programs rely closely on environment friendly and safe communication protocols to alternate knowledge seamlessly.”

OPC Basic & OPC UA

The precursor of OPC UA is OPC Basic (often known as OPC DA or OPC Information Entry), a set of commercial automation requirements developed by the OPC Basis. First printed in 1996, the OPC Basic specification defines a standardized technique for exchanging knowledge between software program purposes and industrial {hardware} units comparable to sensors, controllers, and programmable logic controllers (PLCs).

Nonetheless, considered one of its main drawbacks is that OPC Basic is tightly built-in with the Microsoft Home windows working system and its proprietary DCOM expertise. Any such dependency severely compromises the protocol’s usability, scalability, interoperability, safety, and platform independence, which is a big limitation for an open customary.

In response to those limitations, the OPC Basis began work in 2006 on OPC Unified Structure (UA) as a successor to the OPC Basic specification. Each specs have a functionally equal protocol however use totally different underlying communication applied sciences. As well as, OPC Basic DA 3.0 was launched the identical 12 months and continues to be in use right this moment.

IoT-Prepared Protocol: Evolution of MQTT

Within the late Nineteen Nineties, Andy Stanford-Clark and Arlen Nipper have been engaged on a pipeline monitoring venture that required a light-weight protocol for speaking with distant sensors and units. The venture required monitoring capabilities in a low-power, low-bandwidth atmosphere. Nonetheless, current messaging protocols comparable to HTTP and SMTP have been thought-about too heavy and inefficient for this particular use case.

To handle these challenges, MQTT was developed as a publish/subscribe (Pub/Sub) messaging protocol. MQTT was designed with a small code footprint and minimal bandwidth necessities, making it appropriate for deployment in low-power, low-bandwidth environments.

Its major function is to facilitate large-scale, real-time knowledge alternate between units and programs, enabling standardized knowledge communication even when totally different codecs and buildings are concerned. This attribute makes MQTT notably appropriate for IoT and M2M (machine-to-machine) purposes.

In 2010, MQTT was launched as an open customary by OASIS (Group for the Development of Structured Data Requirements), making it obtainable to a variety of organizations and industries.

Then, in 2014, MQTT 3.1.1 was launched, together with a number of new options comparable to improved error dealing with and help for High quality of Service (QoS) ranges. Then, in 2019, MQTT 5.0 was launched with vital enhancements comparable to help for customized properties, persistent classes, and improved error reporting.

Combining the Benefits: OPC UA over MQTT

The MQTT publish/subscribe (pub/sub) mannequin affords a number of benefits over the traditional OPC UA client-server mannequin, together with:

  • Scalability: The pub/sub mannequin can successfully deal with a lot of units and programs, making it well-suited for industrial automation and IoT purposes.
  • Actual-time knowledge alternate: The pub/sub mannequin is particularly designed to facilitate real-time knowledge alternate, enabling units and programs to promptly reply to environmental modifications.
  • Lowered community visitors: The pub/sub mannequin helps cut back community visitors by permitting units and programs to obtain solely the information they’re all for, fairly than receiving all knowledge from all sources.

The OPC Basis launched the OPC UA Pub/Sub specification in 2018. This specification defines a publish-subscribe communication mannequin for OPC UA, which might be carried out utilizing the MQTT (Message Queuing Telemetry Transport) protocol as a transport mechanism. OPC UA’s Pub/Sub mannequin is a strong new function that gives vital advantages for industrial automation and IoT purposes.

Enhancing Industrial Connectivity: MQTT Sparkplug Specification

The MQTT protocol has achieved nice success in IoT eventualities. Nonetheless, its applicability to industrial automation programs is proscribed as a consequence of an absence of interoperability. To handle this limitation, Cirrus Hyperlink Options launched the Sparkplug specification in 2016, aiming to simplify the implementation of MQTT in industrial automation programs. This specification establishes a standardized format for MQTT messages, facilitating the alternate of information between totally different units and purposes.

One notable function of Sparkplug is its help for bi-directional communication between units. This functionality permits units to not solely ship instructions but in addition obtain responses from different units inside the community.

Try these 5 key ideas that specify why a MQTT Dealer is ideal for implementing Sparkplug design ideas.

OSI Mannequin Overview

MQTT and OPC UA are the 2 essential common protocols utilized in industrial automation and IoT purposes, they usually have totally different architectures and designs that replicate their totally different supposed makes use of. Here’s a comparability of MQTT, OPC UA, and their variants when it comes to the OSI (Open Techniques Interconnection) mannequin:

OSI Mannequin MQTT OPC UA MQTT Sparkplug OPC UA over MQTT
Software Layer Pub/Sub mechanism OPC UA communication (60 knowledge sorts) Sparkplug communication (18 knowledge sorts) OPC UA pub/sub communication
Presentation Layer not outlined UA-JSON
UA-XML
UA-Binary
Protobuf UA-JSON
UA-XML
UA-Binary
Session Layer no session Shopper-server session administration Sparkplug session consciousness no session
Transport Layer TCP/IP TCP/IP MQTT MQTT

Transport Layer: Each MQTT and OPC UA make the most of TCP/IP because the underlying protocol for communication. For MQTT Sparkplug and OPC UA over MQTT, the transport protocol makes use of MQTT as transport protocol, as a result of these two protocols make the most of the MQTT pub/sub mannequin.

Session Layer: OPC UA incorporates a session layer answerable for managing the connection between shoppers and servers. It handles duties comparable to session institution, authentication, and encryption. In distinction, MQTT doesn’t possess a session layer administration function. Nonetheless, MQTT Sparkplug addresses this limitation by introducing Sparkplug session consciousness on the session layer.

Presentation Layer: OPC UA incorporates a well-defined data mannequin that defines the construction and semantics of exchanged knowledge between shoppers and servers, comparable to UA-JSON and UA-binary. Then again, MQTT lacks a proper data mannequin however depends on topic-based messaging for knowledge communication between shoppers and servers. Nonetheless, MQTT Sparkplug addresses this hole by specifying Google Protobuf because the message format to boost MQTT’s capabilities.

Software Layer: MQTT and OPC UA diverge considerably of their utility layer protocols. MQTT follows a publish/subscribe mannequin that organizes messages utilizing matters, whereas OPC UA adopts a consumer/server mannequin and makes use of a hierarchical object mannequin to prepare knowledge. The OPC UA pub/sub specification serves as an answer for the OPC UA consumer/server mannequin.

Evaluating MQTT Sparkplug and OPC UA

Each MQTT Sparkplug and OPC UA are common protocols for Industrial IoT, they usually have totally different strengths and weaknesses that will make another appropriate than the opposite relying on the particular use case. Listed below are some key variations between the 2 protocols and their variants:

Standards MQTT MQTT Sparkplug OPC UA OPC UA over MQTT
Messaging Mannequin pub/sub pub/sub client-server pub/sub
Bandwidth Utilization minimal overhead
low bandwidth and low energy
minimal overhead
low bandwidth and low energy
giant code
footprint
excessive bandwidth
giant code
footprint
excessive bandwidth
Message Payload not outlined light-weight messaging that’s usually smaller than OPC UA extra advanced knowledge sorts and its messages might be a lot bigger than MQTT Sparkplug. extra advanced knowledge sorts and its messages might be a lot bigger than MQTT Sparkplug.
Interoperability no interoperable interoperable (18 knowledge sorts) extremely interoperable (60 knowledge sorts) extremely interoperable (60 knowledge sorts)
Scalability Excessive scalability excessive scalability with the flexibility to deal with hundreds of thousands of messages per second. scalable however requires extra advanced structure to deal with giant quantities of information higher scalability than OPC UA consumer/server mannequin
Ease of Integration easy to make use of and requires minimal configuration easy to make use of and requires minimal configuration requires extra setup and configuration requires extra setup and configuration
High quality of Companies QoS 0 (at most as soon as), QoS 1 (not less than as soon as), and QoS 2 (precisely as soon as) QoS 0 (at most as soon as), QoS 1 (not less than as soon as), and QoS 2 (precisely as soon as) gives a dependable transport layer that ensures messages are delivered so as and with out loss gives a dependable transport layer that ensures messages are delivered so as and with out loss
State Consciousness No Sure Sure Sure
Auto Discovery No No Sure Sure
Software IoT, residence automation and M2M purposes IIoT and M2M purposes industrial automation industrial automation
Actual-Time Sure Sure Sure Sure
Safety security measures are thought-about much less safe than OPC-UA security measures are thought-about much less safe than OPC-UA digital certificates, digital signatures, knowledge encryption, and safe authentication digital certificates, digital signatures, knowledge encryption, and safe authentication
Data Mannequin doesn’t have built-in help for data modeling help refined data modeling however not as many as OPC UA. help refined data modeling programs that enable for the creation of advanced knowledge buildings and fashions help refined data modeling programs that enable for the creation of advanced knowledge buildings and fashions

In brief, OPC UA is an open customary that comes with a well-defined set of information sort specs. Then again, MQTT Sparkplug can also be an open customary however has fewer efforts in standardizing knowledge sorts in comparison with OPC UA. Consequently, MQTT Sparkplug has much less protocol overhead throughout knowledge transmission.

OPC vs. UA

MQTT Sparkplug makes use of a light-weight messaging protocol, making it well-suited for low-bandwidth or unreliable networks. Then again, OPC UA employs a extra strong messaging protocol able to dealing with bigger knowledge volumes, which is best fitted to high-speed and safe networks.

The competitors between OPC UA and MQTT continues to this present day.



Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles