A sewage treatment process method based on an improved target genetic algorithm optimized LSTM

By combining an improved multi-objective genetic algorithm with an LSTM model, the parameters of the wastewater treatment process are optimized, solving the problems of parameter regulation lag and slow convergence in traditional methods. This enables multi-objective optimization and nonlinear prediction of the wastewater treatment system, thereby improving the overall operational efficiency of the system.

CN122157872APending Publication Date: 2026-06-05JIANGXI KEYUAN BIO-MATERIAL CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGXI KEYUAN BIO-MATERIAL CO LTD
Filing Date
2026-03-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing wastewater treatment process parameter control relies on manual experience or single-objective optimization, making it difficult to achieve a balance between pollutant removal efficiency and energy consumption. Furthermore, traditional multi-objective genetic algorithms have slow convergence speeds and are prone to getting trapped in local optima, making them unsuitable for the high-dimensional and high-precision optimization requirements of LSTM models.

Method used

By combining the improved multi-objective genetic algorithm (IMOGA) with the long short-term memory network (LSTM) model, and through the dynamic adjustment of adaptive crossover rate and mutation rate, elite retention strategy, tournament selection and crowding distance sorting, wastewater treatment process parameters are optimized, and a multi-objective optimization problem is constructed.

Benefits of technology

It achieves multi-objective coordinated optimization of wastewater treatment systems, improves convergence speed and stability, generates more uniform and continuous optimization results, satisfies the balance of multi-dimensional performance indicators, has intelligent prediction capabilities for nonlinear processes, and is suitable for industrial applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157872A_ABST
    Figure CN122157872A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of sewage treatment, and discloses a sewage treatment process method based on an improved target genetic algorithm optimized LSTM, which is characterized in that the process method comprises the following steps: step S1, sewage treatment data acquisition and pretreatment; step S2, sewage treatment process modeling based on an LSTM; and step S3, multi-target genetic algorithm optimization design. The method comprehensively considers multi-dimensional performance indexes such as reaction time, energy consumption and biogas yield of a sewage treatment system, takes the emission standards of chemical oxygen demand (COD), biochemical oxygen demand (BOD), ammonia nitrogen (NH3-N), total nitrogen (TN) and total phosphorus (TP) as constraints, and realizes intelligent and multi-target optimal configuration of sewage treatment process operation parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wastewater treatment technology, and in particular to a wastewater treatment process method based on an improved target genetic algorithm to optimize LSTM. Background Technology

[0002] With increasingly stringent environmental protection requirements, higher demands are being placed on the efficiency, stability, and economy of wastewater treatment processes. Current mainstream wastewater treatment processes (such as A² / O and MBR) rely on the coordinated control of multiple key process parameters (such as dissolved oxygen concentration, sludge return ratio, and hydraulic retention time) to achieve compliant removal of pollutants such as chemical oxygen demand (COD), ammonia nitrogen (NH3-N), total nitrogen (TN), and total phosphorus (TP). However, traditional process parameter control is often based on manual experience or single-objective optimization models, which have significant limitations. On the one hand, wastewater treatment systems are typical nonlinear, time-varying, and multivariate coupled systems. The mapping relationship between pollutant removal efficiency and process parameters is complex, and traditional linear models (such as regression analysis) or simple machine learning models struggle to accurately fit their dynamic changes, leading to lag in parameter control and potential fluctuations in effluent quality or energy waste. For example, when influent quality experiences a sudden shock, manual adjustment of dissolved oxygen concentration often takes several hours to restore system stability, potentially resulting in effluent exceeding standards. On the other hand, existing optimization methods often focus on a single objective (such as "lowest energy consumption" or "highest removal rate"), neglecting the trade-offs between multiple objectives in wastewater treatment, such as "meeting water quality standards," "reducing energy consumption," and "reducing sludge production." For example, simply pursuing a high removal rate may lead to a surge in aeration energy consumption, while excessively reducing energy consumption may result in the risk of substandard effluent quality, making it difficult to achieve the optimal balance of overall system performance.

[0003] In recent years, Long Short-Term Memory (LSTM) networks have been increasingly applied to the modeling and prediction of wastewater treatment systems due to their advantage in capturing long-term dependencies in time-series data. However, their core value still relies on efficient optimization algorithms to discover the optimal combination of process parameters. While traditional Multi-Objective Genetic Algorithms (MOGA) can handle multi-objective optimization problems, they suffer from drawbacks such as slow convergence, susceptibility to local optima, and uneven solution set distribution, making them unsuitable for the high-dimensional, high-precision parameter optimization requirements of LSTM model outputs. Therefore, developing a technical solution that can accurately fit the characteristics of wastewater treatment systems and efficiently solve multi-objective optimization problems is of great significance for overcoming current technological bottlenecks. Summary of the Invention

