Edge Computing-Based Modular Control System for Industrial Environments

: This paper presents a modular hardware control system tailored for industrial applications. The system presented is designed with electrical protection, guaranteeing the reliable operation of its modules in the presence of various field noises and external disturbances. The modular architecture comprises a principal module (mP) and dedicated expansion modules (mEXs). The principal module serves as the network administrator and facilitates interaction with production and control processes. The mEXs are equipped with sensors, conditioning circuits, analog-to-digital converters, and digital signal processing capabilities. The mEX’s primary function is to acquire local processing field signals and ensure their reliable transmission to the mP. Two specific mEXs were developed for industrial environments: an electrical signal expansion module (mSE) and the vibration signals expansion module (mSV). The EtherCAT protocol serves as a means of communication between the modules, fostering deterministic and real-time interactions while also simplifying the integration and replacement of modules within the modular architecture. The proposed system incorporates local and distributed processing in which data acquisition, processing, and data analysis are carried out closer to where data are generated. Locally processing the acquired data close to the production in the mEX increases the mP availability and network reliability. For the local processing, feature extraction algorithms were developed on the mEX based on a Fast Fourier Transform (FFT) algorithm and a curve-fitting algorithm that accurately represents a given FFT curve by significantly reducing the amount of data that needs to be transmitted over the mP. The proposed system offers a promising solution to use computational intelligence methodologies and meet the growing need for a modular industrial control system with reliable local data processing to reach a smart industry. The case study of acquiring and processing vibration signals from a real cement ball mill showed a good capacity for processing data and reducing the amount of data.


Introduction
Recently, there has been a noticeable evolution across the industrial processes, characterized by the need for efficient energy usage, sustainable resource management, and zero defects.These developments have led to a significant increase in the complexity of industrial processes and an urgent need for efficient, flexible, and reliable industrial control systems [1,2].As a result, the concept of smart industry has emerged [3,4].
An area of notable innovation lies in the evolution of modular hardware systems designed to acquire, process, and transmit signals in alignment with industry requirements [5].These modular systems introduced greater control over online data acquisition and processing processes.The ability to easily add new modules or replace faulty modules makes these systems more flexible and adaptable to the constantly evolving requirements of the industry [6,7].Industrial control systems integrate computational and physical components to monitor and control the physical processes of a system [8].Therefore, combining the physical layer and processes in industrial automation to achieve complex optimization decisions that humans traditionally make increases the demand for flexible and adaptable control systems.Therefore, it has led to essential concepts and architectures in the industry, such as edge computing [9] and fog computing [10], allowing resource's proximity to a lower level, improving the response times (latency and performance), system autonomy, and reliability even on network failures [11].Therefore, in order to effectively achieve a smart industry, innovative industrial control systems are a current necessity.Some noteworthy examples on the market follow architectures appropriate for industrial applications [12], such as MyPi and Revolution Pi, which are modular industrial computers based on Raspberry Pi with an improved base for industrial applications; National Instruments Corp (NI) offers a data acquisition and control hardware system that can be customized by the user, for example, CompactRio and CompactDAQ with robustness for industry, and there is also a wide range of expansion modules; and Beckhof that offers industrial automation systems with industrial PCs (Portable Computers) and expansion components/modules.However, the development and implementation of expansion modules on the above architectures demand substantial user time and extensive expertise to establish communication, configuration, and programming within modular systems.Also, some architectures integrate proprietary automation software that needs knowledgeable users in the previously explained area.Moreover, these solutions, originally intended for non-industrial sectors, must contend with industry-specific challenges, encompassing factors like dirt, mechanical disturbances, electrical noise, overcurrent and overvoltage spikes, and bad implementations by users.To cover some limitations of the mentioned architectures, [12] proposes a new modular hardware system.It comprises a main processing module and expansion modules that can be added in a Plug&Play way, without third-party dependencies, allowing the easy development and implementation of modules.It also incorporates electrical protection and condition circuits to be robust for industrial environments.However, the hardware architecture developed is not based on the distributed processing concept, including also centralized data processing on the main processing module or outside of the proposed system.This paper presents an edge computing-based modular hardware control system for industrial environments.The main contribution is the design of an architecture that incorporates the Plug&Play concept by having a main principal module (mP) and expansion modules (mEXs) that can be easily added to a network.The architecture owns local processing features in which data acquisition, processing, and analysis are carried out closer to where data are generated, contributing to the edge computing paradigm.The mP is the central coordinator and controls the entire architecture, performing the external remote control and data transmission, ensuring seamless connectivity and interoperability with external devices and networks.The mEXs are designed to acquire the field signals generated by the sensors, process them locally, and communicate the processed data to the mP.The mEXs are equipped with a System-On-Chip (SoC) capable of executing computational intelligence algorithms to process the data from the sensors or the source.Two specific mEXs were developed, the electrical signal expansion module (mSE) and the vibration signals expansion module (mSV), acquiring and local processing data from electrical signals (current and voltage) and vibration signals, respectively.The mEXs proposed in this paper perform the local processing in two stages: analyzing the field signals in the frequency domain using the FFT algorithm, and then, the FFT signal is approximated by a curvefitting method to significantly reduce the amount of data that needs to be transmitted and post-processing.The communication between modules is completed by the Ethernetbased EtherCAT bus, thus facilitating the addition of new modules to the control system and deterministic real-time communication framework between the individual modules.
The proposed system also incorporates electrical protection to be robust for industrial environments.
The paper is organized as follows.Section 2 presents an overview of the proposed industrial modular hardware control system and the hardware protection techniques employed.The mP is described in Section 3, while Section 4 presents the mEXs.Section 5 presents the results of the proposed system and the local processing algorithms.Finally, the conclusions are drawn in Section 6.

