A Comparative Study of OPC UA and MQTT in a Simulated Industrial Environment

Autores/as

DOI:

https://doi.org/10.70577/asce.v5i1.604

Palabras clave:

OPC UA, MQTT, Automation, Industry 4.0, Smart Factory

Resumen

The emergence of new technologies has profoundly transformed man- ufacturing industries, driving significant changes in production processes. The integration of advanced elements such as process automation, resource optimiza- tion, and device interconnectivity is shaping the development of next-generation Smart Factories. In Ecuador, despite being classified as a mid-level industrial country, there are notable opportunities for adopting Industry 4.0 technologies to enhance productivity and competitiveness.

This research analyzes the performance of the OPC UA and MQTT commu- nication protocols as part of the FCI project aimed at implementing connectivity systems in a dry product filling plant at the Faculty of Industrial Engineering of the University of Guayaquil. A controlled simulation environment is used to eval- uate both protocols based on key network performance indicators (KPIs). The study employs various monitoring and analysis tools to assess protocol behavior and proposes specific optimizations to strengthen plant-level communication in- frastructure and support the transition toward a Smart Factory model.

Descargas

Los datos de descargas todavía no están disponibles.

Revista ASCE Magazine, Periodicidad: Trimestral, Volumen: 5, Número: 1, Año: 2026 páginas 502 - 515

Doi: https://doi.org/10.70577/asce.v5i1.604

Recibido:2025-12-23

Aceptado:2026-01-08

Publicado:2026-01-14

A Comparative Study of OPC UA and MQTT in a Simulated Industrial Environment

Estudio comparativo de OPC UA y MQTT en un entorno industrial simulado

Autores

Ericka Stephania Oyague Bajaña 1

https://orcid.org/0000-0003-4457-9395 ericka.oyagueb@ug.edu.ec

Universidad de Guayaquil

Universidad Politécnica de Valencia

Ecuador - Guayaquil

Rodolfo Antonio Parra López2

https://orcid.org/0000-0002-5588-3993 rodolfo.parral@ug.edu.ec

Universidad de Guayaquil

Ecuador - Guayaquil

Freddy Steve Pincay Bophorquez3

https://orcid.org/0000-0001-8260-5887 freddy.pincayb@ug.edu.ec

Universidad de Guayaquil

Ecuador - Guayaquil

Harry Alfredo Zurita Hurtado4

https://orcid.org/0000-0003-1082-4719 harry.zuritah@ug.edu.ec

Universidad de Guayaquil

Ecuador - Guayaquil

Cómo citar

Oyague Bajaña, E. S., Parra López, R. A., Pincay Bophorquez, F. S., & Zurita Hurtado, H. A. (2026). A Comparative Study of OPC UA and MQTT in a Simulated Industrial Environment. ASCEMAGAZINE, 5(1), 502–515.

Resumen

La aparición de nuevas tecnologías ha transformado de manera significativa a las industrias manufactureras, impulsando cambios en los procesos productivos mediante la automatización, la optimización de recursos y la interconectividad de dispositivos. En Ecuador, a pesar de ser un país con un nivel industrial medio, existen importantes oportunidades para la adopción de tecnologías de la Industria

4.0 con el fin de mejorar la productividad y la competitividad.

Esta investigación analiza el desempeño de los protocolos de comunicación OPC UA y MQTT en un entorno industrial de llenado de productos secos, orientado a la implementación de sistemas de conectividad para el desarrollo de una Fábrica Inteligente. Se emplea un entorno de simulación controlado para evaluar ambos protocolos mediante indicadores clave de desempeño de red (KPIs). Además, se utilizan herramientas de monitoreo y análisis para estudiar el comportamiento de los protocolos y se proponen optimizaciones específicas que fortalecen la infraestructura de comunicación a nivel de planta, facilitando la transición hacia un modelo de Smart Factory.

Palabrasclave: Industria 4.0, Smart Factory, OPC UA, MQTT, comunicaciones industriales, automatización industrial, interconectividad.

Abstract

The emergence of new technologies has profoundly transformed man- ufacturing industries, driving significant changes in production processes. The integration of advanced elements such as process automation, resource optimiza- tion, and device interconnectivity is shaping the development of next-generation Smart Factories. In Ecuador, despite being classified as a mid-level industrial country, there are notable opportunities for adopting Industry 4.0 technologies to enhance productivity and competitiveness.