[0004] The purpose of this invention is to achieve multi-objective intelligent optimization of wastewater treatment processes by combining an improved multi-objective genetic algorithm (IMOGA) with a long short-term memory (LSTM) network model. The technical solution adopted is: a wastewater treatment process optimization method based on an improved objective genetic algorithm and LSTM, characterized in that the process method includes:

[0005] Step S1, Wastewater treatment data acquisition and preprocessing:

[0006] The collected raw data, including input features, water quality indicators, and process variables, are normalized to form a training sample set.

[0007] Step S2, LSTM-based wastewater treatment process modeling:

[0008] The wastewater treatment process is modeled and trained using the LSTM network in the MATLAB platform to obtain a trained LSTM model.

[0009] Step S3, Multi-objective genetic algorithm optimization design:

[0010] (1) Optimize the objective function:

[0011] Using the trained LSTM model as the surrogate function, construct a multi-objective optimization problem:

[0012]

[0013] in:

[0014] f1(x): IC reaction time;

[0015] f2(x): System energy consumption;

[0016] f3(x): Biogas production;

[0017] Constraints:

[0018] COD≤50, BOD≤10, NH3−N≤5, TN≤15, TP≤0.5;

[0019] (2) Standard NSGA-II algorithm steps:

[0020] ① Initialize the population (randomly generate the process parameter matrix);

[0021] ② Calculate the multi-objective values ​​f1, f2, f3 for each individual.

[0022] ③ Perform non-dominated sorting and assign ranks;

[0023] ④ Calculate the crowding distance;

[0024] ⑤ Use random linear crossover and multi-point mutation to generate offspring;

[0025] ⑥ Merge the parent and child generations, retaining the first popsize individuals to enter the next generation;

[0026] ⑦ Iterate to the maximum algebra and output the Pareto front solution set;

[0027] (3) Improved NSGA-II objective function algorithm steps:

[0028] Based on the standard NSGA-II algorithm, the following improvements were made:

[0029] The adaptive crossover rate Pc is improved to P_c = 0.9-0.4(g / Gmax);

[0030] The adaptive mutation rate Pm was improved to P_m = 0.3 - 0.25(g / Gmax);

[0031] (4) Obtain the convergence curve of the objective function, and then achieve the optimal configuration of wastewater treatment process parameters.

[0032] The technical solution of the present invention also includes that the input features include influent flow rate, influent COD concentration, dissolved oxygen (DO), pH value and temperature; the water quality indicators include effluent COD, BOD, ammonia nitrogen, TN and TP; and the process variables include IC reaction time, stirring energy consumption and biogas production.

[0033] Another technical solution of the present invention includes training a wastewater treatment process using an LSTM network in the MATLAB platform, comprising:

[0034] Maximum training epochs = 200;

[0035] Initial learning rate = 0.001;

[0036] Optimization algorithm: Adam;

[0037] The number of samples in each gradient update batch is 64;

[0038] Gradient threshold = 1;

[0039] Training ratio: 80% training set, 20% validation set.

[0040] Another improvement in the technical solution of this invention, based on the standard NSGA-II algorithm, is to explicitly retain the top few outstanding individuals (Elite Archive).

[0041] Further improvements to the standard NSGA-II algorithm include using tournament selection as the selection mechanism; using crowding distance plus dynamic mutation as a diversity maintenance method; and adding local perturbation search through dynamic mutation.

[0042] The beneficial effects of this invention are as follows: This method comprehensively considers multiple performance indicators such as reaction time, energy consumption and biogas production of the sewage treatment system, and takes the emission standards of chemical oxygen demand (COD), biochemical oxygen demand (BOD), ammonia nitrogen (NH3-N), total nitrogen (TN) and total phosphorus (TP) as constraints, so as to realize the intelligent and multi-objective optimal configuration of sewage treatment process operating parameters.

[0043] 1) Achieve multi-objective coordinated optimization of wastewater treatment processes.

[0044] This invention, while simultaneously meeting emission constraints for effluent COD, BOD, ammonia nitrogen, TN, TP, etc., aims to minimize IC reaction time, minimize energy consumption, and maximize biogas production. It can achieve a balance among multiple performance indicators and improve the overall operating efficiency of the system.

[0045] 2) Significantly improves the convergence speed and stability of the optimization algorithm.

