An intelligent phosphorus removal agent dosing control system and method for a sewage treatment plant based on artificial intelligence

CN122963239APending Publication Date: 2026-10-23HUNAN XINYUAN ENVIRONMENTAL TECH GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610947058.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

固定流量比例投加仅根据进水流量按照预设的固定系数计算药剂投加量,完全忽略进水TP浓度、温度、pH等参数的动态变化;单PID反馈投加仅能基于出水TP的实测偏差进行滞后调节,无法抵消化学除磷15-30分钟的工艺滞后,这两种方式无法提前预判进水磷负荷的冲击性变化,对突发性水质突变的应对能力差;控制参数固定,不能随季节更替、工艺运行状态及进水水质特性的变化自动优化,需要运维人员频繁手动调整

Benefits of technology

1.该基于人工智能的污水处理厂智能除磷药剂投加控制系统及方法,有效解决了传统除磷药剂投加系统响应滞后、控制精度不足的核心问题,能够精准匹配不同水质水量条件下的药剂需求,避免了过量投加造成的药剂浪费,同时减少了化学除磷过程中产生的无机污泥量,在保障出水水质稳定达标的前提下,显著降低了污水处理厂的运行成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122963239A_ABST
    Figure CN122963239A_ABST
Patent Text Reader

Abstract

The application discloses an intelligent phosphorus removal reagent dosing control system and method for a sewage treatment plant based on artificial intelligence, which comprises a perception layer, a control layer including an edge computing gateway, a PLC main controller, an AI inference module, a double-closed-loop controller, a reinforcement learning optimizer and an execution mechanism, a platform layer including a data center and a model training server, and an application layer including a remote monitoring platform supporting PC end and mobile end access, an abnormal alarm module supporting sound-light alarm and short message push, and a report analysis system automatically generating daily, monthly and annual operation reports. The application effectively solves the core problems of the traditional phosphorus removal reagent dosing system, such as response lag and insufficient control precision, can accurately match the reagent demand under different water quality and quantity conditions, avoids reagent waste caused by excessive dosing, reduces the amount of inorganic sludge generated in the chemical phosphorus removal process, and significantly reduces the operation cost of the sewage treatment plant under the premise of ensuring that the effluent water quality is stable and up to standard.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wastewater treatment technology, specifically to an intelligent phosphorus removal agent dosing control system and method for wastewater treatment plants based on artificial intelligence. Background Technology

[0002] With the full implementation of the Class A standard of my country's "Discharge Standard of Pollutants for Urban Wastewater Treatment Plants" (GB18918-2002) and the continuous tightening of local discharge standards, the total phosphorus (TP) in effluent is required to be consistently ≤0.5 mg / L, and the instantaneous discharge value has been included in the online monitoring and assessment scope of environmental protection departments. Chemical phosphorus removal is an essential process for ensuring that effluent TP meets the standards in urban wastewater treatment plants, and the quality of its dosing control directly determines the stability of effluent water quality, the cost of chemical consumption, and the amount of sludge produced. Currently, the vast majority of wastewater treatment plants in China still use traditional phosphorus removal chemical dosing control methods, mainly including two modes: fixed flow rate proportional dosing and single PID feedback dosing. Fixed flow rate proportional dosing calculates the chemical dosage based solely on the influent flow rate according to a preset fixed coefficient, completely ignoring dynamic changes in parameters such as influent TP concentration, temperature, and pH. Single PID feedback dosing can only make lag adjustments based on the measured deviation of effluent TP, which cannot offset the 15-30 minute process lag in chemical phosphorus removal. Both methods cannot predict shock changes in influent phosphorus load in advance and have poor response capabilities to sudden changes in water quality. The control parameters are fixed and cannot be automatically optimized according to seasonal changes, process operating status, and changes in influent water quality characteristics, requiring frequent manual adjustments by maintenance personnel. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention provides an intelligent phosphorus removal agent dosing control system and method for wastewater treatment plants based on artificial intelligence, which solves the problems mentioned in the background.

