IIoT-Based Intelligent Process Control for Crude Oil Separation: Investigating the Impact of Model-Based Control and Genetic Algorithms

Integrating the Internet of Things (IIoT) with intelligent process control can improve the performance and e ﬃ ciency of various industrial processes. However, there is a need for continued research on integrating IIoT-based control with advanced techniques such as model-based control and genetic algorithms to fully realize these bene ﬁ ts. This study investigates the impact of such integration on the performance of crude oil separation processes. To this end, we implemented IIoT-based intelligent process control with model-based control and genetic algorithms using speci ﬁ c IIoT devices and platforms, such as SCADAPACK 535E and FactoryTalk. The results of our implementation show that this technique can signi ﬁ cantly improve the quality of crude oil separation, with an increase from 95% to 99% over two months of production. Overall, our ﬁ ndings suggest that integrating IIoT-based intelligent process control with advanced techniques such as model-based control and genetic algorithms can signi ﬁ cantly improve the performance of crude oil separation processes and may have similar bene ﬁ ts in other industrial processes. Further research is needed to fully understand these techniques ’ potential in di ﬀ erent contexts and identify best practices for their implementation.


Introduction
Integrating the Internet of Things (IIoT) with intelligent process control has been a topic of increasing interest in recent years, as the use of IIoT technologies has grown in various industrial and other applications.The Industrial Internet of Things (IIoT) is a crucial aspect of Industry 4.0 and Industry 5.0, which are the latest industrial revolutions driven by technology and value, respectively.The IIoT is aimed at improving manufacturing processes by connecting various devices and systems through the Internet, enabling them to communicate and share data.This has led to the creation of smart factories, where machines and systems are able to work together seamlessly and make decisions based on real-time data.However, there are still several gaps in the existing knowledge on the use of IIoT in intelligent process control that need to be addressed through further research, such as the lack of research on the integration of IIoT-based intelligent process control with other advanced control techniques, such as model-based control and genetic algorithms.There are also challenges to be addressed in implementing IIoT in Industry 5.0, such as data privacy and security, standardization of communication protocols, and integration with legacy systems.The specific research question for this study is this: How does integrating IIoT-based intelligent process control with advanced techniques such as model-based control and genetic algorithms impact the performance of crude oil separation processes?This research is aimed at investigating the potential benefits of integrating IIoT-based intelligent process control with model-based control and genetic algorithms using specific IIoT devices and platforms, such as SCADAPACK 535E and FactoryTalk, in the context of crude oil separation processes.The potential benefits of using these advanced control techniques include the ability to tune PID controllers using genetic algorithms, which can reduce the time required to collect the data needed to train a machine learning model.This approach allows for the development of an AI-based prediction model that is based on a larger and more diverse dataset than would be possible to collect manually, which can improve the accuracy and efficiency of process control.The genetic algorithm is used to optimize the parameters of a PID (proportional-integral-derivative) controller in order to improve the control of a process.The prediction model can then use this dataset to make more accurate predictions and improve control of the process over time.IIoT also plays a key role in Industry 5.0, which emphasizes the importance of human creativity and collaboration with machines.The goal of Industry 5.0 is to create highly customized products and increase efficiency in production with the help of advanced technologies such as edge computing, digital twins, collaborative robots, blockchain, and 6G networks.The integration of AI and machine learning technologies in IIoT is also a promising area for future research.
Finally, the IIoT plays a crucial role in the current state of the art for Industry 4.0 and Industry 5.0 and will continue to shape the future of manufacturing and production processes.The integration of IIoT-based intelligent process control with other advanced control techniques, such as modelbased control and genetic algorithms, is a promising area for research, with the potential to improve the performance and efficiency of process control systems in the context of crude oil separation processes.

