Design and Implementation of a PLC-Based Automatic Control System for Water Treatment Plant Filter Beds
2026-04-06 03:14:28··#1
1 Introduction The Maoming No. 2 Waterworks has a daily output of 2 × 10⁵ cubic meters, providing more than 70% of the daily water needs of Maoming City. To alleviate the city's water shortage, the municipal government increased investment and expanded the waterworks. The waterworks has a high degree of automation, and the entire automatic control system adopts a (PC+PLC) configuration. Filter control is one of the more difficult aspects to design in waterworks automation, mainly due to the complexity of the valve opening and closing sequence and conditions during backwashing. This paper mainly describes the main design process of the expanded filter control system. 2 Control Tasks of the Filter System 2.1 Process Requirements The newly expanded V-type filter at the No. 2 Waterworks has six filter compartments. Each compartment is equipped with a level gauge and a blockage meter. Each filter compartment has its own inlet valve, clear water valve, air flush valve, water flush valve, drain valve, and air vent valve. There are 3 blowers for air flushing (two in operation and one on standby); 3 backwash pumps for water flushing (two in operation and one on standby); 2 air compressors (one in operation and one on standby); and 1 dryer. The filtered water enters each filter cell of the filter bed, undergoes constant-velocity filtration with quartz sand, and then enters the clear water tank. The filtration process requires the water level in the filter cells to be maintained at 1.2 meters above the filter media; at this level, the filtration effect is optimal. To achieve constant-velocity, constant-water-level filtration, the outflow rate of the filter bed must equal the inflow rate. The opening degree of the outlet valve should be adjusted according to changes in the filter bed water level to control the outflow rate. When the filter bed operation meets the constraints of backwashing, backwashing is required to clean the filter sand. Backwashing is achieved by controlling the filter bed inlet valve, clear water outlet valve, backwash air inlet valve, exhaust valve, backwash water inlet valve, backwash drain valve, and operating the backwash pumps and blowers. Therefore, the main tasks of the filter control system are liquid pull control during filtration and backwash control during cleaning of filter sand. Filtration and backwashing are continuously cycled and alternated. 2.2 Performance requirements for the control system are as follows: (1) Achieve automatic constant water level filtration with an error of ±1.5 cm; (2) Accurately achieve automatic backwashing according to one of the following constraints: ? The filtration time reaches the backwashing set cycle (e.g., 48 hours) and backwashing is not performed; ? The head loss value reaches the set value (150) and the delay time (15 minutes) has expired, but backwashing is not performed; ? The forced backwashing button is triggered. (3) The backwashing cycle and the time of each step in the backwashing process can be set by the program to meet the process and actual operation requirements. (4) The filter water level, head loss and outlet valve opening degree can be displayed intuitively, and the on/off status of the backwashing equipment and local filter valves can be displayed at the same time. (5) The backwashing equipment, local filter valves and backwashing process can be fully automatically controlled or manually controlled. 3. Control Principle and Operation of the Filter Pool 3.1 Constant Water Level Control Principle The constant water level control of the filter pool is shown in Figure 1. Each filter pool compares the detected water level value with the set water level value to obtain a water level deviation signal Δe. After PID calculation, the output signal is sent to the output additional processing program, which then outputs the signal to the servo motor of the outlet valve to control the opening degree of the outlet valve. The increase in opening degree is determined by the rate of water level rise and the water level deviation over a certain cumulative time. The faster the influent flow rate, the larger the outlet valve opening, and vice versa. The goal of PID calculation is to maintain the water level at the set value, and the additional value can be added to the output control as compensation. The output additional processing program outputs the PID calculation result to the clear water valve servo motor according to a certain rule. [align=center] Figure 1 Constant Water Level Control System Diagram of the Filter Pool[/align] 3.2 Backwashing Process When the control system receives the backwashing command signal, it queues up for backwashing according to the first-in-first-out principle. The backwashing process consists of three stages: air washing, air-water mixed washing, and water washing. The process is as follows: First, close the inlet valve of the water to be filtered. When the water level drops to the set backwash level, close the clean water outlet valve and open the wastewater drain valve. After the drain valve signal is received, close the exhaust valve first, then open the backwash air inlet valve and start the first blower for air washing, which takes 1-3 minutes. After completion, open the backwash water inlet valve, then start the second blower and the first water pump for air-water mixed washing, which takes 5 minutes. Then, turn off both blowers, close the backwash air inlet valve, open the exhaust valve, and start the second water pump for single-water washing, which takes 3-6 minutes. After completion, close the backwash water inlet valve, stop both backwash water pumps, close the wastewater drain valve, open the inlet valve of the water to be filtered, and open the clean water valve after filtration. When the water level rises to the constant filtration level, the system switches back to the normal filtration program. 4 Control System Design 4.1 Hardware Composition and Network Structure This system adopts a PC+PLC configuration. The host computer consists of one Compaq microcomputer and two printers, while the slave computer consists of eight Schneider Electric PLCs: an analog panel PLC8, a common flushing PLC7, and six unit filter PLCs (1-6), as shown in Figure 2. The PLCs are connected by a bus-type communication network using twisted-pair cables, also known as a FIPWAY communication network, with a transmission rate of 1 Mbps. The PLCs communicate with each other to share data. Each unit filter and the common flushing PLC is equipped with a field XBT-B (Artificial Intelligence Interface), which connects to the PLC via cables, allowing for manual control of the filters from the XBT control panel. Each unit filter's PLC is connected to the common flushing PLC via a FIPWAY network. The common flushing PLC, in turn, connects to the water plant's central control room and microcomputer network via the network. Therefore, the system can remotely monitor the filter's operation from the central control room, achieving three-level control: centralized monitoring by the central control room computer, remote PLC control, and on-site XBT operation. This ensures the safe and reliable operation of the filter production. The PLC configuration for this system is as follows: PLC8: One CPU/COM, one POWER, and one DI from a TSX47/415; nine DOs. The analog panel is equipped with a D/A converter. PLC7: One CPU/COM, one POWER, one DO, and one AI (TSXAEM811) from a TSX67/455; two DIs. PLC1-6: One CPU/COM, one POWER, one DI, one DO, and one AI (TSXAEM411) from a TSX47/415. Communication between the PLC and the PC requires first installing a dedicated FIPWAY communication network card from TE on the PC, and then data communication via the RS422 communication interface. 4.2 PLC Control Function Unit: The PLC in the filter unit mainly performs constant water level filtration control within its own filter compartment and automatic control of the inlet valve, outlet valve, drain valve, backwash air inlet valve, exhaust valve, and backwash water valve for each filter compartment, as well as data acquisition and data exchange with the common backwashing PLC. When the blockage device under the filter plate transmits the filter bed blockage level signal to the filter unit PLC, the PLC receives the signal, compares it with the head setpoint, displays the result, determines whether the filter needs backwashing, and transmits the result to the common backwashing PLC. The number of filter cells opened is determined by the influent flow rate. For each filter cell, the water level and head loss are measured by a level gauge and a blockage meter. These three parameters, along with the opening of the filtered water valve, are sent to the unit PLC. After PID calculation by the PLC, if the water level deviation exceeds 1.5cm, the PLC immediately activates the control unit to automatically adjust the opening of the filter cell's outlet butterfly valve, maintaining a relatively constant water level and thus achieving constant water level filtration. The common backwash PLC is responsible for coordinating the backwashing queue of the six filter cells and monitoring the backwashing equipment (backwash pumps, blowers, etc.) and their inlet and outlet valves. When a unit PLC sends a backwashing request to the common backwash PLC, the common backwash PLC starts the backwashing program to control the backwashing of that filter cell. When a filter cell is being backwashed, if one or more other filter cells send backwashing request signals, these signals are stored in the common backwash PLC's memory. The filters are then washed in the order they were stored, while the filter cells waiting in the backwashing queue maintain normal production. The function of the simulation screen PLC is to drive the simulation screen and realize communication with the water company's radio system and microcomputer. The simulation screen can dynamically display the entire water plant's process flow, equipment operating status, and key process parameters, and provide audible and visual alarms for easy production scheduling and management. 4.3 Program Design Backwashing is performed when one of the backwashing control constraints is met. This system uses one backwashing PLC to implement queued backwashing of six filter tanks. The backwashing information and specific water level of the entire filter group are collected through read/write commands in the common program, and commands are issued. The main contents of the common program include: backwashing pump and blower control program, read/write program for information between the common PLC and other unit PLCs, and filter tank queuing program. The process of each filter tank is basically the same, and its PLC program structure is also the same, which can be in the form of subroutines, as shown in Figure 3. Each filter tank program includes initialization commands and programs for the filter tank's automatic, manual, and field status. The filter tank automatic status program includes three subroutines: backwash status, tidying status, and normal filtration status. The filter tank manual status program includes manual operation commands for each valve. The main contents of the filter bed field status program include: (1) When the filter bed switches from automatic to field status, all commands issued must be reset. (2) Some variables in the automatic status, such as time variables and counter variables, must be reset. (3) For backflushing, a command to end backflushing must be issued in this status. 4.4 System monitoring software The host computer of this system adopts the Windows NT operating system, and the real-time monitoring software uses Wonderware's InTouch 7.0 industrial configuration software, which mainly includes two programs: WindowMaker and WindowViewer. The host computer is equipped with a communication network card that follows the FIPWAY communication protocol to collect production data in real time. Through the monitoring computer, the dynamic process simulation screen of the filter bed during filtration, waiting, backflushing and other processes can be clearly displayed. It can remotely operate and control all equipment in the system, and has the functions of displaying process layout diagrams, real-time dynamic parameters, equipment working status and real-time/historical alarm signals, real-time/historical trend curves of online instruments, motor running time, etc. At the same time, it can perform offline/online programming and parameter modification, compile and print production and management reports. 5. Networking Issues Between the New and Old Systems Since the newly built filter system and the original water plant system are two independent systems developed using PLCs from different companies, their communication protocols differ, and they lack data communication, causing some problems for production and management. Both phases use InTouch monitoring configuration software, but different versions. Considering the cost of technical upgrades and the company's technical capabilities, it was decided to utilize InTouch's Ethernet-based network functionality, compatible with the TCP/IP communication protocol, to achieve network control between the two independent systems. The specific method is as follows: First, an Ethernet network is established using a switch, as shown in Figure 4. The TCP/IP communication protocol and NetDDE program are then installed on the original system's monitoring microcomputer PC1 and the newly built system's monitoring microcomputer PC2, respectively. Next, the InTouch monitoring system software was configured. The InTouch development environment, WindowMaker, was run, and the "import" function was used to integrate the data from the old and new phases of the program into a single application. This application was then installed on PC1 and PC2 respectively, allowing production monitoring from either PC. b. InTouch's DDE Access was configured by adding "\\PC2\viewer" (on PC1) and "\\PC1\viewer" (on PC2) to the "DDE Application/Server Name" field in the "Modify DDE Access Name" dialog box. This configuration enabled real-time data communication between PC1 and PC2 via Ethernet. c. NetDDE was initialized, and the InTouch WindowViewer was run, allowing real-time communication between PC1 and PC2. 6. Conclusion After a period of operation, the filter bed showed good performance from the control system, with all system control performance indicators meeting design requirements. Under normal circumstances, the water level fluctuation of this filter is controlled within ±1.5cm of the set value, realizing automatic filtration and automatic queuing and backwashing of the six filter tanks. It also indirectly realizes the network control with the original system of the water plant. The design of the entire control system basically meets the production requirements and achieves the expected results.