Multi-agent collaborative adding optimization method and system for sewage plant
By optimizing the synergistic addition of multiple agents, the problem of synergistic optimization of carbon source and phosphorus removal agent addition was solved, which improved the efficiency of biological phosphorus removal and reduced the consumption of agents, thus achieving the effect of energy saving, consumption reduction and carbon reduction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SICHUAN DEV GUORUN WATER INVESTMENT CO LTD
- Filing Date
- 2025-12-22
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies lack synergistic optimization between carbon source and phosphorus removal agent addition, lack real-time correction of addition effect, and do not consider carbon footprint cost, resulting in low biological phosphorus removal efficiency, increased agent dosage, and increased carbon emissions.
By collecting multi-source water quality data, predicting the demand for carbon sources and phosphorus removal agents, making collaborative decisions with multiple agents, correcting fuzzy assessments, and implementing distributed dosing, a collaborative dosing decision-making mechanism for carbon sources and phosphorus removal agents is established. The dosing amount is evaluated and dynamically corrected in real time and incorporated into the carbon footprint cost optimization objective.
It improves the efficiency of biological phosphorus removal, reduces chemical consumption and carbon emissions, achieves cost savings in chemicals and a reduction in carbon emissions, and ensures that the effluent meets standards.
Smart Images

Figure CN122021996A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent control technology for wastewater treatment, specifically relating to an optimized method and system for the coordinated dosing of multiple agents in wastewater treatment plants. Background Technology
[0002] Urban wastewater treatment facilities are one of the essential infrastructures of modern cities. With the acceleration of urbanization, the volume of domestic wastewater discharge has increased significantly, posing a severe challenge to the efficient, low-cost, and compliant treatment of urban domestic wastewater. The A2 / O process is the most widely used in urban domestic wastewater treatment. This process utilizes the nitrification and denitrification processes of microorganisms in the activated sludge process to degrade harmful substances in wastewater. Due to the generally low-carbon and high-nitrogen-phosphorus characteristics of domestic wastewater, wastewater treatment plants have to supplement certain carbon sources and phosphorus removal agents to ensure that effluent meets standards under increasingly stringent discharge requirements.
[0003] Chinese patent CN120802857A discloses a control system for a wastewater treatment plant. This system includes a multimodal biosensor module, a cloud-edge collaborative data processing module, and an adaptive decoupling controller. The cloud-edge collaborative data processing module comprises an edge computing module and a cloud optimization platform. The cloud optimization platform runs a multi-objective dynamic optimization module and a digital twin model. This prior art's multi-objective dynamic optimization module simultaneously optimizes the effluent quality to meet standards, minimize energy consumption, and reduce chemical reagent usage based on pre-treated data, employing the NSGA-III algorithm for optimization calculations.
[0004] However, the aforementioned existing technologies have the following technical problems: First, these technologies primarily focus on the optimized dosing of a single agent (carbon source), without fully considering the synergistic relationship between the carbon source and the phosphorus removal agent. In actual wastewater treatment processes, the addition of a carbon source can affect the efficiency of biological phosphorus removal because polyphosphate-accumulating bacteria require volatile fatty acids as a carbon source for anaerobic phosphorus release. Improper timing and dosage of the added carbon source can lead to its competitive consumption by other microorganisms, thereby reducing biological phosphorus removal efficiency and increasing the dosage of chemical phosphorus removal agents. Second, the optimization decision-making of this technology lacks a real-time assessment and dynamic correction mechanism for the dosing effect. When the influent water quality fluctuates significantly, relying solely on predictive models is insufficient to guarantee the accuracy of the dosage. Furthermore, this technology does not consider the indirect carbon emissions from agent dosing, and under the current dual-carbon target context, it lacks the ability to incorporate carbon footprint into the optimization objectives. Summary of the Invention
[0005] The purpose of this invention is to provide an optimized method and system for the synergistic dosing of multiple agents in wastewater treatment plants, in order to solve the technical problems in the prior art, such as the lack of synergistic optimization of carbon source and phosphorus removal agent dosing, the lack of real-time correction of dosing effect, and the failure to consider carbon footprint costs.
[0006] To achieve the above objectives, this invention provides an optimization method for the synergistic dosing of multiple agents in a wastewater treatment plant, comprising: a multi-source water quality data acquisition step, which acquires water quality monitoring data from each process node of the wastewater treatment process, performs data cleaning and normalization preprocessing on the acquired water quality monitoring data, and generates a standardized water quality characteristic sequence; a carbon source demand prediction step, which inputs the standardized water quality characteristic sequence into a pre-trained carbon source dosage prediction model, and outputs a predicted carbon source dosage value under the current operating conditions based on the influent total nitrogen concentration, influent chemical oxygen demand, carbon-nitrogen ratio, and hydraulic retention time; and a phosphorus removal agent demand prediction step, which inputs the standardized water quality characteristic sequence into a pre-trained phosphorus removal agent dosage prediction model, and outputs a predicted carbon source dosage value under the current operating conditions based on the influent total phosphorus concentration, phosphate concentration, and other parameters. The system outputs the predicted dosage of phosphorus removal agent under the current operating conditions, along with the target total phosphorus value in the effluent. The multi-agent collaborative decision-making step receives the predicted carbon source dosage and phosphorus removal agent dosage, constructs multi-agent collaborative constraints based on the influence of carbon source dosage on biological phosphorus removal efficiency, and generates a collaborative dosage strategy by solving a multi-objective optimization problem. The fuzzy evaluation and correction step assesses the rationality of the collaborative dosage strategy using a fuzzy comprehensive evaluation method based on the deviation between recent actual and expected effects, and generates a dosage correction coefficient based on the evaluation results. The distributed dosage execution step determines the allocation ratio and timing of the corrected dosage instructions at each dosing point based on the process location and hydraulic residence time of each dosing point.
[0007] Preferably, in the carbon source demand prediction step, carbon source addition is triggered when the influent carbon-nitrogen ratio is lower than a preset carbon-nitrogen ratio threshold, and the carbon source addition prediction model is a long short-term memory network model with an integrated attention mechanism.
[0008] Preferably, the multi-objective optimization problem also includes a carbon footprint cost term, which is calculated based on the product of the carbon emission intensity of the carbon source agent and the amount of phosphorus removal agent added.
[0009] Preferably, when the evaluation result of the fuzzy evaluation correction step is within an unreasonable range for a preset number of consecutive times, the incremental learning process of the prediction model is triggered.
[0010] The present invention also provides a multi-agent synergistic dosing optimization system for wastewater treatment plants, including a multi-source water quality data acquisition module, a carbon source demand prediction module, a phosphorus removal agent demand prediction module, a multi-agent synergistic decision-making module, a fuzzy evaluation correction module, and a distributed dosing execution module. The functions of each module correspond to the steps of the above-mentioned method.
[0011] The beneficial effects of this invention are as follows: by establishing a synergistic dosing decision mechanism for carbon sources and phosphorus removal agents, the impact of carbon source dosing on biological phosphorus removal efficiency is fully considered, the mutual interference between the two agents is avoided, and the overall nitrogen and phosphorus removal efficiency is improved; by introducing a fuzzy comprehensive evaluation method to evaluate and dynamically correct the dosing strategy in real time, the accuracy and robustness of dosing control are improved; by incorporating carbon footprint cost into the optimization objective, the synergistic optimization of agent cost and carbon emissions is achieved, providing technical support for wastewater treatment plants to achieve multiple objectives of energy conservation, cost reduction, and carbon reduction. Attached Figure Description
[0012] Figure 1 This is a flowchart of the optimized method for synergistic dosing of multiple agents in wastewater treatment plants according to the present invention.
[0013] Figure 2 This is an architecture diagram of the wastewater treatment plant multi-agent synergistic dosing optimization system of the present invention. Detailed Implementation
[0014] Please refer to the attached document. Figures 1-2 The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Those skilled in the art should understand that the following embodiments are for illustrative purposes only and should not be considered as limiting the scope of protection of the present invention.
[0015] The optimized method for synergistic dosing of multiple agents in wastewater treatment plants provided by this invention has the following overall technical solution: Figure 1 As shown, the process includes steps such as multi-source water quality data acquisition, carbon source demand prediction, phosphorus removal agent demand prediction, multi-agent collaborative decision-making, fuzzy evaluation and correction, and distributed dosing execution. Each step is described in detail below.
[0016] Step S1: Multi-source water quality data acquisition steps The purpose of the multi-source water quality data acquisition step is to obtain water quality monitoring data from each process node of wastewater treatment and to preprocess the acquired data to generate standardized feature sequences that can be used for subsequent prediction. In one embodiment of the present invention, the multi-source water quality data acquisition step specifically includes the following processing steps.
[0017] During the data acquisition phase, water quality parameters are collected using online monitoring instruments deployed at various process nodes of the wastewater treatment plant. Influent water quality monitoring parameters include total nitrogen (TN), ammonia nitrogen (NH3-N), total phosphorus (TP), chemical oxygen demand (COD), biochemical oxygen demand (BOD5), and pH. Effluent water quality monitoring parameters include total nitrogen (TN), total phosphorus (TP), COD, and phosphate (PO4-P). Intermediate process point monitoring parameters include nitrate nitrogen (NO3-N) concentration, pH, and suspended solids (SS) concentration in the deep denitrification filter. Preferably, the data acquisition cycle is set to once every 5 minutes to ensure timely capture of dynamic changes in water quality.
[0018] During the data cleaning phase, outlier detection and processing are performed on the collected raw data. Specifically, an interquartile range (ICM)-based method is used to identify outliers. When the instantaneous value of a monitoring parameter deviates from its median over the past 24 hours by more than three times the ICM, the data point is marked as an outlier. For the marked outliers, linear interpolation is used to fill in the gaps, i.e., the linear interpolation value between the two normal data points before and after the outlier is taken as the replacement value. In addition, the continuity of the data needs to be checked. When a monitoring parameter is missing for more than 30 consecutive minutes, the system issues an alarm to prompt manual intervention.
[0019] In the normalization preprocessing stage, the cleaned water quality parameters are mapped to a uniform numerical range. In this embodiment, the min-max normalization method is used to map each parameter value to the interval between 0 and 1. The normalization calculation formula is as follows: , in, These are the normalized parameter values. These are the original parameter values. and These represent the minimum and maximum values of the parameter in the training dataset, respectively. The normalized reference ranges for each water quality parameter are set as follows: the normalized range for influent TN is 10 to 80 mg / L, the normalized range for influent TP is 1 to 15 mg / L, the normalized range for influent COD is 100 to 500 mg / L, the normalized range for influent NH3-N is 5 to 60 mg / L, and the normalized range for influent pH is 6.0 to 9.0.
[0020] In the feature sequence construction stage, the normalized water quality parameters are organized into a time-series feature sequence in chronological order. In this embodiment, the time window length of the feature sequence is set to 72 sampling points, i.e., 6 hours of historical data. Each sampling point contains 6 water quality parameters, so the dimension of the feature sequence is 72×6. The selection of this time window length is based on the following criteria: on the one hand, it needs to be long enough to capture the daily variation pattern of water quality; on the other hand, the sequence length needs to be controlled to reduce the computational complexity of the prediction model.
[0021] Step S2: Carbon Source Demand Forecasting Step The purpose of the carbon source demand prediction step is to predict the amount of carbon source required under the current operating conditions based on the current water quality characteristic sequence. In this invention, the preferred carbon source is sodium acetate, with a BOD5 equivalent of 0.52 mg BOD / mg sodium acetate and a COD equivalent of 0.78 mg COD / mg sodium acetate.
[0022] In the carbon source addition trigger condition judgment stage, the first step is to determine whether the current operating conditions require the addition of a carbon source. In this embodiment, carbon source addition is triggered when the influent BOD5 / TN ratio is lower than a preset carbon-nitrogen ratio threshold. Preferably, the carbon-nitrogen ratio threshold is set to 4, meaning that when the BOD5 / TN ratio is lower than 4, an external carbon source needs to be added to maintain the normal operation of the denitrification process. The basis for selecting this threshold is that during the denitrification process, approximately 4g of BOD5 is theoretically required to remove 1g of nitrate nitrogen. Therefore, when the influent carbon-nitrogen ratio is lower than 4, the carbon source in the raw water is insufficient to support complete denitrification.
[0023] In the carbon source dosage prediction model structure design stage, this invention adopts a lightweight long short-term memory network (Attention-LSTM) with integrated attention mechanism as the prediction model. The input layer of this model receives a standardized water quality feature sequence with a dimension of 72×6; the feature extraction layer adopts a two-layer LSTM structure, with the first LSTM containing 64 hidden units and the second LSTM containing 32 hidden units. Dropout regularization is used between the two layers to prevent overfitting, and the dropout rate is set to 0.2; the attention layer adopts a self-attention mechanism to weight the hidden states of the LSTM at each time step, enabling the model to automatically focus on the most critical time point for dosage prediction; the output layer is a fully connected layer with an output dimension of 1, i.e., the predicted carbon source dosage.
[0024] The calculation process for attention weights is as follows. Let the hidden state sequence of the last layer of the LSTM be... ,in Let be the number of time steps. First, a fully connected layer maps the hidden states at each time step to the attention score space: , in, Here is the attention weight matrix. For bias vectors, For the first Attention scores at each time step are calculated. Then, the attention scores are normalized to weights using the Softmax function. , in, For the first Attention weights are assigned at each time step. Finally, these attention weights are applied to the hidden state sequence to obtain a weighted feature vector: , The weighted eigenvector A fully connected network from the input to the output layer is used to obtain the predicted value of carbon source addition.
[0025] In the preliminary calculation stage of carbon source dosage, in addition to using the LSTM model for prediction, this invention also performs theoretical calculations of carbon source dosage based on the denitrification principle, serving as a reference and verification for the model predictions. The theoretical calculation formula is as follows: , in, The dosage of sodium acetate, the carbon source, is expressed in kg / d. This refers to the influent flow rate, expressed in meters (m³). 3 / d; This refers to the total nitrogen concentration in the influent, expressed in mg / L. The target concentration of total nitrogen in the effluent is expressed in mg / L. The target carbon-to-nitrogen ratio ranges from 4 to 6. The actual carbon-to-nitrogen ratio of the influent is given; 0.78 is the COD equivalent coefficient of sodium acetate.
[0026] During the model training phase, historical running data was used to train the LSTM prediction model. The training dataset contained running data from the past year, divided into training, validation, and test sets in an 8:1:1 ratio. The Adam optimizer was used during training, with an initial learning rate of 0.001, a batch size of 32, and a maximum number of iterations of 100. The mean squared error (MSE) loss function was used, and an early stopping mechanism was triggered to prevent overfitting when the validation set loss no longer decreased for 10 consecutive iterations.
[0027] Step S3: Demand Forecasting Step for Phosphorus Removal Agents The purpose of the phosphorus removal agent demand forecasting step is to predict the amount of phosphorus removal agent required under current operating conditions. In this invention, the phosphorus removal agent is preferably polyaluminum chloride (PAC) or polyferric sulfate (PFS).
[0028] In the phosphorus removal agent dosing trigger condition judgment stage, phosphorus removal agent dosing is triggered when the effluent phosphate concentration exceeds the preset phosphate concentration threshold. Preferably, the phosphate concentration threshold is set to 0.3 mg / L, which is lower than the total phosphorus limit of 0.5 mg / L in the national Class A discharge standard, leaving a certain safety margin to ensure that the effluent consistently meets the standards.
[0029] In the design phase of the phosphorus removal agent dosage prediction model, the phosphorus removal agent dosage prediction model and the carbon source dosage prediction model of this invention adopt a shared feature extraction layer design. Specifically, the two models share the same two-layer LSTM structure for feature extraction, and then obtain the dosage prediction value through their respective attention layers and output layers. This shared feature extraction layer design has the following advantages: on the one hand, it can make full use of the correlation information between carbon source and phosphorus removal agent dosage, improving prediction accuracy; on the other hand, it can reduce the number of model parameters, reducing computational overhead and the risk of overfitting.
[0030] In the preliminary calculation stage of phosphorus removal agent dosage, theoretical calculations are performed based on the principle of chemical precipitation. Taking polyaluminum chloride as an example, the theoretical calculation formula is as follows: , in, The dosage of phosphorus removal agent is expressed in kg / d. This refers to the influent flow rate, expressed in meters (m³). 3 / d; This refers to the total phosphorus concentration in the influent, expressed in mg / L. The target concentration of total phosphorus in the effluent is expressed in mg / L. This is an excess factor, ranging from 1.5 to 2.5, used to compensate for losses in the actual reaction; The relative atomic mass of aluminum is 27. The relative atomic mass of phosphorus is 31.
[0031] Step S4: Multi-drug collaborative decision-making step The purpose of the multi-agent collaborative decision-making step is to comprehensively consider the dosage requirements of carbon sources and phosphorus removal agents to generate a collaboratively optimized dosage strategy. This step is one of the core innovations of this invention, and its key lies in constructing a collaborative constraint relationship between carbon source and phosphorus removal agent dosage and establishing a multi-objective optimization model.
[0032] In the stage of constructing synergistic constraints, this invention constructs the following synergistic constraints based on the mechanism of carbon source addition on biological phosphorus removal efficiency.
[0033] Carbon source dosage limit constraint: The amount of carbon source added must not exceed the upper limit of carbon source requirements for the denitrification process; otherwise, excess carbon source will lead to excessive COD in the effluent. This constraint is expressed as: , in, The allowable increase in effluent COD is preferably set at 10 mg / L.
[0034] Maximum dosage constraint for phosphorus removal agent: The dosage of phosphorus removal agent must not exceed the maximum efficiency point of chemical phosphorus removal. Excessive dosage not only wastes the agent but also increases sludge production. This constraint is expressed as follows: , in, Determined based on the optimal phosphorus removal efficiency point from historical data.
[0035] Carbon source-phosphorus removal synergistic constraint: When the carbon source dosage increases, the phosphorus removal agent dosage needs to be adjusted accordingly to compensate for changes in biological phosphorus removal efficiency. This invention uses historical data fitting to obtain the relationship between carbon source dosage and biological phosphorus removal efficiency: , in, For biological phosphorus removal efficiency; Based on the baseline biological phosphorus removal efficiency; The coefficient representing the impact of carbon source dosage on biological phosphorus removal efficiency was obtained through regression analysis of historical data. This serves as the baseline carbon source dosage. Based on this relationship, when an increase in the carbon source dosage leads to a decrease in biological phosphorus removal efficiency, the dosage of chemical phosphorus removal agent needs to be increased to compensate.
[0036] In the multi-objective optimization model construction stage, this invention constructs the following multi-objective optimization model: , in, Let the objective function be the total cost of the drug. The objective function for the risk of effluent exceeding standards is... The objective function is the carbon footprint cost.
[0037] Total cost objective function of the drug Defined as: , in, The unit price of carbon source is yuan / kg; The price is the unit price of the phosphorus removal agent, expressed in yuan / kg.
[0038] Objective function for risk of excessive effluent Defined as: , in, and These are the predicted total nitrogen and total phosphorus concentrations in the effluent, respectively. and These are the emission limits for total nitrogen and total phosphorus, respectively. and These are the penalty weights for exceeding the limits for total nitrogen and total phosphorus, respectively.
[0039] Carbon footprint cost objective function Defined as: , in, The carbon emission intensity of the production of carbon source reagents is expressed in kgCO2 / kg reagents. The carbon emission intensity of phosphorus removal agent production is expressed in kgCO2 / kg of agent. Preferably, the carbon emission intensity of sodium acetate production is 2.5 kgCO2 / kg, and the carbon emission intensity of polyaluminum chloride production is 1.8 kgCO2 / kg.
[0040] In the multi-objective optimization solution stage, this invention uses a weighted summation method to transform the multi-objective optimization problem into a single-objective optimization problem: , in, , , These are the weight coefficients of the three objective functions, satisfying... Preferably, The value is 0.4. The value is 0.4. The value is set to 0.2 to achieve a balance between the three objectives of cost, compliance, and carbon reduction. The sequential quadratic programming (SQP) algorithm is used to solve this optimization problem to obtain the optimal combination of carbon source dosage and phosphorus removal agent dosage as a synergistic dosage strategy.
[0041] Step S5: Fuzzy Evaluation Correction Step The purpose of the fuzzy evaluation and correction step is to evaluate the coordinated dosing strategy in real time and dynamically adjust the dosing amount based on the evaluation results. This step is another core innovation that distinguishes this invention from existing technologies. The fuzzy evaluation and correction model includes the construction of a multi-level evaluation index system, the construction of a fuzzy relation matrix, the determination of index weights, fuzzy synthesis operations, and defuzzification.
[0042] In the construction phase of the multi-level evaluation index system, this invention establishes a three-level evaluation system comprising a target layer, a criterion layer, and an index layer. The target layer evaluates the rationality of the dosage; the criterion layer includes three primary indicators: the degree of fluctuation in influent water quality, the magnitude of prediction deviation, and the effluent compliance margin; the index layer includes seven secondary indicators: influent TN change rate, influent TP change rate, carbon source dosage prediction deviation, phosphorus removal agent dosage prediction deviation, effluent TN compliance margin, effluent TP compliance margin, and COD increment margin.
[0043] In the fuzzy evaluation set definition stage, the evaluation level is defined as five levels: very reasonable, reasonably reasonable, average, reasonably unreasonable, and very unreasonable. The corresponding fuzzy evaluation set is V={v1, v2, v3, v4, v5}, and its numerical value is V={1.0, 0.8, 0.6, 0.4, 0.2}.
[0044] In the membership function construction stage, a trapezoidal membership function is used to determine the membership degree of each secondary indicator to each evaluation level. Taking the effluent TN compliance margin as an example, its membership function is defined as follows: when the compliance margin is greater than 30%, the membership degree for "very reasonable" is 1; when the compliance margin is between 20% and 30%, the membership degree for "very reasonable" decreases linearly; when the compliance margin is between 10% and 20%, the membership degree for "relatively reasonable" is the largest; and so on.
[0045] In the indicator weight determination stage, the Analytic Hierarchy Process (AHP) is used to determine the weight of each evaluation indicator. First, a pairwise comparison matrix of the criteria-level indicators is constructed based on expert experience, and the weight of each criterion is calculated. Then, a pairwise comparison matrix is constructed for the secondary indicators under each criterion, and the weight of the secondary indicators is calculated. Finally, a consistency check is performed to ensure the logical consistency of the judgment matrix. Preferably, the criterion-level weight allocation is as follows: influent water quality fluctuation degree 0.3, prediction deviation amplitude 0.4, and effluent compliance margin 0.3.
[0046] In the fuzzy synthesis operation stage, a weighted average synthesis operator is used for fuzzy synthesis. Let the index layer weight vector be A, and the fuzzy relation matrix be R, then the fuzzy comprehensive evaluation result is: , in, This represents a fuzzy composition operation. This is a vector representing the comprehensive evaluation results. Indicates the first Membership degree of each evaluation level.
[0047] In the defuzzification stage, a weighted average method is used to transform the fuzzy evaluation results into deterministic evaluation scores: , in, The score is used for comprehensive evaluation, with a range of 0.2 to 1.0. A higher score indicates a more reasonable investment strategy.
[0048] In the stage of determining the dosage correction factor, the dosage correction factor is determined based on the comprehensive evaluation score. Correction factor With evaluation score The relationship is defined as follows: , When the evaluation score is low, the correction coefficient is greater than 1, indicating that the dosage needs to be increased; the correction coefficient is applied to the coordinated dosage strategy to generate the corrected dosage instruction.
[0049] During the model relearning trigger phase, when the comprehensive evaluation score is below the threshold (preferably 0.5) for N consecutive times (preferably N=5), it indicates that the accuracy of the prediction model can no longer meet the requirements of the current operating conditions, triggering the incremental learning process of the carbon source dosage prediction model and the phosphorus removal agent dosage prediction model. Incremental learning uses recent operating data to fine-tune the model, with the learning rate set to one-tenth of the initial training rate to maintain the model's memory of historical knowledge.
[0050] Step S6: Distributed application execution steps The purpose of the distributed dosing execution step is to distribute the revised dosing instructions to each dosing point and determine the appropriate dosing sequence. This step fully considers the actual process layout and hydraulic characteristics of the wastewater treatment plant.
[0051] In the dosing point configuration stage, the dosing points of this invention are configured as follows: Carbon source dosing points include: aerobic tanks 1 to 4 and a deep denitrification filter, with a total of 5 dosing pipelines, each capable of independent opening and closing. Phosphorus removal agent dosing points include: anoxic tanks 1 to 4 and a secondary booster pump station, with a total of 5 dosing pipelines, each capable of independent opening and closing. Each dosing point is equipped with a digital metering pump, flow meter, and solenoid valve to achieve precise dosing control.
[0052] In the stage of determining the allocation ratio of the dosing points, this invention proposes two allocation methods: the fixed ratio method and the intelligent allocation method.
[0053] The fixed-ratio method is suitable for operating conditions where the influent water quality is relatively stable. The allocation ratio at each dosing point is preset according to the process design parameters. For carbon source dosing, the preferred allocation ratio is: 80% to 90% in the anoxic zone and 10% to 20% in the anaerobic zone; for phosphorus removal agent dosing, the preferred allocation ratio is: 70% to 80% in the anoxic tank and 20% to 30% in the secondary lift pump station tank.
[0054] The intelligent allocation method is suitable for operating conditions with significant fluctuations in influent water quality. The allocation ratio at each dosing point is dynamically adjusted based on current water quality characteristics and historical optimal ratios. Specifically, a relationship model between the dosing point allocation ratio and effluent water quality is established based on historical data, and the optimal allocation ratio for each dosing point is predicted based on the current influent water quality. The adjustment cycle for the allocation ratio is set to once every 4 hours to balance control precision and system stability.
[0055] In the dosing sequence determination stage, the dosing execution time corresponding to the current water intake is determined based on the hydraulic residence time between each dosing point and the inlet. Let the water intake time be... The hydraulic residence time of a certain dosing point from the inlet is Then the timing of the application at that application point is This dosing sequence control based on hydraulic retention time ensures that the added reagents can converge with the corresponding influent in the target process tank, avoiding a decrease in dosing effectiveness due to misalignment. In this embodiment, the hydraulic retention time in the anaerobic zone is approximately 2 hours, in the anoxic zone it is approximately 4 hours, and in the aerobic zone it is approximately 6 hours.
[0056] During the dosing instruction execution phase, the distributed dosing execution module encapsulates the calculated dosing amount and dosing time at each dosing point into control instructions, which are then sent to the PLC controller at each dosing point via industrial Ethernet. Based on the received instructions, the PLC controller controls the output flow of the digital metering pump and the opening and closing status of the solenoid valve to achieve precise reagent dosing. Simultaneously, the flow meters at each dosing point collect the actual dosing flow in real time and feed it back to the upper-level monitoring system for tracking and evaluating the dosing effect.
[0057] This invention also provides an optimized system for the synergistic dosing of multiple chemicals in a wastewater treatment plant, such as... Figure 2 As shown, the system includes a multi-source water quality data acquisition module 1, a carbon source demand prediction module 2, a phosphorus removal agent demand prediction module 3, a multi-agent collaborative decision-making module 4, a fuzzy evaluation and correction module 5, and a distributed dosing execution module 6. Each module is described below.
[0058] The multi-source water quality data acquisition module 1 communicates with the online monitoring instruments at each process node to acquire influent water quality parameters, effluent water quality parameters, and intermediate process point water quality parameters. This module includes a built-in data cleaning unit and a normalization preprocessing unit to remove outliers and normalize the acquired raw data, generating a standardized water quality characteristic sequence, which is then output to the carbon source demand prediction module 2 and the phosphorus removal agent demand prediction module 3. The specific data cleaning and normalization processes are consistent with step S1 in the method embodiment.
[0059] The carbon source demand prediction module 2 receives the standardized water quality feature sequence output by the multi-source water quality data acquisition module 1, runs a pre-trained carbon source dosage prediction model, and outputs the predicted carbon source dosage value. This module includes a trigger condition judgment unit, an Attention-LSTM prediction unit, and a theoretical calculation verification unit. The trigger condition judgment unit determines whether carbon source dosage prediction is needed based on the comparison between the influent carbon-nitrogen ratio and a preset threshold. The Attention-LSTM prediction unit runs a lightweight long short-term memory network model with an integrated attention mechanism and outputs the predicted carbon source dosage value. The theoretical calculation verification unit performs theoretical calculations of the carbon source dosage based on the denitrification principle; when the deviation between the predicted value and the theoretical value exceeds a preset range, an alarm signal is output. The model structure and calculation formula are consistent with step S2 in the method embodiment.
[0060] The phosphorus removal agent demand prediction module 3 receives the standardized water quality feature sequence output by the multi-source water quality data acquisition module 1, runs a pre-trained phosphorus removal agent dosage prediction model, and outputs the predicted phosphorus removal agent dosage value. This module shares a feature extraction layer with the carbon source demand prediction module 2, and includes independent phosphorus removal agent attention units and phosphorus removal agent output units. The shared feature extraction layer design allows the prediction of carbon sources and phosphorus removal agents to utilize the same water quality feature representation, improving the consistency of predictions. The specific processing procedure is consistent with step S3 in the method embodiment.
[0061] The multi-agent collaborative decision-making module 4 receives the predicted carbon source dosage from the carbon source demand prediction module 2 and the predicted phosphorus removal agent dosage from the phosphorus removal agent demand prediction module 3. It then constructs multi-agent collaborative constraints and a multi-objective optimization model, generating a collaborative dosage strategy by solving the optimization problem. This module includes a constraint construction unit, an objective function calculation unit, and an optimization solution unit. The constraint construction unit constructs upper limits for carbon source dosage, phosphorus removal agent dosage, and carbon source-phosphorus removal collaborative constraints based on the impact of carbon source dosage on biological phosphorus removal efficiency. The objective function calculation unit calculates three objective function values: total reagent cost, risk of effluent exceeding standards, and carbon footprint cost. The optimization solution unit uses a sequential quadratic programming algorithm to solve the weighted multi-objective optimization problem and outputs the optimal collaborative dosage strategy. The specific constraints and objective functions are consistent with those described in step S4 of the method embodiment.
[0062] The fuzzy evaluation and correction module 5 receives the collaborative dosing strategy output by the multi-agent collaborative decision-making module 4, combines it with feedback from actual dosing effects, and uses a fuzzy comprehensive evaluation method to assess the rationality of the dosing strategy, outputting a corrected dosing instruction. This module includes an evaluation index calculation unit, a membership function calculation unit, a fuzzy synthesis operation unit, and a correction coefficient determination unit. When the evaluation results are repeatedly in the unreasonable range, this module will also trigger the incremental learning process of the carbon source demand prediction module 2 and the phosphorus removal agent demand prediction module 3. The specific evaluation index, membership function, synthesis operation, and correction coefficient calculation are consistent with step S5 in the method embodiment.
[0063] The distributed dosing execution module 6 receives the corrected dosing command output by the fuzzy evaluation correction module 5. Based on the process location and hydraulic residence time of each dosing point, it determines the allocation ratio and dosing sequence for each dosing point and sends the allocated control commands to the actuators at each dosing point. This module includes a dosing point configuration unit, a ratio allocation unit, a timing determination unit, and a command sending unit. The dosing point configuration unit stores the process parameters and equipment information of each dosing point; the ratio allocation unit determines the allocation ratio of each dosing point according to a fixed ratio method or an intelligent allocation method; the timing determination unit calculates the dosing execution time of each dosing point based on the hydraulic residence time; and the command sending unit sends the control commands to the PLC controller of each dosing point via an industrial Ethernet network. The specific configuration and calculation methods are consistent with step S6 in the method embodiment.
[0064] In a preferred embodiment of the present invention, the above modules are deployed on a plant-level smart water management cloud platform, adopting a cloud-edge-device collaborative architecture. Specifically, the multi-source water quality data acquisition module 1 is deployed on an edge computing node, responsible for real-time data acquisition and preprocessing; the carbon source demand prediction module 2, the phosphorus removal agent demand prediction module 3, the multi-agent collaborative decision-making module 4, and the fuzzy evaluation correction module 5 are deployed on a cloud server, utilizing cloud computing resources for complex model reasoning and optimization solutions; the distributed dosing execution module 6 has its proportional allocation and timing determination functions deployed in the cloud, while its command sending function is deployed on edge nodes, ensuring the real-time nature of control commands.
[0065] In a preferred embodiment of the present invention, the hardware implementation of the multi-source water quality data acquisition module includes the following components.
[0066] The influent water quality online monitoring instrument group includes a total nitrogen analyzer, an ammonia nitrogen analyzer, a total phosphorus analyzer, a COD analyzer, and a pH meter. Each instrument is connected to the edge computing gateway via an RS-485 interface. The edge computing gateway uses an industrial-grade embedded computer, configured with an Intel Atom processor and 4GB of RAM, running a Linux operating system, and is responsible for data acquisition, preprocessing, and local caching. Communication between the gateway and the cloud server is via a 4G / 5G mobile network, using the MQTT protocol for data transmission. The data transmission cycle is set to once per minute to balance real-time performance and communication bandwidth.
[0067] Online monitoring instruments at intermediate process points include online nitrate nitrogen analyzers, pH meters, and suspended solids meters deployed in the deep denitrification filter. The monitoring data from these instruments is also collected and uploaded via an edge computing gateway, providing a basis for refined control of carbon source dosage.
[0068] An online water quality monitoring instrument group is deployed at the final outlet, including a total nitrogen analyzer, a total phosphorus analyzer, a COD analyzer, and a phosphate analyzer. The monitoring results are used for evaluation of the dosing effect and feedback control.
[0069] The control system at each dosing point adopts a distributed PLC architecture. Each dosing point is equipped with a Siemens S7-1200 series PLC, responsible for receiving dosing commands from the host computer and controlling the local metering pump and solenoid valve. The PLC communicates with the edge computing gateway via industrial Ethernet, exchanging data using the Modbus TCP protocol. The metering pump is an electromagnetic diaphragm metering pump with a flow range of 0 to 50 L / h and an accuracy better than ±1%. It receives flow control commands from the PLC via 4 to 20 mA analog signals or pulse signals.
[0070] The carbon source replenishment device of the present invention is specifically implemented as follows.
[0071] The sodium acetate replenishment system mainly consists of three parts: a purchased sodium acetate addition system, a dilution water replenishment system, and a digital metering pump output system. The sodium acetate tank is equipped with high and low level protection devices, and a radar level gauge monitors the liquid level in real time. The concentration of the purchased sodium acetate is fixed, determined by the wastewater treatment plant based on the product specifications provided by the supplier, and the system interface provides manual input controls for operators to set. After each addition of sodium acetate, the total amount of dilution water to be added is determined by a concentration algorithm and precisely added via a metering pump. The dilution water metering pump is configured with one operating and one standby pump to ensure reliable system operation. The digital metering pump cannot start at low liquid levels to prevent dry running and pump damage; the replenishment metering pump cannot start at high liquid levels to prevent overflow, waste, and environmental pollution.
[0072] The sodium acetate metering pump is directly connected to the sodium acetate tank. When each tank needs to add carbon source, the metering pump starts working and outputs sodium acetate to the main pipeline. A pressure gauge and flow meter are installed after the pump. The flow meter's range is 1.2 times the total dosage required for the five branch lines, with a safety margin. The five output pipelines can operate independently. The outlet of the metering pump is the sodium acetate main pipeline, and solenoid valves are installed at the inlets of each tank to connect to the branch lines. Each branch line is equipped with a flow meter and interlocked with the solenoid valve for metered delivery. The sodium acetate dosing flow rate for each branch line is controlled by the collaborative optimization algorithm of this invention.
[0073] The control parameters include: temperature display of the sodium acetate tank solution, high and low liquid level limits and alarms, water replenishment control, total output flow of the digital metering pump, flow rates of the five tanks, and the operating status of the pumps and valves.
[0074] The phosphorus removal agent replenishment device of the present invention is specifically implemented as follows.
[0075] The structure of the phosphorus removal agent replenishment device is similar to that of the carbon source replenishment device, mainly including a purchased phosphorus removal agent addition system, a dilution water replenishment system, and a digital metering pump output system. High and low level protection devices are also installed inside the phosphorus removal agent tank. The concentration of the purchased phosphorus removal agent is determined by the wastewater treatment plant according to the product specifications. After manually inputting the amount to be added each time, the total amount of dilution water to be added is determined by the concentration adjustment algorithm.
[0076] The dephosphorus removal agent metering pump is connected to the dephosphorus removal agent tank. When dephosphorus removal agent needs to be added to anoxic tanks 1 to 4 and the secondary booster pump station tank, the metering pump starts working and outputs dephosphorus removal agent to the main pipe. Five pipelines are output to the inlet of each tank, each equipped with a solenoid valve and flow meter to achieve independent control and metering. The dephosphorus removal agent addition flow rate of each branch is also controlled by the collaborative optimization algorithm of this invention.
[0077] To ensure the safe operation of the system, this invention incorporates multiple protection mechanisms. When the flow meter at any dosing point detects an abnormal flow rate, the system automatically closes the solenoid valve of that branch and issues an alarm; when the main pipe pressure exceeds the set upper limit, the output metering pump automatically stops; when the sodium acetate tank or phosphorus removal agent tank level is too low, the system automatically stops dosing and reminds the operator to replenish the agent.
[0078] To verify the technical effectiveness of this invention, a three-month field test was conducted at a municipal wastewater treatment plant. This wastewater treatment plant uses a modified A2 / O process and has a designed treatment capacity of 70,000 m³ / h. 3 / day, serving a population of approximately 250,000. During the testing period, the influent total nitrogen concentration fluctuated between 30 and 65 mg / L, the influent total phosphorus concentration fluctuated between 3 and 8 mg / L, and the influent COD concentration fluctuated between 150 and 400 mg / L.
[0079] The test was conducted in three phases: the first phase used the original manual experience-based dosing method as a control benchmark; the second phase used the multi-agent synergistic dosing optimization method of the present invention, but did not enable the carbon footprint optimization function; the third phase fully enabled all functions of the present invention, including carbon footprint cost optimization.
[0080] Test results show that, compared with the original manual, experience-based dosing method, the second stage reduced sodium acetate carbon source consumption by approximately 15% and phosphorus removal agent consumption by approximately 18%, while the compliance rates for total nitrogen and total phosphorus in the effluent increased from 92% and 94% to 98% and 99%, respectively. After fully implementing the carbon footprint optimization function in the third stage, sodium acetate consumption was further reduced by approximately 3% compared to the second stage, phosphorus removal agent consumption was further reduced by approximately 4%, and indirect carbon emissions from reagent dosing were reduced by approximately 15%, while the effluent compliance rate remained stable.
[0081] From an economic perspective, based on a sodium acetate price of 4500 yuan / ton and a polyaluminum chloride price of 1200 yuan / ton, adopting this invention can save approximately 450,000 yuan in reagent costs annually. From an environmental perspective, it reduces indirect carbon emissions by approximately 120 tons of CO2 equivalent annually. The above test results fully demonstrate that the technical solution of this invention can effectively achieve multiple objectives: reduced reagent costs, stable effluent compliance, and reduced carbon emissions.
[0082] In one embodiment of the present invention, the training and deployment process of the carbon source dosage prediction model and the phosphorus removal agent dosage prediction model is as follows.
[0083] During the data preparation phase, historical operational data from the wastewater treatment plant over the past two years were collected, including influent and effluent water quality parameters, real-time monitoring parameters for each tank, actual chemical dosage, and equipment operating status. The raw data was cleaned to remove abnormal data from periods of equipment failure or special operating conditions. The data was then divided into training, validation, and test sets in chronological order, with a ratio of 7:2:1, ensuring that the test set included data from the most recent three months to verify the model's adaptability to current operating conditions.
[0084] During model training, the Attention-LSTM model was implemented using the PyTorch deep learning framework. Training was performed on a workstation equipped with an NVIDIA RTX 3090 graphics card, with a training time of approximately 4 hours for a single model. A learning rate decay strategy was employed during training, with an initial learning rate of 0.001. The learning rate was halved when the validation set loss did not decrease for 5 consecutive epochs. Mean squared error (MSE) was used as the loss function, and the Adam optimizer was used for parameter updates.
[0085] During the model validation phase, model performance was evaluated on the test set. The root mean square error (RMSE) of the carbon source dosage prediction model was 3.2 kg / d, and the relative error was 8.5%; the RMSE of the phosphorus removal agent dosage prediction model was 1.8 kg / d, and the relative error was 7.2%. The prediction accuracy of both models met the requirements for engineering applications.
[0086] During the model deployment phase, the trained model is exported in ONNX format and deployed on a cloud server. The server is configured with an Intel Xeon processor, 64GB of memory, and an NVIDIA T4 GPU, and uses Docker containerization to ensure stable operation of the model inference service. The model inference cycle is set to once every 5 minutes, consistent with the data acquisition cycle.
[0087] The embodiments of the present invention are not limited to the specific embodiments described above. Those skilled in the art can make various equivalent changes or substitutions based on the technical solutions of the present invention, and all such changes or substitutions should be included within the protection scope of the present invention.
Claims
1. An optimized method for synergistic dosing of multiple agents in wastewater treatment plants, characterized in that, include: The multi-source water quality data acquisition steps involve obtaining water quality monitoring data from each process node of wastewater treatment, cleaning and normalizing the acquired water quality monitoring data, and generating standardized water quality characteristic sequences. The carbon source demand prediction step involves inputting a standardized water quality characteristic sequence into a pre-trained carbon source dosage prediction model. Based on the influent total nitrogen concentration, influent chemical oxygen demand, carbon-nitrogen ratio, and hydraulic retention time, the model outputs the predicted carbon source dosage under the current operating conditions. The phosphorus removal agent demand prediction step involves inputting a standardized water quality characteristic sequence into a pre-trained phosphorus removal agent dosage prediction model. Based on the influent total phosphorus concentration, phosphate concentration, and effluent total phosphorus target values, the model outputs the predicted phosphorus removal agent dosage under the current operating conditions. The multi-agent collaborative decision-making process receives the predicted values of carbon source dosage and phosphorus removal agent dosage. Based on the influence of carbon source dosage on biological phosphorus removal efficiency, it constructs multi-agent collaborative constraints and generates a collaborative dosage strategy by solving a multi-objective optimization problem. The multi-objective optimization problem aims to minimize the total cost of the agents and maximize the effluent compliance rate. The fuzzy evaluation and correction steps involve using a fuzzy comprehensive evaluation method to assess the rationality of the coordinated application strategy based on the deviation between the recent actual application effect and the expected effect. Based on the evaluation results, an application amount correction coefficient is generated, and the correction coefficient is applied to the coordinated application strategy to generate a corrected application instruction. The distributed dosing execution steps determine the allocation ratio and dosing sequence of the corrected dosing command at each dosing point based on the process location and hydraulic residence time of each dosing point, and then send the allocated dosing command to the execution mechanism at the corresponding dosing point.
2. The optimized method for synergistic dosing of multiple agents in wastewater treatment plants according to claim 1, characterized in that, In the carbon source demand prediction step, carbon source addition is triggered when the influent carbon-nitrogen ratio is lower than the preset carbon-nitrogen ratio threshold. The carbon source addition prediction model is a long short-term memory network model with an integrated attention mechanism. This model uses recent influent water quality time series data and process operating parameters as input features.
3. The optimized method for synergistic dosing of multiple agents in wastewater treatment plants according to claim 1, characterized in that, In the phosphorus removal agent demand prediction step, phosphorus removal agent is triggered when the effluent phosphate concentration is higher than the preset phosphate concentration threshold. The phosphorus removal agent dosage prediction model and the carbon source dosage prediction model share the feature extraction layer.
4. The optimized method for synergistic dosing of multiple agents in wastewater treatment plants according to claim 1, characterized in that, In the multi-agent collaborative decision-making process, the collaborative constraints include: upper limit constraints on carbon source dosage, upper limit constraints on phosphorus removal agent dosage, constraints on total nitrogen concentration in effluent, constraints on total phosphorus concentration in effluent, and constraints on the increase in chemical oxygen demand caused by carbon source dosage.
5. The optimized method for synergistic dosing of multiple agents in wastewater treatment plants according to claim 1, characterized in that, In the fuzzy evaluation correction step, a multi-level evaluation index system is established, including the degree of fluctuation of influent water quality, the magnitude of prediction deviation, and the effluent compliance margin. The weight of each evaluation index is determined by the analytic hierarchy process, and the value of the dosage correction coefficient is determined by fuzzy synthesis operation.
6. The optimized method for synergistic dosing of multiple agents in wastewater treatment plants according to claim 1, characterized in that, In the distributed dosing process, the carbon source dosing points include the anoxic tank and the deep denitrification filter, and the phosphorus removal agent dosing points include the anoxic tank and the secondary booster pump station. The allocation ratio of each dosing point is dynamically adjusted according to the nitrogen and phosphorus removal load of each tank.
7. The optimized method for synergistic dosing of multiple agents in wastewater treatment plants according to claim 1, characterized in that, The multi-objective optimization problem also includes a carbon footprint cost term, which is calculated based on the product of the carbon emission intensity of the production of carbon source agents and phosphorus removal agents and the amount added.
8. The optimized method for synergistic dosing of multiple agents in wastewater treatment plants according to claim 1, characterized in that, When the evaluation results of the fuzzy evaluation correction step are in an unreasonable range for a certain number of consecutive preset times, the incremental learning process of the carbon source dosage prediction model and the phosphorus removal agent dosage prediction model is triggered.
9. The optimized method for synergistic dosing of multiple agents in wastewater treatment plants according to claim 1, characterized in that, The distributed dosing execution steps also include: determining the dosing execution time corresponding to the current influent based on the hydraulic residence time between the dosing point and the influent, so that the added reagent and the corresponding influent can be combined in the target process tank.
10. A multi-agent synergistic dosing optimization system for wastewater treatment plants, characterized in that: include: The multi-source water quality data acquisition module is used to acquire water quality monitoring data at various process nodes of wastewater treatment, and to perform data cleaning and normalization preprocessing on the acquired water quality monitoring data to generate standardized water quality characteristic sequences. The carbon source demand prediction module is used to input standardized water quality characteristic sequences into a pre-trained carbon source dosage prediction model, and output the predicted carbon source dosage based on the influent total nitrogen concentration, influent chemical oxygen demand, carbon-nitrogen ratio and hydraulic retention time. The phosphorus removal agent demand prediction module is used to input standardized water quality characteristic sequences into a pre-trained phosphorus removal agent dosage prediction model, and output the predicted phosphorus removal agent dosage based on the target values of influent total phosphorus concentration, phosphate concentration and effluent total phosphorus. The multi-agent collaborative decision-making module receives the predicted values of carbon source dosage and phosphorus removal agent dosage, constructs collaborative constraints based on the influence of carbon source dosage on biological phosphorus removal efficiency, and generates a collaborative dosage strategy by solving a multi-objective optimization problem with the objectives of minimizing total reagent cost and maximizing effluent compliance rate. The fuzzy evaluation and correction module is used to evaluate the rationality of the coordinated dosing strategy using the fuzzy comprehensive evaluation method, generate a dosing amount correction coefficient based on the evaluation results, and apply the correction coefficient to the coordinated dosing strategy to generate a corrected dosing instruction. The distributed dosing execution module is used to determine the allocation ratio and dosing sequence of the corrected dosing instructions based on the process location and hydraulic residence time of each dosing point, and send the allocated dosing instructions to the execution mechanism of the corresponding dosing point.