Literature Survey
This literature review on Industry 5.0 and the Industrial Internet of Things (IIoT) highlights the key features and technologies of Industry 5.0, such as edge computing, digital twins, collaborative robots, the Internet of Things, blockchain, and 6G and beyond networks.The authors of these studies emphasize the potential applications of Industry 5.0 in the manufacturing industry and how it can transition from traditional to digital systems, while solving the challenges faced by the industry.The literature provides an overview of the future of manufacturing and the required skills, as well as the integration of traditional automation systems with newer technologies in the IIoT.Other notable studies in the field of IIoT include the examination of the future of control and operations, the development of resource service models, the evaluation of IIoT protocols, and the application of IIoT monitoring solutions for advanced predictive maintenance.The literature also highlights the importance of lightweight authentication protocols, monitoring of gas and oil fields using the IIoT, wireless technology trade-offs for the IIoT, machine learning control for nonlinear dynamics and turbulence, progress and challenges in closed-loop turbulence control, and adaptive fuzzy neural network control methods for wastewater treatment processes.The authors of these papers aim to provide insight into the potential applications and supporting technologies of Industry 5.0.Industry 5.0 is seen as the future of manufacturing and is characterized by being value-driven, as opposed to technology-driven like Industry 4.0.The papers outline key features and technologies of Industry 5.0 such as edge computing, digital twins, collaborative robots, the Internet of Things, blockchain, and 6G and beyond networks [1,2].The authors of these papers highlight the potential applications of Industry 5.0 in the manufacturing industry, and how it can help to transition from traditional to digital systems.They also discuss the challenges faced by manufacturing industries and how Industry 5.0 technologies can help to solve these problems.The papers provide an overview of the future of manufacturing and the skills that will be required in this new era, emphasizing the importance of humans and robots working together in the manufacturing process 2 Journal of Sensors [3,4].The papers also provide a comprehensive overview of Industry 4.0 and Industry 5.0 and will be useful for those interested in the development and implementation of Industry 4.0 technologies.The authors of these papers encourage further discussion and debate around these topics [5].One of the papers presents a trust model for assessing the trustworthiness of Industrial Internet of Things (IIoT) devices based on the neutrosophic weighted product method (WPM).The model uses spatial knowledge, temporal experience, and behavioral pattern information from the IIoT devices to calculate their trust scores.The proposed model provides a promising solution for the security and reliability concerns in IIoT [6].Another paper presents a novel approach called ASTREAM for anomaly detection in data streams in an IIoT environment.The approach combines sliding window, model update, and change detection strategies with LSHiForest to achieve accurate and efficient anomaly detection with better scalability.The approach is evaluated on the KDDCUP99 dataset, and the results show that it outperforms baselines in terms of accuracy and efficiency [7].A third paper introduces the concept of advanced machine-metameric dimension (AmD) to analyze the efficacy, efficiency, and effectiveness of updated Heterogeneous Industrial Internet of Things (HetIoT) machines.The authors propose a HetIoT framework for real-time monitoring of the machines' metameric dimension, resulting in higher precision, recall, F1-score, and purity.The proposed framework has the potential to play a crucial role in industrial management [8].
One of the key challenges in the IIoT is the integration of traditional automation systems with newer technologies such as wireless sensor networks and artificial intelligence.Kutasi [9] discusses the use of IIoT capabilities in the hollow cathode plasma nitriding process, highlighting the potential for improved process control and efficiency.Sasajima et al. [10] examine the latest trends in standardization in industrial automation, particularly with regard to the IIoT.
Security is another important consideration in the IIoT, as the integration of new technologies brings with it the risk of cyberattacks.Eden et al. [11] discuss the forensic analysis of SCADA systems within the IIoT, while Huang [12] investigates the use of artificial intelligence algorithms for  4 Journal of Sensors enhanced security in industrial process control.Gutierrez-Guerrero and Holgado-Terriza [13] propose an automatic configuration method for OPC UA in IIoT environments to improve security and interoperability.
Other notable studies in the field of IIoT include the examination of the future of control and operations in this new era [14], the development of a resource service model for IIoT systems [15], the evaluation of a novel IIoT protocol on a 5G industrial network [16], and the application of IIoT monitoring solutions for advanced predictive maintenance [17].Overall, the literature on IIoT is diverse and multifaceted, covering a wide range of topics including automation, security, interoperability, and predictive maintenance.As the field continues to grow and evolve, it is likely that we will see even more innovative research in the coming years.Lara et al. [18] present a lightweight authentication protocol for machine-to-machine communications of resourceconstrained devices in the industrial internet of things.Aalsalem et al. [19] present a method for monitoring gas and oil fields using reliable wireless sensing and the internet of things.Seferagić et al. [20] presents a survey on wireless technology trade-offs for the industrial internet of things.Duriez et al. [21] discuss machine learning control for taming nonlinear dynamics and turbulence.Brunton and Noack [22] discuss progress and challenges in closed-loop turbulence control.Qiao et al. [23] present an adaptive fuzzy neural network control method for wastewater treatment processes with multiobjective operation.Zeghlache and Amardjia [24] present a real-time implementation of a nonlinear observer-based fuzzy sliding mode controller for a twin rotor multi-input multioutput system.Bodyanskiy et al. [25] present an adaptive multivariate hybrid neurofuzzy system with on-board fast learning.Deepa and Baranilingesan [26] present an optimized deep learning neural network predictive controller for continuous stirred tank reactors.Sabahi et al. [27] present an indirect predictive type-2 fuzzy neural network controller for nonlinear inputdelay systems.Patel and Kumar [28] present an artificial neuro-fuzzy logic PID controller based on a BF-PSO algorithm.Tavakoli et al. [29] present a self-constructing fuzzy neural network controller for damping power system oscillations.Kayacan et al. [30] present a self-learning disturbance observer for nonlinear systems in a feedback-error learning scheme.de Jesús Rubio [31] presents the uniform stable neuro-fuzzy inference system.Talkhoncheh et al. [32] present an observer-based adaptive neural network controller for uncertain nonlinear systems with unknown control directions, subject to input time delay and saturation.Karkevandi-Talkhooncheh et al. [33] present an adaptive neuro-fuzzy controller for a class of nonlinear systems with unknown time-varying uncertainties and external disturbances.

