Matlab simulation of ESP32 integration with a Raspberry PI soft-PLC via MQTT

This paper presents a MATLAB-based simulation framework for evaluating the temporal behaviour of an ESP32–MQTT–Soft-PLC integration intended for future deployment on a Raspberry Pi Soft-PLC platform. The proposed setup emulates a typical industrial IoT chain in which a virtual ESP32 node acquires synthetic ADC-like sensor data with Gaussian noise, performs preprocessing and normalisation, injects software jitter at task level, and publishes timestamped JSON messages via a Python MQTT client over a TLS-secured connection to a cloud-based MQTT broker. On the control side, a MATLAB Soft-PLC subscribes to the same MQTT topic, updates a process image at the beginning of each scan cycle and executes an ON-delay (TON) timing logic, while logging all relevant timestamps for performance analysis. End-to-end latency is defined as the time difference between publication at the ESP32 node and processing in the Soft-PLC, whereas jitter is evaluated as the deviation of the actual scan time from a nominal scan period. For a 30-second experiment with a 50 ms nominal scan time, the measured end-to-end latency exhibits a mean of 568.06 ms, with values ranging from 64.11 ms to 1144.76 ms, while the Soft-PLC scan time shows an average of 62.64 ms and a maximum of 172.03 ms. These results characterise the architecture as a soft real-time solution suitable for monitoring, data acquisition and supervisory control, but not for hard real-time applications with strict millisecond-level deadlines. The framework thus provides a practical basis for analysing latency and scan jitter before migrating the ESP32–Soft-PLC integration to real Raspberry Pi-based controllers.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2025-09-30
DOI
https://doi.org/10.5281/zenodo.18723602
Primary Topic
Industrial Automation and Control Systems
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Matlab simulation of ESP32 integration with a Raspberry PI soft-PLC via MQTT

Alexandru Bârsan, Timotei Morariu, Paula Drașovean, Anca Lucia Chicea et al.
Zenodo (CERN European Organization for Nuclear Research)
Industrial Automation and Control Systems
article

Matlab simulation of ESP32 integration with a Raspberry PI soft-PLC via MQTT

Alexandru Bârsan, Timotei Morariu, Paula Drașovean, Anca Lucia Chicea, Claudia Emilia Gîrjob, Cristina Maria BIRIȘ, Marosan Adrian
article en

Abstract

This paper presents a MATLAB-based simulation framework for evaluating the temporal behaviour of an ESP32–MQTT–Soft-PLC integration intended for future deployment on a Raspberry Pi Soft-PLC platform. The proposed setup emulates a typical industrial IoT chain in which a virtual ESP32 node acquires synthetic ADC-like sensor data with Gaussian noise, performs preprocessing and normalisation, injects software jitter at task level, and publishes timestamped JSON messages via a Python MQTT client over a TLS-secured connection to a cloud-based MQTT broker. On the control side, a MATLAB Soft-PLC subscribes to the same MQTT topic, updates a process image at the beginning of each scan cycle and executes an ON-delay (TON) timing logic, while logging all relevant timestamps for performance analysis. End-to-end latency is defined as the time difference between publication at the ESP32 node and processing in the Soft-PLC, whereas jitter is evaluated as the deviation of the actual scan time from a nominal scan period. For a 30-second experiment with a 50 ms nominal scan time, the measured end-to-end latency exhibits a mean of 568.06 ms, with values ranging from 64.11 ms to 1144.76 ms, while the Soft-PLC scan time shows an average of 62.64 ms and a maximum of 172.03 ms. These results characterise the architecture as a soft real-time solution suitable for monitoring, data acquisition and supervisory control, but not for hard real-time applications with strict millisecond-level deadlines. The framework thus provides a practical basis for analysing latency and scan jitter before migrating the ESP32–Soft-PLC integration to real Raspberry Pi-based controllers.

Zenodo (CERN European Organization for Nuclear Research)
Lucian Blaga University of Sibiu (RO)
Industry, innovation and infrastructure
Openalex Percentile: Top 29%
Industrial Automation and Control Systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Matlab simulation of ESP32 integration with a Raspberry PI soft-PLC via MQTT — Alexandru Bârsan, Timotei Morariu, et al. · Zenodo (CERN European Organization for Nuclear Research) (2025) | TGRS Research Map | TGRS