This research analyzes the performance of the OPC UA and MQTT commu- nication protocols as part of the FCI project aimed at implementing connectivity systems in a dry product filling plant at the Faculty of Industrial Engineering of the University of Guayaquil. A controlled simulation environment is used to eval- uate both protocols based on key network performance indicators (KPIs). The study employs various monitoring and analysis tools to assess protocol behavior and proposes specific optimizations to strengthen plant-level communication in-frastructure and support the transition toward a Smart Factory model.

.

Keywords:OPC UA, MQTT, Automation, Industry 4.0, Smart Factory

Introduction

From the early days of industry with the introduction of mechanization using steam and water, known as Industry 1.0, to the third industrial revolution with the incorporation of robots, technology has been essential for the evolution of industries, all with the same objective of reducing human intervention in the processes within factories or industrial plants. The fourth revolution, called Industry 4.0, in recent years has marked a trend towards digital transformation, process automation, resource optimization, increased productivity, and the integration of Artificial Intelligence (AI) techniques for data anal- ysis and real-time decision-making. These are some of the most prominent variables in manufacturing companies. The adoption of Industry 4.0 by medium-sized industries or SMEs is particularly advantageous when combined with the development and transfor- mation of work, as well as the skilled job profiles required for operating in future Smart Factories [1].

Industry 4.0 derives its name from the German government's Industrial Plan, introduced between 2011 and 2013, which envisaged large-scale, high-level investments in various infrastructures by a diverse array of entities, aiming to elevate the standard of the Ger- man manufacturing industry [2].

In context of Ecuador considering indicators related to Industry 4.0, there are significant opportunities to adopt new technologies and enhance the country's competitiveness. According to the World Economic Forum's "Readiness for the Future of Production Report 2018" [3] . Ecuador ranks 89th out of 100 in the global "Readiness Overall Assessment." Analyzing these data allows us to classify Ecuador as a country with a mid-level industry. The implementation of communication protocols in industrial envi- ronments is key for integrating new technologies. Connectivity poses a significant chal- lenge for production companies. Although the communication protocols used since the previous industrial revolution can be adapted to new intelligent systems, there are com- munication standards specifically designed for these advanced infrastructures.

Smart factories, known by their popular name in English, are a central element in the industry

4.0 paradigm. Their focus is on transforming industries by adopting new tech- nologies such as connected manufacturing systems and the vertical integration of pro- duction processes. This

concept inherently involves the use of industrial robotics, au- tomation, integrated systems, and information systems [4].

OPC UA is an international standard (IEC 62541) primarily based on a client/server communication model that facilitates the distribution of information maintained by an OPC UA server to OPC UA clients. The information is organized through OPC UA Nodes, grouped to compose the so-called AddressSpace within an OPC UA server. Each OPC UA Node belongs to a class known as NodeClass [5]. MQTT (Message Queue Telemetry Transport) is a simple, lightweight, and bandwidth-efficient protocol that operates at the application layer over TCP/IP. It is suitable for M2M communica- tions and follows a publish/subscribe operating model [6].

(En este punto plantearse sip oner mas conceptos teoricos que rodeen el tema de tesis)

The main objective of this research is to highlight the benefits of connectivity systems for the FCI project "Design of an Intelligent System for Monitoring and Production Flexibility in a Dry Product Filling Plant", as part of integrating new technologies into industrial environments. The University of Guayaquil's industrial plant is currently transitioning to a Smart Factory. This paper summarizes the curricular integration work aimed at simulating plant communication and conducting a comprehensive evaluation of the OPC UA and MQTT protocols through performance metrics analysis (KPIs). By implementing these protocols, the research aligns with local and global initiatives that seek to optimize industrial processes, increase competitiveness, and encourage the adoption of new technologies. Additionally, by providing detailed analysis and 3 implementation recommendations, this study aims to serve as a model for other Ecua-dorian industries, contributing to the development of industrial automation in the coun- try.

The scenarios are presented in a simulated environment, with data transmission from PC1 acting as the server using CODESYS Virtual Win V3, the CODESYS virtual PLC, with OPC UA enabled and the Jaz_Tec library for MQTT. The server's capabilities will be analyzed using PRTG Network Monitoring, and communication will be evaluated through traffic capture in Wireshark, with data represented in MATLAB graphs. In this way, the proposed scenarios will provide reliable information for implementing the most appropriate protocol in the dry product filling plant.