Design and Configuration
3.1.Proposed System.The proposed control system for the crude oil separation facility in this study consisted of several key components, including the following: (i) SCADAPACK 535E devices: these were used as IIoT sensors and installed at key points in the crude oil separation process to collect data on process variables such as temperature, pressure, and flow rate (ii) FactoryTalk: this was used as the IIoT platform to monitor the process in real-time and to tune the PID controllers using machine learning based on past datasets that included the values of PID parameters set by experts manually (iii) Mathematical model of the crude oil separation process: this was developed as part of the model-based control approach and was used to optimize the PID controller settings using genetic algorithms (iv) Genetic algorithms: these were used to find the optimal values of the PID controller parameters that minimized a cost function defined based on performance criteria such as process stability and efficiency (v) Statistical analysis software: this was used to analyze the data collected on process variables and the quality of the crude oil separation, as well as on the efficiency of the data collection process (vi) Artificial intelligence (AI) model: this was built using machine learning tools in a program called ML.NET, which is run in a visual studio dot net environment.The model employed a deep learning neural network technique to make predictions about the optimal parameters for the loop controller The overall architecture of the proposed control system involved collecting data on the crude oil separation process using the SCADAPACK 535E devices, transmitting the data to the FactoryTalk platform, and then using the data to tune the PID controllers and build the AI model.The genetic algorithms were used to optimize the PID controller parameters, and the statistical analysis software was used to assessment the impact of the advanced control techniques on the performance of the crude oil separation.The AI model was built using the deep learning neural network technique to make predictions about the optimal parameters for the loop controller, and the system was designed to overcome the challenge of having insufficient data to train the model by using the IIoT to collect and prepare data for model training.