[0004] To achieve the above objectives, the present invention provides the following technical solution: an intelligent phosphorus removal agent dosing control system for wastewater treatment plants based on artificial intelligence, wherein the system adopts a four-layer integrated intelligent control architecture consisting of a perception layer, a control layer, a platform layer, and an application layer, and includes: The sensing layer includes an influent flow meter and an influent TP online monitoring instrument installed in the influent channel, an effluent TP online monitoring instrument installed in the secondary sedimentation tank effluent channel, and a pH meter, thermometer, ORP meter, and MLSS / DO online instrument installed in the biological treatment tank. These instruments are used to collect key operating parameters such as influent flow rate, influent TP concentration, effluent TP concentration, pH value, temperature, ORP value, MLSS, and DO in real time during the wastewater treatment process at a frequency of no less than once per minute. The control layer includes an edge computing gateway, a PLC main controller, an AI inference module, a dual closed-loop controller, a reinforcement learning optimizer, and an actuator. The edge computing gateway and the PLC main controller communicate bidirectionally via Ethernet. The AI ​​inference module is integrated into the edge computing gateway to achieve local millisecond-level real-time inference. The dual closed-loop controller integrates a feedforward controller and a PID feedback controller to achieve a fusion output of feedforward predictive regulation and feedback error correction. The reinforcement learning optimizer iteratively optimizes the system control parameters every 24 hours. The platform layer includes a data middle platform and a model training server. The data middle platform is used to store, clean, and manage historical operation data throughout the entire process. The model training server is used to iteratively update the LSTM prediction model and the reinforcement learning optimization model weekly based on the accumulated historical data, and then distribute the updated model to the edge computing gateway. The application layer includes a remote monitoring platform that supports access from PCs and mobile devices, an anomaly alarm module that supports audible and visual alarms and SMS push notifications, and a report analysis system that automatically generates daily, monthly, and yearly operational reports. The system also integrates an automatic / manual seamless switching module and a multi-level safety constraint protection mechanism. The automatic / manual seamless switching module is used to achieve smooth switching of control modes and no sudden changes in dosage. The multi-level safety constraint protection mechanism is used to ensure the safe and stable operation of the system under abnormal operating conditions.

[0005] An AI-based intelligent phosphorus removal agent dosing control method for wastewater treatment plants, which utilizes the aforementioned AI-based intelligent phosphorus removal agent dosing control system for wastewater treatment plants, includes the following steps: S1: The sensing layer collects influent flow rate, influent TP concentration, pH value, temperature, effluent TP concentration, MLSS and DO parameters in real time at a frequency of 1 time / minute, and transmits the data to the edge computing gateway of the control layer via RS485 bus or Modbus TCP protocol. S2: The edge computing gateway uses a moving average filtering algorithm to reduce noise in the original data, removes outliers using the 3σ criterion, and standardizes all parameters to the [0,1] range to obtain standardized operating data; S3: The AI ​​inference module calls the trained LSTM time series prediction model, using standardized time series data from the past 24 hours as input, to predict the influent phosphorus load minute by minute for the next 15-30 minutes; S4: The AI ​​inference module calls a multi-parameter coupled calculation model to dynamically calculate the optimal phosphorus removal molar ratio that matches the current water quality based on real-time pH value, temperature and wastewater alkalinity. S5: The feedforward controller calculates the basic feedforward dosage based on the predicted influent phosphorus load obtained in step S3 and the dynamic phosphorus removal molar ratio obtained in step S4, combined with the reagent purity conversion factor. S6: The feedback controller acquires the deviation between the measured value of effluent TP and the preset standard value in real time, and calculates the feedback correction amount through the PID algorithm. The proportional, integral and derivative parameters of the PID controller are dynamically adjusted by the reinforcement learning optimizer. S7: The dual closed-loop controller linearly superimposes the feedforward basic injection amount and the feedback correction amount to obtain the initial injection amount. After passing the preset upper and lower limit safety amplitude constraints of the injection amount, it outputs the final injection amount control signal to the actuator. S8: The reinforcement learning optimizer aims to achieve the highest TP compliance rate and the lowest reagent consumption. It calculates reward values ​​based on daily operating data, continuously iterates and optimizes the LSTM prediction model weights, dynamic molar ratio calculation model coefficients, and PID control parameters, and synchronizes the optimized parameters to the edge computing gateway.

[0006] Furthermore, the LSTM time series prediction model in step S3 adopts a 3-layer network structure. The number of neurons in the input layer is 6, corresponding to the 6 input parameters: influent flow rate, influent TP concentration, pH value, temperature, MLSS, and DO. The number of neurons in the hidden layer is 32, the number of neurons in the output layer is 1, and the length of the input sequence is 1440 time points, corresponding to the historical data of the past 24 hours.

[0007] Furthermore, in step S4, when using iron salt dephosphorizing agent, the optimal dynamic range of the Fe / P molar ratio is 1.2-2.8; when using aluminum salt dephosphorizing agent, the optimal dynamic range of the Al / P molar ratio is 1.5-3.5; when the pH value is in the range of 6.5-7.5, the molar ratio is taken at the lower limit of the corresponding range; when the pH value is lower than 6.5 or higher than 8.0, the molar ratio is automatically increased by 10%-20%; when the water temperature is lower than 15℃, the molar ratio shows a linear upward trend as the temperature decreases.

[0008] Furthermore, the calculation formula for the feedforward base injection amount in step S5 is as follows:

[0009] in, This is the feedforward base injection amount; This is a conversion factor for reagent purity, determined based on the effective content of the phosphorus removal agent; To predict the inflow rate; To predict the influent TP concentration; The optimal phosphorus removal molar ratio is dynamically determined. The formula for calculating the feedback correction amount in step S6 is:

[0010] in, This is the amount of feedback correction; The deviation between the measured value and the set value of effluent TP; , , These are the proportional coefficient, integral coefficient, and derivative coefficient of the PID controller, respectively.

[0011] Furthermore, the reward function of the reinforcement learning optimizer in step S8 is:

[0012] in, The TP compliance rate of the outflow on that day; This represents the total actual consumption of medicines on that day. The baseline drug consumption for the day is calculated using a fixed-ratio dosing method; the reinforcement learning optimizer iterates its parameters every 24 hours, with each iteration using complete running data from the past 7 days.

[0013] Furthermore, the measurement accuracy of the sensing layer instruments meets the following requirements: the measurement accuracy of the influent and effluent TP online monitoring instrument is ≤ ±0.01 mg / L, the measurement accuracy of the electromagnetic flow meter is ≤ ±0.5%FS, the measurement accuracy of the pH meter is ≤ ±0.01pH, and the measurement accuracy of the thermometer is ≤ ±0.1℃; the data transmission delay between all instruments and the edge computing gateway is ≤100ms.

[0014] Furthermore, the actuators of the control layer include a variable frequency metering pump set, an electric regulating valve, and a pipeline agitator; the flow rate adjustment range of the variable frequency metering pump set is 0-100% of the rated flow rate, and the control accuracy is ≤±1%; the adjustment accuracy of the electric regulating valve is ≤±0.5%FS, and the response time is ≤2s; the rotation speed of the pipeline agitator is automatically adjusted according to the final dosage, and the rotation speed range is 100-500r / min, ensuring that the agent and sewage are fully mixed within 30s.

[0015] Furthermore, when switching control modes, the automatic / manual seamless switching module maintains the current dosage unchanged, and then gradually adjusts to the target dosage after the mode switch is completed; The multi-level safety constraint protection mechanism includes: hard constraints on upper and lower limits of dosage to prevent the dosage from exceeding the allowable range of the process; an emergency mode for instrument failure, which automatically switches to a proportional dosing mode based on the influent flow rate when a critical instrument fails; and a drug shortage alarm and shutdown protection, which triggers an audible and visual alarm and sends a text message to the operation and maintenance personnel when the liquid level in the drug storage tank is lower than the threshold, and automatically shuts down the dosing system when the liquid level is lower than the minimum safety value.

[0016] This invention provides an intelligent phosphorus removal agent dosing control system and method for wastewater treatment plants based on artificial intelligence, which has the following beneficial effects: 1. This AI-based intelligent phosphorus removal agent dosing control system and method for wastewater treatment plants effectively solves the core problems of slow response and insufficient control precision in traditional phosphorus removal agent dosing systems. It can accurately match the agent requirements under different water quality and quantity conditions, avoid agent waste caused by overdosing, and reduce the amount of inorganic sludge generated during chemical phosphorus removal. Under the premise of ensuring stable effluent quality, it significantly reduces the operating cost of wastewater treatment plants.

[0017] 2. This AI-based intelligent phosphorus removal agent dosing control system and method for wastewater treatment plants can automatically adapt to seasonal changes, water quality fluctuations, and changes in process operating status. It eliminates the need for frequent manual parameter adjustments by maintenance personnel, significantly reducing the intensity of manual maintenance and enabling unattended operation. System deployment requires no modification to the main processes of the wastewater treatment plant and integrates a comprehensive safety protection mechanism, ensuring the safe and stable operation of the system under various abnormal conditions. It possesses extremely high practicality and promotional value. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the steps of an intelligent phosphorus removal agent dosing control system and method for wastewater treatment plants based on artificial intelligence, according to the present invention. Figure 2 This is a schematic diagram of the overall system architecture of an intelligent phosphorus removal agent dosing control system and method for wastewater treatment plants based on artificial intelligence, according to the present invention. Figure 3 This is an AI dual-closed-loop control flowchart of an intelligent phosphorus removal agent dosing control system and method for wastewater treatment plants based on artificial intelligence, according to the present invention. Figure 4 This is a control algorithm logic block diagram of an intelligent phosphorus removal agent dosing control system and method for wastewater treatment plants based on artificial intelligence, according to the present invention. Detailed Implementation

[0019] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and should not be construed as limiting the scope of the invention.

