PLC-SCADA Automation of Inlet Wastewater Treatment Processes: Design, Implementation, and Evaluation

ABSTRACT


INTRODUCTION
Within the inflow region of the treatment plant, three fundamental operations occur: The untreated wastewater must be conveyed to pump stations without any interruption.Consequently, it is necessary to continuously monitor the rotational velocity of the delivery pumps to enable the system to transition to a backup pump in case of a malfunction.Simultaneously, the rate at which the wastewater flows and the level at which it is present are measured to avoid overwhelming the succeeding stages of the plant.The conveyor systems activate and deactivate as needed, ensuring the most efficient utilization of energy [1,2].The preservation of the environment is one of the main advantages of wastewater treatment.Untreated wastewater may contain chemicals, nutrients, pathogens, and other dangerous materials.Untreated wastewater discharge into bodies of water can cause pollution, endangering ecosystems and aquatic life.The water quality is monitored to safeguard the ambient conditions for the bio-organisms in the succeeding biological stage of the treatment plant.In addition to temperature and salt content, the pH value is an important measure that might indicate either alkaline conditions or excessive acidity [3].This implies that suitable actions can be implemented to safeguard the biological phase of the treatment facility.Aside from the specific process areas of a wastewater treatment facility that necessitate a variety of intrinsically safe solutions, it is also crucial to monitor the water filtration equipment and the entire wastewater treatment plant to safeguard against corrosive, dusty, dirty, and explosive environments.Additionally, measures such as lightning protection and purge suppression should be implemented.Offers a diverse array of protective measures to ensure the safety and efficient operation of the wastewater treatment facility [4].
Intelligent wastewater systems may meet the freshwater needs of the Internet of Things (IoT) smart community by utilizing IoT sensors to identify and prevent the occurrence of combined sewage and chemical overflows in wastewater.Freshwater is a rare and highly valued natural resource that is not readily accessible on a daily basis [5,6].The IoT employs the notion of deploying sensing devices at various locations within the water environment to facilitate aquatic care.These sensors acquire and relay data to surveillance systems.The data may encompass water quality, fluctuations in temperature, variations in pressure, detection of water leakage, and identification of chemical leakage [7].These sensors acquire and relay data to surveillance systems.An intelligent water sensor, utilizing the IoT, can monitor and assess the quality, pressure, and temperature of water.Indeed, a sensor solution can regulate the movement of fluids within the treatment facility and might be employed by a water utility provider [8,9].A wastewater treatment facility removes solid particles before discharging the liquid waste into the surrounding ecology.The wastewater treatment facility incorporates a PLC with human-machine interface (HMI) capabilities to construct a water level monitoring system [10].The injection of an adequate quantity of chemicals is a key aspect of boosting the overall efficacy of a typical wastewater treatment facility.Modify the water level to match the desired quantity.In addition, the conventional plant provides reliability through the incorporation of high-speed protective mechanisms, which efficiently mitigate any system malfunctions [11].Challenges in wastewater treatment: Enhancing the treatment processes based on data analyzing the parameters of flowing water, incoming wastewater, and the liquid waste in treated form, the establishment of the communications network, and the system scenario programming process.

CONTRIBUTION OF THE PAPER
The contribution of the paper is as follows: The research proposes improving the biochemical treatment system for incoming wastewater units by designing algorithms with a scenario different from previous studies in terms of the type of system used, the program used, and the algorithm, as follows: PLCS7-300 performs control (monitoring and treatment) first.To achieve performance and low processing costs.Secondly, this research proposes creating new units to collect data from remote terminal units (RTU) to create a larger smart control node that helps in collecting various data, and thirdly, a PC Station to obtain data from RTUs and PLCs through the use of communications.Networking and Communications Protocol (TCP/IP), thus achieving other important processors in the main data center to provide high accuracy in real-time and send data back to the subunits.
This system can also achieve real-time operation in milliseconds because the program used for the design is one of the best programs used by Siemens for data acquisition and processing speed.