Journal of Sensors
The proposed control system in this study is an IIoT-based intelligent process control that integrates model-based control and genetic algorithms, which was implemented at a crude oil separation facility.The system has several advantages that provide real-time monitoring and improved control performance, leading to accurate predictions of loop controller parameters.The SCADAPACK 535E devices are used to collect process data which is transmitted to the FactoryTalk platform, allowing for real-time monitoring of the process.By using modelbased control and genetic algorithms, the system optimizes the PID controller settings, leading to improved process stability and efficiency.Additionally, the AI model built using the deep learning neural network technique and the IIoT data collection enables accurate predictions of loop controller parameters.However, the implementation of this control system also comes with several disadvantages, including complexity and cost.Developing a mathematical model of the crude oil separation process and training an AI model can be a complex and time-consuming task.The success of the system also relies on the quality of the data collected by the SCADAPACK 535E devices, so proper data quality assessment is necessary.Implementing and maintaining this control system require significant investment in technology and resources.7 Journal of Sensors 3.2.Implementation.Figure 1 depicts the general architecture for implementing the proposed system.The research design for this study was a case study, in which we implemented IIoT-based intelligent process control with modelbased control and genetic algorithms at a crude oil separation facility.We selected this research design because it allowed us to investigate the impact of these advanced control techniques on real-world processes in a controlled environment.
To implement the IIoT-based intelligent process control, we used SCADAPACK 535E devices as IIoT sensors and Fac-toryTalk as the IIoT platform.The SCADAPACK 535E devices were installed at key points in the crude oil separation process and were used to collect data on process variables such as temperature, pressure, and flow rate.The data collected by the SCADAPACK 535E devices was transmitted to the Factor-yTalk platform, which was used to monitor the process in realtime and to tune the PID controllers using machine learning based on past datasets that included the values of PID parameters set by experts manually.
In addition to the IIoT-based intelligent process control, we also implemented model-based control and genetic algorithms at the crude oil separation facility.The model-based control approach involved developing a mathematical model of the crude oil separation process, which was used to optimize the PID controller settings using genetic algorithms.The genetic algorithms were used to find the optimal values of the PID controller parameters that minimized a cost function, which was defined based on performance criteria such as process stability and efficiency.
To assess the impact of the IIoT-based intelligent process control with model-based control and genetic algorithms on the performance of the crude oil separation process, we collected data on process variables such as temperature, pressure, density, and flow rate over a two-month period of production.We also collected data on the quality of the crude oil separation, as well as on the efficiency of the data collection process.The data were analyzed using statistical analysis software to assess the impact of the advanced control techniques on the performance of the crude oil separation.
Flowcharts in Figures 2 and 3 declare that building an artificial intelligence (AI) model to predict the optimal parameters for a loop controller is a challenging task, as there is no data to train the model on.To address this challenge, the flowchart proposes the use of the industrial internet of things (IIoT) to record and prepare data for model training.This data is then subjected to a quality assessment to ensure that it is suitable for training the model and will result in the most accurate predictions.The AI model is then built using machine learning tools in a program called ML.NET, which is run in a visual studio dot net environment.The model employs a deep learning neural network technique, which is a type of machine learning that involves training a model on large amounts of data in order to recognize patterns and make decisions.This technique is well suited for building highly accurate models and is likely to be effective in predicting the optimal parameters for a loop controller.Overall, the purpose of this process, as declared by the flowcharts, is to build an AI model that can accurately predict the optimal parameters for a loop controller in an industrial setting, using the IIoT to collect and prepare data for model training and the deep learning neural network technique to build the model.By following this process, it is possible to overcome the challenge of having insufficient data to train the model and build a highly accurate AI model for predicting loop controller parameters.