[0020] like Figures 1-4 As shown, the present invention provides a technical solution: an intelligent phosphorus removal agent dosing control system and method for wastewater treatment plants based on artificial intelligence. This system adopts a four-layer integrated intelligent control architecture consisting of a perception layer, a control layer, a platform layer, and an application layer. Its specific components are as follows: Sensing Layer: As the system's data input unit, it is responsible for real-time acquisition of key operating parameters during the wastewater treatment process. This includes a DN800 electromagnetic flowmeter (measurement accuracy ≤ ±0.5%FS) and an influent TP online monitor (measurement accuracy ≤ ±0.01mg / L) installed in the influent channel; an effluent TP online monitor (measurement accuracy ≤ ±0.01mg / L) installed in the secondary sedimentation tank effluent channel; and a pH meter (measurement accuracy ≤ ±0.01pH), thermometer (measurement accuracy ≤ ±0.1℃), ORP meter, and MLSS / DO online meter installed at the end of the aerobic section of the biological treatment tank. All instruments communicate with the control layer via RS485 bus or Modbus TCP protocol, with a data acquisition frequency of 1 time / minute and a data transmission delay ≤ 100ms. Control Layer: As the core execution unit of the system, it is responsible for data processing, AI inference, control decision-making and execution; including edge computing gateway, PLC main controller, AI inference module, dual closed-loop controller, reinforcement learning optimizer and execution mechanism; The edge computing gateway uses industrial-grade embedded devices, runs on a Linux operating system, and has 16 RS485 interfaces and 2 Ethernet interfaces. It can communicate bidirectionally with the PLC main controller via Ethernet. The AI ​​inference module is integrated into the edge computing gateway and uses the TensorFlow Lite framework for lightweight model deployment, enabling local millisecond-level real-time inference without relying on cloud networks. The dual closed-loop controller integrates a feedforward controller and a PID feedback controller. The feedforward controller is used to output an advance adjustment amount based on the predicted load, and the PID feedback controller is used to output a correction amount based on the effluent TP deviation. The reinforcement learning optimizer uses a deep Q-network (DQN) algorithm to iteratively optimize the system control parameters every 24 hours. The actuators include a variable frequency metering pump set (flow adjustment range 0-100% of rated flow, control accuracy ≤±1%), an electric regulating valve (adjustment accuracy ≤±0.5%FS, response time ≤2s) and a pipeline agitator (speed range 100-500r / min). The PLC main controller is connected to the actuators via hard wiring and outputs a 4-20mA control signal. Platform Layer: Serving as the system's data and model support unit, responsible for data storage and model training; includes the data platform and model training server. The data platform uses the time-series database InfluxDB to store the historical operation data of the entire process. The data retention period is no less than 3 years, and it supports data cleaning, outlier detection and data visualization. The model training server uses a GPU server, and the LSTM prediction model and reinforcement learning optimization model are iteratively updated weekly based on accumulated historical data. The updated model is then distributed to the edge computing gateway via the MQTT protocol. Application layer: As the human-computer interaction unit of the system, it is responsible for remote monitoring and operation and maintenance management; including: Remote monitoring platform: Supports access from PC and mobile devices, displays system operating status, water quality parameters, dosage curves, etc. in real time, and supports remote manual control; Anomaly alarm module: It can provide multi-level audible and visual alarms and SMS push notifications for situations such as instrument failure, abnormal dosage, excessive TP in effluent, and low reagent level. The alarm threshold can be customized. Report Analysis System: Automatically generates daily, monthly, and yearly operation reports, including key indicators such as reagent consumption, effluent quality compliance rate, and operating costs, and supports report export and printing; The system also integrates an automatic / manual seamless switching module and a multi-level safety constraint protection mechanism: Automatic / manual seamless switching module: When switching control modes, the current dosage remains unchanged. After the mode switch is completed, the dosage is gradually adjusted to the target dosage in increments of 0.5 kg / h to avoid fluctuations in effluent water quality caused by sudden changes in dosage during the switching process. Multi-level safety constraint protection mechanism: including hard constraints on upper and lower limits of dosage (to prevent the dosage from exceeding the allowable range of the process), emergency mode for instrument failure (automatically switches to the proportional dosing mode based on the inlet water flow when a critical instrument fails), and drug shortage alarm and shutdown protection (triggers an audible and visual alarm and sends an SMS when the liquid level in the drug storage tank is below 10%, and automatically shuts down the dosing system when it is below 5%).

[0021] This method is based on the aforementioned control system and specifically includes the following steps: S1: The sensing layer collects influent flow rate Q, influent TP concentration C_in, pH value, temperature T, effluent TP concentration C_out, MLSS and DO parameters in real time at a frequency of 1 time / minute, and transmits the data to the edge computing gateway of the control layer via RS485 bus. S2: The edge computing gateway preprocesses the raw data: The moving average filtering algorithm is used to reduce noise in the data. The window size is 5, that is, each data point is replaced by the average of the two data points before and after it. Outliers are eliminated using the 3σ criterion, which means that when a data point exceeds the mean by ±3 times the standard deviation, it is considered an outlier and replaced by the previous valid data point. The min-max normalization method is used to normalize all parameters to the [0,1] interval. The calculation formula is as follows:

[0022] in, The data is standardized. This is the original data; This is the historical minimum value of this parameter; This is the historical maximum value of this parameter; S3: The AI ​​inference module calls the trained LSTM time series prediction model, using standardized time series data from the past 24 hours (1440 moments) as input, to predict the influent phosphorus load minute by minute for the next 15-30 minutes; The LSTM model uses a 3-layer network structure: the input layer has 6 neurons, corresponding to 6 input parameters: influent flow rate, influent TP concentration, pH value, temperature, MLSS, and DO; the hidden layer has 32 neurons, using the ReLU activation function; and the output layer has 1 neuron, using the linear activation function. The model training uses mean squared error (MSE) as the loss function, the optimizer uses the Adam algorithm, the learning rate is 0.001, and the ratio of training set to test set is 8:2. The forecast output is the influent phosphorus load for the next 15-30 minutes, and the average value is taken as the final forecast phosphorus load. ; S4: The AI ​​inference module calls a multi-parameter coupled calculation model to dynamically calculate the optimal phosphorus removal molar ratio that matches the current water quality based on real-time pH, temperature, and wastewater alkalinity. ; When polyferric sulfate (PFS) is used as a phosphorus removal agent, the optimal dynamic range of the Fe / P molar ratio is 1.2-2.8; when polyaluminum chloride (PAC) is used as a phosphorus removal agent, the optimal dynamic range of the Al / P molar ratio is 1.5-3.5. The phosphorus removal effect is optimal when the pH value is between 6.5 and 7.5, and the molar ratio should be taken at the lower limit of the corresponding range. When the pH value is below 6.5 or above 8.0, the phosphorus removal efficiency decreases, and the molar ratio should be automatically adjusted upward by 10%-20%. When the water temperature is below 15℃, the chemical reaction rate decreases, and the molar ratio increases linearly with decreasing temperature. For every 1℃ decrease in temperature, the molar ratio increases by 0.05. S5: Feedforward controller based on predicted influent phosphorus load Compared with the optimal phosphorus removal molar ratio Combined with drug purity conversion factor The feedforward base injection amount was calculated. The calculation formula is:

[0023] In the formula, This is a conversion factor for reagent purity, determined based on the effective content of the phosphorus removal agent. For example, PAC with an effective content of 28%... ; S6: Feedback controller acquires real-time measured TP value of effluent. Compared with the preset target value (Typically set at 0.35 mg / L) Deviation The feedback correction amount is calculated using the PID algorithm. The calculation formula is:

[0024] , , These are the proportional coefficient, integral coefficient, and derivative coefficient of the PID controller, which are dynamically adjusted by the reinforcement learning optimizer. This represents the instantaneous rate of change of the effluent TP deviation, i.e., the speed at which the deviation increases or decreases. S7: The dual closed-loop controller will feed forward the base injection amount With feedback correction amount The initial dosage is obtained by linear superposition. After passing through preset upper and lower limits for safe dosing, the final dosing amount is output. For the executing agency, the calculation formula is:

[0025] in, This is a limiting function; This is the lower limit of the dosage, usually set at 5% of the rated dosage; The upper limit for dosage is usually set at 150% of the rated dosage; S8: The reinforcement learning optimizer aims to achieve the highest effluent TP compliance rate and the lowest reagent consumption. It calculates reward values ​​based on daily operating data and continuously iterates to optimize system control parameters. The reward function is: ,in The effluent TP compliance rate for the day (the percentage of time when effluent TP ≤ 0.5 mg / L); This represents the total actual consumption of medicines on that day. This represents the daily baseline reagent consumption using the traditional fixed-ratio dosing method. The reinforcement learning optimizer iterates its parameters every 24 hours. Each iteration uses complete running data from the past 7 days. The optimization targets include LSTM prediction model weights, dynamic molar ratio calculation model coefficients, and PID control parameters. The optimized parameters are synchronized to the edge computing gateway via the MQTT protocol, enabling the system to learn and adapt.

[0026] Example 1: This example uses a municipal wastewater treatment plant with a treatment capacity of 50,000 tons / day as an example. The wastewater plant adopts the A² / O process, and the designed effluent water quality meets the Class A standard. Chemical phosphorus removal uses PAC with an effective content of 28% as a coagulant. The original system adopted a control method of fixed flow rate ratio addition combined with manual adjustment. The effluent TP compliance rate is about 92%, the PAC consumption is about 0.12 kg / m³, and the annual chemical cost is about 1.35 million yuan. Deploy the intelligent phosphorus removal agent dosing control system according to the four-layer architecture of the present invention: Sensing layer: A DN800 electromagnetic flow meter (accuracy ±0.5%FS) and an influent TP online monitoring instrument (accuracy ±0.01mg / L) are installed in the inlet channel; an effluent TP online monitoring instrument (accuracy ±0.01mg / L) is installed in the secondary sedimentation tank effluent channel; and a pH meter (accuracy ±0.01pH), a thermometer (accuracy ±0.1℃), and an MLSS / DO online meter are installed at the end of the aerobic section of the biological treatment tank. All instruments are connected to the edge computing gateway via an RS485 bus, and the data acquisition frequency is set to 1 time / minute.