Proposed Industrial Hardware Control System
This section presents the global view of the proposed industrial modular hardware control system architecture.Figure 1 depicts the global hardware architecture.It features a main principal module (mP) and expansion modules (mEXs).Together, these modules form the system's backbone, facilitating data acquisition, processing, and transmission.This architecture is designed to provide high performance, scalability, and flexibility, allowing for continuous integration of additional mEX to address new industrial control challenges.The principal module, the mP, is the central coordinator of the internal communication network equipped with a Central Processing Unit (CPU) capable of running an operating system such as Linux, allowing remote control of the entire architecture.External remote control and data transmission are accomplished via the Ethernet Transmission Control Protocol/Internet Protocol (TCP/IP), ensuring seamless connectivity and interoperability with external devices and networks.Section 3 presents the mP in more detail.

CPU
The mEXs proposed in this paper are designed to capture and process signals generated by the field sensors.Two mEXs were developed in this paper, one to acquire and pre-process data from current and voltage signals, the electrical signal expansion module (mSE), and the other for vibration signals, the vibration signals expansion module (mSV).Section 4 presents the developed mEXs in more detail.In the mEX, signals are acquired from the field and undergo a signal-conditioning step, bringing the signal to the acceptable range of the ADC.Additionally, the module is equipped with a SoC capable of interfacing with the ADC using the Serial Peripheral Interface (SPI) communication and executing computational intelligence algorithms, both in a CPU and in a Field-Programmable Gate Array (FPGA) [13].
The bus presented and developed in this architecture consists of a dual-bus system comprising the power supply bus and the EtherCAT bus.The power supply bus encompasses channels for 24 Volts (V) and 0 V, receiving the 24 V direct current (DC) from an external power supply (represented by the red line in Figure 1).This power supply is received by the principal module and then distributed to the expansion modules via the bus network.EtherCAT functions as a master-slave communication system in which one or more master devices oversee the operation of numerous slave devices.These devices are interlinked via a single Ethernet bus, facilitating data transmission through the communication network.Within this framework, the mP assumes the role of a network master and is furnished with a dedicated Ethernet port tailored to accommodate the EtherCAT protocol.Meanwhile, each expansion module (the generic mEX) operates as an EtherCAT slave, boasting two Ethernet ports that contribute to its role within the system, receiving the EtherCAT frame from the previous module and sending it to the next module.This setup empowers data processing by individual slave devices and network control in the master device.Also, the master device can incorporate data processing features.The EtherCAT protocol offers numerous advantages, including high-speed, deterministic, and real-time communication.Additionally, the EtherCAT's wide acceptance in the market and its ability to support many modules on the communication bus make it suitable for emerging industrial applications.
With this proposed architecture design, it is possible to accommodate additional mEXs, enabling more efficient and swift adaptation to new industrial control challenges.This flexibility and scalability facilitate the seamless integration of new functionalities into the system, empowering users to stay ahead of evolving requirements and emerging trends in industrial control, such as distributed control of processes, the easy addition of new modules to a network, real-time processing, and deterministic communication.

