Sewage treatment process modeling control optimization method based on mechanism-data dual drive
By using a mechanism-data dual-driven ASM2d-LSTM mixed water quality prediction model, combined with the MPC control framework, the problems of difficult stable compliance and high energy consumption in wastewater treatment plants were solved, and efficient and low-carbon wastewater treatment process optimization was achieved.
Patent Information
- Application Number
- CN202511281385.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2025-12-16
AI Technical Summary
Wastewater treatment plants face challenges such as large fluctuations in influent water quality, susceptibility to internal and external disturbances, difficulty in adjusting operating parameters, resulting in difficulties in achieving stable compliance, high operating energy consumption, and high operation and maintenance costs. Existing mechanistic models lack sufficient predictive accuracy, and data-driven models lack interpretability.
A mechanism- and data-driven ASM2d-LSTM mixed water quality prediction model was adopted, combined with a SCADA online monitoring system. The ASM2d model was constructed and its parameters were calibrated. The ASM2d-LSTM mixed water quality prediction model was built, and the MPC control framework was integrated to generate optimized operation sequences, thereby achieving accurate simulation and decision optimization of the wastewater treatment process.
It improves prediction accuracy and interpretability, enables low-carbon intelligent decision optimization of wastewater treatment systems, reduces energy consumption and operation and maintenance costs, and maintains stable effluent quality.
Smart Images

