Sewage treatment plant nitrous oxide release prediction method based on long short-term memory neural network

Through the prediction method of nitrous oxide release in sewage treatment plants based on long and short-term memory neural networks, a nitrous oxide release model is established using conventional monitoring data, which solves the problems of large error, strong hysteresis and high cost of nitrous oxide release prediction in the prior art, and achieves accurate prediction in advance and reduction of operation and maintenance costs.

CN119742001AInactive Publication Date: 2025-04-01BEIJING UNIV OF TECH

Patent Information

Application Number
CN202411823600.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-04-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to effectively predict the release of nitrous oxide in wastewater treatment plants, and the traditional methods have problems such as large errors, strong hysteresis, and high costs.

Method used

Using the nitrous oxide release prediction method for sewage treatment plants based on long and short-term memory neural networks, nitrous oxide release models are established by using existing sewage treatment plants routine monitoring data, without the need for additional complex measurement equipment and high-cost experimental data.

Benefits of technology

In advance accurate prediction of nitrous oxide release is achieved, which reduces operation and maintenance costs, reduces manual intervention, and improves prediction accuracy and model reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119742001A_ABST
    Figure CN119742001A_ABST
Patent Text Reader

Abstract

The invention discloses a sewage treatment plant nitrous oxide release prediction method based on a long short-term memory neural network, which is applied to the technical field of sewage treatment and comprises the following steps: acquiring time sequence data of water quality parameters, operation parameters, environmental factors and nitrous oxide release flux; performing feature selection by using a Pearson correlation coefficient method, and dividing into a training set and a test set based on a preset time sequence; training based on the training set to obtain a nitrous oxide release prediction model based on a long short-term memory neural network, and performing hyper-parameter tuning by using a time sequence cross validation method and a grid search method; inputting the test set to the nitrous oxide release prediction model corresponding to the optimal hyper-parameter to obtain a model prediction result, and performing model performance optimization through data volume addition and further hyper-parameter tuning according to a comparison result with a true value; and inputting the to-be-tested set to the optimized prediction model to obtain a nitrous oxide release prediction result. According to the method, the nitrous oxide release prediction precision is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sewage treatment, and in particular to a method for predicting nitrous oxide release in a sewage treatment plant based on a long short-term memory neural network. Background Art

[0002] Nitrous oxide released during sewage treatment is a potent greenhouse gas with a global warming potential 265 times that of carbon dioxide. According to expert calculations, nitrous oxide emissions account for up to 83% of the overall carbon footprint of sewage treatment plants. Therefore, in order to quickly respond to climate change, it has become one of the important tasks of sewage treatment plants to explore the release patterns of nitrous oxide and reduce its release.

[0003] Nitrous oxide in sewage treatment plants mainly comes from the nitrogen conversion process in the biological treatment of sewage. Its release pattern is complex and changeable, and is affected by a variety of water quality parameters, operating parameters, and environmental factors. The method of manually monitoring the release of nitrous oxide offline has the disadvantages of large errors, strong hysteresis, time-consuming and labor-intensive. Although the sensor online monitoring method can monitor the release of nitrous oxide in time, the sensor is expensive and cannot predict the release of nitrous oxide in advance and take timely countermeasures. Some researchers have tried to use mechanism models to simulate the release of nitrous oxide. Although the mechanism model attempts to accurately describe the generation process of nitrous oxide by incorporating multiple microbial pathways (such as nitrification, denitrification, etc.) and abiotic mechanisms, this approach often leads to overly complex models with a large number of parameters. This over-parameterization leads to difficulties in the calibration and verification process of the model. In addition, the mechanism model usually needs to monitor some intermediate products that are difficult to measure or have high costs (such as hydroxylamine (NH2OH), nitric oxide (NO), etc.). These additional measurement requirements increase the monitoring cost and complexity, and also make the calibration process of the model more cumbersome and costly.

[0004] Therefore, how to provide a method for predicting nitrous oxide release from sewage treatment plants that does not require additional complex measuring equipment and high-cost experimental data, and can accurately predict the amount of nitrous oxide release in advance and take timely countermeasures is an issue that technical personnel in this field urgently need to solve. Summary of the invention