LITERATURE SURVEY
Włodarczak et al. [12] describe the design of a flow meter utilizing a PLC.The implementation of a flow meter regulated by a PLC enhances the potential for managing and automating the movement of fluids.Furthermore, the educational capacity of employing basic automation through a PLC was taken into account.A fluid flow rate measurement device was designed, manufactured, and tested using a PLC controller.
According to Wang and Zhang [13], the objective is to enhance the intelligence of sewage detection during the sewage treatment process, thereby increasing the precision and immediacy of monitoring data.This study focuses on analyzing the PLC platform developed by the Allen-Bradley Company.The primary objective is to utilize a basic monitoring apparatus to measure the PH value and COD value in treated sewage.By optimizing the architecture of the distributed control system (DCS) structure and communication network level in the sewage treatment system, using a PLC as the platform, more effective monitoring of sewage has been obtained.
Zhang et al. [14] introduced an application case based on IoT sensor control and supporting maintenance businesses.They introduced a method of bringing the IoT into the membrane bioreactor (MBR) system of industrial wastewater treatment, which can continuously and accurately monitor the nodes of the system.Salem et al. [15] developed an industrial IoT cloud-based model for real-time wastewater monitoring and controlling, which monitors the power of hydrogen and temperature parameters from the wastewater inlet that will be treated in the wastewater treatment plant, thereby avoiding impermissible industrial wastewater that the plant cannot handle.Morales and Lawagon [16] suggested an IoT system for monitoring the pH of wastewater in real-time using web browsers.This system allows for the regulation of waste disposal through web browsers.The authors demonstrated that the pH level fluctuated with temperature, but the variations were rather minimal.
The proposed design in this study, in comparison to previous studies, utilizes advanced programs from Siemens, which necessitate significant expertise and meticulous handling to construct an accurate scenario for the processing units.Previous studies predominantly employed systems that connect a single PLC.This study, however, demonstrates a network of PLCs integrated with a central control unit, capable of achieving real-time operation in milliseconds.This is in contrast to the PLC systems used in other studies, whose specifications will be clarified in the designed work.

PROGRAMMABLE LOGIC CONTROLLER (PLC)
A PLC is an industrial computing device employed to regulate a particular process, machinery system, or, occasionally, an entire assembly line.A PLC is a type of computer used in industrial settings that does not require a mouse, keyboard, or monitor.Given that it is an industrial computer, logical software is developed to manage the process on the main computer [17].The program is subsequently sent to the PLC using cables.The program is stored in the memory of the PLC.The logical program is created using a programming language known as ladder logic, data list, or function block diagram.The program is designed to be simply understandable for anyone with expertise in electrical or hardware domains.A PLC comprises diverse inputs and outputs.A PLC monitors the condition of switches and sensors by utilizing input terminals.Based on this status, it issues commands to output devices via output terminals.
Figure 1.PLC hardware configuration [18] Figure 1 shows the internal and external circuits for PLC S7 300.The SIMATIC S7-300 universal controllers offer a compact installation and are designed with a modular structure [18,19].The system can be expanded either centrally or in a decentralized manner using a diverse selection of modules, depending on the specific purpose.This allows for efficient storage of spare components while minimizing costs.SIMATIC is renowned for its consistent performance and exceptional quality.Effortlessly scalable as the range of features increases.Enhanced by a multitude of integrated functionalities [17].

SUPERVISORY CONTROL AND DATA ACQUISITION (SCADA)
Computers, networked data flows, and graphical user interfaces (GUIs) make up a control system architecture, which enables high-level machine and process supervision.Additionally, it consists of sensors and additional hardwarelike PLCs-that connect to machinery or process plants [20].The operator interfaces that facilitate the monitoring and execution of process directives, such as adjustments to controller set points, are managed by the SCADA computer system.
Ancillary processes, including controller computations or real-time control logic, are handled by modules that are coupled to field sensors and actuators.The SCADA concept shown in Figure 2 was devised as a versatile method for remote access to various local control modules, regardless of their manufacturer, and enabled access using standard automation protocols [21,22].Large SCADA systems have evolved to closely resemble DCS in terms of functionality, employing various methods to interact with the plant.They possess the ability to manipulate extensive operations that encompass numerous locations, functioning effectively across both significant and limited distances.Despite worries regarding the vulnerability of SCADA systems to cyberwarfare and cyberterrorism attacks, they are widely utilized in industrial control systems [23].