The paper is organized as follows Section 2 outlines the materials and methods used for simulating connectivity between a virtual PLC and a client device. Section 3 pre- sents the analysis of communication results for OPC UA and MQTT. Finally, Section 4 summarizes and concludes the document.

Methodology

The research has a quantitative approach by analyzing the numerical data based on graphs of the numerical data based on graphs. The methodology is divided into two methodological approaches: experimental and evaluative, allowing the integration of functionalities in its development. This enables the simulation of the functionality of sending information encapsulated in variables from the dry product filling plant using OPC UA and MQTT communication protocols across the network to a client on another device. Utilizing two types of protocols requires a specific simulation environment for each, which allows for a more detailed representation of their performance under dif- ferent conditions in their recommended configuration. The communication between server and client will recreate a real environment for the performance of both protocols, allowing the use of KPIs as network metrics to determine the network optimization needs in the plant.

Simulation Architecture and Functional Workflow

In the experimental design, a simulation of industrial processes is developed using tools such as CODESYS and Node-RED. CODESYS is employed for OPC UA and MQTT, simulating the filling, dosing, and sealing processes in the dry filling plant through a Virtual Programmable Logic Controller (PLC) where the Ladder Diagram (LD) pro- gramming is loaded. Node-RED is used as a client to receive data and analyze perfor- mance. This configuration allows for the simulation of a Smart Factory environment, where performance metrics can be measured and analyzed in real-time.

The independent variables in this study are the communication protocols OPC UA and MQTT, while the dependent variables are the KPIs, defined as latency, bandwidth, data transfer rate,

and Quality of Service (QoS). The primary hypothesis is that OPC UA 4 and MQTT protocols exhibit significant differences in performance within a Smart Fac- tory environment. To test this hypothesis, specific simulation environments have been configured to allow detailed monitoring of each performance metric.

To carry out the performance metrics evaluation, monitoring tools such as PRTG Net- work Monitor and Wireshark are used. These tools with MATLAB will allow to ana- lyze the communication between the server and clients, providing precise data on net- work traffic and protocol efficiency. The obtained results will be analyzed to determine the efficiency of each protocol in terms of the evaluated metrics, thereby enabling well- founded conclusions and practical recommendations for the implementation of com- munication technologies in Industry

4.0 industrial environments. The system architec- ture is shown in Figure 1.

Fig. 1. System Architecture

Configuration of the Simulated Communication Environment

It is essential to note that variable transmission from CODESYS differs based on the protocol used. While OPC UA compatibility is built-in for simulating industrial envi- ronments, MQTT requires the use of function blocks from the Jaz_Tec library. In both cases, data is continuously transmitted to simulate plant operations. TON timers are 5 employed to replicate the plant's waiting and production periods in each process sec- tion.

Scenario 1 employs a Ladder Diagram (LD) to simulate OPC UA, consisting of six rungs. Four rungs sequentially transmit variables, timed by TON timers. The remaining two simulate the dry product packaging process, from raw material to final product. A recurring rung ensures continuous production. Figure 2 visually depicts the system's activation process, including a push-button start and hopper fill delay for each produc- tion phase. OPC UA data transmission from CODESYS is straightforward, requiring primarily the configuration of the host address for client identification and the creation of symbol configurations for each declared variable.

Scenario 2 adopts the same TON timer-based transmission structure as Scenario 1 but utilizes function block modules for MQTT communication. Figure 3 illustrates the ex- panded CODESYS configuration, incorporating additional rungs for seamless data transfer to the Mosquitto broker and subsequent subscription by the Node-RED client. It is noteworthy that the Mosquitto Eclipse broker typically requires minimal configu- ration. Verifying the default listening port, 1883, and configuring the sending variable within the function block to match this port is generally sufficient.

Fig.2.OPC UA system configuration in CODESYS 6

Fig.3. MQTT system configuration in CODESYS

Client-Side Communication Setup in Node-RED

To configure the clients using OPC UA nodes, data reception flows were established through the identification of "OpcUa Item" and nodes, with the IDs obtained from the UA Expert software as an additional tool. Additionally, "OPC UA Client" were configured with the server address in CODESYS, "opc.tcp://FabianNieto:4840". Finally, nodes for debugging messages were established, as shown in Figure 4.

Fig.4.Configuration of flows in Node-red for OPC UA

The MQTT input nodes were configured with the server's IP address and the enabled port, sending messages through port 1883, as shown in Figure 5. In the same section, the topics to which Node-RED subscribes under the Eclipse Mosquitto broker, managing the data published by the CODESYS virtual PLC, were added.7