[0027] Control Layer: Deploy one industrial-grade edge computing gateway (integrated AI inference module), one Siemens S7-1200 PLC main controller, and one 10-inch touchscreen HMI; replace the original three PAC metering pumps with variable frequency metering pumps (rated flow rate 500L / h, control accuracy ±1%), and add a DN50 electric regulating valve (regulation accuracy ±0.5%FS, response time ≤2s) and a pipeline agitator (power 1.5kW, speed range 100-500r / min); the edge computing gateway and the PLC main controller communicate via Ethernet, and the PLC main controller and the actuator are connected via hardwiring.

[0028] Platform layer: Deploy one data middleware server (equipped with InfluxDB time series database) and one GPU model training server; the data middleware imports the sewage treatment plant's historical operating data for the past year, and the model training server completes the initial training of the LSTM prediction model and the reinforcement learning optimization model based on the historical data.

[0029] Application layer: Build a remote monitoring platform for web and mobile terminals, configure an anomaly alarm module and report analysis system; set an early warning when the effluent TP is ≥0.45mg / L, and an emergency alarm when it is ≥0.5mg / L; trigger a low level alarm when the liquid level in the chemical storage tank is below 10%, and trigger a shutdown protection when it is below 5%.

[0030] After the system starts up, it will run automatically according to the following steps: S1: The sensing layer collects parameters such as influent flow rate, influent TP, pH, temperature, effluent TP, MLSS, and DO in real time and transmits them to the edge computing gateway; S2: The edge computing gateway uses a moving average filtering algorithm with a window size of 5 to denoise the original data, removes outliers using the 3σ criterion, and standardizes all parameters to the [0,1] interval; S3: The AI ​​inference module calls the trained LSTM time-series prediction model, using standardized time-series data from the past 24 hours as input, to predict the influent phosphorus load for the next 30 minutes. For example, when the average influent flow rate over the past 24 hours is 2083 m³ / h and the average influent TP concentration is 3 mg / L, the predicted average influent flow rate for the next 30 minutes is 2200 m³ / h, the average influent TP concentration is 3 mg / L, and the predicted phosphorus load is... kg / h; S4: The AI ​​inference module dynamically calculates the optimal Al / P molar ratio based on real-time pH and temperature. For example, when the real-time pH is 7.0 and the temperature is 20°C, the Al / P molar ratio is 2.2. When the temperature drops to 10°C, the Al / P molar ratio is automatically adjusted to 2.8. S5: Feedforward controller calculates feedforward base dosage; PAC purity conversion factor. Therefore, the feedforward basic feed rate D_{ff} = 3.57 × 6.6 × 2.2 ≈ 51.9 kg / h; S6: The feedback controller collects the effluent TP concentration in real time. When the measured effluent TP value is 0.4 mg / L (set value is 0.35 mg / L), the deviation... mg / L, the PID controller calculates the feedback correction amount. kg / h; S7: The dual closed-loop controller integrates the feedforward base input and the feedback correction to obtain the initial input. After the safety limit is applied (the lower limit of the dosage is 5 kg / h and the upper limit is 100 kg / h), the final dosage of 54.0 kg / h is output to the variable frequency metering pump, and the frequency of the metering pump is adjusted to the corresponding value. S8: The reinforcement learning optimizer calculates the reward value daily. For example, if the daily TP compliance rate is 99.8%, the actual chemical consumption is 1200 kg, and the baseline consumption for traditional fixed-ratio dosing is 1740 kg, then the reward value is:

[0031] The optimizer iteratively adjusts the control parameters based on the reward value and synchronizes them to the edge computing gateway; The actual results after the wastewater treatment plant applied this system for 6 months are as follows: The effluent TP remained stable between 0.2-0.4 mg / L, achieving a compliance rate of 99.8%, with no instances of instantaneous exceedances. PAC consumption per unit was reduced to 0.083 kg / m³, a decrease of 31% in consumption; The production of excess sludge decreased by 16%, and the cost of sludge disposal decreased significantly. The annual savings in pharmaceutical costs are approximately 420,000 yuan, and the system's investment payback period is 1.8 years. The workload of manual adjustment has been reduced by 90%, achieving unattended operation.