Hardware Protections from External Environment
The proposed system must be designed with the necessary robustness for application in an industrial environment.The industry is aware of various field noises and external disturbances.Therefore, protecting and isolating the modules from possible field disturbances is essential.Thus, the implemented protective measures primarily encompass an assemblage of safeguards, such as Electromagnetic Compatibility (EMC) and Electromagnetic Interference (EMI) filters and radio frequency interference (RFI) filters.
Figure 2 illustrates the 24 V DC input circuit, which originates from an external power supply designated for both the input voltage regulator of the CPU and as a power source for the mEXs module.This circuit incorporates a range of protective elements: a high-current fuse (F2) to safeguard against excessive power supply currents, a diode (D3) to ensure correct input polarity, a varistor (RV3) providing protection against voltage spikes, the integration of a common-mode choke filter (FL3) functioning as an EMI and RFI filter to counteract common-mode noise and capacitors that are used for current noise suppression in differential mode.Figure 3 presents the protection circuit for overvoltages from the 5 V direct current voltage regulator, which serves as a power supply for the Power Management Integrated Circuit (PMIC).The PMIC exerts control over voltage levels utilized by various components as well as the microprocessor and SoC housed within the mP and mEXs, respectively.The protection circuit consists of a reference diode (U1), active when there is a reference voltage above a given threshold proportional to the input voltage.In this circuit, the FET transistor (Q2) will conduct when Q1 is cut off and will not conduct when BJT transistor (Q1) is active, and this holds for an input voltage of less than about 5 V DC.In the first transistor (Q1), a BJT transistor is used since it will be activated by passing the current.In the second case, a FET transistor (Q2) is used since this is activated by applying a voltage and has better characteristics than a BJT transistor.The FET transistor has a higher input impedance and a lower gain in the passage of currents, being more stable with temperature and generating less input noise in the PMIC power supply.Galvanic isolation systems are also used in modules (both the mP and mEXs) to protect them from external interference.For example, a DC/DC isolator was used to separate the internal and external power supply.Other safeguarding mechanisms were implemented to ensure robust protection, including the strategic use of decoupling capacitors and ferrite beads in the power supplies.These additional measures bolster the system's stability and mitigate potential power fluctuations and electromagnetic interference risks.

Principal Module-mP
This section presents the principal module, the mP.It is composed of a CPU (in this case, the MCIMX6D5EY-M10AE, manufactured by NXP Semiconductors/Freescale) featuring two ARM Cortex A9 cores, a 32-bit data bus, and a maximum frequency of 1 GHz.The system can support the following peripherals: Serial Advanced Technology Attachment (SATA) connector, Secure Digital SD card, High-Definition Multimedia Interface (HDMI), Universal Serial Bus connector (USB), Ethernet communication, EtherCAT communication, and Random Access Memory (RAM) memory.The overall architecture of the mP can be seen in Figure 4.The SATA connection allows for the connection of a Solid-State Drive (SSD) to the module, allowing for the storage of collected data and serving as a backup for the modular system.The SD card allows for the incorporation and initialization of the operating system.The HDMI connection is primarily necessary to facilitate the configuration of the microprocessor and its operating system (Linux), allowing for graphical displays.The USB connection facilitates connections to computers for operating system configurations, as well as the exchange of information with external disks.The USB port is standard in current embedded systems.The Ethernet connections also allow for system configuration, as well as the module's remote control and data transmission to the cloud.Additionally, the Ethernet connector allows the mP to be established as an EtherCAT master, controlling the EtherCAT network, controlling slave devices, and managing the information collected and processed in the mEX.For RAM, the use of 1 GB of memory was dimensioned as sufficient, considering the processes used, the Linux operating system, and the applications used.The 2 Kbits Read-Only Memory (ROM) and 32 Mbits Flash memory are both nonvolatile memories, with the information contained in the ROM memory unable to be updated, while in the Flash memory, there is an updating possibility.The ROM and Flash memories store the BIOS (Basic Input/Output System) or firmware.The module operates on a 24 V DC power supply obtained from an external source located in the electrical panel.To ensure proper functioning and safeguard the components, the module necessitates protection against overvoltage, as previously explained in Section 2. This is achieved by a PMIC routing the supply voltage through a voltage regulator, which adjusts the voltage to an appropriate level for all the components within the module.