[0005] In view of this, the present invention proposes a method for predicting the release of nitrous oxide from a sewage treatment plant based on a long short-term memory neural network. Considering the application of machine learning in the field of sewage treatment, it no longer relies on traditional biological or chemical process mechanisms, but automatically learns laws from historical data in a data-driven manner, and has significant advantages in processing large-scale, high-dimensional, and complex data with nonlinear relationships. Specifically, a nitrous oxide release model can be established by utilizing existing conventional monitoring data of sewage treatment plants (such as ammonia nitrogen, nitrite, dissolved oxygen, etc.), without the need for additional complex measuring equipment and high-cost experimental data, thereby reducing operation and maintenance costs. In particular, time series machine learning models such as long short-term memory neural networks can well capture the time-varying characteristics of nitrous oxide emissions, and make full use of their time series data autocorrelation to accurately predict future nitrous oxide emission trends. In addition, it can also continuously optimize prediction accuracy and adapt to changing operating conditions through continuous learning and data feedback.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] A method for predicting nitrous oxide release from a sewage treatment plant based on a long short-term memory neural network comprises:

[0008] Step 1: Obtain the time series data of water quality parameters, operating parameters, environmental factors and nitrous oxide release flux corresponding to the water quality parameters, operating parameters and environmental factors in the biological pool of the sewage treatment plant, and perform preprocessing;

[0009] Step 2: Use the Pearson correlation coefficient method to select the features of water quality parameters, operating parameters, and environmental factors, and divide the time series data into training sets and test sets based on the preset time sequence;

[0010] Step 3: Based on the training set, a nitrous oxide release prediction model based on a long short-term memory neural network is obtained, and hyperparameters are tuned using a time series cross-validation method and a grid search method to obtain a nitrous oxide release prediction model corresponding to the optimal hyperparameters;

[0011] Step 4: Input the test set to the nitrous oxide release prediction model corresponding to the optimal hyperparameters, obtain the model prediction results, and compare them with the true values ​​to evaluate the model prediction accuracy. If the model prediction accuracy meets the model evaluation conditions, the optimal nitrous oxide release prediction model is obtained. If it does not meet the model evaluation conditions, add data and further tune the hyperparameters until the model evaluation conditions are met and the optimal nitrous oxide release prediction model is obtained.

[0012] Step 5: Input the test set into the optimal nitrous oxide release prediction model to obtain the nitrous oxide release prediction results of the sewage treatment plant, and regularly use the nitrous oxide monitoring equipment to calibrate and evaluate the performance of the optimal nitrous oxide release prediction model. Add new data based on the original time series data, and repeatedly train and optimize the optimal nitrous oxide release prediction model.

[0013] Optionally, in step 1, the water quality parameters include: chemical oxygen demand, mixed liquor suspended solids concentration, mixed liquor volatile suspended solids concentration, pH, redox potential, dissolved oxygen, conductivity, water temperature, turbulence, inlet flow, ammonia nitrogen, nitrite, and nitrate.

[0014] Optionally, in step 1, the operating parameters include: aeration volume, return sludge volume, and stirring rate.

[0015] Optionally, in step 1, environmental factors include: air temperature, humidity, atmospheric pressure, and wind speed.

[0016] Optionally, in step 1, preprocessing includes: detecting and removing outliers using a box plot method, filling missing values ​​using a linear interpolation method, unifying the frequencies of various types of data, and normalizing the data.

[0017] Optionally, in step 2, the Pearson correlation coefficient method is used to select the characteristics of water quality parameters, operating parameters, and environmental factors, specifically:

[0018] Calculate and retain the parameters of the water quality parameters, operating parameters, and environmental factors whose Pearson correlation coefficients with the nitrous oxide release flux are greater than or equal to a first preset correlation threshold value by using the Pearson correlation coefficient method;

[0019] The Pearson correlation coefficient method is used to calculate the Pearson correlation coefficients between the retained parameters, and the sensor costs corresponding to the two parameters whose Pearson correlation coefficients between the two parameters are greater than the second preset correlation threshold are compared, and the corresponding parameters with low sensor costs are retained.

[0020] Optionally, in step 2, the time series data is divided into a training set and a test set based on a preset time order, specifically:

[0021] The time series data before the preset time order is used as the training set, and the time series data after the preset time order is used as the test set.