DESIGN AND IMPLEMENTATION OF THE PROPOSED SYSTEM
When constructing the wastewater treatment lifting unit, it is crucial to take into account many functions, including precise monitoring of the water level and biochemical sensor signals relaying this signal through the sensors to the treatment unit (PLC).The system is equipped with processing algorithms that enable precise and vital decision-making for running the equipment in the given scenario.In addition, a multitude of biological signals are evaluated and relayed to the same processor.Moreover, these algorithms are organized sequentially by using a ladder algorithm within the CPU for PLC S7 314 PN/DP, as illustrated by the programming parameters in Figure 3.The signals acquired from the sensors are analog signals (4-20 mA or more) that fluctuate by the measured ratios.Moreover, the system's behaviors (run, trip, faults) can be perceived by analyzing digital signals.This project implementation (in real-time) transforms a biological system into an electrical system to perform necessary chemical treatments for the effective functioning of the inlet-station wastewater-process unit.After completing the programming of the system, as shown in Figure 4, the system will send the specified signals over a communication system and communication protocol (TCP/IP) to the central processing and monitoring unit.This enables the operators to acquaint themselves with the system and its functioning, as well as observe the presented data and surveillance on user interfaces.Furthermore, the system database architecture displayed in Figure 5, offers numerous benefits for creating and implementing the system.
Central subunits, RTUs, are designed to create a larger smart control node that helps in collecting various data, through which information is exchanged with the main (PC Station) through communications networks designed and communication protocol (TCP/IP) shown in Figure 6, thus conveniently achieving other processors.Main data center to provide high accuracy in real-time and send data back to subunits.
Specifications PLC Siemens, as explained in Figure 3: • Modular Design: The S7-300 circuit is grouped in a modular form, which makes it easy for customers who wish to upgrade it.To configure a controller differently to meet my requirements, you can choose any type of CPU and add I/O modules for digital (ON/OFF) or analog (0-10V or 4-20mA or more) signals.
• Memory Capacity: The size of the memory is also dependent on the chosen CPU but provides adequate space for storing logical programs as well as data processing in wastewater treatment as explained in Appendix (Figure A1).• Communication Protocols: The S7-300 supports several communication protocols, including the PROFIBUS protocol, which enables the use of the S7-300 to connect with other devices such as sensors, HMIs, and other PLCs for easy control of a central system.• Rugged Construction: These PLCs are made for durability and industrial applications and are also suitable for temperature and relative humidity factors that exist in wastewater treatment plants.
Capabilities relevant to wastewater treatment: • Logic Control: With the S7-300, logic programs of different levels of complexity can be performed for various tasks in WWTP.Currently, it can manage pump functions according to water levels, manage the amount of chemicals to be released, and set off alarms when reading levels are not normal as in Appendix (Figure A2) showing the symbols for the basic ladder algorithm.• Data Acquisition and Processing: It can record information produced by sensors that control some parameters of the treatment, such as the flow, pH, and DO.It may then analyze this data and make control decisions within preprogrammed values that have been inputted into its hardware.

•
Scalability: About the design of the wastewater treatment plant: It must be modular.You have the option to add more I/O modules or upgrade the RISC CPU if you need more software processing capabilities.