Process Model.
The pneumatic control valve regulates and controls various types of processes such as level control in the oil separator, as shown in Figure 4.
The nature of the valve is spring-mass dynamics, and the equation described the time series model of it is: 3.4.Digital PID Controller.The PID in continues form is express by equation as Then convert the continues form to discrete form using sampling interval ΔT as follows: (i) The error e will be e n (ii) The integral part is nothing but summation of errors (iii) The derivative is deference between past and current error Putting all three parts together, the digital algorithm equation is.
where K c , T I , and    10 Journal of Sensors respectively.For the independent form of PID or parallel form, K P , K I , and K D gains proportional, integral, and derivative, respectively, will be And the parallel form of PID will express in equation as Since it is required to control the position of the valve, the calculation algorithm programming form upgraded from Equations ( 5) and (7) to P n at nth sampling instant as where P m is a median valve position, S is setpoint, and V is variable.Because of the noisy data sampling, the derivative part in Equation ( 8) has to be chosen carefully using the technique called four-point difference while the constant setpoint is where e = ðS − VÞ.
3.5.Simulation of IIoT Device and Process.The Internet of Things (IIoT) platform needs to be connected to the crude oil separation process through an IIoT device with a PID controller in order to ensure connectivity between the platform and the process.It is important to test the IIoT platform before implementing it in the actual process in order to ensure its functionality.One solution for this is to use a virtual or simulated process, which can be achieved using the Proteus software.
The Proteus software includes a range of tools and libraries that can be used to simulate the crude oil separation process and IIoT devices, such as Laplace primitives, Microchip PIC microcontrollers, Arduino microcontrollers, Ethernet controllers, and an oscilloscope.The Laplace primitives require the damping value ζ and natural frequency ω n in order to simulate the process.
The IIoT device is responsible for sensing and actuating the crude oil separation process by collecting data from sensors and transmitting it to the IIoT platform.The platform then uses this data and the algorithms of intelligent controllers to execute control commands based on the optimal values received in order to achieve the desired control actions.
Figure 5 shows the second-order tools in the Proteus software that are used to simulate the real crude oil separation process based on the damping ratio and natural frequency.
Figure 6 shows the implementation of an IIoT device that serves the crude oil separation process model, which is driven by an industrial IoT device built on an Arduino Mega 2560.The IIoT device includes a digital-to-analog converter (DAC104S085) and a virtual Ethernet network, using an ENC28J60 Ethernet controller and the Modbus TCP protocol.The entire system is simulated in the Proteus software, with various features such as the ability to start or stop the PID controller, control four loops (only one at a time), select the type of tuning (remote using a genetic algorithm or local using potentiometers), set setpoints using potentiometers for each loop, monitor the network using the Proteus virtual terminal tool (UART), and monitor the process with and without a PID controller using the Proteus oscilloscope tool.
The experiment in this paper is divided into five parts: (1) Plant selection to control the second-order system with a different damping ratio ζ and natural frequency ω n (2) Apply the digital PID written on Arduino and tune it manually using potentiometers process.This research uses a genetic algorithm to find effective PID gains as shown in Figure 14 that minimize a cost function.The cost function used in this example is the linear quadratic regulator (LQR) cost function, with Q = 1 and R = 0:001 for a step response of w r = 1.The transfer function of the system being controlled is given by Equation (10).The process variable (level) is measured by a displacer level transmitter, and the target of the PID controller is to maintain the level at the setpoint by manipulating the flow of oil at the outlet.Meanwhile, the density of the oil at the outlet indicates the quality of the separation process.The oil flow and density are measured by an Emerson Micromotion Coriolis flow meter, which transmits this data to the SCADAPACK 535 through Modbus RTU over RS485.
Once installed, the new IIoT device effectively controls the pneumatic valve actuator and regulates the oil flow, as shown in Figure 23.This figure illustrates the behavior of oil flow rate and density for two months before using the new IIoT platform.The density of the oil at the outlet is a key indicator of the separation quality, so a normal distribution statistical approach is used to monitor it.The results     show that the mean density is μ = 0:84 g/cm 3 and the standard deviation is σ = 0:02, indicating that 95% of the oil outlet density falls within the range of 0.80 to 0.88.
The oil phase in the crude oil separator is located between the water and gas phases, which means it can be affected by the water phase.Figure 24 shows the water flow rate and density chart for the same two-month period as Figure 23.The statistical results of the water density are μ = 1:06 g/cm 3 and σ = 0:01, indicating that 95% of the water outlet density falls within the range of 1.04 to 1.08.This range indicates that the water level controller is performing well.
Once the IIoT device is installed and connected to the IIoT platform, the process model is generated from the time series step response, and the PID controller is tuned with the help of MATLAB.Figure 25 shows the chart of oil flow rate and density for two months after using the new IIoT platform.The statistical results show that the mean density is μ = 0:84 g/cm 3 and the standard deviation is σ = 0:01, indicating that 95% of the oil outlet density falls within the range of 0.82 to 0.86.This improvement in the separation process demonstrates the effectiveness of the IIoT platform in tuning the PID controller.
The improvement in the oil outlet shown in Figure 25 should not affect the water phase.Figure 26 shows the water outlet flow rate and density for the same two-month period as Figure 25.The statistical results show that the mean density is μ = 1:06 g/cm 3 and the standard deviation is σ = 0:01, indicating that 95% of the water outlet density falls within the range of 1.04 to 1.08.This demonstrates that there is no impact on the water outlet due to the new IIoT platform.
The new IIoT platform successfully reduced the standard deviation of the oil outlet density from 0.02 to 0.01.This means that the 95% range of oil density improved from 0.80 to 0.88 g/cm 3 to 0.82 to 0.86 g/cm 3 , resulting in a higher quality oil with better API and lower water content.The 99% range of oil density also improved from 0.78 to 0.9 g/cm 3 to 0.81 to 0.87 g/cm 3 , indicating a significant improvement in the separation process.However, in both cases, the minimum value of the oil outlet density is 0.83 g/cm 3 ,     18 Journal of Sensors indicating that there is no gas present in the oil.The 99% range of oil outlet density is therefore 0.83 to 0.87 g/cm 3 .These results demonstrate the effectiveness of the IIoT platform in improving the crude oil separation process.