[0046] The improved NSGA-II algorithm adopts a dynamic adjustment mechanism of adaptive crossover rate and mutation rate, which enables the algorithm to have stronger global search capabilities in the early stage and higher local convergence accuracy in the later stage. Compared with the traditional NSGA-II, the average number of convergence generations is reduced by about 30%, and the algorithm stability is significantly improved.

[0047] 3) The optimized results are more evenly distributed and the Pareto front is more complete.

[0048] By introducing an elite retention strategy and a crowding distance sorting mechanism, this invention can maintain the diversity of Pareto solution distribution, avoid over-concentration or fragmentation of the solution set, and generate more continuous and smooth optimization results in the three-objective space.

[0049] 4) It has the ability to make intelligent predictions of complex nonlinear processes.

[0050] LSTM models can effectively fit the nonlinear, time-varying, and coupled relationships in wastewater treatment processes, accurately predict the treatment effects under different combinations of operating parameters, and replace traditional empirical formulas and static models, significantly improving prediction accuracy and generalization ability.

[0051] 5) The algorithm structure is portable and scalable, making it easy to apply in industry.

[0052] The algorithm framework of this invention is implemented on the MATLAB platform and can be embedded in the real-time control system of a wastewater treatment plant. It supports online parameter optimization and operation scheduling, and has good scalability and engineering promotion value.

[0053] 6) Its overall performance is significantly better than that of traditional algorithms.

[0054] In comparative experiments, the improved algorithm of this invention outperforms the standard NSGA-II in both Generational Distance (GD) and Spread (Δ) evaluation metrics, demonstrating superior convergence and diversity, thus verifying the effectiveness and advancement of the algorithm. Attached Figure Description

[0055] Appendix Figure 1 The image shows the convergence curves of the LSTM fitting of the wastewater treatment device. The RMSE curve converged after 300 generations, and the loss function curve converged after 200 generations, indicating that the LSTM training was successful. Figure 2 This is a comparison plot of the Pareto fronts of the standard algorithm and the improved algorithm. The Pareto front of the improved algorithm significantly dominates the Pareto front of the standard algorithm on the three objective functions, indicating that the improved algorithm finds more dominant solutions. Figure 3 These are the convergence curves of the three objective functions under the standard algorithm. Figure 4 These are the convergence curves of the three objective functions under the improved algorithm, from... Figures 3-4 It can be seen that the convergence curves of the objective functions of the improved algorithm converge faster than those of the standard algorithm, and the energy consumption target and biogas target converge to better target values, indicating that the improved algorithm has a good improvement effect. Figure 5 The results show the algorithm comparison. GD (Generational Distance) represents the average distance from each solution in the Pareto solution set to the reference Pareto front; a smaller value indicates a better algorithm. Δ (Spread) measures the uniformity of the approximate solution set obtained by the algorithm in the target space; a smaller value indicates a better algorithm. We can see that the improved algorithm has a GD of 2.7383, lower than the standard algorithm's 3.0281; the improved algorithm has a Δ (Spread) of 0.6134, lower than the standard algorithm's 0.7726, indicating that the improved algorithm is superior to the standard algorithm. Figure 6 This is the algorithm flowchart. Detailed Implementation

[0056] The method will be explained below with reference to the accompanying drawings.

[0057] This invention discloses a wastewater treatment process method based on an improved target genetic algorithm to optimize LSTM, the process method comprising:

[0058] Step S1, Wastewater treatment data acquisition and preprocessing:

[0059] The collected raw data, including input features, water quality indicators, and process variables, are normalized to form a training sample set.

[0060] Based on the actual wastewater treatment process, the input characteristics include influent flow rate, influent COD concentration, dissolved oxygen (DO), pH value, and temperature. Water quality indicators include effluent COD, BOD, ammonia nitrogen, TN, and TP. Process variables include IC reaction time, stirring energy consumption, and biogas production.

[0061] Step S2, LSTM-based wastewater treatment process modeling:

[0062] The wastewater treatment process is modeled and trained using an LSTM network in the MATLAB platform, resulting in a trained LSTM model. The training process using an LSTM network in the MATLAB platform includes:

[0063] Maximum training cycles Epochs = 200;

[0064] Initial learning rate = 0.001;

[0065] Optimization algorithm: Adam;

[0066] The number of samples in each gradient update batch is 64;

[0067] Gradient threshold = 1;

[0068] Training ratio: 80% training set, 20% validation set.

[0069] Step S3, Multi-objective genetic algorithm optimization design:

[0070] (1) Optimize the objective function:

[0071] Using the trained LSTM model as the surrogate function, construct a multi-objective optimization problem:

[0072]

[0073] in:

[0074] f1(x): IC reaction time;