RESULT AND DISCUSSION
The results of the design and implementation of a PLC to automate the process of introducing wastewater into the treatment plant are based on a fully integrated automation gateway program, including the ladder for programming the system, which achieved several tasks, including controlling the inlet based on various parameters, where data is acquired.In real-time sensors that monitor water levels, flow rates, and other essential factors based on these inputs, as we can see from Figure 7 (a) and 7 (b), the online system process, the operating status of the ladder for the system, through which the status of the input to the processing unit can be seen (open, closed, failure), and also through the GUI of the SCADA system shown in Figure 8, the GUI provides a visual representation of the state of the system in terms of motor operation and signals from biochemical sensors.Thus, operators can monitor critical parameters such as water levels, flow rates, valve positions in real time, and other chemical signals.In addition, the GUI enabled an alarm function to alert operators about critical events such as overflow or pump failure.Table 1 represents the transition from the biochemical signal to the proposed system's electrical signal.
Measurement: The sensor signal (typically a 4-20 mA current output signal) may not go in direct relation to measurement units (for instance, a degree Celsius temperature).It measures the current-to-voltage level on the analog input module, which is present inside the PLC.This voltage is then scaled to represent the actual measuring range of the sensor; the relationship between these values must be directly proportional.For example, 4 mA may mean that the temperature is 0 degrees Celsius, while 20 mA would mean that the temperature is 100 degrees Celsius.
Filtering: sensor signals are vulnerable to electrical interference, thus being different.
Analog-to-digital conversion (ADC): It has a modal voltage input from the actual process placed on the analog input module, the ADC of the PLC converts it into digital form.This conversion entails partitioning the voltage range into a given number of bits, e.g., 12-bits or 16-bits.Every numerical value is a numbered voltage value, starting from the lowest voltage level in the mentioned range.
Data processing and use: After this code, the PLC program can obtain the digital representation of the sensor reading.With this data, it can perform the necessary calculations, comparisons, and also basic logical operations.Depending on the values received from the sensor and the logic employed, the PLC can manage other associated parameters like ON/OFF collars of pumps or valves and alarms ON.
Integration of the PLC with the SCADA system: Compatibility: When the communication protocols of the SCADA don't match those of a PLC, data sharing is compromised.Solution: utilize a suitable or common communication protocol.
Data synchronization: There can be timing disparities resulting in non-concurrent information among systems.Solution: Set data update rates and do error checking for reliable communications.
Security: A single-point failure could leave both systems exposed to cyber threats.Solution: To minimize security risks, install firewalls, access controls, and secure communications protocols.
The improvement of process automation compared to manual operation is evident through the following points: Process efficiency: • Reduced cycle time: Automated operations save between 20% and 90% of the cycle times compared to manual operations, thus increasing production within a particular duration.• Improved material handling: This results in about a 10%-60% decrease in the wastage of materials due to an automation system that handles materials better and faster.• Reduce human errors: Automating repetitive tasks such as workstations can eliminate human errors from the process, saving companies over fifty percent of their workplace accidents.
RTUs play an important role in achieving an intelligent approach to data collection through their use, how they are implemented and programmed according to the designed scenario, and their results are summarized in several points: • Decentralized decision-making: RTUs can develop simple controls, unlike traditional centralized systems.They receive data from sensors, interpret it in terms of pre-programmed rules, and react accordingly.This includes actions such as opening or closing valves without the need for frequent communication with central command.It facilitates fast response times and efficient control, especially for remote site systems.• Adaptability: RTUs are programmed using different control algorithms to adapt to changing situations or processing conditions.This flexibility allows adjustments to be made to these tactics so that they can be executed optimally.• Bi-directional Communication: RTUs allow bidirectional transmission between field sensors/operators and the home control room.The above scenario allows real-time monitoring of system feedback and parameters from the field.
• Data collection: Wide range of sensor integration: Different types of sensors can be used to connect to the RTU, and measure different variables such as temperature, pressure flow, etc... • Scalability: RTUs are capable of being implemented in expansive regional networks, where they are accountable for the collection of data from a plethora of sensors spread across a vast territory.This helps in overseeing immense data and drawing better conclusions on a central point.• Standardized Protocols: Most modern RTUs allow the use of certain standard protocols, like Modbus or IEC 61850.This way, the program can be integrated easily with various kinds of controls and SCADA software.Via this feature, the data can be collected and managed without much difficulty.The GUI of the SCADA system, shown in Figure 9, provides other biochemical indicators in real-time.Furthermore, the GUI has simplified the calculation of the water flow rate, making it easier for operators to be immediately informed of important events, such as overflow or other important factors.

CONCLUSIONS
The use of PLC with SCADA to automate inlet wastewater treatment has many advantages over traditional manual methods, including increased efficiency and accuracy as the PLC ensures precise control of flow rates, chemical doses, and treatment times, resulting in improved treatment.Accurate It also improves data acquisition and monitoring as real-time data is acquired from sensors through continuous monitoring of inlet characteristics, allowing for proactive adjustments and optimal operation while enhancing safety and reliability by automating tasks to reduce human intervention.(PLCS7300) for control (monitoring and processing) achieves high performance and lower access time as the RTU suggests creating a larger smart control node that helps in collecting various data and sending it to the computer terminal through the use of communication networks and thus achieves other processors in the data center.The main one provides high accuracy in real-time and sends the data back to the subunits.

APPENDIX
The characteristics and details of PLC data storage use in the inlet parameters system are noted in Figure A1. Figure A2 shows the educational symbols for the basic ladder algorithm that allow researchers to learn it through these symbols.

Figure 3 .
Figure 3.The ladder program algorithm proposed and the parameter system

Figure 5 .Figure 6 .
Figure 5. Database system (Address, Tag, Data type, and OPC/HMI) (a) Online communication between the PLC and PC system process (b) Ladder program results for the proposed system

Figure 7 .
Figure 7. ON line results system

Future
suggestions for this study are to use other types of Schneider PLC and to use machine learning programming to improve predictive maintenance in SCADA networks.

Figure A1 .
Figure A1.The details of PLC data storage

Figure A2 .
Figure A2.Symbols ladder logic diagrams for learning PLC programming