[0022] Optionally, in step 3, the activation function of the long short-term memory neural network is relu, the loss function is mse, and the optimizer is adam. Hyperparameters include time window size, number of neurons in the LSTM layer, number of neurons in the Dense layer, number of iterations, and batch size.

[0023] Optionally, in step 4, the evaluation parameters in the model evaluation conditions include, but are not limited to, one or more of the following: coefficient of determination, mean absolute error, and root mean square error.

[0024] It can be seen from the above technical solution that compared with the prior art, the present invention proposes a method for predicting the release of nitrous oxide from a sewage treatment plant based on a long short-term memory neural network. By constructing a nitrous oxide release prediction model based on a long short-term memory neural network with a powerful time series data processing capability, it is possible to capture the time variation characteristics of nitrous oxide emissions, make full use of the autocorrelation of nitrous oxide release time series data to accurately predict future emission trends, and the LSTM model effectively avoids the gradient vanishing and gradient explosion problems in traditional neural networks when processing data with long-term dependencies, and achieves not only the ability to accurately predict the release of nitrous oxide in advance and take timely countermeasures, but also the intermediate process does not require manual intervention, which greatly reduces labor costs and operational complexity. By performing feature selection by the Pearson correlation coefficient method before constructing the nitrous oxide release prediction model, it is possible to effectively identify water quality parameters, operating parameters and environmental factors that are highly correlated with nitrous oxide emissions, and solve the multicollinearity between parameters, which not only effectively improves the training efficiency and accuracy of the model, but also reduces the workload of data collection and reduces the cost of experimental data. By strictly dividing the training set and test set in chronological order, we ensure that the model can only use past data for training and prediction, avoiding the leakage of future data into the training set and ensuring the realism and reliability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] 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.

[0026] Figure 1 It is a schematic diagram of the method flow of the present invention.

[0027] Figure 2 Schematic diagram of the method for collecting data related to nitrous oxide release in an open A / O process biological pond of the present invention.

[0028] Figure 3 The underground formula A of the present invention 2 Schematic diagram of the method for collecting data related to nitrous oxide release from O process biological ponds. DETAILED DESCRIPTION

[0029] 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.

[0030] Embodiment 1:

[0031] Embodiment 1 of the present invention discloses a method for predicting nitrous oxide release in a sewage treatment plant based on a long short-term memory neural network, such as Figure 1 As shown, including:

[0032] Step 1: Obtain the time series data of water quality parameters, operating parameters, environmental factors and nitrous oxide release flux corresponding to the water quality parameters, operating parameters and environmental factors in the biological pool of the sewage treatment plant, and perform preprocessing.

[0033] Among them, water quality parameters and nitrous oxide release flux are obtained through water quality parameter sensors and nitrous oxide online monitoring equipment installed in the biological pool; environmental factors are obtained through environmental factor monitoring instruments installed next to the biological pool; and operating parameters are obtained through the sewage treatment plant control center.

[0034] Water quality parameters, including: chemical oxygen demand (COD), mixed liquor suspended solids concentration (MLSS), mixed liquor volatile suspended solids concentration (MLVSS), pH, oxidation-reduction potential (ORP), dissolved oxygen (DO), electrical conductivity (EC), water temperature (T w ), turbulence (TI), influent flow (Q), ammonia nitrogen (NH4 + ), nitrite (NO2 - ), nitrate (NO3 - ).

[0035] Operating parameters, including: aeration volume (V a ), return sludge volume (Q h ), stirring rate (v1).

[0036] Environmental factors include: air temperature (T), humidity (H), atmospheric pressure (P), and wind speed (v).

[0037] Preprocessing includes: using box plot method to detect and remove outliers, using linear interpolation method to fill missing values, unifying the frequency of various data, and data normalization. In the embodiment of the present invention, the frequency of various data is unified to once every 30 minutes. In the embodiment of the present invention, data normalization uses the minimum normalization method to unify the dimensions of different types of data to the interval [0,1].

[0038] Step 2: Use the Pearson correlation coefficient method to select the features of water quality parameters, operating parameters, and environmental factors, and divide the time series data into training sets and test sets based on the preset time sequence.

[0039] The Pearson correlation coefficient method is used to select the characteristics of water quality parameters, operating parameters, and environmental factors, specifically:

[0040] Calculate and retain the parameters of the water quality parameters, operating parameters, and environmental factors whose Pearson correlation coefficients with the nitrous oxide release flux are greater than or equal to a first preset correlation threshold value by using the Pearson correlation coefficient method; in the embodiment of the present invention, the first preset correlation threshold value is 0.4;

[0041] The Pearson correlation coefficient method is used to calculate the Pearson correlation coefficient between the retained parameters, and the sensor costs corresponding to the two parameters whose Pearson correlation coefficient between the two parameters is greater than the second preset correlation threshold are compared, and the corresponding parameters with low sensor cost are retained; in the embodiment of the present invention, the second preset correlation threshold is 0.6.

[0042] The time series data is divided into training set and test set based on the preset time order, specifically:

[0043] The time series data before the preset time sequence is used as a training set, and the time series data after the preset time sequence is used as a test set. In the embodiment of the present invention, the preset time sequence is 80%, that is, the first 80% of the time series data is used as a training set, and the time series data after the first 80%, that is, the last 20%, is used as a test set.

[0044] Step 3: Based on the training set, a nitrous oxide release prediction model based on the long short-term memory neural network LSTM is obtained, and the time series cross-validation method and the grid search method are used to tune the hyperparameters to obtain the nitrous oxide release prediction model corresponding to the optimal hyperparameters.

[0045] The activation function of the long short-term memory neural network is relu, the loss function is mse, and the optimizer is adam. Hyperparameters include time window size (win_size), number of neurons in the LSTM layer (lstm_units), number of neurons in the dense layer (dense_units), number of iterations (epochs), and batch size (batch_size). In the embodiment of the present invention, the candidate values ​​of win_size are 10, 20, 30, and 40, the candidate values ​​of dense_units are 16, 32, 64, and 128, the candidate values ​​of epochs are 50, 100, 150, and 200, and the candidate values ​​of batch_size are 16, 32, 64, and 128. The number of splits in the time series cross-validation is 5, that is, the model corresponding to each set of hyperparameters is trained and verified 5 times, and the model performance takes the average value of five verifications.

[0046] Step 4: Input the test set to the nitrous oxide release prediction model corresponding to the optimal hyperparameters, obtain the model prediction results, and compare them with the true values ​​to evaluate the model prediction accuracy. If the model prediction accuracy meets the model evaluation conditions, the optimal nitrous oxide release prediction model is obtained. If it does not meet the model evaluation conditions, add data and further tune the hyperparameters until the model evaluation conditions are met and the optimal nitrous oxide release prediction model is obtained.

[0047] The evaluation parameters in the model evaluation conditions include but are not limited to one or more of the following: determination coefficient R 2 , mean absolute error MAE, root mean square error RMSE.

[0048] In the embodiment of the present invention, the determination coefficient R 2 As the evaluation parameter in the model evaluation condition, R 2 If the value is less than 0.9, it is considered that the model evaluation condition is not met and the amount of data needs to be increased and the hyperparameters need to be further tuned. 2 A value equal to or exceeding 0.9 is considered to meet the model evaluation conditions.

[0049] Step 5: Input the test set (water quality parameters, operating parameters and environmental factors monitored in real time in the biological pool) into the optimal nitrous oxide release prediction model to obtain the prediction results of nitrous oxide release in the sewage treatment plant, and regularly use the nitrous oxide monitoring equipment to calibrate and evaluate the performance of the optimal nitrous oxide release prediction model. Add new data based on the original time series data, and repeatedly train and optimize the optimal nitrous oxide release prediction model.

[0050] Embodiment 2:

[0051] Embodiment 2 of the present invention discloses a specific application of a method for predicting nitrous oxide release in a sewage treatment plant based on a long short-term memory neural network in an open A / O process biological pool, as follows:

[0052] like Figure 2 As shown, a set of water quality parameter sensors and nitrous oxide online monitoring equipment are respectively set in pool A and pool O. The nitrous oxide online monitoring equipment is connected to a gas collecting hood that can float on the water surface, and the environmental factor monitoring instrument only needs to be set up by the biological pool.

