AAO-MBR water nitrogen element operation monitoring method and system based on GA optimization BP neural network
Through the BP neural network optimized based on genetic algorithm, the parameters of the sewage plant are monitored and pretreated in real time, and a nitrogen element prediction model is established, which solves the real-time monitoring problem of nitrogen removal in AAO-MBR sewage treatment, and achieves efficient and accurate prediction of nitrogen element treatment.
Patent Information
- Application Number
- CN202510318957.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-04
AI Technical Summary
The existing AAO-MBR sewage treatment process has large and complex data volumes in the process of nitrogen removal, and it is difficult to quickly adjust the pollutant treatment effect. Nitrogen removal is closely related to other pollutants, and it is difficult to achieve real-time and efficient monitoring in the existing technology.
BP neural network optimized based on genetic algorithm is adopted to monitor sewage plant parameters in real time, establish a nitrogen element prediction model, perform data preprocessing and division, optimize network topology and weights, and realize dynamic adaptive monitoring.
It improves the accuracy and efficiency of nitrogen element operation monitoring, combines the learning and logical judgment capabilities of neural networks, and realizes accurate prediction and timely adjustment of nitrogen element treatment process.
Smart Images

Figure CN120260712A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water treatment, and in particular to a method and system for monitoring the operation of nitrogen elements in AAO-MBR water based on GA-optimized BP neural network. Background Technique
[0002] The current AAO-MBR sewage treatment process, as a high-COD and high-nitrogen treatment process, has been widely used in the fields of domestic sewage, food wastewater, fertilizer plant wastewater, etc. The sewage treatment plant real-time detects data, monitors the operation parameters of the sewage plant in hours, and records the data, that is, 1 parameter is recorded 24 times a day, and a total of at least 240 parameters are recorded daily. Calculated monthly, the total monthly data is 7,200. For such a large amount of data, it is difficult to manually identify the pollutant removal effect and removal amount. It is difficult to quickly judge the pollutant treatment effect and the parameters that need to be adjusted only through the pollution treatment process. In addition, the human experience-based judgment of data also has hysteresis and cannot adjust the pollution treatment process in time.
[0003] In addition, there is a close relationship between nitrogen removal and other pollutants in the sewage treatment plant. From the perspective of the nitrogen removal pathway, organic nitrogen and ammonia nitrogen are converted into NO2 and NO3 under the action of nitrifying bacteria in the aerobic tank. Under the operating condition of DO>2.0mg / L, various organic nitrogen and ammonia nitrogen can be converted into NO3; NO3 is reduced to N2 under the action of denitrifying bacteria in the anaerobic tank and the anoxic tank to achieve nitrogen removal. As a biofilm structure, MBR has a certain degree of nitrogen removal function, and the process is the same. The aerobic tank is the location where organic matters such as COD and BOD in water are removed aerobically. COD and BOD can be used as carbon sources to provide to denitrifying bacteria to achieve denitrification. The nitrification reaction and the denitrification reaction are both related to parameters such as DO and pH; in addition. The removal of phosphorus utilizes the function of polyphosphate-accumulating bacteria to release phosphorus under anaerobic conditions and absorb phosphorus under aerobic conditions, and removes phosphorus by absorbing it into the bacteria body in the form of excess sludge. The removal of phosphorus is related to both DO and NO3 content. If the biological phosphorus removal effect is insufficient, an external phosphorus remover needs to be added to strengthen phosphorus removal. Parameters such as the air-water ratio and the transmembrane pressure difference are also related to the DO index of the sewage treatment plant operation. Therefore, nitrogen element, as one of the core pollutants in the sewage treatment process, can connect the main pollutants together.
[0004] BP (neural network) mimics the neural network and continuously adjusts the weights and biases through backpropagation to reduce errors and obtain more accurate prediction results. It has good generalization ability in dealing with nonlinear problems and uncertainty problems. GA-BP (genetic algorithm-neural network) is an algorithm that simulates the biological evolution process to obtain the optimal solution of the problem. It selects excellent individuals through the selection operation. The selected ones may depend on the fitness of the individuals, or generates new individuals through the crossover operation to increase randomness.
[0005] Therefore, it is an urgent problem for those skilled in the art to propose a method and system for monitoring the operation of nitrogen elements in AAO-MBR water based on GA-optimized BP neural network to solve the difficulties existing in the prior art. Summary of the Invention
[0006] In view of this, the present invention provides a method and system for monitoring the operation of nitrogen elements in AAO-MBR water based on GA-optimized BP neural network, which combines the learning and prediction capabilities of neural network and the intuitiveness and accuracy of logical judgment, and improves the accuracy and efficiency of nitrogen element operation monitoring.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] A method for monitoring the operation of nitrogen elements in AAO-MBR water based on GA-optimized BP neural network includes the following steps:
[0009] S1. Obtain data: Real-time monitor the operation parameters of the sewage treatment plant to obtain parameter data;
[0010] S2. Data preprocessing: Preprocess the obtained parameter data;
[0011] S3. Data division: Divide the preprocessed parameter data into a training set and a test set;
[0012] S4. Model construction: Establish a nitrogen element prediction model based on a BP neural network optimized by a genetic algorithm GA;
[0013] S5. Model training: Input the training set into the nitrogen element prediction model to train the nitrogen element prediction model; Update the model weight parameters through the loss function, and after several trainings, obtain a trained nitrogen element prediction model;
[0014] S6. Prediction processing: Input the test set into the trained nitrogen element prediction model to predict the nitrogen element treatment amount in the sewage treatment process.
[0015] Optionally, in S1, when real-time monitoring the operation parameters of the sewage treatment plant, the obtained parameter data includes effluent flow rate, water temperature, pH, total phosphorus, phosphorus removal agent dosage, aeration volume, air-water ratio, DO, and transmembrane pressure difference.
[0016] Optionally, in S2, data cleaning and data transformation preprocessing are performed on the obtained parameter data.
[0017] Optionally, in S3, 80% of the preprocessed parameter data is divided into a training set, and 20% is divided into a test set.
[0018] Optionally, the specific steps of establishing a nitrogen element prediction model based on a BP neural network optimized by a genetic algorithm GA in S4 are:
[0019] S41. Initialize the data, where each individual represents the weight bias of a BP neural network.
[0020] S42. For each individual, use the BP neural network for training and calculate the fitness.
[0021] S43. Use the selection operation to select parent individuals according to the fitness function.
[0022] S44. Use the crossover operation to cross the parent individuals to generate new individuals.
[0023] S45. Use the mutation operation to mutate the new individuals to introduce new gene information.
[0024] S46. Add the new individuals to the population and delete the individuals with lower fitness.
[0025] S47. Repeat S42 - S46 until the stop condition is reached. The stop condition is that the predicted value is within the expected range or the maximum iteration is reached.
[0026] S48. Select the individual with the highest fitness as the final solution, that is, the BP neural network with optimal weights and biases.
[0027] Optionally, transfer learning and the gradient descent method are used in S4 to train the nitrogen element prediction model, and the learning rate for training the nitrogen element prediction model is constrained by minimizing the categorical cross - entropy.
[0028] An AAO - MBR water nitrogen element operation monitoring system based on a GA - optimized BP neural network, applying the AAO - MBR water nitrogen element operation monitoring method of any one of the above, includes: a data acquisition module, a data pre - processing module, a data partitioning module, a model construction module, a model training module, and a prediction processing module;
[0029] The data acquisition module, connected to the input end of the data pre - processing module, is used to monitor the operating parameters of the sewage treatment plant in real - time to obtain parameter data;
[0030] The data pre - processing module, connected to the input end of the data partitioning module, is used to pre - process the obtained parameter data;
[0031] The data partitioning module, connected to the input end of the model construction module, is used to partition the pre - processed parameter data into a training set and a test set;
[0032] The model construction module, connected to the input end of the model training module, is used to establish a nitrogen element prediction model of a BP neural network optimized based on the genetic algorithm GA;
[0033] A model training module, connected to the output end of the prediction processing module, is used to input a training set into the nitrogen element prediction model to train the nitrogen element prediction model; update the model weight parameters through a loss function, and after several trainings, obtain a trained nitrogen element prediction model;
[0034] A prediction processing module is used to input a test set into the trained nitrogen element prediction model to predict the nitrogen element treatment amount in the sewage treatment process.
[0035] As can be seen from the above technical solutions, compared with the prior art, the present invention provides a method and system for monitoring the operation of nitrogen elements in AAO-MBR water based on a GA-optimized BP neural network, having the following
[0036] Beneficial effects:
[0037] (1) The present invention combines the learning and prediction capabilities of the neural network with the intuitiveness and accuracy of logical judgment, improving the accuracy and efficiency of nitrogen element operation monitoring;
[0038] (2) During the process of optimizing the BP neural network, the topological structure, weights, and thresholds of the network can be optimized simultaneously, enabling the network model to be selected based on sample knowledge and change with the complexity of the problem, and realizing the dynamic self-adaptability of the BP network. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0040] Figure 1 It is a flowchart of a method for monitoring the operation of nitrogen elements in AAO-MBR water based on a GA-optimized BP neural network provided by the present invention;
[0041] Figure 2 It is a structural block diagram of a system for monitoring the operation of nitrogen elements in AAO-MBR water based on a GA-optimized BP neural network provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0043] Reference Figure 1 As shown, the present invention discloses a method for monitoring the operation of nitrogen elements in AAO - MBR water based on a GA - optimized BP neural network, which includes the following steps:
[0044] S1. Obtain data: Real - time monitor the operation parameters of the sewage treatment plant to obtain parameter data;
[0045] S2. Data pre - processing: Pre - process the obtained parameter data;
[0046] S3. Data division: Divide the pre - processed parameter data into a training set and a test set;
[0047] S4. Model construction: Establish a nitrogen element prediction model based on a BP neural network optimized by the genetic algorithm GA;
[0048] S5. Model training: Input the training set into the nitrogen element prediction model to train the nitrogen element prediction model; Update the model weight parameters through the loss function. After several trainings, obtain a trained nitrogen element prediction model;
[0049] S6. Prediction processing: Input the test set into the trained nitrogen element prediction model to predict the nitrogen element treatment amount in the sewage treatment process.
[0050] Furthermore, in S1, when real - time monitoring the operation parameters of the sewage treatment plant, the obtained parameter data includes effluent flow rate, water temperature, pH, total phosphorus, phosphorus removal agent dosage, aeration volume, air - water ratio, DO, and transmembrane pressure difference.
[0051] Furthermore, in S2, data cleaning and data transformation pre - processing are performed on the obtained parameter data.
[0052] Specifically, data cleaning: Involves dealing with missing values, outliers, and duplicate data. Missing values can be processed by deleting records, data imputation, or not processing. Outlier processing may include removing records containing outliers, treating as missing items, mean correction, or not processing. Duplicate data needs to be identified and deleted to avoid bias in the analysis results.
[0053] Data transformation: Data transformation includes simple function transformation (such as squaring, square - rooting, taking logarithms, differential operations), normalization (such as deviation normalization, standard deviation normalization, decimal scaling normalization), and discretization of continuous attributes.
[0054] Furthermore, in S3, 80% of the pre - processed parameter data is divided into the training set, and 20% is divided into the test set.
[0055] Furthermore, the specific steps for establishing a nitrogen element prediction model based on a BP neural network optimized by the genetic algorithm GA in S4 are:
[0056] S41. Initialize the data, where each individual represents the weight bias of a BP neural network.
[0057] S42. For each individual, use the BP neural network for training and calculate the fitness.
[0058] S43. Use the selection operation to select parental individuals according to the fitness function.
[0059] S44. Use the crossover operation to perform crossover on the parental individuals to generate new individuals.
[0060] S45. Use the mutation operation to mutate the new individuals and introduce new gene information.
[0061] S46. Add the new individuals to the total population and delete the individuals with lower fitness.
[0062] S47. Repeat S42 - S46 until the stop condition is reached. The stop condition is that the predicted value is within the expected range or the maximum number of iterations is reached.
[0063] S48. Select the individual with the highest fitness as the final solution, that is, the BP neural network with the optimal weights and biases.
[0064] Furthermore, in S4, transfer learning and the gradient descent method are used to train the nitrogen element prediction model, and the learning rate for training the nitrogen element prediction model is constrained by minimizing the categorical cross - entropy.
[0065] In a specific embodiment, the operating parameters of the sewage treatment plant are monitored in real - time to obtain parameter data; the parameter data includes several parameters such as influent and effluent flow rates, water temperature, pH, ammonia nitrogen, total nitrogen, total phosphorus, dosage of phosphorus removal agent, aeration volume, steam - water ratio, DO, transmembrane pressure difference, etc. The sewage treatment plant uses the real - time detection data to monitor the operating parameters of the sewage treatment plant in hourly units, with at least 240 parameters per day, and selects the parameters of five days as the data. Perform data cleaning and data transformation pre - processing on the obtained parameter data; divide the pre - processed parameter data into an 80% training set and a 20% test set; establish a nitrogen element prediction model of a BP neural network optimized by the genetic algorithm GA; input the training set into the nitrogen element prediction model to train the nitrogen element prediction model; update the model weight parameters through the loss function, and after several trainings, obtain the trained nitrogen element prediction model; input the test set into the trained nitrogen element prediction model to predict the nitrogen element treatment amount during the sewage treatment process.
[0066] In a specific application, the training process of the nitrogen element prediction model can be as follows:
[0067] Input the training set into the nitrogen element prediction model of the BP neural network optimized by the genetic algorithm GA for K - time iterative training.
[0068] Measure the training result of the nth iteration through a loss function.
[0069] Calculate the minimized loss function of the training result of the nth iteration, and adjust the learning rate of the (n + 1)th iteration training according to the minimized loss function.
[0070] Generate a nitrogen element prediction model based on the training results of K iterations of training.
[0071] And Figure 1 Corresponding to the method described above, an AAO-MBR water nitrogen element operation monitoring system based on a GA-optimized BP neural network is further provided in an embodiment of the present invention, which is used for Figure 1 the specific implementation of the method in Figure 2 As shown, it includes: a data acquisition module, a data preprocessing module, a data partitioning module, a model construction module, a model training module, and a prediction processing module;
[0072] The data acquisition module, connected to the input end of the data preprocessing module, is used for real-time monitoring of the operating parameters of the sewage treatment plant to obtain parameter data;
[0073] The data preprocessing module, connected to the input end of the data partitioning module, is used for preprocessing the obtained parameter data;
[0074] The data partitioning module, connected to the input end of the model construction module, is used for partitioning the preprocessed parameter data into a training set and a test set;
[0075] The model construction module, connected to the input end of the model training module, is used to establish a BP neural network nitrogen element prediction model optimized based on the genetic algorithm GA;
[0076] The model training module, connected to the output end of the prediction processing module, is used to input the training set into the nitrogen element prediction model to train the nitrogen element prediction model; update the model weight parameters through a loss function, and after several trainings, obtain a trained nitrogen element prediction model;
[0077] The prediction processing module is used to input the test set into the trained nitrogen element prediction model to predict the nitrogen element treatment amount in the sewage treatment process.
[0078] In this specification, each embodiment is described in a progressive manner. The key point of each embodiment is to describe the differences from other embodiments. The same or similar parts between each embodiment 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 description of the method part.
[0079] The foregoing description of the disclosed embodiments enables those skilled in the art to practice or use the present invention. Various modifications to these embodiments will be readily apparent to those 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. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for monitoring the operation of nitrogen elements in water by AAO-MBR based on GA-optimized BP neural network, characterized in that, It includes the following steps: S1. Obtain data: Real-time monitor the operating parameters of the sewage treatment plant to obtain parameter data; S2. Data preprocessing: Preprocess the obtained parameter data; S3. Data division: Divide the preprocessed parameter data into a training set and a test set; S4. Model construction: Establish a nitrogen element prediction model based on a BP neural network optimized by the genetic algorithm GA; S5. Model training: Input the training set into the nitrogen element prediction model to train the nitrogen element prediction model; Update the model weight parameters through the loss function. After several trainings, obtain a trained nitrogen element prediction model; S6. Prediction processing: Input the test set into the trained nitrogen element prediction model to predict the nitrogen element treatment amount in the sewage treatment process.
2. The AAO-MBR water nitrogen element operation monitoring method based on GA-optimized BP neural network according to claim 1, characterized in that In S1, real-time monitor the operating parameters of the sewage treatment plant, and the obtained parameter data includes effluent flow rate, water temperature, pH, total phosphorus, phosphorus remover dosage, aeration volume, steam-water ratio, DO, and transmembrane pressure difference.
3. The AAO-MBR water nitrogen element operation monitoring method based on GA-optimized BP neural network according to claim 1, characterized in that In S2, perform data cleaning and data transformation preprocessing on the obtained parameter data.
4. The AAO-MBR water nitrogen element operation monitoring method based on GA-optimized BP neural network according to claim 1, characterized in that In S3, divide the preprocessed parameter data, with the first 80% being the training set and the last 20% being the test set.
5. The AAO-MBR water nitrogen element operation monitoring method based on GA-optimized BP neural network according to claim 1, characterized in that The specific steps for establishing a nitrogen element prediction model based on a BP neural network optimized by the genetic algorithm GA in S4 are as follows: S41. Initialize the data, where each individual represents the weight deviation of a BP neural network; S42. For each individual, use the BP neural network for training and calculate the fitness; S43. Use the selection operation to select parent individuals according to the fitness function; S44. Use the crossover operation to cross the parent individuals to generate new individuals; S45. Use the mutation operation to mutate the new individuals to introduce new gene information; S46. Add the new individuals to the total population and delete the individuals with lower fitness; S47. Repeat S42 - S46 until the stop condition is reached. The stop condition is that the predicted value is within the expected range or the maximum iteration is reached; S48. Select the individual with the highest fitness as the final solution, that is, the BP neural network with optimal weights and biases.
6. The AAO-MBR water nitrogen element operation monitoring method based on GA-optimized BP neural network according to claim 1, characterized in that In S4, use transfer learning and the gradient descent method to train the nitrogen element prediction model, and constrain the learning rate of training the nitrogen element prediction model by minimizing the categorical cross-entropy.
7. An AAO-MBR water nitrogen element operation monitoring system based on a GA-optimized BP neural network, characterized in that, An operation monitoring method for nitrogen elements in AAO-MBR water based on a GA-optimized BP neural network according to any one of claims 1-6, comprising: a data acquisition module, a data preprocessing module, a data partitioning module, a model construction module, a model training module, and a prediction processing module; The data acquisition module, connected to the input end of the data preprocessing module, is used for real-time monitoring of the operation parameters of the sewage treatment plant to obtain parameter data; The data preprocessing module, connected to the input end of the data partitioning module, is used for preprocessing the obtained parameter data; The data partitioning module, connected to the input end of the model construction module, is used for partitioning the preprocessed parameter data into a training set and a test set; The model construction module, connected to the input end of the model training module, is used for establishing a nitrogen element prediction model based on a BP neural network optimized by a genetic algorithm GA; The model training module, connected to the output end of the prediction processing module, is used for inputting the training set into the nitrogen element prediction model to train the nitrogen element prediction model; updating the model weight parameters through a loss function, and after several trainings, obtaining a trained nitrogen element prediction model; The prediction processing module is used for inputting the test set into the trained nitrogen element prediction model to predict the nitrogen element treatment amount in the sewage treatment process.