[0075] f2(x): System energy consumption;

[0076] f3(x): Biogas production;

[0077] Constraints:

[0078] COD≤50, BOD≤10, NH3−N≤5, TN≤15, TP≤0.5;

[0079] (2) Standard NSGA-II algorithm steps:

[0080] ① Initialize the population (randomly generate the process parameter matrix);

[0081] ② Calculate the multi-objective values ​​f1, f2, f3 for each individual;

[0082] ③ Perform non-dominated sorting and assign ranks;

[0083] ④ Calculate the crowding distance;

[0084] ⑤ Use random linear crossover and multi-point mutation to generate offspring;

[0085] ⑥ Merge the parent and child generations, retaining the first popsize individuals to enter the next generation;

[0086] ⑦ Iterate to the maximum algebra and output the Pareto front solution set;

[0087] (3) Improved NSGA-II objective function algorithm steps:

[0088] To optimize the algorithm, the improved NSGA-II objective function algorithm mechanism includes:

[0089] Improvements to the NSGA-II objective function algorithm Technical content effect Adaptive crossover rate (P_c) P_c = 0.9 - 0.4(g / Gmax) Early enhancement exploration, late enhancement convergence Adaptive mutation rate (P_m) P_m = 0.3 - 0.25(g / Gmax) Dynamically control search diversity Elite retention strategy The best 10% of individuals are retained in each generation. To prevent excellent solutions from being destroyed Tournament Selection Local competitive selection mechanism Improve selection pressure and stability Dynamic logging Each generation records the three target mean values. Monitoring convergence trend

[0090] The two algorithms are compared below:

[0091] project Standard NSGA-II Improved NSGA-II Algorithm framework Classic NSGA-II with fixed parameters (non-dominated sorting + crowding distance) Introducing adaptive parameters, elite retention, and dynamic search mechanisms into the original framework. Crossover and mutation rate Fixed values: Pc = 0.9, Pm = 0.1 Dynamic adjustment: Pc decreases with algebra, Pm adapts to the degree of convergence. Elite preservation Implicitly preserved only through non-dominated ordering Explicitly retain the top few outstanding individuals (Elite Archive) Selection mechanism Random choice of two Based on tournament selection, it is more stable. Diversity maintenance Crowded distance Crowded distance + dynamic variation enhances diversity Global vs. Local Search Global Random Add local perturbation search (through dynamic mutation) Target Converging to the Pareto front Faster convergence and preservation of uniform solution set distribution

[0092] ① Adaptive crossover rate Pc and mutation rate Pm:

[0093] principle:

[0094] Standard NSGA-II uses fixed crossover / mutation probabilities, resulting in:

[0095] Slow convergence in the early search phase;

[0096] The solution set is prone to stagnation in the later stages (getting stuck in a local optimum).

[0097] Improvement strategy: Dynamic adjustment is introduced in this invention:

[0098] Pc=0.9−0.4⋅gGmaxP_c = 0.9 - 0.4 \cdot \frac{g}{G_{\max}}Pc=0.9−0.4⋅Gmaxg Pm=0.3−0.25⋅gGmaxP_m = 0.3 - 0.25 \cdot \frac{g}{G_{\max}}Pm=0.3−0.25⋅Gmaxg

[0099] Where ggg is the current iteration number. Meaning:

[0100] Early exploration phase → High mutation rate, broader search scope;

[0101] In the later convergence phase, reduce the mutation rate to ensure a finer search.

[0102] Effect:

[0103] Early stage enhances population diversity; later stage improves convergence accuracy; Pareto front is more uniform and continuous.

[0104] ②Elite Archive Mechanism:

[0105] principle:

[0106] In standard NSGA-II, elite preservation is implicit, achieved by merging parent and child generations and then selecting the top N non-dominant individuals. However, this can lead to the destruction of superior individuals by random operations.

[0107] Improved strategy: In this invention, the top 10% of the best individuals are explicitly retained and added to the elite archive, and each generation is directly added to the next generation of the population.

[0108] Effect:

[0109] Prevent excellent solutions from being lost; stabilize the Pareto front; improve global convergence reliability.

[0110] ③ Improved selection mechanism: Tournament Selection:

[0111] principle:

[0112] The standard NSGA-II implementation in MATLAB defaults to randomly selecting one of two options or selecting by ranking; the improved version adopts the "local competition" concept.

[0113] Two individuals are randomly selected;

[0114] Compare their non-dominant rank.

[0115] If they are the same, then compare the distance between crowded areas;

[0116] The winners will proceed to cross-operation.

[0117] Effect:

[0118] Ensure that superior individuals are more likely to be selected; avoid the population from becoming homogeneous; maintain diversity.

[0119] ④ Dynamic diversity maintenance (adaptive crowding distance + variation perturbation):

[0120] principle:

[0121] In each generation, the distribution of individuals gradually concentrates near the frontier; excessive concentration can lead to sparsity or breakage of Pareto solutions.

[0122] Improvement strategy: In this invention, the congestion distance calculation results are combined to add a small perturbation to individuals in the congested area;

[0123] Temporarily increase the mutation rate when diversity is insufficient;

[0124] Maintain search space coverage.

[0125] Effect:

[0126] The Pareto front points are evenly distributed; "clustering" is reduced; and the trade-off between targets is more accurately reflected.

[0127] ⑤ Dynamic convergence control and recording mechanism:

[0128] In the `logbook(gen,:) = mean(fvals)` part, the average values ​​of the three objectives are recorded for each generation, which is convenient for plotting:

[0129] Convergence curves for each objective;

[0130] Comparison of convergence speeds;

[0131] Evolution trend of the optimal solution.

[0132] (4) Obtain the convergence curve of the objective function, thereby achieving the optimal configuration of wastewater treatment process parameters and providing a visualization curve.

[0133] Of course, the above description is not a limitation of the present invention, and the name of the method is not limited to the examples above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention are also within the protection scope of the present invention.

Claims

1. A wastewater treatment process optimization method based on an improved target genetic algorithm for LSTM, characterized in that, The process includes: Step S1, Wastewater treatment data acquisition and preprocessing: The collected raw data, including input features, water quality indicators, and process variables, are normalized to form a training sample set. Step S2, LSTM-based wastewater treatment process modeling: The wastewater treatment process is modeled and trained using the LSTM network in the MATLAB platform to obtain a trained LSTM model. Step S3, Multi-objective genetic algorithm optimization design: (1) Optimize the objective function: Using the trained LSTM model as the surrogate function, construct a multi-objective optimization problem: in: f1(x): IC reaction time; f2(x): System energy consumption; f3(x): Biogas production; Constraints: COD≤50, BOD≤10, NH3−N≤5, TN≤15, TP≤0.5; (2) Standard NSGA-II algorithm steps: ① Initialize the population (randomly generate the process parameter matrix); ② Calculate the multi-objective values ​​f1, f2, f3 for each individual; ③ Perform non-dominated sorting and assign ranks; ④ Calculate the crowding distance; ⑤ Use random linear crossover and multi-point mutation to generate offspring; ⑥ Merge the parent and child generations, retaining the first popsize individuals to enter the next generation; ⑦ Iterate to the maximum algebra and output the Pareto front solution set; (3) Improved NSGA-II objective function algorithm steps: Based on the standard NSGA-II algorithm, the following improvements were made: The adaptive crossover rate Pc is improved to P_c = 0.9 - 0.4(g / Gmax); The adaptive mutation rate Pm was improved to P_m = 0.3 - 0.25(g / Gmax); (4) Obtain the convergence curve of the objective function, thereby achieving the optimal configuration of wastewater treatment process parameters and providing a visualization curve.

2. The wastewater treatment process according to claim 1, characterized in that, The input characteristics include influent flow rate, influent COD concentration, dissolved oxygen (DO), pH value, and temperature.

3. The wastewater treatment process according to claim 1, characterized in that, The water quality indicators include effluent COD, BOD, ammonia nitrogen, TN, and TP.

4. The wastewater treatment process according to claim 1, characterized in that, The process variables include IC reaction time, stirring energy consumption, and biogas production.

5. The wastewater treatment process according to claim 1, characterized in that, Training a wastewater treatment process using an LSTM network in the MATLAB platform includes: Maximum training epochs = 200; Initial learning rate = 0.001; Optimization algorithm: Adam; The number of samples in each gradient update batch is 64; Gradient threshold = 1; Training ratio: 80% training set, 20% validation set.

6. The wastewater treatment process according to claim 1, characterized in that, Improvements made to the standard NSGA-II algorithm include explicitly preserving the top few outstanding individuals (Elite Archive).

7. The wastewater treatment process according to claim 1, characterized in that, Improvements made to the standard NSGA-II algorithm include using tournament selection as the selection mechanism.

8. The wastewater treatment process according to claim 1, characterized in that, Improvements made to the standard NSGA-II algorithm include using crowding distance plus dynamic mutation as a diversity maintenance method.

9. The wastewater treatment process according to claim 1, characterized in that, Improvements made to the standard NSGA-II algorithm include adding local perturbation search through dynamic mutation.