Conclusion
In conclusion, this research has demonstrated the effectiveness of implementing an IIoT platform and advanced control techniques in optimizing the performance of a crude oil separation process.Using the genetic algorithm to tune the PID controller and the machine learning model to predict optimal control parameters improved the separation quality from 95% to 99%.The integration of IIoT technology and advanced control techniques resulted in a reduction of the oil outlet density standard deviation and an overall improvement in the efficiency of the separation process.These findings highlight the potential of IIoT and advanced control techniques to maximize process efficiency and improve the quality of oil production.As we move towards Industry 5.0, it is crucial that we adopt innovative technologies and approaches to improve the performance of industrial processes.Integrating IIoT and advanced control techniques in the crude oil separation process is a step towards realizing Industry 5.0.The development of 6G networks will provide even greater opportunities for real-time monitoring, control, and optimization of industrial processes.This will further improve efficiency, quality, and sustainability in the oil production industry.Finally, this research provides valuable insights into the benefits of combining IIoT and advanced control techniques in optimizing industrial processes.The findings have the potential to drive innovation and drive the adoption of Industry 5.0 and 6G technologies in the oil production industry.

Figure 5 :
Figure 5: Second-order process simulation tools in the Proteus software.

Figure 8 :
Figure8: Four-inch short tube valve step's response with manual tuning PID, 100 ms sampling time, and setpoint changed less than 50%.

Figure 10 :
Figure 10: Four-inch short tube valve step's response without controller and setpoint dropped down.

Figure 12 :
Figure12: Four-inch short tube valve step's response with manual tuning PID, 10 ms sampling time, and setpoint changed more than 50%.
response time series reads from CSV file

Figure 13 :
Figure 13: Process's response reads by IIoT platform from CSV file.

2 dτ: ð11Þ Figure 15
Figure 15 displays the complete process of utilizing GA to optimize the controller.Once the MATLAB libraries have completed the transfer function estimation, the transfer function is passed back to MATLAB in order to apply the .

4. 4 .
Experimental Results and Discussion.In this research, the SCADAPACK 535 remote controller serves as the IIoT device for the crude oil separation process shown in results generation #1.

)Figure 24 :
Figure 24: Water flow rate and density chart with manual tuning.

Figure 23 :Figure 26 :
Figure 23: Oil flow and density chart with manual tuning.

Figure 25 :
Figure 25: Oil flow rate and density chart with the new IIoT platform.