[0032] In summary, the intelligent phosphorus removal agent dosing control system and method for wastewater treatment plants based on artificial intelligence effectively solves the core problems of slow response and insufficient control precision in traditional phosphorus removal agent dosing systems. It can accurately match the agent requirements under different water quality and quantity conditions, avoid agent waste caused by overdosing, and reduce the amount of inorganic sludge generated during chemical phosphorus removal. Under the premise of ensuring stable effluent quality, it significantly reduces the operating cost of wastewater treatment plants. It can automatically adapt to seasonal changes, water quality fluctuations, and changes in process operation status, eliminating the need for frequent manual parameter adjustments by maintenance personnel, significantly reducing the intensity of manual maintenance, and enabling unattended operation. System deployment requires no modification to the main processes of the wastewater treatment plant, and it integrates a comprehensive safety protection mechanism, ensuring the safe and stable operation of the system under various abnormal conditions, making it highly practical and worthy of widespread adoption.

[0033] The embodiments of the present invention are given for illustrative and descriptive purposes only, and are not intended to be exhaustive or to limit the invention to the forms disclosed. Many modifications and variations will be apparent to those skilled in the art. The embodiments were chosen and described in order to better illustrate the principles and practical application of the invention, and to enable those skilled in the art to understand the invention and to design various embodiments with various modifications suitable for a particular purpose.

Claims

1. An intelligent phosphorus removal agent dosing control system for wastewater treatment plants based on artificial intelligence, characterized in that: The system adopts a four-layer integrated intelligent control architecture consisting of a perception layer, a control layer, a platform layer, and an application layer, including: The sensing layer includes an influent flow meter and an influent TP online monitoring instrument installed in the influent channel, an effluent TP online monitoring instrument installed in the secondary sedimentation tank effluent channel, and a pH meter, thermometer, ORP meter, and MLSS / DO online instrument installed in the biological treatment tank. These instruments are used to collect key operating parameters such as influent flow rate, influent TP concentration, effluent TP concentration, pH value, temperature, ORP value, MLSS, and DO in real time during the wastewater treatment process at a frequency of no less than once per minute. The control layer includes an edge computing gateway, a PLC main controller, an AI inference module, a dual closed-loop controller, a reinforcement learning optimizer, and an actuator. The edge computing gateway and the PLC main controller communicate bidirectionally via Ethernet. The AI ​​inference module is integrated into the edge computing gateway to achieve local millisecond-level real-time inference. The dual closed-loop controller integrates a feedforward controller and a PID feedback controller to achieve a fusion output of feedforward predictive regulation and feedback error correction. The reinforcement learning optimizer iteratively optimizes the system control parameters every 24 hours. The platform layer includes a data middle platform and a model training server. The data middle platform is used to store, clean, and manage historical operation data throughout the entire process. The model training server is used to iteratively update the LSTM prediction model and the reinforcement learning optimization model weekly based on the accumulated historical data, and then distribute the updated model to the edge computing gateway. The application layer includes a remote monitoring platform that supports access from PCs and mobile devices, an anomaly alarm module that supports audible and visual alarms and SMS push notifications, and a report analysis system that automatically generates daily, monthly, and yearly operational reports. The system also integrates an automatic / manual seamless switching module and a multi-level safety constraint protection mechanism. The automatic / manual seamless switching module is used to achieve smooth switching of control modes and no sudden changes in dosage. The multi-level safety constraint protection mechanism is used to ensure the safe and stable operation of the system under abnormal operating conditions.

2. A method for controlling the intelligent phosphorus removal agent dosing in a wastewater treatment plant based on artificial intelligence, comprising the intelligent phosphorus removal agent dosing control system for a wastewater treatment plant based on artificial intelligence as described in claim 1, characterized in that: Includes the following steps: S1: The sensing layer collects influent flow rate, influent TP concentration, pH value, temperature, effluent TP concentration, MLSS and DO parameters in real time at a frequency of 1 time / minute, and transmits the data to the edge computing gateway of the control layer via RS485 bus or Modbus TCP protocol. S2: The edge computing gateway uses a moving average filtering algorithm to reduce noise in the original data, removes outliers using the 3σ criterion, and standardizes all parameters to the [0,1] range to obtain standardized operating data; S3: The AI ​​inference module calls the trained LSTM time series prediction model, using standardized time series data from the past 24 hours as input, to predict the influent phosphorus load minute by minute for the next 15-30 minutes; S4: The AI ​​inference module calls a multi-parameter coupled calculation model to dynamically calculate the optimal phosphorus removal molar ratio that matches the current water quality based on real-time pH value, temperature and wastewater alkalinity. S5: The feedforward controller calculates the basic feedforward dosage based on the predicted influent phosphorus load obtained in step S3 and the dynamic phosphorus removal molar ratio obtained in step S4, combined with the reagent purity conversion factor. S6: The feedback controller acquires the deviation between the measured value of effluent TP and the preset standard value in real time, and calculates the feedback correction amount through the PID algorithm. The proportional, integral and derivative parameters of the PID controller are dynamically adjusted by the reinforcement learning optimizer. S7: The dual closed-loop controller linearly superimposes the feedforward basic injection amount and the feedback correction amount to obtain the initial injection amount. After passing the preset upper and lower limit safety amplitude constraints of the injection amount, it outputs the final injection amount control signal to the actuator. S8: The reinforcement learning optimizer aims to achieve the highest TP compliance rate and the lowest reagent consumption. It calculates reward values ​​based on daily operating data, continuously iterates and optimizes the LSTM prediction model weights, dynamic molar ratio calculation model coefficients, and PID control parameters, and synchronizes the optimized parameters to the edge computing gateway.