Expansion Modules
The expansion modules, the mEXs, capture and locally process data directly from the field through sensors.Figure 5 presents an example of a generic mEX architecture composed of two sensors.These sensors convert external stimuli into analog values, which are then prepared for further processing through a signal-conditioning circuit.This circuit ensures that the signals fall within the acceptable range for the ADC (0 to 5 V).More than external disturbances, internal disturbances can also be present due to the components' imprecision in the condition circuit.These components were chosen to have high precision, for example, with impedances with a tolerance of 0.1% and ADCs with high resolution (12 bits of resolution).The error provided by the internal components will be reduced at the acceptable range of output (0-5 VDC).The SPI protocol established communication between the SoC device and the ADC near it.This protocol was favored because of the close distance between devices and the high-speed full-duplex communication capabilities.The SoC incorporated on the mEX has a CPU and an FPGA, offering exceptional flexibility for implementing algorithms.In scenarios where a low latency and real-time application is required, and if the algorithm is simple to implement in hardware, it can be efficiently implemented using the SoC's built-in FPGA.However, if the algorithms to be implemented in the mEX are complex and time-consuming to implement using VHDL or any other Hardware Description Language, or if there is a need for a quick time-to-market, they can be initially implemented in a processor.

Signal Conditioning
Each mEX module is equipped with an EtherCAT slave controller, specifically the LAN9252 IC.The SoC communicates with the LAN9252 through the SPI protocol and allows the module to function effectively as a participant on the EtherCAT bus.The benefits of utilizing the EtherCAT protocol are elaborated upon in Section 2.
In this paper, two mEXs developed are presented: the mEX for electrical signals (Section 4.1) and the mEX for vibration signals (Section 4.2).

Electrical Signals Expansion Module
An innovative electrical signal expansion module designed specifically for industrial environments has been developed.This module efficiently gathers field electrical signals of a three-phase power supply, processes them, and transmits the processed data to the main module via EtherCAT for further analysis and integration into the industrial system.One of the key features of this mEX is its ability to perform voltage and current readings directly by simultaneously measuring each phase in parallel with the neutral.Analyzing these signals allows for the monitoring of industrial equipment or the prediction of failures.In [12], a case study of "Load Disaggregation Application" can be observed with the respective module, where you could locally process some features through the new module using the methodologies presented below in Section 4.3.This expansion module is updated in relation to the module in [12] by considering local processing.
Figure 6 presents the electrical signal expansion module developed.This expansion module obtains features from a three-phase power supply in the industry using current and voltage sensors.The sensors were dimensioned to detect disturbances that are essential to a precise analysis of the electrical network.Rogowski sensor [14] is used as a current sensor.This sensor is adequate for an industrial environment, dealing with high currents, has an easy application, is isolated from the network (galvanic isolation), and is less perturbed by temperature changes [15].The current sensor also has an extensive range of reading frequencies and good linearity, which is essential to better analyze current signals.The current sensor was selected to measure a current until to a range of 1 kA corresponding to a 22 mVpk of output from the sensor.This range was considered to analyze the industry's current signals and their respective disturbances.The divider voltage is used as a voltage sensor.It allows the direct reading of the actual voltage signal, deals with high voltages, and has a minor measurement error compared to transformer use.The divider voltage and the conditioning circuit voltage were designed to collect voltages of 350 Vpk, although the typical voltage present in the electrical network is 325/330 Vpk.These 350 Vpk were established to allow the measurement of the disturbances at the three-phase power voltages, which can be essential to the electrical network's analysis.As previously presented, the signals from voltage and current sensors need to be conditioned to the range of the ADC.Therefore, two conditioning circuits are presented, one to the current sensor (Figure 7) and the other to the voltage sensor (Figure 8).  Figure 7 presents the conditioning circuitry bridging the current sensor and the ADC.This intricate circuitry is constructed through a sequence of four distinct stages:

•
The first stage is an instrumentation amplifier where the main objectives are to amplify the signal to the magnitudes of ADC input and establish a high input impedance on the expansion module as protection from external currents.

•
The second stage is an integrator due to the signal current derivative from the current sensor.The stage needs to work as an integrator to the electrical network frequency (50 Hz).

•
The third stage is a high pass filter because the integrator works as a high amplifier to the DC components (0 [Hz]).Therefore, a filter was implemented to eliminate the offset voltage.Also, a buffer amplifier was implemented in this stage to isolate the signal to the last stage.

•
The last stage has implemented an inverting amplifier to the gain and offset adjustments.In this case, it was adjusted to an output of 0 to 5 V to the ADC.The Zener diode prevents overvoltages above 5 V DC, being an input protection for the ADC.
The circuit was designed not to have any phase shift beyond the integrator of 90 degrees, which is expected to obtain the original current signal due to the derivative signal originated by the current sensor.
In Figure 8, it is observed that the voltage conditioning circuit to the ADC is composed of three stages: (1) the first stage uses a voltage divider typology to reduce the real voltage to one magnitude admissible by the ADC, where various resistors were used to reduce the power dissipated by each resistor; (2) the second stage is an instrumentation amplifier to establish a high input impedance in the circuit to prevent high current flow inside the module; and (3) the third stage intends to adjust the gain and DC offset to obtain an output of 0 to 5 V on the ADC.
After signal conditioning to the range of the ADC, the analog signal is converted to digital.The SPI communication enables transmitting the collected information from the ADC to the processing unit, the SoC, where data can be processed (see Section 4.3) in a CPU or FPGA.In this module, the ADC requires six channels for data collection: three dedicated to gathering information from a voltage and another three dedicated to the current.For this module, it is also important that the ADC follow the following requirements: has simultaneous measuring of voltage and current in the same instant from the three-phase power supply and has a minimum of 10k samples per second, following the Nyquist theorem because the motor signature on the industry is typical in frequencies 0 to 5 kHz.
The module features a dual Ethernet port configuration that excels as an EtherCAT slave.This design empowers the module to engage with other dedicated external modules and the mP.

Vibration Signals Expansion Module
Another mEX was developed, a vibration signal acquisition and processing mEX designed specifically for industrial environments.This mEX was developed for a particular case study of finding the filling level of a cement horizontal ball mill [16].For this, it was necessary to acquire field signals from vibration signals and extract essential features using frequency analysis.This module serves the purpose of gathering field vibration signals, processing them, and transmitting the processed data to the main module for further analysis.This module can be used in other scenarios, such as analyzing engine and bearing vibrations to detect or predict faults [17], and so on.
In Figure 9 presents the overall architecture of the dedicated mEX for vibration signal analysis applied on a cement mill as a case study.The cement mill (in this case, a horizontal ball mill, the most commonly used in the cement industry) is composed of two chambers [16]: the first chamber, consisting of larger metal balls, corresponds to the raw material inlet chamber for the coarse grinding of the raw material; and the second chamber, with smaller balls, corresponds to the outlet chamber where the fine grinding process takes place.The acquisition of vibration signals is carried out by placing a vibration sensor at the inlet and another at the mill outlet to estimate the filling level of the first and second chambers, respectively.A piezoelectric accelerometer is used as an element of the vibration sensor to acquire vibration values.For the case study on the cement mill, the vibration sensor requires an enclosure that facilitates its attachment to the mill, especially in situations involving calibrations or moving it to areas with different vibration levels.Furthermore, ensuring adequate isolation and robust protection for the sensor against external factors is of utmost importance, as it will be subjected to intense disturbances and dust particles.
The vibration sensor is power supplied through the vibration signal module, with a supply voltage (5 V) and 0 V (GND).This results in a bias voltage of Vcc/2 at the particular sensor to the case study and an output voltage range corresponding to the vibration readings from the environment, ranging between 0.5 and 4.5 V.
This mEX features a signal-conditioning circuit (see Figure 10) for the vibration sensors' signals (ranging from 0.5 to 4.5 V) to convert them into a voltage between 0 and 5 V.The signal-conditioning circuit for the vibration signal consists of two stages: (1) the first stage is responsible for amplifying the signal to achieve a peak-to-peak voltage of 5 V, and (2) the second stage, adjustments to the DC offset and signal inversion are performed, resulting in an output voltage signal ranging from 0 to 5 V.
The signal circuit consists of two inverter amplifiers providing a final signal without phase shift.After signal conditioning to the range of the ADC, the analog signal is converted to digital.The SPI communication enables the transmission of the collected information from the ADC to the processing unit, the SoC, where data can be processed (see Section 4.3) in a CPU or FPGA.The ADC necessitates two distinct channels for data collection, with each channel exclusively designated for acquiring information from a sensor positioned within its corresponding mill chamber.The ADC does not need simultaneous sampling.Instead, the ADC calls for a sampling frequency that ensures accurate sensor readings aligned with the individual sensor's frequency in adherence to the Nyquist theorem.
Similar to the previous module (the mSE), this module also features a dual Ethernet port configuration working as an EtherCAT slave, benefiting from the EtherCAT characteristics.

