A method and system for early warning of nitrite-oxidizing bacteria proliferation in simultaneous short-range nitrification and denitrification
The early warning system established by combining the XGBoost model with online detection instruments solves the problem of unpredictable NOB proliferation in simultaneous short-cut nitrification and denitrification, achieving efficient and accurate early warning and process stability, and reducing operating costs.
Patent Information
- Application Number
- CN202411172524.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-08-26
AI Technical Summary
In the process of simultaneous short-cut nitrification and denitrification, existing technologies have difficulty accurately predicting the rapid proliferation of nitrite-oxidizing bacteria (NOB), leading to process instability, and traditional control methods are difficult to effectively inhibit their growth.
Using the XGBoost machine learning model, combined with online ammonia nitrogen and COD detectors, an early warning system was established through data preprocessing and feature extraction to monitor and predict NOB proliferation in real time, and to inhibit NOB growth by adjusting operating conditions.
It achieves highly accurate early warning of NOB proliferation, ensures long-term stable operation of the process, reduces the cost of additional detection equipment, and improves the accuracy and adaptability of prediction.
Smart Images

Figure CN119152984B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to wastewater treatment technology, and in particular to a method and system for early warning of the rapid proliferation of nitrite-oxidizing bacteria (NOB) in simultaneous short-cut nitrification and denitrification using XGBoost (Limited Gradient Boosting Model). Background Technology
[0002] Simultaneous Partial Nitrification and Denitrification (SPND) refers to the simultaneous occurrence of partial nitrification and denitrification reactions in the same reactor, controlling the nitrification reaction at the nitrite stage and using nitrite nitrogen for denitrification. Compared to traditional biological nitrification-denitrification processes, SPND offers advantages such as reduced sludge production, 25% savings in aeration energy consumption, and 40% reduction in carbon source addition. Compared to partial nitrification-denitrification processes, it offers advantages such as reduced land use and lower greenhouse gas emissions. However, during the conversion of ammonia nitrogen to nitrite nitrogen, nitrite nitrogen is easily peroxidized to nitrate nitrogen, turning the partial nitrification-denitrification reaction into a nitrification-denitrification reaction. Therefore, the accumulation of nitrite nitrogen is crucial for the normal operation of SPND.
[0003] Currently, measures to prevent short-cut nitrification from transforming into nitrification mainly involve controlling operating conditions to inhibit and wash away nitrite-oxidizing bacteria (NOB). For example, strict control of dissolved oxygen (DO) and adjustment of sludge retention time (SRT) are used to suppress NOB growth. However, under prolonged suppression, NOB develops a certain tolerance, meaning the short-cut nitrification process cannot remain stable in the long term. Therefore, even under strict operating conditions, it is still necessary to predict whether NOB will proliferate rapidly. Since ammonia oxidation occurs in an aerobic environment, while nitrate and nitrite reduction occur in an anoxic environment, the DO concentration in the reaction system directly affects both nitrification and denitrification. Therefore, the DO concentration in a simultaneous short-cut nitrification / denitrification system can be reflected by indicators such as ammonia oxidation rate and organic matter removal rate. Because NOB is more sensitive to DO concentration than AOB, these indicators can further reflect NOB activity. However, there are complex nonlinear relationships among these indicators, making it difficult to intuitively judge NOB growth based solely on human experience and traditional control methods.
[0004] In recent years, machine learning has been increasingly applied in wastewater treatment process control. Its powerful ability to process complex data offers new possibilities for solving the problem of predicting rapid NOB proliferation in simultaneous short-cut nitrification and denitrification. Among them, the XGBoost (Extreme Gradient Boosting) model, as a machine learning algorithm based on gradient boosting trees, has performed excellently in prediction and classification problems and has been widely applied in various fields. The XGBoost model is an ensemble learning algorithm that improves prediction accuracy by simultaneously training multiple weak classifiers and combining them into a strong classifier. This model exhibits excellent performance when handling large-scale data and complex features and has strong generalization ability. In predicting NOB proliferation in simultaneous short-cut nitrification and denitrification, the XGBoost model can accurately predict the trend of NOB proliferation by learning patterns and correlations in large amounts of data. Summary of the Invention
[0005] To address the challenge of accurately predicting the rapid proliferation of NOB during simultaneous short-cut nitrification and denitrification (SSTND) processes, this invention provides a method for early warning of rapid NOB proliferation in SSTND processes using XGBoost. The XGBoost intelligent algorithm model is introduced to overcome the shortcomings in the accuracy and adaptability of existing NOB proliferation prediction technologies. By establishing an early warning system based on the XGBoost model, the rapid proliferation of NOB during SSTND processes can be more accurately reflected, providing technical support for the long-term efficient operation of SSTND processes.
[0006] To achieve the above objectives, the present invention provides an early warning method for the proliferation of nitrite-oxidizing bacteria in simultaneous short-cut nitrification and denitrification, characterized in that it includes:
[0007] S1. Use online ammonia nitrogen detectors and online COD detectors to collect water quality data at the inlet and outlet of the simultaneous short-cut nitrification-denitrification reactor;
[0008] S2. Preprocess and extract features from the collected water quality data to determine the most valuable feature variables for predicting the rapid proliferation of NOB;
[0009] S3. Input the water quality data features obtained in step S2 into the pre-trained XGBoost model to obtain early warning results of rapid NOB proliferation during the simultaneous short-range nitrification and denitrification process.
[0010] Furthermore, the aeration flow rate is controlled by a rotor flow meter; an online pH electrode is used to monitor the pH in real time and is linked to the alkali dosing pump to ensure that the pH of the reaction system is not lower than 6.7; and the reaction temperature is maintained at 35°C by heating. Water pumps are placed at the reactor inlet and outlet to collect samples and send them to online ammonia nitrogen detectors and online COD detectors for water quality testing.
[0011] Furthermore, online pH meters, online water quality analyzers, and other equipment transmit water quality parameters to the client's programming software via PLC for processing;
[0012] Furthermore, the effluent nitrate nitrogen at the time of the previous sample data collection was measured using a spectrophotometer, and the collected data were artificially grouped. It was stipulated that if the current measured nitrate nitrogen concentration was 10 mg / L higher than the nitrate nitrogen concentration at the previous moment, it was considered that a rapid NOB proliferation had occurred. The data group with rapid NOB proliferation was labeled as 1, and the data group without rapid NOB proliferation was labeled as 0.
[0013] Furthermore, the collected data is preprocessed, including outlier removal and missing value imputation.
[0014] Furthermore, the contribution of all collected variables is scored using a random forest model, and the variables that contribute more to the prediction results are selected as the input features of the model. The collected variables are then dimensionality-reduced to reduce the computational load of the model, improve the model's running efficiency, and avoid model overfitting.
[0015] Furthermore, an XGBoost model was trained using the preprocessed data, and the model parameters were optimized to improve the model's predictive performance, enabling the trained model to learn the rapid proliferation pattern of NOB during simultaneous short-range nitrification and denitrification.
[0016] Furthermore, the trained XGBoost model is used to provide early warnings based on real-time data of the system operation. By inputting real-time feature variable values into the trained model, early warning results for the rapid proliferation of NOB during the simultaneous short-range nitrification-denitrification process can be obtained.
[0017] The present invention also provides a system for implementing the above-described early warning method, characterized in that it includes:
[0018] Simultaneous short-range nitrification-denitrification reaction unit;
[0019] The online COD detector and the online ammonia nitrogen detector are respectively installed at the inlet and outlet of the synchronous short-range nitrification-denitrification reaction device.
[0020] The data processing unit is used to receive and process data from the detector and generate feature data;
[0021] The XGBoost model training and prediction unit is used to train the XGBoost model and receive real-time data features to predict the rapid proliferation of NOB.
[0022] The early warning and operation adjustment unit is used to issue early warnings based on the prediction results of the XGBoost model and adjust the operating conditions of the reaction device based on the early warning results.
[0023] Compared with the prior art, the beneficial effects of the present invention are:
[0024] 1) By inputting the influent and effluent water quality data into the trained XGBoost model, it is possible to accurately predict the growth of NOB without additional detection equipment, reminding operators whether to implement measures to suppress NOB, and achieving long-term, efficient and stable operation of the short-cut nitrification process.
[0025] 2) The introduced XGBoost machine learning model can learn from large amounts of data the patterns exhibited by other water quality parameters during simultaneous short-cut nitrification and denitrification processes, while NOB proliferates, and makes accurate predictions based on readily available water quality parameters. In evaluating the model's classification performance, the model achieved 100% accuracy. Compared to traditional statistical models and empirical formulas, the XGBoost model better captures complex system behavior and nonlinear relationships, improving prediction accuracy.
[0026] 3) The XGBoost model employed is a general-purpose machine learning algorithm with the advantage of near-zero cost for NOB prediction. The XGBoost model and the prediction system built upon it have fast training and prediction speeds. This enables the method to provide real-time early warnings of NOB proliferation during simultaneous short-cut nitrification and denitrification processes. Operators can then take corresponding control measures based on the warning results, such as adjusting aeration intensity and controlling influent load, to avoid excessive NOB proliferation and nitrate nitrogen accumulation, providing important guidance for process control.
[0027] Combining the above advantages, this invention has significant technical effects such as high accuracy, strong adaptability, high efficiency, and optimized process operation. It can effectively solve the problem of difficulty in accurately predicting NOB proliferation in the early stage of rapid NOB proliferation in the existing technology, and can provide early warning in the early stage of rapid NOB proliferation, providing important support and guidance for the regulation of short-cut nitrification and denitrification processes. Attached Figure Description
[0028] Figure 1 This is a schematic diagram of the early warning system for the proliferation of nitrite-oxidizing bacteria in the simultaneous short-range nitrification and denitrification process of this invention.
[0029] Figure 2 This is a data processing flowchart of the early warning method for the proliferation of nitrite-oxidizing bacteria in simultaneous short-range nitrification and denitrification according to the present invention.
[0030] Figure 3This is a graph showing the importance of model variables in the early warning method for the proliferation of nitrite-oxidizing bacteria in simultaneous short-range nitrification and denitrification according to the present invention.
[0031] Figure 4 This is a schematic diagram of the results of a preferred embodiment of the early warning method for the proliferation of nitrite-oxidizing bacteria in simultaneous short-range nitrification and denitrification of the present invention.
[0032] Figure 5 This is a schematic diagram showing the results of another preferred embodiment of the early warning method for the proliferation of nitrite-oxidizing bacteria in simultaneous short-range nitrification and denitrification of the present invention. Detailed Implementation
[0033] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
[0034] In the following description, specific details, such as particular internal procedures and techniques, are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will appreciate that the invention may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of the invention with unnecessary detail.
[0035] A method for early warning of nitrite-oxidizing bacteria proliferation in simultaneous short-cut nitrification and denitrification, comprising the following steps:
[0036] Constructing a simultaneous short-cut nitrification-denitrification reactor, such as Figure 1 As shown. An aeration sand head is placed at the bottom of the reactor, and the aeration rate of the aeration pump into the reactor is controlled by a rotor flow meter; an online pH detection electrode is placed inside the reactor to monitor pH changes in real time and is linked with the alkali addition pump to ensure that the pH value of the reaction system is not lower than 6.7; there is a water bath heating layer on the outside of the reactor to keep the reaction system at 35°C, so that the ammonia oxidizing bacteria and denitrifying bacteria are in a suitable environmental condition.
[0037] Reactor water quality data processing flow as follows Figure 2 As shown, online ammonia nitrogen and online COD detectors are used to automatically and periodically detect the concentrations of ammonia nitrogen and COD at the reactor's effluent and inlet, and the detection results are exchanged with the PLC via the RS-485 protocol. The programming software in the host computer reads and writes data from the PLC via the Modbus TCP protocol.
[0038] The XGBoost model was trained using the data collected in the early stage, and the trained model was used to predict whether NOB would proliferate rapidly.
[0039] Specifically as follows:
[0040] First, reactor operation data was collected. The collected data included influent ammonia nitrogen concentration, HRT, effluent ammonia nitrogen concentration, effluent nitrite nitrogen concentration, effluent nitrate nitrogen concentration, aeration rate, influent nitrogen load (NLR), influent organic load (OLR), ammonia oxidation rate (ARR), organic matter oxidation rate (ORR), and pH. The influent and effluent ammonia nitrogen concentrations were measured using an online ammonia nitrogen detector, while the effluent nitrite and nitrate nitrogen concentrations were measured using a spectrophotometer. The effluent nitrate nitrogen concentration was used to indicate whether NOB was rapidly multiplying.
[0041] The collected data is then preprocessed. First, outliers and missing data are imputed by averaging the values before and after the outlier to replace or fill in the missing data. Then, feature extraction is performed on the collected data. Since a large number of features are collected initially, this can lead to overfitting, decreased generalization ability, and reduced prediction performance, while also increasing the cost of training the model and predicting data. Therefore, feature selection is necessary to reduce the risk of overfitting, improve the model's generalization ability, reduce computational costs, improve the model's interpretability, and to some extent, improve prediction accuracy. This invention uses the random forest algorithm to calculate the importance of each input variable in the model, such as... Figure 3 As shown. From Figure 3 It can be seen that the three variables, ARR, ORR, and effluent ammonia nitrogen concentration, have high importance scores. To further explore the relationship between the three variables and to further reduce the dimensionality of the features, linear combination and differential transformations were performed on the selected three variables, and then variable importance prediction was performed on the transformed data. Finally, the features of the training model were determined to be effluent ammonia nitrogen concentration, ARR, d'ARR, and d'ORR, where d'ARR and d'ORR are the first derivatives of ARR and ORR, respectively.
[0042] After determining the feature variables, the prediction model can be trained. The preprocessed data is randomly divided into training and test sets. Training parameters for the XGBoost binary classifier, such as learning rate, number of iterations, and loss function, are set. The model is then trained, and its performance is evaluated using accuracy. Results show that the XGBoost model trained using 60 days of previously collected feature data achieves 100% accuracy in predicting labels.
[0043] Once the model is trained, it is only necessary to collect the ammonia nitrogen and COD concentrations measured by the online water quality analyzer. There is no need to perform spectrophotometric sampling of nitrate nitrogen. At this point, the real-time data can be processed and an early warning can be issued for whether a rapid increase in NOB has occurred in the simultaneous short-range nitrification and denitrification system.
[0044] Example 1
[0045] This embodiment provides a method for predicting rapid NOB proliferation in simultaneous short-range nitrification-denitrification using XGBoost, with the reaction apparatus as follows: Figure 1 As shown, the programming platform used is Python. Online COD and ammonia nitrogen detectors are installed at the inlet and outlet of the UASB reactor to collect water quality data.
[0046] First, the collected data sets were labeled. If the nitrate nitrogen concentration at the current moment was 10 mg / L higher than that at the previous moment, it was labeled as 1; otherwise, it was labeled as 0. Labeling 1 indicates that rapid NOB proliferation has occurred, and labeling 0 indicates that rapid NOB proliferation has not occurred. Subsequently, an XGBoost model was trained using the labeled effluent ammonia nitrogen concentration, ARR, d'ARR, and d'ORR, and used for real-time early warning of rapid NOB proliferation in short-cut nitrification and denitrification. To verify the model's effectiveness, the effluent nitrate nitrogen concentration was monitored daily using a spectrophotometer during the model's real-time early warning phase.
[0047] On the 17th day of the model's real-time operation, the online ammonia nitrogen detector detected an influent ammonia nitrogen concentration of 395.8 mg / L and an effluent ammonia nitrogen concentration of 75.62 mg / L. The online COD detector detected an influent COD concentration of 742 mg / L and an effluent COD concentration of 548.98 mg / L. The online water quality detectors transmitted the detected data to the Python platform for processing via a communication protocol. Figure 2 As shown, the ARR of the reactor after data processing is 0.5763 kg-N / m³. 3 The first derivative of ARR is 0.1074, and the first derivative of ORR is -0.3114. The four processed features are then input into the trained XGBoost model for prediction. The model predicts a value of 1, indicating that it is issuing a warning of rapid NOB proliferation. The model's prediction results and the effluent nitrate nitrogen concentration measured by the spectrophotometer are shown below. Figure 4 As shown in the figure, the effluent nitrate nitrogen concentration increased from 9.81 mg / L on day 16 to 20.75 mg / L on day 17, and the model accurately issued an early warning on day 17. After receiving the warning, we reduced the aeration rate and promptly controlled the effluent nitrate nitrogen back to a low level. This example demonstrates that the early warning model of this invention can effectively suppress NOB activity.
[0048] Example 2
[0049] The apparatus and implementation method in this embodiment are the same as in Embodiment 1, and will not be repeated here. On the 30th day of the model's real-time operation phase, the online ammonia nitrogen detector detected an influent ammonia nitrogen concentration of 241.2 mg / L and an effluent ammonia nitrogen concentration of 29.78 mg / L. The online COD detector detected an influent COD concentration of 1330.19 mg / L and an effluent COD concentration of 356.98 mg / L. The system input the processed feature values into the model, and the model's prediction result was 1. The model's prediction result and the effluent nitrate nitrogen concentration measured by the spectrophotometer are as follows: Figure 5 As shown in the figure, the effluent nitrate nitrogen concentration at this point is 8.11 mg / L, which is significantly higher than the 1.32 mg / L measured at the previous sampling time, indicating a rapid increase in NOB. Subsequently, we reduced the HRT and increased the influent load to gradually decrease the effluent nitrate nitrogen concentration. This example demonstrates that even if the current effluent nitrate nitrogen concentration is not 10 mg / L higher than the previous sampling time, the XGBoost model proposed in this invention can still provide early warning of rapid NOB proliferation in a simultaneous short-cut nitrification-denitrification system, indicating the model's good adaptability.
[0050] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for early warning of the proliferation of nitrite-oxidizing bacteria in simultaneous short-cut nitrification and denitrification, characterized in that, The application relates to a method for predicting the rapid proliferation of nitrite-oxidizing bacteria (NOB) in a simultaneous partial nitrification and denitrification (SPND) reactor. S1. Collecting water quality data at the influent and effluent of the SPND reactor by using an online ammonia nitrogen detector and an online COD detector; S2. Preprocessing and feature extraction of the collected water quality data to determine the most valuable feature variables for predicting the rapid proliferation of NOB; S3. Inputting the water quality data features obtained in step S2 into a pre-trained XGBoost model to obtain the early warning result of the rapid proliferation of NOB in the SPND process. The preprocessing in step S2 includes correcting and filling abnormal and missing data; the feature extraction is performed by using a random forest model to sort the importance of the input variables of the XGBoost model, and the effluent ammonia nitrogen concentration, ammonia nitrogen oxidation rate, first-order differential of the ammonia nitrogen oxidation rate and first-order differential of the organic matter oxidation rate are selected as the input features of the XGBoost model.
2. The method of claim 1, wherein the method is characterized by, In step S1, sampling points are arranged at the influent and effluent of the SPND reactor, water samples are pumped into the online ammonia nitrogen detector and the online COD detector for water quality detection, and the ammonia nitrogen and COD concentrations at the influent and effluent are detected automatically and regularly.
3. The method of claim 2, wherein the method is characterized by, The bottom of the SPND reactor is provided with a sand aeration head for controlling the aeration amount, ensuring that the dissolved oxygen concentration in the reactor is moderate, and maintaining the pH value of the reaction system to be not lower than 6.7 through the linkage of an online pH detection electrode and an alkali pump, so that the growth of ammonia-oxidizing bacteria and denitrifying bacteria is ensured to be in a suitable range.
4. The method for early warning of proliferation of nitrite-oxidizing bacteria in simultaneous short-cut nitrification and denitrification according to claim 2 or 3, characterized in that, The SPND reactor adopts a water bath heating layer to keep the temperature of the reaction system at 35 DEG C.
5. The early warning method of nitrite-oxidizing bacteria proliferation in simultaneous shortcut nitrification and denitrification according to claim 1, characterized in that, In step S3, the pre-trained XGBoost model refers to optimizing the performance of the XGBoost model by setting training parameters based on the water quality data features.
6. The early warning method of nitrite-oxidizing bacteria proliferation in simultaneous shortcut nitrification and denitrification according to claim 1, characterized in that, In step S3, the early warning result includes that if the effluent nitrate nitrogen concentration at the current time is higher than that at the last time by more than 10 mg / L, it is considered that the rapid proliferation of NOB occurs, and the model issues a warning; otherwise, the model does not issue a warning.
7. The early warning method of nitrite-oxidizing bacteria proliferation in simultaneous shortcut nitrification and denitrification according to claim 1, characterized in that, Step S3 further includes monitoring the effluent nitrate nitrogen concentration by using a spectrophotometer to verify the accuracy of the model warning, and adjusting the operation conditions according to the warning result to control the activity of NOB.
8. A system for implementing the early warning method of proliferation of nitrite-oxidizing bacteria in simultaneous short-cut nitrification and denitrification according to any one of claims 1 to 7, characterized in that, The application also relates to a device for predicting the rapid proliferation of NOB in a SPND reactor. The device comprises a SPND reactor, online COD detectors and online ammonia nitrogen detectors arranged at the influent and effluent of the SPND reactor, a data processing unit for receiving and processing data from the detectors and generating feature data, an XGBoost model training and prediction unit for training the XGBoost model and receiving real-time data features to predict the rapid proliferation of NOB, and a warning and operation adjustment unit for issuing a warning according to the prediction result of the XGBoost model and adjusting the operation conditions of the reactor according to the warning result.
Citation Information
Patent Citations
Wastewater treatment multi-output soft measurement method based on XGBoost online monitoring data driving
CN117012307A
Remote sensing inversion method and system for offshore nutritive salt and chemical oxygen demand
CN117030957A