[0053] The water quality parameters that need to be monitored include: chemical oxygen demand (COD), mixed liquor suspended solids concentration (MLSS), mixed liquor volatile suspended solids concentration (MLVSS), pH, oxidation-reduction potential (ORP), dissolved oxygen (DO), electrical conductivity (EC), water temperature (T w ), turbulence (TI), influent flow (Q), ammonia nitrogen (NH4 + ), nitrite (NO2 - ), nitrate (NO3 - ), and is monitored by corresponding water quality parameter sensors; operating parameters include: aeration volume (V a ), return sludge volume (Q h ), stirring rate (v1), which are obtained through the control center of the sewage treatment plant; environmental factors include: air temperature (T), humidity (H), atmospheric pressure (P), wind speed (v), which are monitored by corresponding environmental factor monitoring instruments.

[0054] The time series data of water quality parameters, operation parameters, environmental factors of pool A and pool O, as well as the corresponding nitrous oxide release fluxes were collected and preprocessed: outliers were deleted, missing values ​​were filled, the frequencies of various data were unified, and data were normalized.

[0055] The prediction models of nitrous oxide for pool A and pool O were established respectively: feature selection was performed before modeling. Based on the Pearson correlation coefficient method, according to the correlation between nitrous oxide release flux, water quality parameters, operating parameters, and environmental factors, the parameters with less correlation with nitrous oxide release flux were removed, and the collinearity between water quality parameters, operating parameters, and environmental factors was eliminated. Then the data was split: the processed data was divided, and the first 80% of the data was used as the training set and the last 20% of the data was used as the test set in chronological order. The long short-term memory neural network LSTM model was then trained using the data from the training set. Hyperparameter tuning was performed using the time series cross-validation method plus the grid search method. The model accuracy corresponding to each set of hyperparameters was evaluated, and the evaluation parameter was the verification loss val_loss, and the best hyperparameter combination was selected. The independent variable data of the test set was brought into the LSTM model corresponding to the best hyperparameter, and the best model was used to output the nitrous oxide prediction value of the test set. The nitrous oxide prediction value was compared with the true value to evaluate the accuracy of the model on the test set. The evaluation parameter was R 2 If R 2 If it is less than 0.9, the amount of data is increased and the hyperparameters are further tuned until R 2 When it is greater than or equal to 0.9, the LSTM model is the best LSTM prediction model.

[0056] The data measured by various water quality parameter sensors, environmental factor sensors and equipment operation parameters are pre-processed and input into the trained optimal LSTM prediction model to predict the nitrous oxide release. The nitrous oxide monitoring equipment is regularly calibrated to evaluate the performance of the optimal nitrous oxide release prediction model. New data is added to the original time series data, and the optimal nitrous oxide release prediction model is repeatedly trained and optimized.

[0057] Embodiment 3:

[0058] Embodiment 3 of the present invention discloses a method for predicting nitrous oxide release in a sewage treatment plant based on a long short-term memory neural network. 2 The specific applications of O process biological pool are as follows:

[0059] like Figure 3 As shown in the figure, a set of water quality parameter sensors and environmental factor monitoring instruments are set in the anaerobic tank, anoxic tank and aerobic tank respectively. 2 The O process biological pool is in a completely closed state. The environmental factor monitoring instrument needs to be installed inside the biological pool cover, and the nitrous oxide online monitoring equipment is installed at the ventilation port of the biological pool.

[0060] The water quality parameters that need to be monitored include: chemical oxygen demand (COD) of anaerobic tanks, anoxic tanks, and aerobic tanks, mixed liquor suspended solids concentration (MLSS), mixed liquor volatile suspended solids concentration (MLVSS), pH, oxidation-reduction potential (ORP), dissolved oxygen (DO), electrical conductivity (EC), water temperature (T w ), turbulence (TI), influent flow (Q), ammonia nitrogen (NH4 + ), nitrite (NO2 - ), nitrate (NO3 - ), and is monitored by corresponding water quality parameter sensors; operating parameters include: aeration volume (V a ), ventilation volume (Q w ), return sludge volume (Q h ), stirring rate (v1), which are obtained through the control center of the sewage treatment plant; environmental factors include: air temperature (T), humidity (H), atmospheric pressure (P), which are monitored by corresponding environmental factor monitoring instruments.

[0061] Collect A 2 The time series data of water quality parameters, operation parameters, environmental factors of the process biological pool and the nitrous oxide release flux corresponding to the water quality parameters, operation parameters and environmental factors are collected and preprocessed: outliers are deleted, missing values ​​are filled, the frequency of various data is unified, and data is normalized.