Fig.5.Configuration of flows in Node-red for MQTT

Evaluation and discussion of Communication Protocols.

The primary objective of the experiments outlined in this document is to verify network metrics, such as KPIs, using Wireshark to capture traces during packet exchanges in the simulation. This is done to extract the necessary communication data into a .CSV file. Subsequently, this information will be processed in MATLAB to generate graphs that visually represent the collected data, thereby determining the most suitable proto- col for implementation in the plant. It is important to note that the network conditions are mixed, starting with normal traffic and then transitioning to saturated network con- ditions. In both scenarios, no significant variations in arrival times are observed, which is attributed to the low number of variables being transmitted.8

Latency Behavior

Latency is a critical metric in industrial automation, particularly in real-time control systems. In this study, OPC UA demonstrated a stable and uniform latency distribution, consistently remaining within a range of 0 to 1 second. Even under saturated network conditions, OPC UA maintained low variation, with atypical cases barely reaching 0.1 seconds. This indicates robust performance suitable for deterministic communication. In contrast, MQTT displayed greater variability in latency, primarily due to how its publishing blocks are configured in CODESYS. During normal conditions, latency values clustered around 0.2 and 0.8 seconds. However, under saturation, outliers increased notably, with peaks reaching up to 10 seconds in processes such as raw material dosing (Figure 6). These delays are evidence of MQTT’s asynchronous, event-driven model, which, while flexible, can introduce significant lag in time-sensitive operations.

Fig.6.Comparative latency graph between OPC UA and MQTT.

Bandwidth Consumption

As shown in Figure 7, OPC UA exhibited stable bandwidth consumption, with small fluctuations around 850 bytes per second. Its higher overall bandwidth usage is expected due to the richer data model and metadata encapsulated in its messages. Despite consuming more resources, the predictable pattern offers advantages in environments where communication reliability is critical. MQTT, on the other hand, showed much lower average consumption, fluctuating between 2 and 65 bytes per second, which is advantageous for constrained networks. However, its graph reveals significant variability, with peaks during transmission bursts and valleys during idle periods. This irregular behavior highlights MQTT’s adaptability but also its susceptibility to traffic spikes and potential congestion if not managed properly.

Fig.7.Comparative Bandwidth graph between OPC UA and MQTT

Bitrate Stability

Bitrate analysis reveals further differences between the two protocols (Figure 8). OPC UA maintains a relatively constant bitrate around 7000 bps, which reflects a reliable and steady communication pattern ideal for Smart Factory scenarios requiring high availability and precision.Conversely, MQTT shows notable bitrate fluctuations, with values spiking up to 500 bps but falling rapidly during low activity phases. These peaks align with publishing events triggered by the PLC’s function blocks, reinforcing MQTT’s design for sporadic, lightweight transmissions. While this behavior supports efficient use of bandwidth, it may hinder consistent data delivery when stability is required.

Fig.8.Comparative Bitrate graph between OPC UA and MQTT

Jitter

In Figure 9 we can observe the OPC UA graph with significantly lower and stable jitter levels over time, resulting in minimal variation in packet arrival times. These constant values reflect precise synchronization of communication between the server and the client. Most jitter fluctuations remain within the range of ±0.5 seconds, indicating con- siderable data stability. Low variability levels allow for precise synchronization and real-time communication. The stability provided by OPC UA ensures data reception at constant time intervals, reducing latency and improving service quality.

In contrast, MQTT exhibits higher and more variable jitter. Jitter values fluctuate nota- bly over time around ±10 seconds, indicating greater uncertainty in packet arrival times. Although jitter is higher, MQTT's nature is to operate efficiently in environments with network fluctuations and limited bandwidth, which is advantageous for sporadic trans- missions but not as much for real-time data transmission.

Fig.9.Comparative Jitter graph between OPC UA and MQTT

Conclusions

This research presents a comprehensive performance evaluation of the OPC UA and MQTT communication protocols within a simulated Smart Factory environment, aligned with the transition efforts at the Faculty of Industrial Engineering of the University of Guayaquil. Based on an extensive review of scientific literature, relevant Key Performance Indicators (KPIs)—such as latency, jitter, bandwidth, and bitrate— were selected to assess communication quality in industrial settings. The experimental setup successfully integrated CODESYS and Node-RED to emulate communication between a virtual PLC and a client device, while monitoring tools such as PRTG and Wireshark, combined with MATLAB-based visualization, allowed for detailed analysis of protocol behavior under varying network conditions.

