Measurement method for predicting nitrous oxide direct discharge in sewage biological denitrification process by using coupling model
By coupling activated sludge mathematical model ASM and machine learning model, the difficulty of measuring N2O direct emissions in sewage treatment is solved, more accurate predictions and more efficient emission reduction strategies are achieved, and the environmental performance of sewage treatment plants is improved.
Patent Information
- Application Number
- CN202510157636.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art has difficulties in obtaining, processing and analyzing data when measuring the direct emissions of nitrous oxide N2O in wastewater treatment, and the existing models have poor prediction effects in practical applications.
Coupled models, including activated sludge mathematical model ASM and machine learning models, are adopted to obtain data that affects the direct N2O emissions, coordinate and analyze, correct model parameters, carry out in-depth processing and feature processing, select appropriate machine learning models for hyperparameter optimization, and finally explain the prediction results.
This method can more accurately predict the direct emission of N2O during sewage biological denitrification, reduce the limitation of low data quality, reduce the operating costs of sewage treatment plants, enhance environmental performance, and help formulate efficient emission reduction strategies.
Smart Images

Figure CN119988883A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of coupling models for constructing an activated sludge model and a machine learning model, and more specifically to a measurement method for predicting direct nitrous oxide emissions in a sewage biological denitrification process using a coupling model. Background Art
[0002] At present, the direct emission of nitrous oxide (N2O) in actual sewage treatment is generally measured by monitoring, accounting or combined with model prediction. However, the single monitoring and accounting method is limited by technology or cost, which makes it difficult for the model to obtain, process and analyze direct emission data.
[0003] First of all, monitoring methods are divided into offline and online monitoring. Offline monitoring is a non-in-situ detection, which requires sampling on site and then sending it to the laboratory for analysis. It is time-consuming and generally only measures limited points. Affected by the on-site data collection method and subsequent analysis methods, the sample will continue to undergo biochemical reactions during the transfer process, and potential erroneous operations will also affect the accuracy. In addition, the time interval for collecting data in offline monitoring is large, the amount of stored data is small, and the advantages of low cost are generally suitable for rough analysis of treatment effects and emission levels. The online monitoring equipment can form a real-time monitoring system with the data processing device, automatically complete data collection, storage and analysis, and only need regular calibration to obtain a large amount of on-site emission data. Online monitoring provides continuous real-time data, reduces the risks that may be caused by errors in the analysis of manually collected samples, and improves overall efficiency and economic benefits. However, the high investment has prevented it from being widely used. The monitoring device is generally fixed in position or difficult to move, and can only measure limited points but cannot analyze emission hot spots.
[0004] Secondly, the accounting method is to estimate N2O emissions using the emission factor method, but the different operating conditions of each sewage treatment plant result in significant temporal and spatial variability in its emissions, and there are also large differences between emission levels. Emission factors need to be selected based on the type of sewage treatment process, operating conditions and specific national or regional standards, and historical emission data should be collected and analyzed, and the emission factors should be adjusted and corrected based on emission characteristics and changing trends. Surveys have shown that short-term monitoring activities cannot capture seasonal N2O emission dynamics, while long-term monitoring activities under the same operating conditions will obtain higher emission factors, resulting in large variations in N2O dynamic emission factors and high uncertainty in calculating carbon footprints. This method is suitable for rapid, preliminary macro-estimates of emissions, with relatively low costs and operational difficulties.
[0005] In addition, although the N2O soft sensor method for building a prediction model has obvious advantages in accurately and efficiently measuring emissions or intuitively viewing the operating status of the system, in practical applications, poor models may be obtained due to non-standard modeling processes and methods. For example, data collection may not be comprehensive and not include all key factors affecting N2O emissions, resulting in missing model input information and affecting prediction accuracy. Or due to improper model structure selection, the appropriate model is not selected according to the complex characteristics of the sewage treatment system. Inaccurate methods used in the parameter estimation process may also result in poor prediction of the model and fail to accurately reflect the actual emission of N2O. In short, most of the existing N2O direct emission models are constructed using reactor operation data in laboratory environments, and less use of actual sewage treatment plant operation data. There is still a lot of room for improvement in the model.
[0006] Therefore, it is an urgent problem for those skilled in the art to propose a measurement method for predicting the direct emission of nitrous oxide in the biological denitrification process of sewage using a coupling model to solve the difficulties existing in the prior art. Summary of the invention
[0007] In view of this, the present invention provides a measurement method for predicting the direct emission of nitrous oxide in the biological denitrification process of sewage using a coupling model. Since greenhouse gas emission standards are still imperfect at the levels of different countries, industries and enterprises, especially for some emerging sewage treatment technologies, clear standards and specifications have not yet been established, and the traditional method of measuring direct N2O emissions is also difficult to intuitively describe the operating status of the system. Therefore, developing a model to formulate an efficient N2O emission reduction strategy is of great significance to improving the efficiency of sewage treatment plants and mitigating climate change. In short, under the background of dual carbon goals, the present invention proposes standardized modeling processes and data processing and analysis methods under different influent water quality, process types, operating and environmental conditions.
[0008] In order to achieve the above object, the present invention provides the following technical solutions:
[0009] A method for measuring direct nitrous oxide emissions from a wastewater biological denitrification process using a coupled model, comprising the following steps:
[0010] S1. Obtain data that affects direct N2O emissions;
[0011] S2. Coordinate and analyze the acquired data, check the N2O emission characteristics and select the activated sludge mathematical model ASM that includes the N2O emission pathway;
[0012] S3, modifying the parameters of the activated sludge mathematical model ASM, obtaining the final activated sludge mathematical model ASM, and outputting the data set with the shortest time interval;
[0013] S4, deep processing and feature processing of the data set;
[0014] S5. Select a machine learning model to optimize model hyperparameters based on the characteristics of the data set;
[0015] S6. Explain the process and results predicted by the coupled model.
[0016] Optional, data include: chemical oxygen demand COD, ammonia nitrogen NH4 + -N, nitrite nitrogen NO2-N, nitrate nitrogen NO3-N, total organic nitrogen TON, total phosphorus TP, dissolved oxygen DO, pH, redox potential ORP, temperature, dissolved N2O and gaseous N2O.
[0017] Optionally, S2 coordinates and analyzes the acquired data, checks the N2O emission characteristics, and selects the activated sludge mathematical model ASM that includes the N2O emission pathway. The specific contents are:
[0018] After aligning the data at different collection intervals, dot plots and box plots were drawn to view the data distribution to check for missing values and outliers, and the emission characteristics were analyzed to select the activated sludge mathematical model (ASM) that included the N2O emission pathway.
[0019] Optionally, the parameters of the activated sludge mathematical model ASM are modified in S3 to obtain the final activated sludge mathematical model ASM, and the specific content of the data set with the shortest time interval is output as follows:
[0020] Choose to use the automatic search method, search within the range of parameter values and provide the parameter combination that makes the model predict the best result, make multiple comparisons on different data sets and finally determine the algorithm; compare the mean square error (MSE) and determination coefficient (R) of the model output data with the real data. 2 The final activated sludge mathematical model ASM is obtained by correction as the target, which is used to output the data set with the shortest time interval.
[0021] Optionally, the specific content of selecting a machine learning model for model hyperparameter optimization according to the characteristics of the data set in S5 is:
[0022] 80% of the data is selected for training and 20% for testing. The method of model hyperparameter optimization requires multiple comparisons to select the search algorithm. The mean square error MSE and the coefficient of determination R 2 Set it to optimize the loss function, and finally use the test set to view the model performance.
[0023] Optionally, the specific content of explaining the process and results of the coupled model prediction in S6 is:
[0024] The introduction of an explanatory activated sludge mathematical model ASM for interpolation is consistent with the N2O emission mechanism in the process of biological denitrification of sewage. In addition to the correlation between the input and output itself for model interpretation, the SHAP analysis method can also be used to deeply explain the importance of predictive variables.
[0025] It can be seen from the above technical solution that, compared with the prior art, the present invention discloses a method for measuring the direct emission of nitrous oxide in the biological denitrification process of sewage using a coupling model, and its beneficial effects are:
[0026] 1) The present invention is proposed in response to the current climate change and the growing demand for carbon emission reduction in sewage treatment plants. The coupling of ASM and machine learning models can reduce the difficulty of obtaining high-quality continuous data as much as possible, refine the specific data acquisition method, continuously compare and select appropriate parameter correction methods, and perform complete data processing and feature engineering, which are all necessary ways to simulate the biological denitrification process of real sewage treatment plants;
[0027] 2) The present invention can not only reduce the limitation of low data quality and provide data support, but also reduce the operating costs of sewage treatment plants, enhance environmental performance, and help formulate efficient emission reduction strategies to better meet the stricter environmental regulations in the future. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0029] Figure 1 A flow chart of a method for measuring direct emission of nitrous oxide in a sewage biological denitrification process using a coupling model provided by the present invention;
[0030] Figure 2 The coefficient matrix diagram of the principal components and original features after PCA dimension reduction provided by the method of the present invention;
[0031] Figure 3 The R of the method provided by the present invention on a certain test data set 2 Value graph. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] See also Figure 1 As shown, the present invention discloses a method for measuring direct emission of nitrous oxide in a sewage biological denitrification process using a coupling model, comprising the following steps:
[0034] S1. Obtain data that affects direct N2O emissions;
[0035] S2. Coordinate and analyze the acquired data, check the N2O emission characteristics and select the activated sludge mathematical model ASM that includes the N2O emission pathway;
[0036] S3, modifying the parameters of the activated sludge mathematical model ASM, obtaining the final activated sludge mathematical model ASM, and outputting the data set with the shortest time interval;
[0037] S4, deep processing and feature processing of the data set;
[0038] Specifically, since the data set is essentially obtained through ASM interpolation, there are no missing values or outliers in theory, that is, all of its data contains valuable information and can be directly used to train machine learning models. However, machine learning models are also greatly affected by feature engineering, and attention should also be paid to the correlation between the predictor variables themselves and between the predictor variables and the target variable. Methods such as Pearson correlation analysis, variance inflation factor (VIF) and tree models can rank the importance of predictor variables to reduce model redundancy and improve computational efficiency and accuracy. If it is time series data, it may also involve constructing new features such as lag features or sliding windows to describe time information, while spatiotemporal data may involve creating features such as geographic location. Before selecting a model for training, redundancy between features should be minimized.
[0039] S5. Select a machine learning model to optimize model hyperparameters based on the characteristics of the data set;
[0040] S6. Explain the process and results predicted by the coupled model.
[0041] Further, the data include: chemical oxygen demand COD, ammonia nitrogen NH4 + -N, nitrite nitrogen NO2-N, nitrate nitrogen NO3-N, total organic nitrogen TON, total phosphorus TP, dissolved oxygen DO, pH, redox potential ORP, temperature, dissolved N2O and gaseous N2O.
[0042] Specifically, the specific collection method needs to be determined in combination with the sewage treatment process. When the sewage treatment process is a plug flow process such as AAO, appropriate points should be selected on the corridor. For completely mixed processes such as SBR that are treated in chronological order, sampling should be carried out at different time points. The determination of specific sampling variables needs to be based on the analysis of historical operations and relevant literature. The use of laboratory analysis combined with online monitoring can improve the accuracy and efficiency of data collection. It should be noted that data with stable and regular changes can choose a lower collection frequency, while variables with a greater impact on gaseous N2O and a larger range of changes need to choose a higher collection frequency. Because measurement errors or network crashes may occur during data acquisition, preliminary coordination and analysis are required. After aligning the data at different collection intervals, drawing point and line graphs and box and line graphs can intuitively view the data distribution to check missing values and outliers. Analyze its emission characteristics to select an activated sludge mathematical model (ASM) that includes the N2O emission pathway. Generally, models such as ASM1 or ASM3 can be selected.
[0043] Furthermore, S2 coordinates and analyzes the acquired data, checks the N2O emission characteristics, and selects the activated sludge mathematical model ASM that includes the N2O emission pathway. The specific contents are:
[0044] After aligning the data at different collection intervals, dot plots and box plots were drawn to view the data distribution to check for missing values and outliers, and the emission characteristics were analyzed to select the activated sludge mathematical model (ASM) that included the N2O emission pathway.
[0045] Furthermore, the parameters of the activated sludge mathematical model ASM are modified in S3 to obtain the final activated sludge mathematical model ASM, and the specific content of the data set with the shortest time interval is output as follows:
[0046] Choose to use the automatic search method, search within the range of parameter values and provide the parameter combination that makes the model predict the best result, make multiple comparisons on different data sets and finally determine the algorithm; compare the mean square error (MSE) and determination coefficient (R) of the model output data with the real data. 2 The final activated sludge mathematical model ASM is obtained by correction as the target, which is used to output the data set with the shortest time interval.
[0047] Specifically, the search algorithms include grid search, random search, and Bayesian optimization.
[0048] Specifically, the simulation software for building ASM has gradually matured. BioWin, GPS-X and SUMO can be used to simulate the process. It should be noted that ASM is only a sub-model of the whole plant model in the simulation software, and environmental data such as the volume of the biological pool, sewage flow, internal reflow and external reflow ratio need to be input to determine the boundary conditions of the model. Taking ASM1 as an example, after adding four-step denitrification and N2O emission pathways to the model, according to the research results, the heterotrophic bacteria yield coefficient (Y H ) and heterotrophic bacteria attenuation coefficient (b H ) and other key parameters, and the default values provided in the literature can be used for the remaining parameters. Generally speaking, it is necessary to design a continuous test or measure and revise the parameter values based on the sewage treatment operation experience, but the cycle may be long and the obtained parameter values may not be accurate.
[0049] Furthermore, the specific contents of selecting a machine learning model for model hyperparameter optimization according to the characteristics of the data set in S5 are as follows:
[0050] 80% of the data is selected for training and 20% for testing. The method of model hyperparameter optimization requires multiple comparisons to select the search algorithm. The mean square error MSE and the coefficient of determination R 2 Set it to optimize the loss function, and finally use the test set to view the model performance.
[0051] Specifically, for example, the long short-term memory network (LSTM) used for time series data research, or the extreme gradient boosting (XGBoost) with low requirements on data normalization and dimensionality, have the potential to perform better fitting.
[0052] Furthermore, the specific contents of explaining the process and results of the coupled model prediction in S6 are as follows:
[0053] The introduction of an explanatory activated sludge mathematical model ASM for interpolation is consistent with the N2O emission mechanism in the process of biological denitrification of sewage. In addition to the correlation between the input and output itself for model interpretation, the SHAP analysis method can also be used to deeply explain the importance of predictive variables.
[0054] Specifically, since the amount of data of the pure activated sludge mathematical model ASM is too small, and the pure machine learning model has poor interpretability, the ASM with strong interpretability is introduced for interpolation. In addition, on the basis of continuous operation of sewage treatment, new data should be continuously input for model training to continuously enhance the generalization ability of the model.
[0055] In summary, based on the existing technology, the present invention refines the data acquisition method and provides an ASM interpolation method that includes the physical, chemical and biological transformation mechanisms of N2O, which is used to expand the data set for training and testing machine learning models. Overall, it has greater flexibility than ASM and stronger interpretability than machine learning models.
[0056] In a specific embodiment, the present invention is verified using a large amount of historical data of a certain SBR reactor that has been previously operated. + -N, NO2-N, NO3-N, TON, PO4 3 -, DO, pH, ORP, temperature, dissolved N2O and gaseous N2O with a maximum interval of hours. First, the SUMO4N model with a four-step denitrification pathway and N2O emission pathway in the SUMO simulation software was selected, and some key parameters were corrected using grid search, and a large number of data sets with minute intervals were generated. After obtaining a large number of data sets, the code was written in Python. After method comparison, Pearson correlation analysis, maximum and minimum normalization, data set partitioning and principal component analysis (PCA) were finally performed, and the model with the best fitting effect was obtained, which was XGBoost. The performance of its fitting effect on real data can be seen in Figure 2 and Figure 3 shown.
[0057] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0058] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for measuring direct emission of nitrous oxide from biological denitrification of sewage using a coupled model, characterized in that: The following steps are involved: S1. Obtain data that affects direct N2O emissions; S2. Coordinate and analyze the acquired data, check the N2O emission characteristics and select the activated sludge mathematical model ASM that includes the N2O emission pathway; S3, modifying the parameters of the activated sludge mathematical model ASM, obtaining the final activated sludge mathematical model ASM, and outputting the data set with the shortest time interval; S4, deep processing and feature processing of the data set; S5. Select a machine learning model to optimize model hyperparameters based on the characteristics of the data set; S6. Explain the process and results predicted by the coupled model.
2. A method for measuring the direct emission of nitrous oxide in the biological denitrification process of sewage using a coupling model according to claim 1, characterized in that: Data includes: chemical oxygen demand COD, ammonia nitrogen NH4 + -N, nitrite nitrogen NO2-N, nitrate nitrogen NO3-N, total organic nitrogen TON, total phosphorus TP, dissolved oxygen DO, pH, redox potential ORP, temperature, dissolved N2O and gaseous N2O.
3. The method for measuring the direct emission of nitrous oxide in the biological denitrification process of sewage using a coupling model according to claim 1, characterized in that: In S2, the acquired data are coordinated and analyzed, the N2O emission characteristics are checked, and the specific contents of the activated sludge mathematical model ASM including the N2O emission pathway are selected as follows: After aligning the data at different collection intervals, dot plots and box plots were drawn to view the data distribution to check for missing values and outliers, and the emission characteristics were analyzed to select the activated sludge mathematical model (ASM) that included the N2O emission pathway.
4. The method for measuring the direct emission of nitrous oxide from biological denitrification of sewage using a coupled model according to claim 1, characterized in that: In S3, the parameters of the activated sludge mathematical model ASM are modified to obtain the final activated sludge mathematical model ASM. The specific content of the data set with the shortest time interval is output as follows: Choose to use the automatic search method, search within the range of parameter values and provide the parameter combination that makes the model predict the best result, make multiple comparisons on different data sets and finally determine the algorithm; compare the mean square error (MSE) and determination coefficient (R) of the model output data with the real data. 2 The final activated sludge mathematical model ASM is obtained by correction as the target, which is used to output the data set with the shortest time interval.
5. The method for measuring the direct emission of nitrous oxide from biological denitrification of sewage using a coupled model according to claim 1, characterized in that: The specific contents of S5 in selecting a machine learning model for model hyperparameter optimization based on the characteristics of the data set are as follows: 80% of the data is selected for training and 20% for testing. The method of model hyperparameter optimization requires multiple comparisons to select the search algorithm. The mean square error MSE and the coefficient of determination R 2 Set it to optimize the loss function, and finally use the test set to view the model performance.
6. The method for measuring the direct emission of nitrous oxide from biological denitrification of sewage using a coupled model according to claim 1, characterized in that: The specific contents of S6 explaining the process and results of coupled model prediction are as follows: The introduction of an explanatory activated sludge mathematical model ASM for interpolation is consistent with the N2O emission mechanism in the process of biological denitrification of sewage. In addition to the correlation between the input and output itself for model interpretation, the SHAP analysis method can also be used to deeply explain the importance of predictive variables.