Figure CN121142986A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wastewater treatment technology, and in particular to a wastewater treatment process modeling, control and optimization method based on mechanism-data dual-driven approaches. Background Technology
[0002] The efficient and stable operation of wastewater treatment plants is crucial for regional water environment management and energy conservation and carbon reduction throughout the entire water treatment process. Urban wastewater treatment plants in my country generally face challenges such as difficulty in achieving stable compliance with standards, high energy consumption, and high operation and maintenance costs. Currently, wastewater treatment plants face challenges such as large fluctuations in influent water quality, susceptibility to internal and external disturbances, and difficulty in adjusting operating parameters. The root cause lies in the difficulty of quantifying the impact of the current operating state on future effluent, which limits the realization of efficient, low-carbon, and intelligent control of wastewater treatment systems. On the one hand, the construction of traditional mechanistic models inevitably relies on the understanding of highly complex biochemical reaction processes and includes a large number of kinetic and stoichiometric parameters, requiring extensive online sensor deployment and highly knowledgeable operation and maintenance personnel. Data-driven models, represented by deep learning, exhibit inherent "black box" characteristics, their reliability is highly controversial, and they are strongly dependent on data quality and scale. Therefore, designing a wastewater treatment system modeling optimization control method based on a combination of mechanistic models and data-driven models is of great significance for achieving accurate simulation and decision optimization of the wastewater treatment process. In summary, it is essential to design a mechanism-data-driven modeling, control and optimization method for wastewater treatment processes. Summary of the Invention
[0003] To overcome the shortcomings of existing technologies, the purpose of this invention is to provide a wastewater treatment process modeling, control and optimization method based on mechanism-data dual-drive.
[0004] To achieve the above objectives, the present invention provides the following solution:
[0005] This invention provides a mechanism-data dual-driven modeling, control, and optimization method for wastewater treatment processes, comprising:
[0006] Step 1: Collect basic data on the wastewater treatment process;
[0007] Step 2: Construct a mechanism model based on the collected basic data;
[0008] Step 3: Construct a hybrid model based on the mechanistic model, and perform optimization control based on the hybrid model.
[0009] Preferably, in step 1, the basic data of the wastewater treatment process is collected, specifically as follows:
[0010] The wastewater treatment plant's characteristic indicators are collected using a SCADA online monitoring system and online sensors.
[0011] Preferably, the characteristic indicators include influent water quality, biochemical indicators, operating control parameters, and effluent water quality.
[0012] Preferably, in step 2, the mechanism model is constructed based on the collected basic data, specifically as follows:
[0013] Step 201: Construct an ASM2d model of the wastewater treatment plant;
[0014] Step 202: Perform sensitivity analysis and parameter calibration on the ASM2d model parameters.
[0015] Preferably, in step 201, constructing the ASM2d model of the wastewater treatment plant specifically involves:
[0016] The operating process and actual geometric dimensions of the wastewater treatment plant are obtained, and an ASM2d model is constructed based on simulation software. The ASM2d model mainly focuses on four parts: anaerobic zone, anoxic zone, aerobic zone, and MBR membrane tank.
[0017] Preferably, in step 202, sensitivity analysis and parameter calibration of the ASM2d model parameters are performed, specifically as follows:
[0018] The influent index and operating process parameters were obtained and used as inputs. A preliminary steady-state simulation of the wastewater treatment process was conducted based on the ASM2d model. Based on the preliminary steady-state simulation results and sensitivity analysis, the parameters of the constructed ASM2d model were calibrated.
[0019] Preferably, during the initial steady-state simulation, all parameters of the ASM2d model are set to default values, and the input data is the monthly average value of the wastewater treatment plant. When calibrating the parameters, parameters that have a potential key impact on the effluent quality are initially screened, and the calibration range is focused on these parameters. The adjustment direction is determined based on the error characteristics of the initial steady-state simulation, and the weights are calculated based on sensitivity analysis to determine the adjustment range.
[0020] Preferably, in step 3, a hybrid model is constructed based on the mechanistic model, and optimization control is performed based on the hybrid model, specifically as follows:
[0021] Step 301: Build the environment and dataset, and select input features based on the dataset, and divide the training set and test set according to the proportion;
[0022] Step 302: Build an ASM2d-LSTM mixed water quality prediction model based on the ASM2d model, and train the ASM2d-LSTM mixed water quality prediction model based on the training set;
[0023] Step 303: Integrate the MPC control framework on the trained ASM2d-LSTM mixed water quality prediction model, use the model to generate optimized operation sequences, and use the collected real control parameters as a benchmark to evaluate the control effect of the optimized strategy.
[0024] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0025] This invention provides a mechanism-data dual-driven modeling and control optimization method for wastewater treatment processes. The method includes collecting basic data on the wastewater treatment process, constructing an ASM2d model of the wastewater treatment plant, performing sensitivity analysis and parameter calibration on the ASM2d model parameters, constructing an environment and dataset, selecting input features based on the dataset, dividing the training and test sets proportionally, building an ASM2d-LSTM mixed water quality prediction model based on the ASM2d model, training the ASM2d-LSTM mixed water quality prediction model based on the training set, integrating an MPC control framework on the trained ASM2d-LSTM mixed water quality prediction model, generating optimized operation sequences using the model, and evaluating the control effect of the optimization strategy using collected real control parameters as a benchmark. This invention is precise and efficient. It adopts a hybrid modeling method driven by mechanism and data fusion. Compared with a single data-driven model, it has high prediction accuracy, generalization ability and dynamic tracking ability. It solves the shortcomings of insufficient prediction accuracy of existing mechanism models and insufficient interpretability of data-driven models. At the same time, this invention includes an optimization strategy based on MPC, which enables the prediction model to maximize energy saving and consumption reduction while maintaining the current good effluent quality, and realize low-carbon intelligent decision optimization of wastewater treatment system. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 A heatmap of the feature filtering results;
[0028] Figure 2 A schematic diagram illustrating the construction of a hybrid model using a parallel approach;
[0029] Figure 3 is a schematic diagram showing the changes in key parameters before and after the implementation of step S6. Figure 3a For Q air , Figure 3b (R1);
[0030] Figure 4 This is a schematic diagram of the method flow of the present invention;
[0031] Figure 5 A schematic diagram of a simplified process model for a wastewater treatment plant. Detailed Implementation
[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] The purpose of this invention is to provide a mechanism-data dual-driven modeling, control and optimization method for wastewater treatment processes. Through a series of procedures, including the construction of an ASM2d-LSTM wastewater quality prediction model based on mechanism-data dual-driven methods and MPC control based on energy consumption and carbon emission reduction targets, the method can realize online optimization strategy output for key indicators of the wastewater treatment process.
[0034] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0035] like Figure 4 As shown, this invention provides a mechanism-data dual-driven modeling, control, and optimization method for wastewater treatment processes, including:
[0036] Step 1: Collect basic data on the wastewater treatment process;
[0037] Step 2: Construct a mechanism model based on the collected basic data;
[0038] Step 3: Construct a hybrid model based on the mechanistic model, and perform optimization control based on the hybrid model.
[0039] Step 1 involves collecting basic data on the wastewater treatment process, specifically:
[0040] During the operation of the selected wastewater treatment plant, characteristic indicators of the wastewater treatment plant are collected based on SCADA online monitoring systems and online sensor monitoring equipment.
[0041] The characteristic indicators include influent water quality, biochemical indicators, operating control parameters, and effluent water quality.
[0042] In step 2, a mechanism model is constructed based on the collected basic data, specifically as follows:
[0043] Step 201: Construct an ASM2d model of the wastewater treatment plant;
[0044] Step 202: Perform sensitivity analysis and parameter calibration on the ASM2d model parameters.
[0045] In step 201, the ASM2d model of the wastewater treatment plant is constructed, specifically as follows:
[0046] The operation process and actual geometric dimensions of the wastewater treatment plant were obtained. Based on the simulation software containing ASM2d, a generalized process model of the wastewater treatment plant containing the ASM2d model was constructed. In order to focus on the nitrogen and phosphorus removal process of the biological unit, the ASM2d model mainly focuses on four parts: anaerobic zone, anoxic zone, aerobic zone, and MBR membrane tank.
[0047] In step 202, sensitivity analysis and parameter calibration are performed on the ASM2d model parameters, specifically as follows:
[0048] The influent index and operating process parameters are obtained and used as inputs. A preliminary steady-state simulation of the wastewater treatment process is carried out based on the ASM2d model. Based on the preliminary steady-state simulation results and sensitivity analysis, the parameters of the constructed ASM2d model are calibrated so that the model can reflect the operating status and basic changing trends of the wastewater treatment system.
[0049] During the initial steady-state simulation, all parameters of the ASM2d model were set to default values, and the input data was the monthly average of the wastewater treatment plant. When calibrating the parameters, a certain number of parameters that have potential key impacts on the effluent quality of the process system were initially screened, and the calibration range was focused on these parameters. Then, the adjustment direction was determined based on the error characteristics of the initial steady-state simulation, and the weights were calculated through sensitivity analysis to determine the adjustment range.
[0050] In step 3, a hybrid model is constructed based on the mechanistic model, and optimization control is performed based on the hybrid model, specifically as follows:
[0051] Step 301: Build the environment and dataset, and select input features based on the dataset, and divide the training set and test set according to the proportion;
[0052] Step 302: Build an ASM2d-LSTM mixed water quality prediction model based on the ASM2d model, and train the ASM2d-LSTM mixed water quality prediction model based on the training set;
[0053] Step 303: Integrate the MPC control framework on the trained ASM2d-LSTM mixed water quality prediction model, use the model to generate optimized operation sequences, and use the collected real control parameters as a benchmark to evaluate the control effect of the optimized strategy.
[0054] In step 301, the environment and dataset are constructed, and input features are selected based on the dataset. The training set and test set are then divided proportionally, specifically as follows:
[0055] Set up the Python environment and import the necessary libraries. Import the relevant data of the sewage operation process, remove extreme outliers and noise from the data, use interpolation to fill in missing values, and use the sliding time window algorithm on the dataset to transform the data into a time series.
[0056] Input feature filtering can be performed using Pearson correlation coefficient or Spearman correlation coefficient.
[0057] In step 302, an ASM2d-LSTM mixed water quality prediction model is built based on the ASM2d model, and the ASM2d-LSTM mixed water quality prediction model is trained based on the training set, specifically as follows:
[0058] A parallel coupled architecture is used to construct an ASM2d-LSTM hybrid water quality prediction model. With the aim of minimizing the loss function, the hyperparameters of the ASM2d-LSTM hybrid model are further optimized to obtain the optimal parameter combination. The prediction target is the residual between the actual detection value and the ASM input value. The input of the model is the feature selected in step 301. The loss function used in the training process is the mean squared error.
[0059] In step 303, the MPC control framework is integrated into the trained ASM2d-LSTM mixed water quality prediction model. The model generates optimized operation sequences, and the collected real control parameters are used as a benchmark to evaluate the control effect of the optimized strategy. Specifically:
[0060] Based on the trained ASM2d-LSTM mixed water quality prediction model, the MPC control framework is integrated. The simulation model is used to generate optimized operation sequences. The collected real control parameters are used as a benchmark to evaluate the control effect of the optimization strategy. The control content in the exported operation sequences can be adjusted according to the actual situation and engineering needs.
[0061] In the implementation of the functions in the above steps, the selection of relevant functions, parameter settings, model complexity, etc., can be adjusted according to actual needs to best suit the actual operation of the wastewater treatment plant. The following example, using the operation optimization of a buried wastewater treatment plant with a process of "wastewater pretreatment + secondary treatment (A2O) + advanced treatment (MBR membrane tank) + effluent disinfection," further illustrates the implementation process and effects of this invention:
[0062] In this embodiment, the SCADA monitoring system within the wastewater treatment plant is used to collect relevant data, recording it every hour. The collected data undergoes preprocessing to filter extreme outliers and noise, and is then imported into BioWin software developed by Envirosim (Canada) for ASM2d modeling. After model calibration and dynamic simulation, the data is uniformly imported into a wastewater treatment process modeling, control, and optimization system written in Python. This system uses the residuals of COD, TN, and TP as prediction targets to mine hidden information within the data and generate an optimized operational sequence for the wastewater treatment plant. The specific steps are as follows:
[0063] S1. Online indicator collection for wastewater treatment process
[0064] During the operation of the selected wastewater treatment plant, characteristic indicators such as influent water quality, biochemical indicators, operating control parameters, and effluent water quality are collected based on the SCADA online monitoring system and online sensor monitoring equipment.
[0065] Specifically, the recording frequency for each special diagnostic indicator is per hour / time;
[0066] S2 and ASM2d model construction
[0067] Commonly used simulation software for the ASM2d model includes general-purpose software such as MATLAB, and specialized software such as BioWin, GPS-X, STOAT, and WEST. This invention uses BioWin simulation software as an example to illustrate the construction process of the ASM2d model. To better focus on the biological treatment unit and activated sludge dynamics, the model construction process simplifies the pretreatment and sludge disposal stages, focusing mainly on four main parts: the anaerobic zone, the anoxic zone, the aerobic zone, and the MBR membrane tank. In this embodiment, the current operating capacity of the wastewater treatment plant is approximately 40,000 m³ / h. 3 / d, after primary treatment, the influent is evenly distributed to two parallel combined biological treatment tanks and membrane tanks. The effluents merge and then enter the subsequent advanced treatment unit. A schematic diagram of the wastewater treatment plant process is shown below. Figure 5 ;
[0068] S3. Sensitivity Analysis and Parameter Calibration
[0069] Based on the generalized model of the wastewater treatment plant process obtained from S2, steady-state simulation was performed with all parameters set to default values. To improve computational efficiency, a certain number of parameters with potential key impacts on the effluent quality of the process system were initially screened, and the calibration range was focused on these parameters. Subsequently, the adjustment direction was determined based on the error characteristics of the initial steady-state simulation, and the weights were calculated using sensitivity analysis to determine the adjustment range.
[0070] This invention uses a normalized sensitivity coefficient to analyze selected parameters;
[0071] The sensitivity formula for the system state variable y and parameter a is:
[0072]
[0073] Among them, S i,j Represents parameter θ j For output Y i Normalized sensitivity, ΔY i and Δθ i Y represents the change in output and parameters. i,0 and θ i,0 This indicates the output baseline value and parameter baseline value;
[0074] In this invention, a parameter is uniformly increased by 10%, and the results are observed. If S is positive, it indicates a positive correlation between the parameter and the effluent; otherwise, it indicates a negative correlation. If |S|>1, the parameter has a significant impact on the effluent result; if 0.01<|S|≤1, the parameter has a relatively large impact; if 0.01<|S|≤0.1, the impact on the effluent result is relatively small; if |S|≤0.01, it can be considered to have virtually no impact on the effluent.
[0075] In the embodiment, the key parameter identified as high-impact (S) i,j The values >0.1) and their final values after calibration are shown in Table 1;
[0076] After parameter calibration, the relative errors of the model for COD, TN, and TP decreased from 37.50%, 45.92%, and 251.49% to 24.96%, 4.13%, and 0.46%, respectively.
[0077] Table 1. Key parameters with high impact and their final values after calibration.
[0078]
[0079] S4, Dataset Construction
[0080] Configure the Python environment, import the necessary libraries such as NumPy, Pandas, and Tensorflow, and import the relevant data of the wastewater operation process;
[0081] There are multiple ways to identify extreme outliers and noise. In this embodiment, taking the Raida criterion and interquartile range method as examples, for indicators that are normally distributed or approximately normally distributed, the following formula is used for screening:
[0082] |x j -μ|≥3σ (2)
[0083] The remaining distribution indicators were selected based on the interquartile range method, as follows:
[0084] IQR = Q3 - Q1 (3)
[0085] x j <Q1-1.5*IQR or x j >Q3+1.5*IQR (4)
[0086] Where, x j σ represents outlier data, μ represents the mean of the original data, σ is the standard deviation, and Q1 and Q3 represent the first and third quartiles of the data, respectively.
[0087] Data outside the upper and lower limits of the distribution will be removed;
[0088] Based on the removal of extreme outliers and noise from the data, missing values are filled in using linear interpolation. This involves constructing a straight line between the nearest known data points to the missing value and assigning weights based on distance. The calculation formula is as follows:
[0089]
[0090] To eliminate the influence of differences in dimensions between different indicators, all data were normalized. The calculation formula is as follows:
[0091]
[0092] In the above formula, x0 and x1 represent the original data x. i Two neighboring points, x max and x min These are the maximum and minimum values of the feature, respectively;
[0093] To reduce redundant input and increase training efficiency, feature filtering is performed on the normalized dataset. Feature filtering refers to the process of removing redundant or irrelevant features from the original dataset based on the importance of the input features to the prediction target and obtaining the optimal subset. A widely used evaluation metric for feature filtering is the Pearson coefficient or the Spearman coefficient.
[0094] As a preferred option, considering the nonlinear characteristics of the wastewater treatment process, the Spearman coefficient is selected as the evaluation index, and the calculation formula is as follows:
[0095]
[0096] In the formula, x and y are variables with a sample size of n. and These are their mean values, R(x) i ) and R(y i ) are the positions of the observed values i of variables x and y, respectively. and These are the average rank of variables x and y, respectively;
[0097] In this embodiment, the Spearman coefficient is used as the evaluation index, and features strongly correlated with the three prediction targets of effluent COD, TN, and TP are preferentially retained. The results of feature selection are presented as a heatmap, such as... Figure 1 As shown, after feature filtering, COD was selected. in NH4 + -N in TN in TP in DO3, NH4 + -N2, MLSS, R1, R2, and Q air A total of 10 indicators are used as input features of the model, and the combination of these features is denoted as G. hybrid ;
[0098] The input form of the recurrent neural network is a multidimensional time series (MTS). The sliding time window algorithm is used on the dataset to transform the data into a T*N matrix form, where T represents the window size, i.e. the length of the input time series, and N is the number of input features.
[0099] In this embodiment, T = 24. Based on the feature filtering operation in S4, N = 10.
[0100] Finally, the dataset is split into a training set and a test set. The training set is used by the model to learn data features and hidden relationships, forming and calibrating its prediction ability. The test set does not participate in the model training process and is used as unseen data to evaluate the model's prediction effect and generalization ability.
[0101] In this embodiment, the total length of the data is ten months. Preferably, the ratio of training set to dataset length is 9:1, that is, the training set uses the data from the first nine months and the test set uses the data from the last month.
[0102] S5 and ASM2d-LSTM hybrid model construction
[0103] To improve overall prediction accuracy, as a preferred method, this invention employs a parallel approach to construct a hybrid model, as shown in the reference figure below. Figure 2 As shown, we first assume that the wastewater reaction process in the real world has the following characteristics:
[0104]
[0105] Among them, y meas For each sensor measurement, F represents an idealized representation of all physical, chemical, and biological reaction processes, and x represents known and measurable input variables or conditions (such as influent water quality, DO setpoint, etc.) when constructing the mechanistic model. This indicates that the mechanistic model does not cover all the factors in ASM2d;
[0106] The hybrid model can be represented as:
[0107]
[0108] Among them, y hybrid y represents the predicted value of the mixture model. ASM (x) represents the output value of the mechanistic model, f data To build a data-driven model, by learning x, y ASM With the corresponding y meas The historical data relationship between them indirectly captures the influence of... A model of systematic bias caused by factors such as...
[0109] In the hybrid model, models including but not limited to XGboost, recurrent neural network (RNN), and long short-term memory network (LSTM) can be used to construct the residual prediction model. As a preferred embodiment, this invention uses LSTM to construct the ASM2d-LSTM hybrid model. The LSTM model reduces the gradient vanishing and gradient explosion problems faced by the traditional RNN configuration when processing long sequence data by introducing a gating mechanism.
[0110] In the Python environment built in S4, a residual prediction model is constructed based on libraries such as TensorFlow. The prediction target is the error between the actual monitored value and the output value of the ASM2d model obtained in step S3.
[0111] The training set constructed in S4 is used as the training input for the model. In this embodiment, the loss function used in the training process is the mean squared error (MSE), which is often used for regression problems. Its calculation formula is as follows:
[0112]
[0113] Among them, y i , Let represent the true value and the predicted value of the i-th sample, respectively;
[0114] In this embodiment, as a preferred embodiment, the Adam optimizer is selected as the model optimizer, the maximum number of iterations is set to 300 epochs, the random neuron dropout rate is set to Dropoutrate = 0.2, and an early stopping mechanism is introduced to prevent model overfitting.
[0115] In the embodiment, the coefficient of determination (R²) is selected. 2The mean absolute percentage error (MAPE) and root mean square error (RMSE) are used as evaluation indicators to reflect the degree of fit between the model's predicted values and the actual values, the percentage of error relative to the actual values, and the ratio of the square root of the number of observation points to the sum of the squares of the deviations between the predicted and actual values, respectively. Their calculation formulas are expressed as follows:
[0116]
[0117] Among them, y i , Let n represent the true value and predicted value of the i-th sample, respectively, where n is the number of samples. This represents the mean;
[0118] In the embodiments, the quantization performance of the obtained ASM2d-LSTM coupled model test set is shown in Table 2;
[0119] Table 2 Quantization Performance of ASM2d-LSTM Coupled Model Test Set
[0120]
[0121] S6 and MPC control framework implementation
[0122] Based on the ASM2d-LSTM coupled prediction model obtained from the optimal parameter combination in S5 above, the MPC (Model Predictive Control) framework is integrated on this basis to realize the pollution reduction and carbon reduction optimization control of the wastewater treatment process. MPC is a control strategy that predicts the future change response of the system based on the existing dynamic model. It can effectively solve complex problems such as time delay and variable coupling contained in industrial systems.
[0123] MPC can be divided into three steps: predictive model, feedback correction, and rolling optimization. These three parts work together. The predictive model is used to predict the future dynamic response. The feedback correction uses known conditions and target performance to control the current moment based on the prediction, and the rolling optimization obtains the optimal control quantity. At the same time, the prediction of the future state is adjusted by using the system state at each rolling step.
[0124] Rolling optimization is the core implementation step in MPC. It doesn't calculate all control actions during the entire control task at once, but rather performs a dynamic online optimization process at each discrete time k. The controller first obtains the current system state X. k Then, based on the system's prediction model, the state and output trajectory are predicted within a pre-defined, finite prediction time domain P. Subsequently, the core task of the controller is to solve a constrained optimization problem, aiming to find the optimal control input sequence within the control time domain M (1≤M≤P):
[0125] U k ={u k|k ,u k+1|k ,...,u k+M-1|k} (15)
[0126] The optimality refers to the sequence's ability to minimize a predefined objective function, denoted as J. The mathematical expression of this optimization problem at time k is:
[0127]
[0128] Subject to the system model, initial state, output equations, and input, state, and output constraints:
[0129] x k+i+1|k =F(x) k+i|k ,u k+i|k ,v k+i|k ,w k+i|k (17)
[0130] x k|k =x current (18)
[0131] y k+i|k =G(x) k+i|k (19)
[0132] u min ≤u k+i|k ≤u max (20)
[0133] x min ≤x k+i|k ≤x max (twenty one)
[0134] y min ≤y k+i|k ≤y max (twenty two)
[0135] Where, x k+i|k and u k+i|k Let L represent the state predicted at time k+i in the future and the planned control input, respectively. Let L be the stage cost function and E be the terminal cost function. The optimal solution yields... After that, only Executed;
[0136] The core mechanism of rolling optimization lies in its unique rolling time-domain strategy: at each controlled time step, although the optimization calculation produces an optimal control sequence covering the entire control time domain M... However, the control unit only applies the first element of this sequence to the actual controlled object. When entering the next time step k+1, the controller obtains the new state x(k+1) that the system has reached under the combined influence of previous control, disturbance and model error. Based on the new state, the entire prediction and optimization window moves forward by one time step and is executed cyclically.
[0137] For the wastewater treatment process optimization scenario applied in this invention, the optimization objective is to maximize economic and environmental benefits while satisfying a series of operational constraints. The constraints include equality constraints that must be satisfied, such as energy conservation and material balance of the system, as well as inequality constraints that cover operational limitations and key effluent water quality standards. Based on satisfying the above conditions, the objective is to search for the set value x of the process operation variable while minimizing multiple interrelated objective functions.
[0138] In the embodiments, as a preferred embodiment, the objective function to be solved is set as environmental impact indicators such as emission pollution concentration, reduction of system energy consumption, and optimization of carbon emissions;
[0139] In step S6, the simulation environment required for MPC is constructed based on the ASM2d-LSTM coupled prediction model built in step S5, to achieve automated data interaction and simulation execution of the MPC control logic. Within this framework, at each control time k, the initial state x required for MPC optimization is determined. k The state is derived from the simulation model's output at the end of the previous control cycle k-1. To balance optimization effectiveness and computational feasibility, the control time domain M is set to 1 hour, indicating that at each decision moment, the controller only optimizes the current single control action u. k Rather than seeking action sequences across multiple future time steps;
[0140] As a preferred option, the key control parameter selected is the aeration value Q. air Both the primary return flow rate R1 and the primary return flow rate are high-energy-consuming and high-carbon-emission links in the wastewater treatment process;
[0141] Preferably, the cost function of the MPC control strategy is set as follows:
[0142] min J1=ω air *R airk +ω1*R 1k (twenty three)
[0143]
[0144] Where, ω air =5, ω1=1 are used to balance the aeration value Q airThe relative magnitude of the primary return flow rate R1 and the degree of energy consumption impact are constrained to limit the change in effluent quality after optimization and control to within ±5% of the original value, so as to ensure that the water quality remains unchanged.
[0145] In this embodiment, interactive simulation was performed using data from a 7-day period, with an aeration rate Q. air The flow rate fluctuates dynamically depending on the operating conditions, but generally operates within a relatively high range; while the return flow rate R1 is set and operates at a constant and relatively high level (close to 1850m). 3 / h), Q air It still maintains dynamic adjustment to adapt to the needs of real-time operating conditions, but its average operating level is lower than before optimization, while the response speed and adjustment precision are improved; the change in R1 is more significant, with its operating value dropping sharply from a constant high level to a new level with a significantly lower average value (1650-1700m). 3 The energy consumption of the primary return pump decreased by approximately 8.7%, and the energy consumption of the aeration system decreased by approximately 14.38%, from a state of near constant to one with slight dynamic adjustments. Figure 3 shows a comparison of the changes in key parameters before and after the implementation of step S6.
[0146] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0147] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for modeling, controlling, and optimizing wastewater treatment processes based on a mechanism-data dual-driven approach, characterized in that, include: Step 1: Collect basic data on the wastewater treatment process; Step 2: Construct a mechanism model based on the collected basic data; Step 3: Construct a hybrid model based on the mechanistic model, and perform optimization control based on the hybrid model.
2. The method according to claim 1, characterized in that, Step 1 involves collecting basic data on the wastewater treatment process, specifically: The wastewater treatment plant's characteristic indicators are collected using a SCADA online monitoring system and online sensors.
3. The method according to claim 2, characterized in that, The characteristic indicators include influent water quality, biochemical indicators, operating control parameters, and effluent water quality.
4. The method according to claim 3, characterized in that, In step 2, a mechanism model is constructed based on the collected basic data, specifically as follows: Step 201: Construct an ASM2d model of the wastewater treatment plant; Step 202: Perform sensitivity analysis and parameter calibration on the ASM2d model parameters.
5. The method according to claim 4, characterized in that, In step 201, the ASM2d model of the wastewater treatment plant is constructed, specifically as follows: The operating process and actual geometric dimensions of the wastewater treatment plant are obtained, and an ASM2d model is constructed based on simulation software. The ASM2d model mainly focuses on four parts: anaerobic zone, anoxic zone, aerobic zone, and MBR membrane tank.
6. The method according to claim 5, characterized in that, In step 202, sensitivity analysis and parameter calibration are performed on the ASM2d model parameters, specifically as follows: The influent index and operating process parameters were obtained and used as inputs. A preliminary steady-state simulation of the wastewater treatment process was conducted based on the ASM2d model. Based on the preliminary steady-state simulation results and sensitivity analysis, the parameters of the constructed ASM2d model were calibrated.
7. The method according to claim 6, characterized in that, In the initial steady-state simulation, all parameters of the ASM2d model are set to default values. The input data is the monthly average value of the wastewater treatment plant. When calibrating the parameters, parameters that have a potential key impact on the effluent quality are initially screened, and the calibration range is focused on these parameters. The adjustment direction is determined based on the error characteristics of the initial steady-state simulation, and the weights are calculated based on sensitivity analysis to determine the adjustment range.
8. The method according to claim 7, characterized in that, In step 3, a hybrid model is constructed based on the mechanistic model, and optimization control is performed based on the hybrid model, specifically as follows: Step 301: Build the environment and dataset, and select input features based on the dataset, and divide the training set and test set according to the proportion; Step 302: Build an ASM2d-LSTM mixed water quality prediction model based on the ASM2d model, and train the ASM2d-LSTM mixed water quality prediction model based on the training set; Step 303: Integrate the MPC control framework on the trained ASM2d-LSTM mixed water quality prediction model, use the model to generate optimized operation sequences, and use the collected real control parameters as a benchmark to evaluate the control effect of the optimized strategy.
Citation Information
Cited By
Artificial intelligence application management and control method and system for sewage treatment plant based on multi-modal model
CN121722086A
Intelligent EGSB (expanded granular sludge bed) reactor control system and method based on model predictive control
CN122221700A
