Intelligent control method for feeding of sewage biological nitrogen and denitrification carbon source
By constructing the ASM-AI hybrid model, combining the mechanism and monitoring data of sewage treatment, the carbon source addition amount in the sewage biological nitrogen denitrogenation reactor was optimized, and the problems of insufficient carbon source and inaccurate automatic control system were solved, and more efficient and stable sewage nitrogen denitrogenation effect was achieved.
Patent Information
- Application Number
- CN202510099830.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-06-27
AI Technical Summary
In the wastewater treatment process, insufficient carbon source is a common problem in the biological denitrification process, resulting in incomplete denitrification reaction, limited denitrification effect, and the existing automatic control system has problems of accuracy and hysteresis, resulting in insufficient carbon source addition.
ASM-AI hybrid model of ASM activated sludge mechanism model and RNN recursive neural network model is constructed. By combining monitoring data and mechanism model, carbon source addition is optimized and real-time precise control is achieved.
It improves the accuracy and prediction accuracy of carbon source injection, reduces carbon source consumption, stabilizes the total nitrogen index of effluent, and enhances the interpretability of the sewage treatment system.
Smart Images

Figure CN120208404A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sewage treatment, and particularly to an intelligent control method for adding denitrification carbon source in biological sewage denitrification. Background Technique
[0002] In the process of sewage treatment, biological denitrification is an important link. Biological denitrification refers to the process in which organic nitrogen and ammonia nitrogen in sewage are finally converted into nitrogen gas through ammonification, nitrification, and denitrification reactions under the combined action of microorganisms, which has the characteristics of economy, effectiveness, and no secondary pollution. However, during the biological denitrification process, insufficient carbon source is a common problem. Affected by various factors such as season, rainfall, residents' water use habits, and groundwater inflow and infiltration, the average concentration of influent COD (Chemical Oxygen Demand) in urban sewage treatment plants is usually lower than 200 mg / L, and the carbon-nitrogen ratio of influent COD and ammonia nitrogen is usually below 5, resulting in incomplete denitrification reaction in biological sewage denitrification and limited sewage denitrification effect. To ensure the normal progress of the denitrification reaction and meet the total nitrogen index of the effluent, sewage treatment plants usually adopt the method of adding carbon source to improve the denitrification effect. The methods of adding carbon source are usually manual addition or fixed-flow addition, without considering the influence of various factors such as influent water volume, water quality fluctuation, change of sewage treatment microorganism state, and result feedback lag, resulting in waste of carbon source reagent addition and instability of the total nitrogen index of the effluent.
[0003] Existing automatic control systems generally include three types: feedforward, feedback, and feedforward + feedback. For example, the Chinese invention patent with the publication number CN111470628A: Carbon source reagent adding equipment and adding method, this invention discloses a precise carbon source reagent adding equipment, the output interfaces of its influent water volume monitoring module, pre-nitrate nitrogen monitoring module, and post-nitrate nitrogen feedback module are respectively electrically connected to the input interface of the calculation control module, and the output interface of the calculation control module is electrically connected to the input interface of the dosing control module. However, due to the accuracy problem of the feedforward system and the lag problem of the feedback control system, the control of the carbon source addition amount by a simple automatic control system is not precise enough.
[0004] There are also some intelligent control technologies for carbon source dosing in the prior art. For example, the Chinese invention patent with the publication number CN117985847A: an intelligent carbon source dosing method and system. This invention discloses a method for obtaining the required carbon source dosing amount in real time according to the variation law and trend between the input operation indexes and equipment regulation values, and then adjusting the control strategy of carbon source dosing according to the dosing amount of the carbon source. Another example is the Chinese invention patent with the publication number CN114217529A: an intelligent dosing system and method based on a mathematical model and predictive control. This invention discloses an intelligent dosing system and method based on a mathematical model and predictive control. This system adopts MPC (Model Predictive Control) and is applicable to multi-variable disturbance and large lag control scenarios. The above types of intelligent control technologies directly use monitoring data (such as influent and effluent flow rates, dosing amounts, influent and effluent TN concentrations, etc.) to establish a black-box data-driven model, only focusing on the relationship between input and output values, without revealing the mechanism in the process, and the established model lacks interpretability. Summary of the Invention
[0005] Object of the Invention: The object of the present invention is to provide an intelligent control method for denitrifying carbon source dosing in sewage biological nitrogen removal that combines interpretability and prediction accuracy.
[0006] Technical Solution: An intelligent control method for denitrifying carbon source dosing in sewage biological nitrogen removal includes the following steps:
[0007] S1. Monitor the parameters of the sewage biological nitrogen removal reactor and output the monitoring data of the denitrification process.
[0008] S2. Based on the sewage biological nitrogen removal principle and the structure of the sewage biological nitrogen removal reactor, construct an ASM activated sludge mechanism model for the sewage treatment denitrification process, and use the ASM activated sludge mechanism model to predict the parameters of the sewage treatment denitrification process and output the prediction data.
[0009] S3. Integrate the ASM activated sludge mechanism model and the RNN recursive neural network model to obtain an ASM-AI hybrid model. The ASM activated sludge mechanism model is used to provide the parameter prediction data of the sewage treatment denitrification process, and the RNN recursive neural network model is used to correct the prediction data of the ASM activated sludge mechanism model. Combine the prediction data obtained in step S1 and the monitoring data obtained in step S2 into a data set, and use this data set as the input of the RNN recursive neural network model for training. The output of the ASM-AI hybrid model is the weighted result of the prediction data of the ASM activated sludge mechanism model and the prediction data of the RNN recursive neural network model.
[0010] S4. Optimize the carbon source dosage according to the output of the ASM-AI hybrid model. Define the objective function as the difference between the output of the ASM-AI hybrid model and the target value, and use an optimization algorithm to obtain the real-time carbon source dosage that minimizes the objective function.
[0011] S5. Control the carbon source dosage in the sewage biological denitrification reactor and adjust it to the real-time carbon source dosage obtained in step S4.
[0012] Specifically, in step S1, the monitoring data of the denitrification process includes: the flow rate of the influent, the concentration of easily biodegradable substances, the ammonia nitrogen concentration, the total nitrogen concentration, the flow rate of the effluent, the concentration of easily biodegradable substances, the ammonia nitrogen concentration, the nitrate nitrogen concentration, the dissolved oxygen concentration, the ammonia nitrogen concentration, the nitrate nitrogen concentration, the nitrogen concentration, and the oxidation-reduction potential in the reactor.
[0013] Specifically, step S2 includes the following sub-steps:
[0014] S21. Analyze based on the sewage biological denitrification principle and the structure of the sewage biological denitrification reactor, and define the parameter types of the ASM activated sludge mechanism model, including the concentration of easily biodegradable substances S cod , the dissolved oxygen concentration S O2 , the nitrite concentration S NO2 , the nitrate concentration S NO3 , the ammonia nitrogen concentration S NH4 , the nitrogen concentration S N2 , the heterotrophic aerobic yield coefficient Y STOO2 , the heterotrophic anoxic yield coefficient Y STONOX , the heterotrophic aerobic growth yield coefficient Y HO2 , the heterotrophic anoxic growth yield coefficient Y HNOX , the maximum specific growth rate coefficient μ of heterotrophic bacteria H , the maximum storage rate coefficient K STO , the proportion coefficient n of the reduction of the heterotrophic anoxic metabolism rate NOX , the substrate half-saturation constant K S , the dissolved oxygen half-saturation constant K O2 , the particulate non-biodegradable organic matter yield coefficient f in the biomass decay process XI , the aerobic endogenous respiration rate b of heterotrophic bacteria HO2 , the anoxic endogenous respiration rate b of heterotrophic bacteria HNOX , the aerobic endogenous respiration rate b of heterotrophic bacteria STOO2 and the anoxic endogenous respiration rate b of heterotrophic bacteria STONOX ;
[0015] S22. According to the parameter types of the ASM activated sludge mechanism model defined in step S11 and the denitrification process, establish the reaction rate equations for each stage in the denitrification process, including the aerobic storage of the concentration of readily biodegradable substances, the anoxic storage of the concentration of readily biodegradable substances, the aerobic growth of heterotrophic bacteria, the anoxic growth of heterotrophic bacteria, the aerobic endogenous respiration of heterotrophic bacteria intracellular polymers, the anoxic endogenous respiration of heterotrophic bacteria intracellular polymers, the aerobic endogenous respiration of heterotrophic bacteria, and the anoxic endogenous respiration of heterotrophic bacteria;
[0016] S23. Establish a matrix based on the reaction rate equations established in step S12, set the initial values of the parameters, and complete the construction of the ASM activated sludge mechanism model.
[0017] Specifically, in step S22, the reaction rate equations for each stage in the denitrification process include:
[0018] Aerobic storage of the concentration of readily biodegradable substances:
[0019]
[0020] Anoxic storage of the concentration of readily biodegradable substances:
[0021]
[0022] Aerobic growth of heterotrophic bacteria:
[0023]
[0024] Anoxic growth of heterotrophic bacteria, including two types:
[0025] Nitrite to nitrogen:
[0026]
[0027] Nitrate to nitrogen:
[0028]
[0029] Aerobic endogenous respiration of heterotrophic bacteria intracellular polymers:
[0030]
[0031] Anoxic endogenous respiration of heterotrophic bacteria intracellular polymers:
[0032]
[0033] Aerobic endogenous respiration of heterotrophic bacteria:
[0034]
[0035] Anoxic endogenous respiration of heterotrophic bacteria:
[0036]
[0037] Preferably, step S2 further includes the following sub-steps:
[0038] S24. Adjust the parameters of the ASM activated sludge mechanism model by using the monitoring data of the denitrification process, so that the predicted data output by the ASM activated sludge mechanism model is consistent with the monitoring data.
[0039] Specifically, step S3 includes the following sub-steps:
[0040] S31. Clean and normalize the data set, and randomly divide the data set into a training set, a validation set and a test set according to a set ratio;
[0041] S32. Set the optimizer, loss function and evaluation index of the RNN recurrent neural network model, input the training set, train the RNN recurrent neural network model, and use the validation set to evaluate the results of each iteration until the requirements of the set evaluation index are met;
[0042] S33. Use the test set to evaluate the performance of the trained RNN recurrent neural network model, output the evaluation results, and optimize the hyperparameters of the RNN recurrent neural network model according to the evaluation results.
[0043] Specifically, in step S3, the output formula of the ASM-AI hybrid model is:
[0044] y mixed = w1 × y ASM + w2 × y AI
[0045] In the formula: y ASM is the predicted value of the ASM activated sludge mechanism model, y AI is the predicted value of the RNN recurrent neural network model, w1 and w2 are weights, and w1 + w2 = 1.
[0046] Preferably, the method further includes the following steps:
[0047] S6. Use the ASM-AI hybrid model to predict the denitrification process after adjusting the carbon source dosage, output the predicted data, and at the same time monitor the parameters of the sewage biological denitrification reactor, output the monitoring data of the denitrification process, calculate the error value between the predicted data of the ASM-AI hybrid model in this step and the monitoring data of the denitrification process, correct the hyperparameters of the RNN recurrent neural network model, calculate the error value between the predicted data of the ASM-AI hybrid model and the parameters of the ASM activated sludge mechanism model, and update the parameters of the ASM activated sludge mechanism model.
[0048] Specifically, in step S6, updating the parameters of the ASM activated sludge mechanism model includes:
[0049] Calculating the error value Δu between the prediction data of the ASM-AI hybrid model and the prediction data of the ASM activated sludge mechanism model:
[0050] Δu = u mixed - u ASM
[0051] Where: u mixed is the prediction data of the ASM-AI hybrid model, and u ASM is the parameter of the ASM activated sludge mechanism model;
[0052] Updating the parameters of the ASM activated sludge mechanism model using the gradient descent method:
[0053]
[0054] Where: u' ASM is the updated parameter of the ASM activated sludge mechanism model, and η is the learning rate.
[0055] Specifically, in step S4, the objective function is:
[0056]
[0057] Where: MSE is the mean square error, N is the sample size, y i is the target value, is the output value of the ASM-AI hybrid model.
[0058] Beneficial effects: Compared with the prior art, the remarkable effects of the present invention are:
[0059] The present invention first constructs an ASM activated sludge mechanism model. By analyzing the process of sewage denitrification, the microbial metabolism process in the sewage biological denitrification process is described by the reaction rate equation, which has strong interpretability and credibility. Then, an RNN recursive neural network model is introduced and combined with the ASM activated sludge mechanism model. As an artificial intelligence model, the RNN recursive neural network model can mine laws and patterns from data without involving the internal mechanism of the system. Combining it with the ASM activated sludge mechanism model can effectively avoid calculation errors caused by the simplification of the mechanism model, insufficient understanding of the mechanism, and incorrect estimation of model parameters. Based on the ASM-AI hybrid model, the carbon source addition for sewage biological denitrification is controlled. Through the accurate and real-time feedback intelligent control mode, the consumption of the carbon source can be effectively reduced, and at the same time, a more stable total nitrogen index of the effluent can be obtained. Description of the Drawings
[0060] Figure 1 It is the process flow chart of the method of the present invention.
[0061] Figure 2 It is the flow chart of the configuration and training of the artificial intelligence model of the present invention.
[0062] Figure 3 It is the implementation effect diagram of the present invention. Specific implementation manners
[0063] The following further illustrates a preferred solution of the present invention in conjunction with the accompanying drawings.
[0064] Please refer to Figure 1 As shown, the present invention provides an intelligent control method for adding carbon source for biological denitrification of sewage, including the following steps:
[0065] S1. Monitor the parameters of the sewage biological denitrification reactor and output the monitoring data of the denitrification process.
[0066] Online data monitoring is carried out on the sewage biological denitrification reactor. The monitoring data includes the flow rate of influent water, the concentration of easily biodegradable substances, ammonia nitrogen concentration, total nitrogen concentration, the flow rate of effluent water, the concentration of easily biodegradable substances, ammonia nitrogen concentration, nitrate nitrogen concentration, the dissolved oxygen concentration, ammonia nitrogen concentration, nitrate nitrogen concentration, nitrogen concentration, and oxidation reduction potential ORP in the reactor. To achieve comprehensive online data monitoring, various types of sensors need to be deployed in the sewage biological denitrification reactor. For example, for the monitoring of dissolved oxygen, a fluorescence LDO dissolved oxygen sensor of HACH can be selected, and the data is transmitted to the data acquisition system through the MODBUS protocol or 485 communication; for the measurement of the influent water flow rate, an ultrasonic flowmeter of Siemens is selected, and the data can also be transmitted to the data acquisition system through 485 communication. For the concentration of ammonia nitrogen, total nitrogen and nitrate nitrogen, an online multi-parameter water quality analyzer of Thermo Fisher or WTW is selected and connected through the MODBUS or Ethernet interface; for the oxidation reduction potential, an InPro series electrode of Mettler-Toledo is selected for monitoring. The data collected by all sensors is wirelessly transmitted through the DTU module, and the data is uploaded to the cloud server or the local database system. The data storage uses a relational database such as MySQL, combined with real-time data display and historical data query to ensure the security and convenience of the data. At the same time, it can be monitored in conjunction with the SCADA system to achieve fully automated management and alarm functions.
[0067] S2. Based on the sewage biological denitrification principle and the structure of the sewage biological denitrification reactor, construct an ASM activated sludge mechanism model for the sewage treatment denitrification process, and use the ASM activated sludge mechanism model to predict the parameters of the sewage treatment denitrification process and output the prediction data.
[0068] S21. Analyze based on the principle of biological nitrogen removal from sewage and the structure of the sewage biological nitrogen removal reactor, and define the parameter types of the ASM activated sludge mechanism model, including the concentration S of readily biodegradable substances cod , the dissolved oxygen concentration S O2 , the nitrite concentration S NO2 , the nitrate concentration S NO3 , the ammonia nitrogen concentration S NH4 , the nitrogen concentration S N2 , the aerobic yield coefficient Y of heterotrophic bacteria STOO2 , the anoxic yield coefficient Y of heterotrophic bacteria STONOX , the aerobic growth yield coefficient Y of heterotrophic bacteria HO2 , the anoxic growth yield coefficient Y of heterotrophic bacteria HNOX , the maximum specific growth rate coefficient μ of heterotrophic bacteria H , the maximum storage rate coefficient K STO , the proportional coefficient n of the reduction in the anoxic metabolism rate of heterotrophic bacteria NOX , the substrate half-saturation constant K S , the dissolved oxygen half-saturation constant K O2 , the yield coefficient f of particulate non-biodegradable organic matter during the biomass decay process XI , the aerobic endogenous respiration rate b of heterotrophic bacteria HO2 , the anoxic endogenous respiration rate b of heterotrophic bacteria HNOX , the aerobic endogenous respiration rate b of heterotrophic bacteria STOO2 and the anoxic endogenous respiration rate b of heterotrophic bacteria STONOX , specifically, in this embodiment, the temperature T is added as a variable parameter to the maximum specific growth rate coefficient μ H of heterotrophic bacteria and the maximum storage rate coefficient K STO to ensure the applicability of the model under different temperature conditions.
[0069] S22. According to the parameter types of the ASM activated sludge mechanism model defined in step S11 and the denitrification process, establish the reaction rate equations for each stage in the denitrification process, including the aerobic storage of readily biodegradable substances concentration, the anoxic storage of readily biodegradable substances concentration, the aerobic growth of heterotrophic bacteria, the anoxic growth of heterotrophic bacteria, the aerobic endogenous respiration of heterotrophic bacteria intracellular polymers, the anoxic endogenous respiration of heterotrophic bacteria intracellular polymers, the aerobic endogenous respiration of heterotrophic bacteria, and the anoxic endogenous respiration of heterotrophic bacteria.
[0070] Establish the equations for the reaction process based on the substrate and parameters, including: 1. The intracellular storage process of heterotrophic bacteria: S cod 's aerobic storage:
[0071]
[0072] S cod 's anoxic storage:
[0073]
[0074] 2. Growth process of heterotrophic bacteria X H Aerobic growth of X: H
[0075]
[0076] X H Anaerobic ( section) growth of X:
[0077] X H Anaerobic ( section) growth of X:
[0078] 3. Intracellular polymers of heterotrophic bacteria X STO Endogenous respiration process of X: STO Aerobic endogenous respiration of X:
[0079]
[0080] X STO Anaerobic endogenous respiration of X:
[0081]
[0082] 4. Endogenous respiration process of heterotrophic bacteria X H Aerobic endogenous respiration of X: H
[0083]
[0084] X H Anaerobic endogenous respiration of X:
[0085]
[0086] Where: X I represents particulate non-biodegradable organic matter.
[0087] Based on the above equations, the corresponding reaction rate equations are established:
[0088] Aerobic storage of readily biodegradable substances:
[0089]
[0090] Anaerobic storage of readily biodegradable substances:
[0091]
[0092] Aerobic growth of heterotrophic bacteria:
[0093]
[0094] Anoxic growth of heterotrophic bacteria includes two types:
[0095] Nitrite to nitrogen:
[0096]
[0097] Nitrate to nitrogen:
[0098]
[0099] Heterotrophic intracellular polymer X STO Aerobic endogenous respiration:
[0100]
[0101] Heterotrophic intracellular polymer X STO Anoxic endogenous respiration:
[0102]
[0103] Aerobic endogenous respiration of heterotrophic bacteria:
[0104]
[0105] Anoxic endogenous respiration of heterotrophic bacteria:
[0106]
[0107] S23. Establish a matrix based on the reaction rate equation established in step S22, set the initial values of the parameters, and complete the construction of the ASM activated sludge mechanism model.
[0108] The parameter values of the ASM activated sludge mechanism model are shown in Table 1 below.
[0109] Table 1
[0110] Symbol Meaning Value Unit <![CDATA[Y STOO2 > <![CDATA[Heterotrophic bacteria aerobic X STO Yield coefficient]]> 0.8 gCOD / gCOD <![CDATA[Y STONOX > <![CDATA[Heterotrophic bacteria hypoxia X STO Yield coefficient]]> 0.85 gCOD / gCOD <![CDATA[Y HO2 > Yield coefficient of heterotrophic bacteria for aerobic growth 0.835 gCOD / gCOD <![CDATA[Y HNOX > Yield coefficient of heterotrophic bacteria for anoxic growth 0.74 gCOD / gCOD <![CDATA[f XI > <![CDATA[X in the biomass decay process I Yield coefficient]]> 0.2 gCOD / gCOD <![CDATA[K S > Substrate half-saturation constant 3 <![CDATA[d -1 > <![CDATA[K STO > Maximum storage rate coefficient <![CDATA[1.27 (T-20) > <![CDATA[d -1 > <![CDATA[μ H > Maximum specific growth rate coefficient of heterotrophic bacteria <![CDATA[6×1.07 (T-20) > <![CDATA[d -1 > <![CDATA[η NOX > Proportion coefficient of reduced anoxic metabolism rate of heterotrophic bacteria 0.63 / <![CDATA[K O2 > Dissolved oxygen half-saturation constant 0.1 <![CDATA[gO2 / m -3 > <![CDATA[b STOO2 > <![CDATA[X of heterotrophic bacteria STO Aerobic endogenous respiration rate]]> 0.2 <![CDATA[d -1 > <![CDATA[b STONOX > <![CDATA[X of heterotrophic bacteria STO Anoxic endogenous respiration rate]]> 0.1 <![CDATA[d -1 > <![CDATA[b HO2 > <![CDATA[X of heterotrophic bacteria H aerobic endogenous respiration rate]]> 0.1 <![CDATA[d -1 > <![CDATA[b HNOX > <![CDATA[X of heterotrophic bacteria H Anoxic endogenous respiration rate]]> 0.05 <![CDATA[d -1 >
[0111] After the basic parameter values are set, the boundary conditions and initial conditions of the ASM activated sludge mechanism model are set. The boundary conditions include the influent flow rate and water quality parameters. The sewage biological denitrification reactor consists of multiple treatment units such as an anaerobic tank, an aerobic tank, and an anoxic tank, and each unit is responsible for a specific biochemical process. Among them, the denitrification process mainly occurs in the anoxic tank. Under anoxic conditions, denitrifying bacteria use the organic matter in the sewage as an electron donor to reduce nitrate to nitrogen gas, and finally remove nitrogen from the water. This process not only reduces the nitrate content in the sewage but also reduces the total nitrogen load. The initial conditions include the initial concentrations of each component in the anoxic tank, and the specific data are shown in Table 2 below.
[0112] Table 2
[0113] Influent water quality concentration <![CDATA[S COD > <![CDATA[S O2 > <![CDATA[S NO2 > <![CDATA[S NO3 > <![CDATA[S NH4 > <![CDATA[S N2 > Initial value 300mg / L 0mg / L 0mg / L 0mg / L 20mg / L 0mg / L Component concentration in anoxic tank <![CDATA[X H > <![CDATA[X STO > <![CDATA[X I > Initial value 500mg / L 20mg / L 0mg / L
[0114] S24. Use the monitoring data of the denitrification process to adjust the parameters of the ASM activated sludge mechanism model so that the predicted data output by the ASM activated sludge mechanism model matches the monitoring data.
[0115] S3. Integrate the ASM activated sludge mechanism model and the RNN recursive neural network model to obtain the ASM-AI hybrid model. The ASM activated sludge mechanism model is used to provide parameter prediction data for the denitrification process of sewage treatment, and the RNN recursive neural network model is used to correct the prediction data of the ASM activated sludge mechanism model. Combine the prediction data obtained in step S1 and the monitoring data obtained in step S2 into a data set, and use this data set as the input for training the RNN recursive neural network model. The output of the ASM-AI hybrid model is the weighted result of the prediction data of the ASM activated sludge mechanism model and the prediction data of the RNN recursive neural network model.
[0116] S31. Preprocess the data set, including data cleaning and normalization, and randomly divide the data set into a training set, a validation set, and a test set according to a set ratio.
[0117] S32. Set the optimizer, loss function, and evaluation metrics of the RNN recursive neural network model, input the training set, train the RNN recursive neural network model, and use the validation set to evaluate the results of each iteration until the set evaluation metric requirements are met.
[0118] S33. Use the test set to evaluate the performance of the trained RNN recursive neural network model, output the evaluation results, and optimize the hyperparameters of the RNN recursive neural network model according to the evaluation results.
[0119] Please refer to Figure 2As shown, the present invention selects the RNN (Recurrent Neural Network) model as the artificial intelligence model for configuration and training. The architecture of the RNN (Recurrent Neural Network) includes multiple RNN units, which are used to effectively capture the long-term dependencies in the sequence information. At the same time, the Dropout technique is introduced to reduce the possibility of overfitting of the model, and the model prediction is output through one or more fully connected layers. Compile the RNN (Recurrent Neural Network) model, and set the optimizer, loss function and evaluation metrics. Then, perform model training. The data set is converted into the input format that conforms to the RNN (Recurrent Neural Network) model, that is, each instance represents a sequence data of a fixed length. Set the early stopping callback to prevent overfitting and improve the generalization ability of the model. Through iterative training, the model meets the set evaluation metric requirements on the validation set. Finally, use the test set to evaluate the performance of the model. Continuously optimize the hyperparameters according to the model evaluation results in order to achieve the optimal model efficiency.
[0120] The output formula of the ASM-AI hybrid model is:
[0121] y mixed = w1 × y ASM + w2 × y AI
[0122] In the formula: y ASM is the predicted value of the ASM activated sludge mechanism model, y AI is the predicted value of the RNN (Recurrent Neural Network) model, w1 and w2 are weights, and w1 + w2 = 1.
[0123] S4. Optimize the carbon source dosage according to the output of the ASM-AI hybrid model. Define the objective function as the difference between the output of the ASM-AI hybrid model and the target value, and use the optimization algorithm to obtain the real-time carbon source dosage that minimizes the objective function.
[0124] The objective function is:
[0125]
[0126] In the formula: MSE is the mean square error, N is the sample size, y i is the target value, is the output value of the ASM-AI hybrid model.
[0127] Use the optimization algorithm (such as the gradient descent method or genetic algorithm) to find the optimal carbon source dosage C opt , so that the objective function reaches the minimum value.
[0128]
[0129] In the formula: C is the carbon source dosage.
[0130] To control the carbon source dosing amount in real time, an adjustment factor α is introduced to smooth the change of the carbon source dosing amount and avoid the impact on the system caused by mutations. The denitrifying carbon source dosing amount C is adjusted in real time according to the optimization results. real .
[0131] C real = C current + α·(C opt - C current )
[0132] In the formula: C current is the current carbon source dosing amount, α is the adjustment factor, and its value is 0.1 in this example.
[0133] S5. Control the carbon source dosing amount in the sewage biological denitrification reactor and adjust it to the real-time carbon source dosing amount obtained in step S4.
[0134] Specifically, the calculated carbon source dosing amount C real is transmitted to the control system, such as PLC (Programmable Logic Controller) or SCADA (Supervisory Control and Data Acquisition). The control system adjusts the flow rate of the carbon source dosing pump according to the received carbon source dosing amount C real to ensure that the carbon source is dosed as needed. Parameters such as the carbon source concentration, ammonia nitrogen concentration, and nitrate nitrogen concentration in the reactor are monitored in real time through sensors to ensure the accuracy of the carbon source dosing amount.
[0135] S6. Use the ASM-AI hybrid model to predict the denitrification process after adjusting the carbon source dosing amount, output the prediction data, and at the same time monitor the parameters of the sewage biological denitrification reactor, output the monitoring data of the denitrification process, calculate the error value between the prediction data of the ASM-AI hybrid model and the monitoring data of the denitrification process in this step, correct the hyperparameters of the RNN recursive neural network model, calculate the error value between the prediction data of the ASM-AI hybrid model and the parameters of the ASM activated sludge mechanism model, and use the gradient descent method to update the parameters of the ASM activated sludge mechanism model.
[0136] The update of the parameters of the ASM activated sludge mechanism model includes:
[0137] Calculate the error value Δu between the prediction data of the ASM-AI hybrid model and the prediction data of the ASM activated sludge mechanism model:
[0138] Δu = u mixed - u ASM
[0139] In the formula: u mixed is the prediction data of the ASM-AI hybrid model, and u ASM is the parameter of the ASM activated sludge mechanism model;
[0140] Update the parameters of the ASM activated sludge mechanism model using the gradient descent method:
[0141]
[0142] Where: u′ ASM is the updated parameter of the ASM activated sludge mechanism model, and η is the learning rate.
[0143] Please refer to Figure 3 As shown, apply the above intelligent control method for adding carbon source for biological denitrification of sewage to a typical biological denitrification reactor of sewage, control the dosage of carbon source addition, and synchronously detect and output the total nitrogen concentration data through sensors. It can be clearly seen from Figure 3 that before the optimal control, the dosage of carbon source addition was fixed, maintained at a relatively large dosage. However, due to the non-constant quality of sewage, the total nitrogen concentration fluctuated greatly before the optimal control, and it was impossible to ensure the stability of indicators. There were situations of carbon source waste in some periods and carbon source shortage in some periods. After the optimal control, the dosage of carbon source addition was controlled by the ASM-AI hybrid model. With the average dosage per unit time decreasing, the fluctuation of the total nitrogen concentration decreased and was at a relatively low average level. After a period of optimal control, there was an obvious downward trend, which confirmed the effectiveness of this method.
Claims
1. An intelligent control method for adding carbon source for biological denitrification and denitrification of sewage, characterized in that: The following steps are involved: S1. Monitor the parameters of the sewage biological denitrification reactor and output the monitoring data of the denitrification and denitrification process; S2. Based on the principle of biological denitrification of sewage and the structure of biological denitrification reactor of sewage, an ASM activated sludge mechanism model of denitrification and denitrification process of sewage treatment is constructed, and the parameters of denitrification and denitrification process of sewage treatment are predicted by using the ASM activated sludge mechanism model, and the predicted data is output; S3. Integrate the ASM activated sludge mechanism model and the RNN recursive neural network model to obtain an ASM-AI hybrid model. The ASM activated sludge mechanism model is used to provide parameter prediction data for the denitrification and denitrification process of sewage treatment. The RNN recursive neural network model is used to correct the prediction data of the ASM activated sludge mechanism model. The prediction data obtained in step S1 and the monitoring data obtained in step S2 are combined into a data set, and the data set is used as the input of the RNN recursive neural network model for training. The output of the ASM-AI hybrid model is a weighted result of the prediction data of the ASM activated sludge mechanism model and the prediction data of the RNN recursive neural network model. S4. Optimize the carbon source dosage according to the output of the ASM-AI hybrid model, define the objective function as the difference between the output of the ASM-AI hybrid model and the target value, and use the optimization algorithm to obtain the real-time carbon source dosage that minimizes the objective function; S5. Control the carbon source dosage in the sewage biological denitrification reactor and adjust it to the real-time carbon source dosage obtained in step S4.
2. The intelligent control method for adding carbon source for biological denitrification and denitrification of sewage according to claim 1 is characterized by: In step S1, the monitoring data of the denitrification and denitrification process include: the flow rate of the inlet water, the concentration of readily biodegradable substances, the ammonia nitrogen concentration, the total nitrogen concentration, the flow rate of the outlet water, the concentration of readily biodegradable substances, the ammonia nitrogen concentration, the nitrate nitrogen concentration, the dissolved oxygen concentration, the ammonia nitrogen concentration, the nitrate nitrogen concentration, the nitrogen concentration, and the redox potential in the reactor.
3. The intelligent control method for adding carbon source for biological denitrification and denitrification of sewage according to claim 1 is characterized by: The step S2 comprises the following sub-steps: S21. Based on the principle of biological denitrification of sewage and the structure of biological denitrification reactor, define the parameter types of ASM activated sludge mechanism model, including the concentration of biodegradable substances S cod , dissolved oxygen concentration S O2 , nitrite concentration S NO2 , nitrate concentration S NO3 , ammonia nitrogen concentration S NH4 , Nitrogen concentration S N2 , heterotrophic aerobic productivity coefficient Y STOO2 , heterotrophic bacteria anoxic yield coefficient Y STONOX , heterotrophic aerobic growth yield coefficient Y HO2 , heterotrophic bacteria anoxic growth yield coefficient Y HNOX , maximum specific growth rate coefficient of heterotrophic bacteria μ H , Maximum storage rate coefficient K STO 、The ratio coefficient of heterotrophic bacteria anoxic metabolic rate reduction n NOX , substrate half-saturation constant K S , dissolved oxygen half-saturation constant K O2 , the yield coefficient of particulate non-biodegradable organic matter in the biomass decay process f XI , aerobic endogenous respiration rate of heterotrophic bacteria b HO2 , the anoxic endogenous respiration rate of heterotrophic bacteria b HNOX , aerobic endogenous respiration rate of heterotrophic bacteria b STOO2 and the anoxic endogenous respiration rate of heterotrophic bacteria b STONOX ; S22. According to the parameter type of the ASM activated sludge mechanism model defined in step S11 and the denitrification and denitrification process, the reaction rate equations for each stage in the denitrification and denitrification process are established, including aerobic storage of the concentration of readily biodegradable substances, anoxic storage of the concentration of readily biodegradable substances, aerobic growth of heterotrophic bacteria, anoxic growth of heterotrophic bacteria, aerobic endogenous respiration of intracellular polymers of heterotrophic bacteria, anoxic endogenous respiration of intracellular polymers of heterotrophic bacteria, aerobic endogenous respiration of heterotrophic bacteria, and anoxic endogenous respiration of heterotrophic bacteria; S23, establishing a matrix according to the reaction rate equation established in step S12, setting initial values of parameters, and completing the construction of the ASM activated sludge mechanism model.
4. The intelligent control method for adding carbon source for biological denitrification and denitrification of sewage according to claim 3 is characterized by: In step S22, the reaction rate equations of each stage in the denitrification and denitrification process include: Aerobic storage of readily biodegradable material concentrations: Anoxic storage of readily biodegradable material concentrations: Aerobic growth of heterotrophic bacteria: There are two types of anaerobic growth of heterotrophic bacteria: Nitrite to Nitrogen: Nitrate to Nitrogen: Aerobic endogenous respiration of intracellular polymers of heterotrophic bacteria: Anoxic endogenous respiration of intracellular polymers in heterotrophic bacteria: Aerobic endogenous respiration of heterotrophic bacteria: Anoxic endogenous respiration of heterotrophic bacteria:
5. The intelligent control method for adding carbon source for biological denitrification and denitrification of sewage according to claim 3 is characterized by: The step S2 further comprises the following sub-steps: S24. The monitoring data of the denitrification and denitrification process is used to adjust the parameters of the ASM activated sludge mechanism model so that the predicted data output by the ASM activated sludge mechanism model is consistent with the monitoring data.
6. The intelligent control method for adding carbon source for biological denitrification and denitrification of sewage according to claim 1, characterized in that: The step S3 comprises the following sub-steps: S31, performing data cleaning and normalization on the data set, and randomly dividing the data set into a training set, a validation set, and a test set according to a set ratio; S32, setting the optimizer, loss function and evaluation index of the RNN recursive neural network model, inputting the training set, training the RNN recursive neural network model, and using the validation set to evaluate the results of each iteration until the set evaluation index requirements are met; S33. Use the test set to perform performance evaluation on the trained RNN recursive neural network model, output the evaluation results, and optimize the hyperparameters of the RNN recursive neural network model based on the evaluation results.
7. The intelligent control method for adding carbon source for biological denitrification and denitrification of sewage according to claim 1, characterized in that: In step S3, the output formula of the ASM-AI hybrid model is: and mixed =w1×y ASM +w2×y AI Where: y ASM is the predicted value of the ASM activated sludge mechanism model, y AI is the predicted value of the RNN recurrent neural network model, w1 and w2 are weights, and satisfy w1+w2=1.
8. The intelligent control method for adding carbon source for biological denitrification and denitrification of sewage according to claim 1, characterized in that: The following steps are also included: S6. Use the ASM-AI hybrid model to predict the denitrification and denitrification process after adjusting the carbon source dosage, output the predicted data, monitor the parameters of the sewage biological denitrification reactor, output the monitoring data of the denitrification and denitrification process, calculate the error value between the ASM-AI hybrid model prediction data and the monitoring data of the denitrification and denitrification process in this step, correct the hyperparameters of the RNN recursive neural network model, calculate the error value between the ASM-AI hybrid model prediction data and the ASM activated sludge mechanism model parameters, and update the parameters of the ASM activated sludge mechanism model.
9. The intelligent control method for adding carbon source for biological denitrification and denitrification of sewage according to claim 8, characterized in that: In step S6, updating the parameters of the ASM activated sludge mechanism model includes: Calculate the error value Δu between the ASM-AI hybrid model prediction data and the ASM activated sludge mechanism model prediction data: Δu=u mixed -u ASM Where: u mixed Predict data for the ASM-AI hybrid model, u ASM are the parameters of the ASM activated sludge mechanism model; Use the gradient descent method to update the ASM activated sludge mechanism model parameters: Where: u′ ASM are the updated ASM activated sludge mechanism model parameters, and η is the learning rate.
10. The intelligent control method for adding carbon source for biological denitrification and denitrification of sewage according to claim 1, characterized in that: In step S4, the objective function is: Where: MSE is the mean square error, N is the sample size, y i is the target value, is the output value of the ASM-AI hybrid model.
Citation Information
Patent Citations
Carbon source medicament adding equipment and adding method
CN111470628A
Intelligent dosing system and method based on mathematical model and predictive control
CN114217529A
Intelligent carbon source adding method and system
CN117985847A
CFD-ASM coupling simulation model, establishment method thereof and sewage treatment system optimization method
CN111222253A
Sewage treatment aeration control method and system based on artificial intelligence and mechanism model
CN118838168A
Cited By
Microorganism supplement control method and device for high-concentration nitrate nitrogen industrial sewage
CN120573848A
Rural domestic sewage treatment system and method for controlling A2O reaction process based on energy detection
CN121107595A
Constructed wetland and intelligent carbon source regulation and control method thereof
CN121342207A
Artificial wetland and carbon source intelligent regulation method thereof
CN121342207B