[0062] Only one biological pool overall nitrous oxide prediction model is established, that is, all water quality parameters, operating parameters, and environmental factors of anaerobic pools, anoxic pools, and aerobic pools are used as independent variables, and the total amount of nitrous oxide released by the biological pool is used as the target variable for modeling: feature selection is performed before modeling. Based on the Pearson correlation coefficient method, according to the correlation between nitrous oxide release flux, water quality parameters, operating parameters, and environmental factors, the parameters with less correlation with nitrous oxide release flux are removed, and the collinearity between water quality parameters, operating parameters, and environmental factors is eliminated. Then, data splitting is performed: the processed data is split, and the first 80% of the data is used as the training set and the last 20% of the data is used as the test set in chronological order. Then the data of the training set is used to train the long short-term memory neural network LSTM model. The time series cross-validation method plus the grid search method is used for hyperparameter tuning. The model accuracy corresponding to each set of hyperparameters is evaluated, and the evaluation parameter is the verification loss val_loss, and the best hyperparameter combination is selected. The independent variable data of the test set is brought into the LSTM model corresponding to the optimal hyperparameter. The optimal model is used to output the predicted value of nitrous oxide in the test set. The predicted value of nitrous oxide is compared with the true value to evaluate the accuracy of the model on the test set. The evaluation parameter is R 2 If R 2 If it is less than 0.9, the amount of data is increased and the hyperparameters are further tuned until R 2When it is greater than or equal to 0.9, the LSTM model is the best LSTM prediction model.

[0063] The data measured by various water quality parameter sensors, environmental factor sensors and equipment operation parameters are pre-processed and input into the trained optimal LSTM prediction model to predict the nitrous oxide release. The nitrous oxide monitoring equipment is regularly calibrated to evaluate the performance of the optimal nitrous oxide release prediction model. New data is added to the original time series data, and the optimal nitrous oxide release prediction model is repeatedly trained and optimized.

[0064] The embodiment of the present invention discloses a method for predicting nitrous oxide release from a sewage treatment plant based on a long short-term memory neural network. By constructing a nitrous oxide release prediction model based on a long short-term memory neural network with a powerful time series data processing capability, the time variation characteristics of nitrous oxide emissions can be captured, and the autocorrelation of nitrous oxide release time series data can be fully utilized to accurately predict future emission trends. In addition, when the LSTM model processes data with long-term dependencies, the gradient vanishing and gradient explosion problems in traditional neural networks are effectively avoided, and the nitrous oxide release amount can be accurately predicted in advance and countermeasures can be taken in time, and no manual intervention is required in the intermediate process, which greatly reduces labor costs and operational complexity. By selecting features by the Pearson correlation coefficient method before the nitrous oxide release prediction model is constructed, water quality parameters, operating parameters and environmental factors that are highly correlated with nitrous oxide emissions can be effectively identified, and the multicollinearity between parameters is solved, which not only effectively improves the training efficiency and accuracy of the model, but also reduces the workload of data collection and reduces the cost of experimental data. By strictly dividing the training set and the test set in chronological order, it is ensured that the model can only use past data for training and prediction, avoiding the leakage of future data into the training set, and ensuring the reality and reliability of the model.

[0065] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0066] 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 predicting nitrous oxide release from a sewage treatment plant based on a long short-term memory neural network, characterized in that: include: Step 1: Obtain the water quality parameters, operating parameters, environmental factors and time series data of nitrous oxide release flux corresponding to the water quality parameters, operating parameters and environmental factors in the biological pool of the sewage treatment plant, and perform preprocessing; Step 2: Using the Pearson correlation coefficient method to select the characteristics of the water quality parameters, operating parameters, and environmental factors, and dividing the time series data into a training set and a test set based on a preset time sequence; Step 3: Based on the training set, a nitrous oxide release prediction model based on a long short-term memory neural network is obtained by training, and hyperparameters are tuned by using a time series cross-validation method and a grid search method to obtain a nitrous oxide release prediction model corresponding to the optimal hyperparameters; Step 4: input the test set into the nitrous oxide release prediction model corresponding to the optimal hyperparameters, obtain the model prediction results, and compare them with the true values ​​to evaluate the model prediction accuracy. If the model prediction accuracy meets the model evaluation conditions, the optimal nitrous oxide release prediction model is obtained. If the model evaluation conditions are not met, the data volume is added and the hyperparameters are further tuned until the model evaluation conditions are met to obtain the optimal nitrous oxide release prediction model. Step 5: Input the test set into the optimal nitrous oxide release prediction model to obtain the nitrous oxide release prediction result of the sewage treatment plant, and regularly use the nitrous oxide monitoring equipment to calibrate and evaluate the performance of the optimal nitrous oxide release prediction model. Add new data on the basis of the original time series data, and repeatedly train and optimize the optimal nitrous oxide release prediction model.