Local Processing
Figure 11 presents the data workflow on the mEXs.In the mEXs, the acquired signals can transform in their frequency domain to be later used on intelligent computational algorithms.Thus, the Fast Fourier Transform (FFT) was implemented on the proposed mEXs, more precisely, the Cooley-Tukey Generalized (CTG) algorithm of the FFT.In addition to the FFT, the mEXs incorporate a post-processing step where the transformed data are passed through a curve-fitting algorithm (the Cubic Spline method).This algorithm derives an interpolation function for the transformed dataset, obtaining the coefficients that accurately represent the dataset to be transmitted from the mEX to the mP over the EtherCAT network, reducing the amount of communication data.

Acquire Data
Acquire signals from a sensor using SPI protocol.

Fourier Transform Curve Fitting Send Data
EtherCAT Spline

Send the coefficients of the curve fitting function over the EtherCAT network.
Transform the acquired data in its frequency domain using a FFT algorithm.
Post-processing step to find an interpolating function and its coefficients that correctly represent the FFT result.

Cooley-Tukey Generalized (CTG) Algorithm
The CTG algorithm [18] was preferred to be implemented in the mEXs given its flexibility and ease of implementation.Adopting the CTG algorithm in expansion modules can effectively cover a broader range of case studies involving frequency analysis.This advantage arises from its capability to handle a wider range of input data sizes for computing frequency domain representations.
Recognizing the broader potential of their algorithm, Cooley and Tukey acknowledged its capacity to embrace vectors of diverse dimensions.This flexibility extends to vectors x of length N, particularly when N assumes a composite value.N is composite when where N 1 and N 2 are integer factors of N. The first step of the Cooley-Tukey algorithm derivation is to substitute the indices in the one-dimensional DFT expression along with the relation N = N 1 • N 2 to obtain the following expression: where n i , k i = 0, 1, . . ., N i − 1 (i = 1, 2 the dimension of the matrix) and k refers to the index of the frequency component being analyzed in the frequency domain.The twiddle factors matrix W can be expanded as: where [19].Therefore, the two-dimensional Cooley-Tukey Fourier transform equation is given by: (3)

Cubic Spline Algorithm
The curve-fitting process involves selecting a mathematical function to represent the data and finding the coefficients of the function that best fit the function to the data points.The choice of function depends on the nature of the data and the desired level of accuracy.Common functions include linear, polynomial, logistic functions, and spline methods.Although linear and polynomial curve-fitting algorithms are straightforward to develop and computationally efficient, they may be incapable of capturing more complicated patterns in data.Furthermore, high-degree polynomial fits might be prone to overfitting, resulting in poor generalization performance on new data.In light of these considerations, using a Cubic Spline interpolation technique is preferable.Unlike regression-based approaches that approximate data with a single function, Cubic Spline interpolation finds an interpolation function that precisely passes through selected data points.This method maintains the smoothness of the curve while being less prone to overfitting, offering better generalization performance on new data [20,21].
The cubic spline algorithm is a technique that divides the full dataset into smaller intervals and fits a cubic polynomial function to each of the data partitions.These cubic polynomials are selected to pass through every data point and ensure smoothness by maintaining continuous first and second derivatives at the interval intersections [21].
The nodes, which represent local maxima or minima in the dataset, act as the boundaries between these segments.A cubic polynomial interpolates between every two consecutive nodes.In the case of having p knot points (x 1 , y 1 ), (x 2 , y 2 ) . . .x p , y p , there will be p − 1 segments, each defined by a cubic polynomial S i (x), as follows: Additionally, the first (S ′ ) and second (S ′′ ) derivatives of all polynomials are identical in the continuity of adjacent polynomials.Thus, coefficients a, b, and c for each polynomial are obtained by solving the following equations that guarantee the continuity and smoothness of the final total spline function.
S i (x i ) = y i and S i (x i+1 ) = y i+1 for i = 1, 2, . . ., p − 1, The spline system of equations is commonly solved by adding new boundary conditions and using the iterative Jacobi method or the Gauss-Newton method.