The results indicate that OPC UA offers higher temporal stability, lower jitter, and predictable data delivery, making it suitable for real-time industrial processes requiring reliability and synchronization. Conversely, MQTT demonstrates lower bandwidth consumption and greater adaptability to fluctuating workloads but exhibits higher variability in latency and jitter, which may limit its application in time-sensitive operations. These findings support the development of tailored implementation strategies for the dry product filling plant and provide a valuable reference for other Ecuadorian industries aiming to adopt Industry 4.0 technologies. Overall, this study contributes to the understanding of communication protocol performance in emerging industrial contexts and promotes informed decision-making in the design of connectivity architectures for smart manufacturing systems.

References

  1. Rauch, E., Linder, C., Dallasega, P.: Anthropocentric perspective of production before and within Industry 4.0. Comput Ind Eng. 139, (2020). https://doi.org/10.1016/j.cie.2019.01.018.
  2. Ghobakhloo, M.: Industry 4.0, digitization, and opportunities for sustainability, (2020). https://doi.org/10.1016/j.jclepro.2019.119869.
  3. World Economic Forum, A.T Kearney: Readiness for the Future of Production Report 2018. (2018).
  4. Ryalat, M., ElMoaqet, H., AlFaouri, M.: Design of a Smart Factory Based on Cyber-Physical Systems and Internet of Things towards Industry 4.0. Applied Sciences. 13, 2156 (2023). https://doi.org/10.3390/app13042156.
  5. Cavalieri, S., Mulè, S.: Interoperability between OPC UA and oneM2M. Jour- nal of Internet Services and Applications. 12, 13 (2021). https://doi.org/10.1186/s13174-021-00144-9.
  6. Patti, G., Leonardi, L., Testa, G., Lo Bello, L.: PrioMQTT: A prioritized ver- sion of the MQTT protocol. Comput Commun. 220, 43–51 (2024). https://doi.org/10.1016/j.comcom.2024.03.018.

Conflicto de intereses:

Los autores declaran que no existe conflicto de interés posible.

Financiamiento:

No existió asistencia financiera de partes externas al presente artículo.

Agradecimiento:

N/A

Nota:

El artículo no es producto de una publicación anterior.

Citas

1. Rauch, E., Linder, C., Dallasega, P.: Anthropocentric perspective of production before and within Industry 4.0. Comput Ind Eng. 139, (2020). https://doi.org/10.1016/j.cie.2019.01.018. DOI: https://doi.org/10.1016/j.cie.2019.01.018

2. Ghobakhloo, M.: Industry 4.0, digitization, and opportunities for sustainability, (2020). https://doi.org/10.1016/j.jclepro.2019.119869. DOI: https://doi.org/10.1016/j.jclepro.2019.119869

3. World Economic Forum, A.T Kearney: Readiness for the Future of Production Report 2018. (2018).

4. Ryalat, M., ElMoaqet, H., AlFaouri, M.: Design of a Smart Factory Based on Cyber-Physical Systems and Internet of Things towards Industry 4.0. Applied Sciences. 13, 2156 (2023). https://doi.org/10.3390/app13042156. DOI: https://doi.org/10.3390/app13042156

5. Cavalieri, S., Mulè, S.: Interoperability between OPC UA and oneM2M. Jour- nal of Internet Services and Applications. 12, 13 (2021). https://doi.org/10.1186/s13174-021-00144-9. DOI: https://doi.org/10.1186/s13174-021-00144-9

6. Patti, G., Leonardi, L., Testa, G., Lo Bello, L.: PrioMQTT: A prioritized ver- sion of the MQTT protocol. Comput Commun. 220, 43–51 (2024). https://doi.org/10.1016/j.comcom.2024.03.018. DOI: https://doi.org/10.1016/j.comcom.2024.03.018

Descargas

Publicado

2026-01-14

Cómo citar

Oyague Bajaña, E. S., Parra López, R. A., Pincay Bophorquez, F. S., & Zurita Hurtado, H. A. (2026). A Comparative Study of OPC UA and MQTT in a Simulated Industrial Environment. ASCE MAGAZINE, 5(1), 502–515. https://doi.org/10.70577/asce.v5i1.604

Artículos similares

<< < 2 3 4 5 6 7 8 9 10 11 > >> 

También puede Iniciar una búsqueda de similitud avanzada para este artículo.