2. The method for predicting nitrous oxide release in a sewage treatment plant based on a long short-term memory neural network according to claim 1, characterized in that: In step 1, the water quality parameters include: chemical oxygen demand, mixed liquor suspended solids concentration, mixed liquor volatile suspended solids concentration, pH, redox potential, dissolved oxygen, conductivity, water temperature, turbulence, inlet flow, ammonia nitrogen, nitrite, and nitrate.

3. The method for predicting nitrous oxide release from a sewage treatment plant based on a long short-term memory neural network according to claim 1, characterized in that: In step 1, the operating parameters include: aeration volume, return sludge volume, and stirring rate.

4. The method for predicting nitrous oxide release in a sewage treatment plant based on a long short-term memory neural network according to claim 1, characterized in that: In step 1, the environmental factors include: air temperature, humidity, atmospheric pressure, and wind speed.

5. The method for predicting nitrous oxide release in a sewage treatment plant based on a long short-term memory neural network according to claim 1, characterized in that: In step 1, the preprocessing includes: detecting and removing outliers using the box plot method, filling missing values ​​using the linear interpolation method, unifying the frequencies of various types of data, and normalizing the data.

6. The method for predicting nitrous oxide release in a sewage treatment plant based on a long short-term memory neural network according to claim 1, characterized in that: In step 2, the Pearson correlation coefficient method is used to select the characteristics of the water quality parameters, operating parameters, and environmental factors, specifically: Calculate and retain the parameters of the water quality parameters, operating parameters, and environmental factors whose Pearson correlation coefficients with the nitrous oxide release flux are greater than or equal to a first preset correlation threshold value by using the Pearson correlation coefficient method; The Pearson correlation coefficient method is used to calculate the Pearson correlation coefficients between the retained parameters, and the sensor costs corresponding to the two parameters whose Pearson correlation coefficients between the two parameters are greater than the second preset correlation threshold are compared, and the corresponding parameters with low sensor costs are retained.

7. The method for predicting nitrous oxide release in a sewage treatment plant based on a long short-term memory neural network according to claim 1, characterized in that: In step 2, the time series data is divided into a training set and a test set based on a preset time sequence, specifically: The time series data before the preset time order is used as the training set, and the time series data after the preset time order is used as the test set.

8. The method for predicting nitrous oxide release in a sewage treatment plant based on a long short-term memory neural network according to claim 1, characterized in that: In step 3, the activation function of the long short-term memory neural network is relu, the loss function is mse, and the optimizer is adam. Hyperparameters include time window size, number of neurons in the LSTM layer, number of neurons in the Dense layer, number of iterations, and batch size.

9. The method for predicting nitrous oxide release in a sewage treatment plant based on a long short-term memory neural network according to claim 1, characterized in that: In step 4, the evaluation parameters in the model evaluation conditions include but are not limited to one or more of the following: determination coefficient, mean absolute error, and root mean square error.

Citation Information

Patent Citations

  • Parameter prediction of wastewater treatment effluent based on principal component analysis and long-term and short-term memory network

    CN109508811A

  • Sewage treatment water quality prediction method based on improved long short-term memory LSTM neural network

    CN111027776A

  • Air quality PM2.5 prediction method based on ordered neuron long-short-term memory network

    CN116432836A

  • Sewage treatment dissolved oxygen concentration prediction method based on hybrid optimization algorithm

    CN116542382A

  • Control method based on adaptive neural network model for dissolved oxygen of aeration system

    US20230047297A1

Cited By

  • Pesticide pollution treatment control method and system based on Internet of Things

    CN120406163A

  • Intelligent water quality treatment method and device

    CN121147677A