Results and Discussion
This section discusses the developed modular hardware system (Section 5.1) and the results of the implemented local processing methodologies (Section 5.2).

Proposed Industrial Control System
As a final result, the Figure 12 illustrates the envisioned hardware components of the developed industrial control system, which consists of the principal module alongside the mSE and the mSV expansion modules.The printed circuit boards (PCB) of modules, including the architectures and the respective hardware protections previously explained, were designed for the enclosure offered by Phoenix Contact, the ICS series for IoT (Internet of Things) applications.This casing is acclaimed for its compactness, robustness, thermal endurance, and facilitated integration of heatsinks [12].The communication between modules is completed by a shared EtherCAT bus, employed through a dedicated commu-nication rail tailored for industrial settings.This rail also shares a common power supply to all interconnected modules.The system presented in this paper goes towards the objective of creating a modular hardware system with distributed processing specifically designed for industrial environments.The developed modular hardware architecture successfully incorporates the established features for the desired system, enabling the acquisition and processing of field data within the mEXs.Notably, the proposed architecture incorporates Plug&Play functionality [22] by facilitating the addition of new modules to the network by incorporating EtherCAT communication between the mP and the mEX.
The mEXs are equipped with an SoC, housing a CPU and an FPGA, which bestows the module with the versatile capability of executing signal processing algorithms through software and programmable logic.In scenarios where a low-power, low latency, and realtime application is required, and if the algorithm is relatively simple, it can be efficiently implemented using programmable logic, the FPGA.Moreover, the mSV has already been tested in the real cement industry, and the mSE was tested at the laboratory on an electrical network composed of several industrial motors.

Local Processing
The present system successfully acquires and processes data locally near where it is acquired, incorporating local processing concepts.The mSV case study of acquiring and processing vibration signals from a cement ball mill was tested in a real industrial scenario.First, according to the data workflow described in Figure 11, the data acquired from sensors are transformed and analyzed in its frequency domain by the CTG algorithm presented in Section 4.3.1, and later, it undergoes a post-processing method, the cubic spline algorithm presented in Section 4.3.1, to reduce the amount of communication data.

CTG Implementation
It is essential to transform the incoming data to the frequency domain to implement some computational intelligence algorithms based on the data acquired from the field sensors.As mentioned before, the CTG transform algorithm was selected as the most appropriate choice.The CTG algorithm offered several advantages in being implemented in the mEX.It enables low-latency computation of the Fourier Transform, ensuring timely data processing.Moreover, it exhibits remarkable flexibility in handling different input sizes, surpassing its counterparts in the FFT algorithm family.Figure 13 presents the FFT obtained by the CTG on the proposed mSV.The signals were acquired from a vibration sensor placed in a cement ball mill, and the FFT was successfully computed locally in the mSV.

Cubic Spline Implementation
An effective post-processing technique, the Cubic Spline, was successfully employed to enhance network efficiency by reducing data rates and communication latency.This technique was specifically applied to the final result of the FFT CTG algorithm to transmit the essential information without transmitting the entire set of FFT data points.By integrating the Cubic Spline algorithm into the SoC platform, a significant increase in network availability was achieved by not transmitting the complete dataset.This advancement entailed transmitting the pertinent fitted function coefficients solely, accurately capturing the essence of the original data rather than the complete dataset.Figure 14 presents the FFT of acquired field data from a vibration sensor in a cement ball mill and its respective Cubic Spline curve fitting applied to the FFT curve computed locally in the mSV.Compared to the FFT curve, the obtained interpolation function dominates the algorithm's success since the fitted curve represents the original data with satisfactory results.This approach makes it possible to send the computed function coefficients over the network instead of sending all the FFT data, sending less data and enhancing network availability.