3. The intelligent phosphorus removal agent dosing control method for wastewater treatment plants based on artificial intelligence according to claim 2, characterized in that: The LSTM time series prediction model in step S3 adopts a 3-layer network structure. The number of neurons in the input layer is 6, corresponding to the 6 input parameters: influent flow rate, influent TP concentration, pH value, temperature, MLSS, and DO. The number of neurons in the hidden layer is 32, and the number of neurons in the output layer is 1. The length of the input sequence is 1440 time points, corresponding to the historical data of the past 24 hours.

4. The intelligent phosphorus removal agent dosing control method for wastewater treatment plants based on artificial intelligence according to claim 2, characterized in that: In step S4, when using iron salt dephosphorizing agent, the optimal dynamic range of Fe / P molar ratio is 1.2-2.8; when using aluminum salt dephosphorizing agent, the optimal dynamic range of Al / P molar ratio is 1.5-3.5; when the pH value is in the range of 6.5-7.5, the molar ratio is taken at the lower limit of the corresponding range; when the pH value is lower than 6.5 or higher than 8.0, the molar ratio is automatically increased by 10%-20%; when the water temperature is lower than 15℃, the molar ratio shows a linear upward trend as the temperature decreases.

5. The intelligent phosphorus removal agent dosing control method for wastewater treatment plants based on artificial intelligence according to claim 2, characterized in that: The formula for calculating the feedforward base injection amount in step S5 is as follows: in, This is the feedforward base injection amount; This is a conversion factor for reagent purity, determined based on the effective content of the phosphorus removal agent; To predict the inflow rate; To predict the influent TP concentration; The optimal phosphorus removal molar ratio is dynamically determined. The formula for calculating the feedback correction amount in step S6 is: in, This is the amount of feedback correction; The deviation between the measured value and the set value of effluent TP; , , These are the proportional coefficient, integral coefficient, and derivative coefficient of the PID controller, respectively.

6. The intelligent phosphorus removal agent dosing control method for wastewater treatment plants based on artificial intelligence according to claim 2, characterized in that: The reward function of the reinforcement learning optimizer in step S8 is: in, The TP compliance rate of the outflow on that day; This represents the total actual consumption of medicines on that day. The baseline drug consumption for the day is calculated using a fixed-ratio dosing method; the reinforcement learning optimizer iterates its parameters every 24 hours, with each iteration using complete running data from the past 7 days.

7. The intelligent phosphorus removal agent dosing control system for wastewater treatment plants based on artificial intelligence according to claim 1, characterized in that: The measurement accuracy of the sensing layer instruments meets the following requirements: the measurement accuracy of the influent and effluent TP online monitoring instrument is ≤ ±0.01 mg / L, the measurement accuracy of the electromagnetic flow meter is ≤ ±0.5%FS, the measurement accuracy of the pH meter is ≤ ±0.01pH, and the measurement accuracy of the thermometer is ≤ ±0.1℃; the data transmission delay between all instruments and the edge computing gateway is ≤100ms.

8. The intelligent phosphorus removal agent dosing control system for wastewater treatment plants based on artificial intelligence according to claim 1, characterized in that: The actuators of the control layer include a variable frequency metering pump set, an electric regulating valve, and a pipeline agitator; the flow rate adjustment range of the variable frequency metering pump set is 0-100% of the rated flow rate, and the control accuracy is ≤±1%; the adjustment accuracy of the electric regulating valve is ≤±0.5%FS, and the response time is ≤2s; the rotation speed of the pipeline agitator is automatically adjusted according to the final dosage, and the rotation speed range is 100-500r / min to ensure that the agent and sewage are fully mixed within 30s.

9. The intelligent phosphorus removal agent dosing control system for wastewater treatment plants based on artificial intelligence according to claim 1, characterized in that: When switching control modes, the automatic / manual seamless switching module keeps the current dosage unchanged, and then gradually adjusts to the target dosage after the mode switch is completed. The multi-level safety constraint protection mechanism includes: hard constraints on upper and lower limits of dosage to prevent the dosage from exceeding the allowable range of the process; an emergency mode for instrument failure, which automatically switches to a proportional dosing mode based on the influent flow rate when a critical instrument fails; and a drug shortage alarm and shutdown protection, which triggers an audible and visual alarm and sends a text message to the operation and maintenance personnel when the liquid level in the drug storage tank is lower than the threshold, and automatically shuts down the dosing system when the liquid level is lower than the minimum safety value.