Conclusions
The results presented in this paper go towards the objective of creating a modular industrial hardware control system with distributed processing specifically designed for industrial environments.
Initially, the system's architecture was defined as scalable, modular to the new challenges of the industry, and easy for the user to use.The industrial control system also presents essential hardware protections from external perturbations to stable work and to prevent failures in the industrial environment.The system is constituted by a principal module with network control features and high local processing capability.Additionally, two case studies of mEXs (mSE and mSV) incorporated in the industrial control system are presented.The mEXs are essential to the literature for designing boards collecting vibration and electrical signals due to their large range of applications and relevance in the industrial field.Additionally, the mExs incorporate the SoC, allowing for distributed and local processing in the system.This processing allows the data analysis to be carried out closer to where data are generated.Notably, the EtherCAT protocol is employed in the modular architecture, which enables not only deterministic real-time communication among these modules but also incorporates Plug&Play functionality, fostering the easy addition and replacement of modules to the network.The referenced features of the presented architecture increase the efficiency and speed of data processing, making the architecture more adequate for real-time applications.
Finally, the developed modular hardware architecture successfully incorporates feature extraction algorithms for the desired system, incorporating local processing concepts.The industrial control system simplifies the incorporation of different local processing algorithms in the mEX for different case studies and industrial applications.It provides the capability for hardware acceleration for algorithms amenable to parallelization and allows for the deployment of algorithms on a robust processor when it proves more suitable for the specific use case.Two methods of local processing algorithms were used: frequency domain analysis and the curve-fitting process.Frequency domain analysis was used to process sensor data and, consequently, feed intelligent computational methodologies.The cubic curve fitting (Cubic Spline Algorithm) optimizes data transmission over the network by selectively sending only the essential characteristics of the dataset.
As a result, the system becomes highly adaptable, deterministic, reliable, and easily expandable with robust data processing and communication, allowing the versatile implementation of more complex algorithms and models for real-time applications.
As future work, better analysis and new applications domains for the modular control system can be tested.Key performance indicators such as processing speed, dependability, and adaptability need to be evaluated and compared with current control systems.Performance benchmarks can offer verifiable proof of the benefits of our system.Additionally, complex computational analyses, including advanced optimization methods or predictive maintenance models based on machine learning, will illustrate the effectiveness and suitability of the suggested techniques more successfully.The performance analysis through the modular control system, more specifically through expansion modules, requires the system to be tested in different industrial process environments, validating its reliability.The system will be tested in cement, microalgae, biomass, mines, and wastewater treatment plants, among others.More and better analysis and new application domains, as well as an evolution of the system with technical advancements, can be developed with possible technical advancements.A significant technical advancement can be the evolution of architecture to be compatible with distributed processes, which do not have a dependency on central resources to manage the system.The current system is characterized as a centralized architecture, with the expansion modules depending on the principal module.A distributed system will lead to a more reliable architecture and industry process.The approach of new techniques will be essential to achieve a distributed system, like the IEC 61499 standard [23], orchestrations of microservices and the virtualization of services.The introduction of these new technologies also leads to new challenges, such as real-time control in distributed and virtualized processes.

Figure 1 .
Figure 1.Global view of the proposed architecture for industrial environments.

Figure 6 .
Figure 6.Architecture of the proposed mSE.

Figure 7 .
Figure 7. Conditioning circuit of the current signal.

Figure 8 .
Figure 8. Conditioning circuit of the voltage signals.

Figure 9 .
Figure 9. Architecture of the proposed mSV.

Figure 11 .
Figure 11.Data workflow within the expansion modules.

Figure 12 .
Figure 12.Industrial Control System developed with expansion modules coupled.

Figure 13 .
Figure 13.Results of the FFT from a vibration sensor placed in a cement ball mill.

Figure 14 .
Figure 14.Results of an FFT and Cubic Spline curve fitting from a cement ball mill.