Sewage plant operation optimization method based on prediction model
By constructing a prediction model for inlet and effluent and combining genetic algorithms, the problem of comprehensive consideration of factors in the operation optimization of sewage plant is solved, and the operation efficiency and effluent water quality of sewage plant are improved, while reducing energy consumption and drug consumption.
Patent Information
- Application Number
- CN202510042672.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-09
AI Technical Summary
The existing sewage plant operation optimization technology is difficult to comprehensively consider multiple factors, which leads to the inaccurate and optimized operational plans generated, and it is difficult to balance multiple goals.
The sewage plant operation optimization method based on the prediction model is adopted, and the water inlet and outlet prediction models are constructed and the genetic algorithm is optimized to generate the optimal operation plan.
It improves the operating efficiency and effluent quality of the sewage plant, reduces energy consumption and drug consumption, and solves the problems of nonlinear relationship and external environmental impact.
Smart Images

Figure CN119960397A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of big data intelligent systems, and in particular relates to a sewage treatment plant operation optimization method based on a prediction model. Background Art
[0002] The operation of sewage treatment plants, namely sewage treatment, is an indispensable part of urban water cycle. Its main task is to remove pollutants in sewage through physical, chemical or biological methods so that sewage meets discharge standards or reuse requirements. With the acceleration of urbanization, the amount of sewage discharged has increased dramatically, and the requirements for the operation efficiency and effluent quality of sewage treatment plants have also increased day by day.
[0003] Most of the existing sewage treatment plant operation plan generation and optimization technologies rely on historical operation data and experience judgment. Engineers collect and analyze the historical influent load, effluent water quality, energy consumption and drug consumption of the sewage treatment plant, and combine their own professional knowledge and experience to formulate an operation plan for the sewage treatment plant. However, this method has many shortcomings. First, historical data often cannot fully reflect the current and future operating conditions, such as the impact of meteorological changes on influent water quality and water volume, which may result in the formulated plan being inaccurate. Secondly, experience judgment is highly subjective, and different engineers may formulate operation plans that are quite different, making it difficult to ensure optimality. In addition, most of the existing optimization technologies focus on a single goal, such as reducing energy consumption or improving effluent water quality, but fail to comprehensively consider the balance and coordination between multiple goals.
[0004] The main problem with existing technologies is that it is difficult to comprehensively consider multiple factors and generate the optimal operation plan. The difficulty in solving this problem lies in the fact that the sewage treatment process is complex and changeable, involving multiple interrelated links and parameters, and there is often a nonlinear relationship between these factors, which is difficult to accurately describe and optimize through simple mathematical models. At the same time, the operation of sewage treatment plants is also significantly affected by the external environment, such as changes in meteorological conditions, which further increases the difficulty and uncertainty of plan generation.
[0005] Therefore, how to comprehensively consider multiple factors and generate the optimal operation plan to improve the operation efficiency and effluent quality of the sewage treatment plant while reducing energy consumption and drug consumption has become a problem that needs to be solved urgently. Summary of the invention
[0006] In view of the above-mentioned deficiencies in the prior art, the present invention provides a sewage treatment plant operation optimization method based on a predictive model, which can comprehensively consider multiple factors and generate an optimal operation plan, thereby improving the operating efficiency and effluent quality of the sewage treatment plant, while reducing energy consumption and drug consumption.
[0007] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0008] A method for optimizing the operation of a sewage treatment plant based on a prediction model comprises the following steps:
[0009] S1. Construct a sewage treatment plant operation prediction model; the sewage treatment plant operation prediction model includes an inlet prediction model and an outlet prediction model; wherein the inlet prediction model uses meteorological data and historical inlet load data as input to predict the inlet water quality and quantity of the sewage treatment plant; the outlet prediction model uses the inlet water quality and quantity data predicted by the inlet prediction model and the input sewage treatment plant operation plan as input, and simulates the sewage treatment process based on the sewage treatment plant operation plan to predict the outlet water quality of the sewage treatment plant;
[0010] S2. With the goal of meeting the effluent quality standards and minimizing the energy and drug consumption, a genetic algorithm is used to solve the sewage treatment plant operation prediction model, and the input randomly initialized sewage treatment plant operation plan is optimized to obtain an optimized operation plan;
[0011] S3. Use the optimized operation plan obtained in S2 to optimize the operation of the sewage treatment plant.
[0012] Compared with the prior art, the present invention has the following beneficial effects:
[0013] 1. This method can comprehensively consider multiple factors and generate the optimal operation plan. This technical solution can comprehensively consider multiple factors such as meteorological data, historical inlet load, outlet water quality requirements, energy consumption and drug consumption by constructing an inlet prediction model and an outlet prediction model. Compared with the existing technology, this significantly improves the comprehensiveness and accuracy of the solution generation. Through the solution of the genetic algorithm, the optimal balance point can be found among these complex and changeable factors, thereby generating the optimal operation plan.
[0014] 2. This method can improve the operating efficiency and effluent quality of sewage treatment plants. Since this technical solution can accurately predict the influent quality and water volume, and simulate the sewage treatment process based on these predicted data, it can more accurately control each link in the sewage treatment process, thereby improving the operating efficiency of the sewage treatment plant. At the same time, the effluent prediction model can predict the effluent quality, ensure that the effluent quality meets the standard, and may even be better than the effluent quality of the existing technology.
[0015] 3. This method can reduce energy consumption and drug consumption and achieve economic benefits. This technical solution aims to ensure that the effluent quality meets the standards and the operating energy consumption and drug consumption are minimized, and optimizes the sewage plant operation plan through a genetic algorithm. This can not only ensure that the effluent quality meets the requirements, but also minimize energy consumption and drug consumption while ensuring water quality, thereby achieving improved economic benefits. Compared with the existing technology, this technical solution has significant advantages in reducing energy consumption and drug consumption.
[0016] 4. This method can solve the problem of nonlinear relationship and external environmental impact. In view of the problem that it is difficult to accurately describe and optimize the nonlinear relationship and external environmental impact in the sewage treatment process through simple mathematical models in the existing technology, this technical solution effectively solves these problems by building a complex prediction model and using advanced genetic algorithms for solving. This makes the solution generation more scientific, reasonable and reliable, and improves the stability and adaptability of sewage plant operation.
[0017] In summary, this method can comprehensively consider multiple factors and generate the optimal operation plan, thereby improving the operation efficiency and effluent quality of the sewage treatment plant, while reducing energy consumption and drug consumption, solving the problems existing in the existing technology, and has significant technical advantages and application value.
[0018] Preferably, S1 also includes: learning and training the inlet prediction model through meteorological data and historical inlet load data; learning and training the outlet prediction model through inlet water quality and quantity data, sewage treatment plant operation plan and corresponding outlet water quality data.
[0019] With this setup, through in-depth learning and training of meteorological data and historical inflow load data, the inflow prediction model can more accurately capture the patterns and trends in the data, thereby achieving high-precision prediction of inflow water quality and quantity. Through learning and training, the effluent prediction model can more accurately simulate the effluent water quality of the sewage treatment process under different operation schemes. This helps to more accurately predict and optimize the effluent water quality.
[0020] Preferably, in S1, the effluent prediction model is also modified; the modification includes using a Kalman filter algorithm to modify the prediction results of the sewage plant operation prediction model to reduce noise and uncertainty of the prediction results.
[0021] Such a setting can 1. reduce the impact of noise. The Kalman filter algorithm is an effective signal processing technology that can smooth the prediction results based on historical data and current observations, thereby reducing the noise component in the prediction results. This is particularly important for the water output prediction model, because in actual operation, the data is often interfered by various factors, such as sensor errors, environmental changes, etc. Through Kalman filtering, the impact of these interferences on the prediction results can be significantly reduced.
[0022] 2. It can also reduce uncertainty. In addition to reducing noise, the Kalman filter algorithm can also reduce the uncertainty of the prediction results by comprehensively considering the weights of historical data and current observations. This means that under the same prediction conditions, the prediction results after using the Kalman filter are more reliable and stable.
[0023] 3. Real-time prediction and adjustment can be achieved. The Kalman filter algorithm can process data in real time and update the prediction results, which enables the effluent prediction model to achieve real-time monitoring and prediction of the operating status of the sewage plant. Managers can adjust the operation plan in time according to the real-time prediction results to ensure that the effluent water quality meets the standards.
[0024] Preferably, the water inflow prediction model adopts an LS-based T The neural network model of M. LSTM, namely Long Short-Term Memory, long short-term memory network.
[0025] With this setting, the LSTM model is particularly good at processing time series data and can capture long-term dependencies in the data. For influent forecasting, this means that the model can accurately predict future influent water quality and quantity based on historical influent load data and meteorological data, including possible seasonal changes and periodic fluctuations. Through deep learning technology, the LSTM model can learn complex nonlinear relationships from a large amount of data, thereby achieving high-precision predictions of influent water quality and quantity. This high-precision prediction helps sewage treatment plants understand the influent situation in advance and provide a reliable basis for adjusting subsequent treatment processes.
[0026] In addition, the LSTM model has good robustness and stability, and can cope with noise and uncertainty in the data. Even if anomalies or missing data are encountered during actual operation, the model can make predictions based on existing knowledge and experience to ensure the accuracy and reliability of the prediction results.
[0027] Preferably, the water discharge prediction model adopts an ASM mechanism model. ASM, namely Active Shape Model, is an active shape model.
[0028] Such a setting, 1. The ASM model is a universal activated sludge model launched by the International Water Association (IWA). It is based on the principles of biology, chemistry and physics and can accurately describe the complex reactions in the biochemical treatment of sewage. Through the ASM mechanism model, key processes such as microbial growth, organic matter degradation, nitrogen and phosphorus removal in the sewage treatment process can be simulated, thereby achieving accurate prediction of effluent water quality.
[0029] 2. The ASM mechanism model can be used to simulate the operation plan of the sewage plant and predict the effluent water quality under different operating conditions. This helps the sewage plant to consider various possible influencing factors when formulating the operation plan, so as to formulate a more reasonable and feasible plan. By optimizing the operation plan, the sewage plant can reduce energy consumption and the use of chemical agents while ensuring that the effluent water quality meets the standards. The ASM mechanism model can provide scientific basis and technical support for this optimization.
[0030] Preferably, the sewage treatment plant effluent quality treatment parameters set in the ASM mechanism model include: heterotrophic bacteria yield coefficient Y H , heterotrophic bacteria attenuation coefficient b H , maximum specific growth rate of heterotrophic bacteria μ mH , the maximum specific growth rate of autotrophic bacteria μ mA , maximum specific hydrolysis rate K h .
[0031] Preferably, the heterotrophic bacteria productivity coefficient Y H The calculation formula is:
[0032]
[0033] ΔCOD1=(COD TOT2 -COD SOL )-(COD TOT -COD SOL );
[0034] ΔCOD2=(COD SOL1 -COD SOL );
[0035] In the formula, COD TOT1 、COD TOT2 are the total COD of the mixed liquid before and after the reaction; COD SOL1 、COD SOL2 are the COD of the mixed liquor before and after the reaction; ΔCOD1 is the change of the COD of heterotrophic bacteria in the reactor; ΔCOD2 is the change of the soluble COD in the reactor;
[0036] Heterotrophic bacteria attenuation coefficient b H The calculation formula is:
[0037]
[0038] In the formula, K d is the traditional attenuation coefficient; Y H is the heterotrophic bacteria productivity coefficient; f I is the proportion of inert particles in microorganisms, taking a typical value;
[0039] Maximum specific growth rate of heterotrophic bacteria μ mH The calculation process includes:
[0040] Calculate the change of DO in the reactor during sewage treatment, ln OUR; plot ln OUR against time t, and the slope of the straight line is (μ mH -b H ); combined with the calculated heterotrophic bacteria attenuation coefficient b H , and the maximum specific growth rate μ of heterotrophic bacteria is obtained mH ;
[0041] The maximum specific growth rate of autotrophic bacteria μ mA The calculation process includes:
[0042] Calculate the natural logarithm of NOx-N concentration in the reactor during sewage treatment over time lnS NO ; with lnS NO Plotted against time t, the slope of the straight line is (μ mA -b A );Combined with the typical value of the attenuation coefficient b of the autotrophic bacteria A , the maximum specific growth rate μ of autotrophic bacteria is obtained mA ;
[0043] Maximum specific hydrolysis rate K h The calculation process includes:
[0044] Calculate the remaining insoluble substrate X in the reactor S Concentration:
[0045]
[0046] Construct a relationship expressing the hydrolysis rate in terms of oxygen consumption rate:
[0047]
[0048] Where t is any time after t0, te is the time for dissolved oxygen to return to the stable value before adding water sample, OUR(t) is the oxygen consumption rate that changes with time, OURe is the oxygen consumption rate generated by endogenous respiration; Y H is the heterotrophic bacteria productivity coefficient;
[0049] The data calculated by the above two equations are plotted as X and Y coordinates, respectively, and the hydrolysis of the slowly degradable insoluble substrate is represented by the first-order reaction relationship: The maximum specific hydrolysis rate K was calculated h .
[0050] The above water quality treatment parameters are all simulation parameters set in the ASM mechanism model. In specific implementation, the values of the relevant parameters in the water quality treatment parameter calculation formula can be obtained / set according to the actual situation, and then the water quality treatment parameters can be set in the ASM mechanism model.
[0051] Preferably, in S2, the process of solving the sewage treatment plant operation prediction model using a genetic algorithm includes: optimizing the sewage treatment plant operation plan in an iterative manner through preset operations until the goals of meeting effluent water quality standards and minimizing operating energy consumption and drug consumption are met; the preset operations include selection, crossover and mutation.
[0052] With this setup, 1. The genetic algorithm continuously screens and optimizes the operation plan by simulating the evolutionary process in nature to ensure that the effluent quality meets the preset standards. This optimization process is based on an in-depth understanding and simulation of the sewage plant operation prediction model, so it can ensure that the optimized plan is also effective in actual operation. In addition to meeting the effluent quality standards, the genetic algorithm also focuses on operating energy consumption and the use of chemical agents. By continuously adjusting and optimizing the operating parameters, the algorithm can find the operating plan with the lowest energy consumption and chemical agent use while meeting the effluent quality. This helps to reduce the operating costs of the sewage plant and improve economic benefits.
[0053] 2. Genetic algorithms have good global search capabilities and can quickly search for the optimal solution or approximate optimal solution in the solution space. This means that the algorithm can find an operating plan that meets the requirements in a short time, improving the efficiency of solving the problem. Compared with traditional optimization methods, genetic algorithms are less likely to fall into local optimal solutions. Through operations such as selection, crossover, and mutation, the algorithm can continuously generate new solutions and retain information about excellent solutions, thereby avoiding premature convergence to local optimal solutions during the search process.
[0054] 3. Genetic algorithms can be combined with the sewage plant operation prediction model to achieve automated optimization. Through continuous iteration and optimization, the algorithm can automatically adjust the operating parameters so that the sewage plant can reduce operating energy consumption and chemical agent usage while maintaining the effluent quality standards. The optimized operation plan can provide strong support for the sewage plant's decision support system. Managers can formulate reasonable operation plans and maintenance strategies based on the optimization results to ensure the stable and efficient operation of the sewage plant.
[0055] Preferably, in S3, the process of optimizing the operation of the sewage treatment plant includes: inputting the optimized operation plan into the control system of the sewage treatment plant to achieve automatic optimization and control of the operation of the sewage treatment plant.
[0056] With this setup, the sewage treatment plant can adjust and optimize the operating parameters in real time by directly inputting the optimized operation plan into the control system. This means that the sewage treatment plant can automatically adjust the treatment process and operating parameters according to the current water quality, water volume and energy consumption, ensuring that the effluent quality meets the standards while reducing operating costs.
[0057] The automated control system can reduce manual intervention and improve the stability and reliability of sewage treatment plant operations. Through preset optimization algorithms and logic, the system can automatically judge and handle abnormal situations, ensuring that the sewage treatment plant can maintain efficient operation under any circumstances.
[0058] Preferably, S3 also includes S4, which adjusts and optimizes the optimized operation plan in real time according to the real-time monitored inlet water quality and water quantity data and effluent water quality data to ensure the stable operation of the sewage treatment plant and the compliance of the effluent water quality.
[0059] Such a setting can, 1. enhance the flexibility of sewage treatment plant operation. By real-time monitoring of influent water quality and quantity and effluent water quality data, sewage treatment plants can quickly perceive changes in water quality and quantity, and adjust the operation plan accordingly. This real-time response capability enables sewage treatment plants to better adapt to fluctuations in water quality and quantity and ensure stable operation. Based on real-time monitoring data, sewage treatment plants can continuously optimize operating parameters such as aeration volume, sludge return ratio, chemical dosage, etc., to achieve more efficient and economical operation. This dynamic optimization process helps sewage treatment plants maintain optimal operation in a changing environment.
[0060] 2. It can improve the stability of effluent quality. Real-time monitoring data provides accurate control basis for sewage treatment plants. By comparing the influent quality and quantity with the effluent quality data, sewage treatment plants can more accurately adjust the treatment process and operating parameters to ensure that the effluent quality always remains within the preset standard range. When significant changes in the influent quality or quantity are detected, the sewage treatment plant can take measures in advance to warn and respond to prevent the effluent quality from exceeding the standard. This early warning and response mechanism helps sewage treatment plants maintain the stability of effluent quality when facing emergencies.
[0061] 3. It can optimize resource utilization and reduce costs. By real-time monitoring and adjusting operating parameters, sewage treatment plants can use energy and resources more rationally, reduce energy consumption and the use of chemical agents. This not only helps to reduce operating costs, but also conforms to the concept of sustainable development. Real-time adjustment and optimization of operating parameters can reduce excessive wear and failure rate of equipment, thereby extending the service life of equipment. This helps to reduce the cost of repairing and replacing equipment and improve the overall economic benefits of sewage treatment plants. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to make the purpose, technical solution and advantages of the invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:
[0063] Figure 1 A flowchart of the method is shown in FIG.
[0064] Figure 2 The figure is a flow chart of the overall construction and calibration of the ASM model in Example 2;
[0065] Figure 3 Schematic diagram of the calculation method of the residual XS concentration in the reactor in Example 2;
[0066] Figure 4 This is a schematic diagram of the A_DO_1 cleaning results within two days in Example 2;
[0067] Figure 5 The cleaning results of A_DO_3 within three months in Example 2;
[0068] Figure 6 Comparison of the results of adding Kalman and not using LSTM in Example 2;
[0069] Figure 7 This is a flow chart including rolling calculation in the second embodiment. DETAILED DESCRIPTION
[0070] The following is a further detailed description through specific implementation methods:
[0071] Embodiment 1
[0072] like Figure 1 As shown, this embodiment discloses a method for optimizing the operation of a sewage treatment plant based on a prediction model, comprising the following steps:
[0073] S1. Construct a sewage treatment plant operation prediction model; the sewage treatment plant operation prediction model includes an inlet prediction model and an outlet prediction model; wherein the inlet prediction model uses meteorological data and historical inlet load data as input to predict the inlet water quality and quantity of the sewage treatment plant; the outlet prediction model uses the inlet water quality and quantity data predicted by the inlet prediction model and the input sewage treatment plant operation plan as input, and simulates the sewage treatment process based on the sewage treatment plant operation plan to predict the outlet water quality of the sewage treatment plant.
[0074] Among them, the influent prediction model adopts a LSTM-based neural network model. The LSTM model is particularly good at processing time series data and can capture long-term dependencies in the data. For influent prediction, this means that the model can accurately predict the future influent water quality and quantity based on historical influent load data and meteorological data, including possible seasonal changes, periodic fluctuations, etc. Through deep learning technology, the LSTM model can learn complex nonlinear relationships from a large amount of data, thereby achieving high-precision prediction of influent water quality and quantity. This high-precision prediction helps sewage treatment plants understand the influent situation in advance and provide a reliable basis for the adjustment of subsequent treatment processes. In addition, the LSTM model has good robustness and stability, and can cope with noise and uncertainty in the data. Even if abnormal conditions or data are missing during actual operation, the model can make predictions based on existing knowledge and experience to ensure the accuracy and reliability of the prediction results.
[0075] The effluent prediction model adopts the ASM mechanism model. The ASM model is a general activated sludge model launched by the International Water Association (IWA). It is based on the principles of biology, chemistry and physics and can accurately describe the complex reactions in the biochemical treatment process of sewage. Through the ASM mechanism model, key processes such as microbial growth, organic matter degradation, and nitrogen and phosphorus removal in the sewage treatment process can be simulated, thereby achieving accurate prediction of effluent water quality. The ASM mechanism model can be used to simulate the operation plan of the sewage plant and predict the effluent water quality under different operating conditions. This helps the sewage plant to consider various possible influencing factors when formulating the operation plan, so as to formulate a more reasonable and feasible plan. By optimizing the operation plan, the sewage plant can reduce energy consumption and the use of chemical agents while ensuring that the effluent water quality meets the standards. The ASM mechanism model can provide scientific basis and technical support for this optimization.
[0076] In specific implementation, the sewage treatment plant effluent water quality treatment parameters set in the ASM mechanism model include: heterotrophic bacteria yield coefficient Y H , heterotrophic bacteria attenuation coefficient b H , maximum specific growth rate of heterotrophic bacteria μ mH , the maximum specific growth rate of autotrophic bacteria μ mA , maximum specific hydrolysis rate K h .
[0077] Preferably, the heterotrophic bacteria productivity coefficient Y H The calculation formula is:
[0078]
[0079] ΔCOD1=(COD TOT2 -COD SOL2 )-(COD TOT1 -COD SOL1 );
[0080] ΔCOD2=(COD SOL -COD SOL2 );
[0081] In the formula, COD TOT 、COD TOT2 are the total COD of the mixed liquid before and after the reaction; COD SOL1 、COD SOL2 are the COD of the mixed liquor before and after the reaction; ΔCOD1 is the change of the COD of heterotrophic bacteria in the reactor; ΔCOD2 is the change of the soluble COD in the reactor;
[0082] Heterotrophic bacteria attenuation coefficient b H The calculation formula is:
[0083]
[0084] In the formula, K d is the traditional attenuation coefficient; Y H is the heterotrophic bacteria productivity coefficient; f I is the proportion of inert particles in microorganisms, taking a typical value.
[0085] Maximum specific growth rate of heterotrophic bacteria μ mH The calculation process includes:
[0086] Calculate the change of DO in the reactor during sewage treatment lnOUR; plot lnOUR against time t, and the slope of the straight line is (μ mH -b H ); combined with the calculated heterotrophic bacteria attenuation coefficient b H , and the maximum specific growth rate μ of heterotrophic bacteria is obtained mH ;
[0087] The maximum specific growth rate of autotrophic bacteria μ mA The calculation process includes:
[0088] Calculate the natural logarithm of NOx-N concentration in the reactor during sewage treatment over time lnS NO ; with lnS NO Plotted against time t, the slope of the straight line is (μ mA -b A );Combined with the typical value of the attenuation coefficient b of the autotrophic bacteria A , the maximum specific growth rate μ of autotrophic bacteria is obtained mA ;
[0089] Maximum specific hydrolysis rate K h The calculation process includes:
[0090] Calculate the remaining insoluble substrate X in the reactor S Concentration:
[0091]
[0092] Construct a relationship expressing the hydrolysis rate in terms of oxygen consumption rate:
[0093]
[0094] Where t is any time after t0, te is the time for dissolved oxygen to return to the stable value before adding water sample, OUR(t) is the oxygen consumption rate that changes with time, OURe is the oxygen consumption rate generated by endogenous respiration; Y H is the heterotrophic bacteria productivity coefficient;
[0095] The data calculated by the above two equations are plotted as X and Y coordinates, respectively, and the hydrolysis of the slowly degradable insoluble substrate is represented by the first-order reaction relationship: The maximum specific hydrolysis rate K was calculated h .
[0096] In specific implementation, S1 also includes: learning and training the inlet prediction model through meteorological data and historical inlet load data; learning and training the effluent prediction model through inlet water quality and quantity data, sewage plant operation plan and corresponding effluent water quality data. In this way, through in-depth learning and training of meteorological data and historical inlet load data, the inlet prediction model can more accurately capture the laws and trends in the data, thereby achieving high-precision prediction of inlet water quality and quantity. Through learning and training, the effluent prediction model can more accurately simulate the effluent water quality of the sewage treatment process under different operation plans. This helps to more accurately predict and optimize the effluent water quality.
[0097] The effluent prediction model is also modified; the modification includes using a Kalman filter algorithm to modify the prediction results of the sewage plant operation prediction model to reduce noise and uncertainty in the prediction results.
[0098] In this way, the influence of noise can be reduced. Kalman filtering algorithm is an effective signal processing technology, which can smooth the prediction results based on historical data and current observations, thereby reducing the noise components in the prediction results. This is particularly important for the effluent prediction model, because in actual operation, the data is often interfered by various factors, such as sensor errors, environmental changes, etc. Through Kalman filtering, the impact of these interferences on the prediction results can be significantly reduced. Uncertainty can also be reduced. In addition to reducing noise, the Kalman filtering algorithm can also reduce the uncertainty of the prediction results by comprehensively considering the weights of historical data and current observations. This means that under the same prediction conditions, the prediction results after using Kalman filtering are more reliable and stable. In addition, real-time prediction and adjustment can also be achieved. The Kalman filtering algorithm can process data in real time and update the prediction results, which enables the effluent prediction model to realize real-time monitoring and prediction of the operating status of the sewage plant. Managers can adjust the operation plan in time according to the real-time prediction results to ensure that the effluent water quality meets the standards.
[0099] S2. With the goal of meeting the effluent quality standards and minimizing the energy and drug consumption, a genetic algorithm is used to solve the sewage plant operation prediction model, and the input randomly initialized sewage plant operation plan is optimized to obtain an optimized operation plan.
[0100] In specific implementation, the process of using genetic algorithms to solve the sewage plant operation prediction model includes: optimizing the sewage plant operation plan in an iterative manner through preset operations until the goal of meeting the effluent water quality standards and minimizing the operating energy consumption and drug consumption is met; the preset operations include selection, crossover and mutation.
[0101] In this way, the genetic algorithm continuously screens and optimizes the operation scheme by simulating the evolution process of nature to ensure that the effluent water quality meets the preset standards. This optimization process is based on an in-depth understanding and simulation of the sewage plant operation prediction model, so it can ensure that the optimized scheme is also effective in actual operation. In addition to the effluent water quality meeting the standard, the genetic algorithm also focuses on the operation energy consumption and the use of chemical agents. By continuously adjusting and optimizing the operation parameters, the algorithm can find the operation scheme with the lowest energy consumption and the minimum use of chemical agents under the premise of meeting the effluent water quality. This helps to reduce the operation cost of the sewage plant and improve the economic benefits. In addition, the genetic algorithm has a good global search ability and can quickly search for the optimal solution or the approximate optimal solution in the solution space. This means that the algorithm can find an operation scheme that meets the requirements in a short time and improve the solution efficiency. Compared with traditional optimization methods, genetic algorithms are not easy to fall into local optimal solutions. Through operations such as selection, crossover and mutation, the algorithm can continuously generate new solutions and retain the information of excellent solutions, thereby avoiding premature convergence to the local optimal solution during the search process.
[0102] In addition, genetic algorithms can be combined with sewage plant operation prediction models to achieve automated optimization. Through continuous iteration and optimization, the algorithm can automatically adjust the operating parameters so that the sewage plant can reduce operating energy consumption and chemical agent usage while maintaining the effluent quality standards. The optimized operation plan can provide strong support for the decision support system of the sewage plant. Managers can formulate reasonable operation plans and maintenance strategies based on the optimization results to ensure the stable and efficient operation of the sewage plant.
[0103] S3. Use the optimized operation plan obtained in S2 to optimize the operation of the sewage treatment plant.
[0104] Among them, the process of optimizing the operation of the sewage plant includes: inputting the optimized operation plan into the control system of the sewage plant to realize automatic optimization and control of the operation of the sewage plant. In this way, by directly inputting the optimized operation plan into the control system, the sewage plant can realize real-time adjustment and optimization of the operating parameters. This means that the sewage plant can automatically adjust the treatment process and operating parameters according to the current water quality, water volume and energy consumption, ensuring that the effluent water quality meets the standards while reducing operating costs. The automated control system can reduce manual intervention and improve the stability and reliability of the sewage plant operation. Through the preset optimization algorithm and logic, the system can automatically judge and handle abnormal situations to ensure that the sewage plant can maintain efficient operation under any circumstances.
[0105] In specific implementation, S3 also includes S4, which makes real-time adjustments and optimizations to the optimized operation plan based on the real-time monitored influent water quality and quantity data and effluent water quality data, so as to ensure the stable operation of the sewage treatment plant and the compliance of the effluent water quality.
[0106] This can enhance the flexibility of sewage treatment plant operation. By real-time monitoring of influent water quality and quantity and effluent water quality data, sewage treatment plants can quickly perceive changes in water quality and quantity, and adjust the operation plan accordingly. This real-time response capability enables sewage treatment plants to better adapt to fluctuations in water quality and quantity and ensure stable operation. Based on real-time monitoring data, sewage treatment plants can continuously optimize operating parameters such as aeration volume, sludge return ratio, and chemical dosage to achieve more efficient and economical operation. This dynamic optimization process helps sewage treatment plants maintain optimal operating conditions in a changing environment. It can also improve the stability of effluent water quality. Real-time monitoring data provides sewage treatment plants with precise control basis. By comparing influent water quality and quantity with effluent water quality data, sewage treatment plants can more accurately adjust treatment processes and operating parameters to ensure that effluent water quality always remains within the preset standard range. When significant changes in influent water quality or quantity are detected, sewage treatment plants can take measures in advance for early warning and response to prevent effluent water quality from exceeding the standard. This early warning and response mechanism helps sewage treatment plants maintain the stability of effluent water quality when facing emergencies. In addition, it can optimize resource utilization and reduce costs. By real-time monitoring and adjusting operating parameters, sewage treatment plants can use energy and resources more rationally, reduce energy consumption and the use of chemical agents. This not only helps to reduce operating costs, but also conforms to the concept of sustainable development. Real-time adjustment and optimization of operating parameters can reduce excessive wear and failure rate of equipment, thereby extending the service life of equipment. This helps to reduce the cost of repairing and replacing equipment and improve the overall economic benefits of sewage treatment plants.
[0107] This method can comprehensively consider multiple factors and generate the optimal operation plan. By constructing an inlet prediction model and an outlet prediction model, this technical solution can comprehensively consider multiple factors such as meteorological data, historical inlet load, outlet water quality requirements, energy consumption and drug consumption. Compared with the existing technology, this significantly improves the comprehensiveness and accuracy of the solution generation. Through the solution of the genetic algorithm, the optimal balance point can be found among these complex and changeable factors, thereby generating the optimal operation plan. In addition, this method can improve the operating efficiency and effluent water quality of the sewage treatment plant. Since this technical solution can accurately predict the inlet water quality and water volume, and simulate the sewage treatment process based on these predicted data, it can more accurately control each link in the sewage treatment process, thereby improving the operating efficiency of the sewage treatment plant. At the same time, the effluent prediction model can predict the effluent water quality to ensure that the effluent water quality meets the standards, and may even be better than the effluent water quality of the existing technology.
[0108] In addition, this method can reduce energy consumption and drug consumption and achieve economic benefits. This technical solution aims to ensure that the effluent water quality meets the standards and the operating energy consumption and drug consumption are minimized, and optimizes the sewage treatment plant operation plan through a genetic algorithm. This can not only ensure that the effluent water quality meets the requirements, but also minimize energy consumption and drug consumption while ensuring water quality, thereby achieving improved economic benefits. Compared with the prior art, this technical solution has significant advantages in reducing energy consumption and drug consumption. In addition, this method can solve the problems of nonlinear relationships and external environmental influences. In view of the problem that it is difficult to accurately describe and optimize the nonlinear relationship and external environmental influence in the sewage treatment process through simple mathematical models in the prior art, this technical solution effectively solves these problems by constructing a complex prediction model and using advanced genetic algorithms for solution. This makes the solution generation more scientific, reasonable and reliable, and improves the stability and adaptability of sewage treatment plant operation.
[0109] In summary, this method can comprehensively consider multiple factors and generate the optimal operation plan, thereby improving the operation efficiency and effluent quality of the sewage treatment plant, while reducing energy consumption and drug consumption, solving the problems existing in the existing technology, and has significant technical advantages and application value.
[0110] Embodiment 2
[0111] In order to better understand the technical solution of the present method, a specific example is used for illustration.
[0112] In this example, when constructing the sewage treatment plant operation prediction model, the ASM mechanism model intends to use West+ as the process simulation modeling software. West+ is used to build a process simulation offline model, simulate the process, and analyze the optimal operation mode and the best control strategy. It has an API called by third-party applications and can be seamlessly integrated with third-party applications such as the sewage treatment plant's SCADA system and data management system. By providing various model calculation engines, it can achieve complete background calculation.
[0113] West has a variety of model libraries and open structures, which makes it easy for users to build new models or modify existing models. Commonly used model tools are as follows:
[0114] Model Editor: Contains code editor and graphical matrix editor, which can edit the model. Node Editor: Used to manage icon library (i.e., a collection of diagrams representing model nodes). Unit Editor: Used to manage WEST unit table, i.e., edit units and various unit conversion parameters. Data Editor: Used to manage and modify the inlet and outlet data of the model. Design Tool: Provides design wizard function, which is executed in the form of MSL or Modelica model (containing only algebraic formulas).
[0115] The West model library includes 26 major categories of models, including physicochemical unit models, biochemical unit models and auxiliary function models. Each major category of models includes several sub-models.
[0116] The West biochemical unit model is based on the activated sludge mathematical model ASM, which can construct and simulate almost all sewage treatment processes, such as various activated sludge processes (AO, AAO, oxidation ditch, SRB and SBR deformation processes, etc.), biological filters, trickling filters, MBR, anaerobic fermentation, sedimentation and other processes.
[0117] West has a rich auxiliary function model. The controller includes multiple sub-models such as switch control, P, PI, PID, etc., which can not only simulate different control processes, but also build various control strategies, such as controlling the dissolved oxygen concentration in the aeration tank or the air volume of the submerged aerator by the concentration of effluent ammonia nitrogen and nitrate nitrogen, and controlling the sludge concentration in the reaction tank according to the inlet water volume and water quality. The timer is used to control and set the time of different processes. The cost calculation model can estimate the cost of aeration, return flow, sludge disposal, etc. The process calculator can customize the calculation of various process variables.
[0118] The Petersen matrix editor and MSL model editor can be used to easily build and edit new large-category models and sub-models.
[0119] Construction and calibration of ASM model
[0120] The overall construction and calibration process of the ASM model is as follows: Figure 2 shown.
[0121] (1) Construction of ASM mechanism model
[0122] Before using West to build a process simulation model, you need to collect relevant information or data from the factory. The factory provides it based on the actual situation. Generally speaking, the data list includes:
[0123] ① Basic information of the sewage treatment plant: designed treatment capacity and actual treatment capacity of the sewage treatment plant, sewage treatment process flow chart, production line, sewage treatment plant floor plan, overall process flow chart of the sewage treatment plant, dimensions of each structure and operating parameters (the activated sludge tank provides the volume, depth, aeration volume, dissolved oxygen, external reflow ratio and internal reflow ratio of each structure; the sedimentation unit needs to provide the sedimentation tank surface area, depth, daily sludge discharge and SVI value; the buffer tank provides the maximum and minimum volumes and pump flow), tailwater discharge implementation standards, daily inlet and outlet water volume and water quality indicators for 12 consecutive months, biological unit monitoring data (dissolved oxygen, MLSS), sludge discharge, water temperature records (it is best to provide a database file), sewage properties (domestic sewage, industrial wastewater, mixed discharge, rainwater and sewage diversion, etc.).
[0124] ② Proposed intelligent dosing control scope: intelligent control of chemical phosphorus removal dosing, intelligent control of external carbon source dosing, intelligent control of oxidant dosing for tail water disinfection, COD removal in primary sedimentation tank, and intelligent control of TP dosing of coagulants.
[0125] ③ Existing online instrument types and installation points: online instrument configuration for influent water quality, online instrument configuration for tailwater discharge, online instrument configuration for process (such as anaerobic tank (anoxic tank) ORP, aerobic tank DO, PH, MLSS, NO3-N), and installation points for flow meters in the sewage treatment process. The following are recommended instrument installations (if conditions permit, it is recommended to add the above-mentioned online equipment at the inlet and outlet before and after the biological unit to improve the model's simulation accuracy for the biological unit).
[0126] ④Operating conditions of biochemical system: MLSS of aerobic tank, internal reflow ratio, sludge reflow ratio, minimum water temperature in winter, maximum water temperature in summer, and activated sludge discharge rules (such as continuous sludge discharge, intermittent sludge discharge).
[0127] ⑤ Current dosing status: Current status of chemical phosphorus removal dosing: types of phosphorus removal agents, types of dosing pumps, such as centrifugal pumps, metering pumps, magnetic centrifugal pumps, whether there are frequency converters, the location and number of dosing points; Current status of external carbon source addition: types of carbon sources, the location and number of dosing points; Current status of disinfectant addition: types of disinfectants, the location and number of dosing points.
[0128] ⑥Current dosing control methods: adding chemicals according to the water inlet ratio, adding chemicals according to the manual visual treatment effect, and adding chemicals according to monitoring data once a day + manual visual treatment.
[0129] Based on the collected data, a process offline model is constructed.
[0130] (2) Calibration of ASM mechanism model
[0131] After building the process model and inputting the basic model parameters (influent component concentration, structure size), a process model that can run successfully is obtained. At this time, the effluent results are inconsistent with the actual situation, so the model needs to be calibrated and verified.
[0132] Model calibration refers to the process of calibrating model parameter values by a certain method, so that the model's calculated values are consistent with the actual measured values when calculating the concentrations of microorganisms, COD, nitrogen, phosphorus and other components under different conditions, at different times and at different locations. Model verification, as the name implies, is the process of testing the calibrated model.
[0133] This system builds the process model based on ASM2D, which includes 21 biochemical reaction processes, 19 model components, 22 stoichiometric constants and 42 kinetic parameters. The model is calibrated by using the advanced experimental tools in West - sensitivity analysis and parameter estimation.
[0134] The general idea of model verification is:
[0135] First, the sensitivity parameters of each indicator (including kinetic parameters and stoichiometric constants) are determined through sensitivity experiments.
[0136] For those insensitive parameters, the recommended values of the International Water Association or the recommended values in local literature can be directly adopted. For those parameters with high sensitivity, the parameter values are obtained by laboratory test and measurement methods first. For the parameter values that cannot be obtained through experiments, the advanced experimental tool provided by West - parameter estimation can be used to optimize these parameter values. The optimization process is also a process of repeated attempts, and the modeling experience of the modeler is needed to assist in determining these parameter values.
[0137] In this example, 42 kinetic parameters and 22 stoichiometric constants need to be analyzed and the kinetic parameters and stoichiometric constants with high sensitivity need to be found for verification. The parameters will change under different temperature conditions, and the parameters need to be corrected based on the description of the Arrhenius equation on the effect of temperature change on the parameters.
[0138] Modeling requires analysis of the influent components and experimental determination of some kinetic parameters. Here we introduce the influent component analysis method and the determination method of several kinetic parameters.
[0139] ① Experimental materials
[0140] During component analysis and kinetic parameter determination, it is necessary to determine the parameter values through breathing experiments.
[0141] A batch reactor is a reactor with complete mixing but no continuous flow. It is a place where a container containing an appropriate amount of microorganisms is fed once, allowing the microorganisms to use the pollutants for growth. The batch process is very flexible and can adapt to changes in water volume, and can be used to measure the respiration rate of active microorganisms.
[0142] The parameter determination test device is a sealed cylinder with a water bath heating device in the outer layer and an effective volume of 1 L. The reactor is made of organic glass and is equipped with an insertion port for a dissolved oxygen meter, an exhaust pipe port, an aeration pipe port and a liquid addition port.
[0143] The main equipment of the parameter determination test device are:
[0144] Magnetic stirrer: Utilizing the property of like-charged magnetic materials to repel each other, the magnetic stirrer is driven to rotate by continuously changing the polarity at both ends of the base, so that the liquid in the reactor is mixed evenly.
[0145] Dissolved oxygen meter: It is a device for measuring dissolved oxygen in water. Its working principle is that oxygen passes through the diaphragm and is reduced by the working electrode, generating a diffusion current proportional to the oxygen concentration. By measuring this current, the concentration of dissolved oxygen in water is obtained.
[0146] Air compressor: to aerate the reactor with oxygen to ensure uniform and sufficient dissolved oxygen inside and to control the dissolved oxygen concentration.
[0147] Separating funnel: Its function is to discharge the air in the closed reactor during aeration.
[0148] Influent composition analysis
[0149] In practical applications, it is first necessary to determine the ASM2d model components in the sewage treatment plant influent. In the original influent, the concentrations of the model components such as autotrophic bacteria XAUT, polyphosphate bacteria XPAO, polyphosphate XPP, polyphosphate bacteria's intracellular storage XPHA, metal hydroxide XMEOH, and metal phosphate XMeP are usually very low and can be assumed to be zero. At the same time, the gas components in the influent such as dissolved oxygen S02 and nitrogen SN2 can also be set to zero. In this way, there are only 11 influent ASM2d model components that need to be analyzed. The determination methods of these 11 model components are analyzed below.
[0150] Chemical method for accurate determination
[0151] To analyze the model influent components, we first need to obtain conventional water quality test data, such as CODCr, TN, TP, etc. These conventional water quality test indicators are basically analyzed according to national standard methods, mainly chemical methods.
[0152] Since the components in the ASM2d model are divided into solubility and granularity, in specific determination, in addition to the conventional test indicators such as CODCr, BOD5, TP, SS, and VSS, which can be directly measured and analyzed in sewage, some components in the model need to be filtered before determination, such as: SNH4, SNO3, SPO4, SALK in the model water quality components are the sum of ammonia nitrogen, nitrate nitrogen and nitrite nitrogen in the filtrate obtained after filtering sewage with 0.45μm filter paper, orthophosphorus, and alkalinity; the total suspended solids XTSS in the model is equal to the conventional analysis indicator SS in sewage. The determination method of these five components is conventional chemical analysis, which is mature and has high accuracy.
[0153] Biochemical estimation analysis
[0154] In addition to the chemical analysis of the above five components, there are another six model components that need to be analyzed, namely fermentation products SA, biodegradable organic matter SF, inert soluble organic matter SI, slowly degradable matrix XS, inert granular organic matter XI and heterotrophic bacteria XH. These components are related to CODCr, and are also related to the material composition and biological activity of sewage. They are unstable and need to be estimated by biochemical methods. They are also the difficulty and focus of the analysis of model components. The specific determination method is studied below.
[0155] From the model component division relationship of ASM2d, it can be seen that the total COD components in the model include the following parts:
[0156] COD t =S A +S F +S I +X I +X S +X H +X PAO +X PHA
[0157] The concentrations of XPAO, XPHA and XAUT in the influent are very low and can be ignored. The components of CODt can be simplified as follows:
[0158] COD t =S A +S F +S I +X I +X S +X H
[0159] In this way, the model components are combined with CODt for analysis.
[0160] It should be noted that although the biodegradable organic matter SS is not an independent component of ASM2(d), since SS is the basis for the determination of SF and XS, the determination of COD components in the influent mainly focuses on the above-mentioned seven components: SA, SF, SI, XI, XS, XH and SS.
[0161] There have been reports at home and abroad on the determination methods of these COD components, which are summarized in the table below.
[0162] Table COD component concentration estimation method
[0163]
[0164] Model parameter determination
[0165] Under appropriate F / M conditions, the curve of OUR changing with time is measured, and the parameters are measured by generating an appropriate OUR dynamic response. The sludge used in the parameter measurement test is in an endogenous respiration state and is used after repeated washing with distilled water to remove residual substrate. Before the start of the experiment, 20 mg / L of ATU is added to the reactor to inhibit the activity of nitrifying bacteria, and the reactor is filled with distilled water to remove the air in the reactor. During the test, the test temperature is strictly controlled at (20±0.5)℃ to ensure constant temperature in the reactor and maintain pH at around 7.0. At the same time, stir with a magnetic stirrer to ensure that the inside is in a good mixing state.
[0166] Heterotrophic bacteria productivity coefficient (Y H )
[0167] Before the test, take a certain amount of culture sludge, rinse it repeatedly with distilled water (to remove the residual soluble COD in the sludge), add it to the reactor, then take a certain volume of influent water and put it in the reactor, aerate and stir the mixed liquid, and keep its temperature at (20±1)℃. After 24h of reaction, use the standard chromium method to determine the total COD of the sludge-water mixture in the reactor and the COD of the filtrate, and calculate Y according to the following formula H .
[0168] Cell: ΔCOD1 = (COD TOT -COD SOL2 )-(COD TOT1 -COD SOL1 )
[0169] Solubility: ΔCOD2=(COD SOL1 -COD SOL2 )
[0170]
[0171] In the formula, COD TOT1 、COD TOT2 ——Total COD of mixed liquor before and after reaction;
[0172] COD SOL1 、COD SOL2 ——COD of the mixed liquid after filtration before and after the reaction;
[0173] ΔCOD1——the change of COD of heterotrophic bacteria in the reactor;
[0174] ΔCOD2——the change of dissolved COD in the reactor;
[0175] Heterotrophic bacteria attenuation coefficient (b H )
[0176] Traditional attenuation coefficient b HThe determination was carried out under aerobic digestion conditions. 1000mL of sludge (sludge concentration was about 2500mg / L) was taken and repeatedly rinsed with distilled water to remove residual substrate. Then it was placed in a 1L batch reactor and aerated for several days. The oxygen consumption rate OUR was measured regularly. After the test, the change of OUR over time was plotted on a semi-logarithmic coordinate, and the data was processed by linear regression method to obtain the traditional attenuation coefficient b. H` , and then calculate b using the following formula H .
[0177]
[0178] In the formula, K D is the traditional attenuation coefficient (d -1 ), that is, b H` ; Y H is the heterotrophic bacteria productivity coefficient (g / g); f I is the proportion of inert particles in microorganisms, taking a typical value.
[0179] Maximum specific growth rate of heterotrophic bacteria (μ mH )
[0180] First, the concentrations of sludge and water samples were measured to determine the appropriate F / M ratio. During the test, a certain amount of sludge and water samples were added to the reactor according to the determined F / M. Intermittent large-scale aeration was used to increase DO to 6-7 mg / L. Then aeration was stopped, the reactor was sealed, and the changes in DO were recorded until the DO gradient showed a downward trend.
[0181]
[0182] The above formula shows that ln OUR is a function of time t. If ln OUR is plotted against time t, the slope of the resulting straight line is (μ mH -b H ), in b H If μ is known, we can get mH Note: F / M is more suitable to be 0.5 to 2.5.
[0183] The maximum specific growth rate of autotrophic bacteria (μ mA )
[0184] Take an appropriate amount of activated sludge from the aerobic tank and measure the sludge concentration. Add 2L of influent to a batch reactor with a volume of 2.5L, and then take a certain volume of inoculated sludge and place it in the reactor so that the initial sludge concentration in the reactor is 100mg / L. Use an aeration sand core to aerate the reactor and maintain the dissolved oxygen concentration in the reactor at 6-7mg / L. The reactor is operated continuously for 4-5 days, and samples are taken from the reactor twice a day to determine NO3 using conventional analytical methods. -The concentration and N02 - The concentration of, the time interval between two samplings should be greater than 4h, and the sampling volume is about 20mL. In order to ensure that the autotrophic bacteria can grow at the maximum rate, add 20mg / L of NH3-N to the reactor, so that the initial NH3-N concentration is about 50mg / L. Add 500mg / L of NaHCO3, adjust the alkalinity in the reactor, and make the pH value between 7.5-8.0. The reactor is placed on a magnetic stirrer for stirring to ensure that the internal mixed liquid is uniform. The entire test process is carried out in a constant temperature laboratory, so that the temperature in the reactor is controlled at about 25°C.
[0185] Samples were taken for analysis. The natural logarithm of the NOx-N concentration in the reactor varied with time during the measurement process. A There is no effective method for determination at present. According to the range recommended by the literature, this test takes b A is a typical value, and then calculated according to the following formula.
[0186]
[0187] Plotting ln OUR against time t, the slope of the straight line is (μ mA -b A ).
[0188] Maximum specific hydrolysis rate (K h )
[0189] The hydrolysis of slowly degrading insoluble substrates is represented by a first-order reaction relationship:
[0190]
[0191] X S The change process of OUR cannot be measured directly, so it is calculated indirectly using OUR measurement technology.
[0192] Figure 3 The following are typical results of the dynamic changes of OUR in batch reaction experiments. In the early stage of the experiment (before t0), the oxygen consumption in the reaction is determined by the easily degradable substrate S in the sewage. S and slowly degradable substrate X S The rapid decline of oxygen consumption rate OUR in the figure indicates that exogenous S S Since t0, the area enclosed by the OUR measurement curve and the endogenous respiratory oxygen consumption rate OURe line is the remaining X S The amount of oxygen consumed. Therefore, the concentration of the remaining insoluble substrate in the reactor at any time after t0 is:
[0193]
[0194] The relationship between the hydrolysis rate and oxygen consumption rate is:
[0195]
[0196] Where t is any time after t0, te is the time for dissolved oxygen to return to the stable value before adding water sample, OUR(t) is the measured oxygen consumption rate changing with time, and OURe is the oxygen consumption rate generated by endogenous respiration.
[0197] The data calculated by the above two formulas are plotted as X and Y coordinates to calculate K h .
[0198] AI algorithm model construction
[0199] Since the monitoring data of sewage treatment plants has obvious time series characteristics, the data results at each time point are closely related to the data before that time point. At the same time, this point also has an impact on the subsequent points; and the data of seasons, months, or mid-week and weekends may have certain regularities.
[0200] Recurrent Neural Network (RNN) is a neural network used to process sequence data. Compared with general neural networks, it can process data with sequence changes. For example, the meaning of a word may have different meanings depending on the content mentioned above, and RNN can solve this kind of problem well.
[0201] Long Short-Term Memory (LSTM) is a special RNN that is mainly used to solve the gradient vanishing and gradient exploding problems in the long sequence training process. In simple terms, compared with ordinary RNN, LSTM can perform better in longer sequences. For sewage treatment plants, the time span from entry to exit of each component is very large, and there are long-distance dependencies. LSTM is good at handling such situations. It calculates the current point through the time series analysis of the previous point value and the corresponding feature, so as to achieve the effect of filling / prediction.
[0202] (1) Single-sequence LSTM and multi-sequence LSTM involving correlation
[0203] Since the LSTM model has certain requirements for the stability of the time series, if only its own data is used for interpolation prediction, the results will be lagging (that is, the LSTM model tends to take the true value of the previous point as the predicted value of this point into the result). To alleviate the above lag, consider the following methods:
[0204] Process the predicted value, such as squaring, taking the root, taking the logarithm, etc.
[0205] Construct richer time series features, add correlation, average value, etc. as features and put them into slices;
[0206] Differentiate the data to a stationary state for prediction;
[0207] In this example, we choose to use increased correlation to alleviate possible lags. The method for selecting correlation data is as follows:
[0208] Artificially list the correlation parameters of the corresponding interpolation data as parameters;
[0209] By calculating the correlation parameters and setting the corresponding boundary size, a better correlation list is obtained in the data;
[0210] Take the intersection of the above two lists to obtain the final required correlation data;
[0211] ·Convert the time into timestamp format and import it as correlation data.
[0212] (2) Feature selection of multi-sequence LSTM
[0213] In this example, the feature selection of multi-sequence LSTM is particularly important. For the data of the sewage plant, it is periodic. For example, there is a peak period of sewage every day, and the amount of sewage in different seasons may be different. Therefore, the time can be split into year / month / week / day / hour as different parameters for consideration.
[0214] Then, for the different properties of inlet / outlet / process quantities, the outlet part can use the inlet and process quantities as features for prediction or interpolation.
[0215] Since the influent part needs to undergo multiple processes in the sewage treatment plant, there is a certain time interval between the effluent time corresponding to the influent data at each time and the influent time. Therefore, when creating a temporary feature table, the influent data of the feature table needs to be shifted as a whole (here a fixed 18h is used), while there is no feature other than time to select for the influent.
[0216] After obtaining the corresponding features, the target component item data is concatenated with the corresponding feature table of the item, and the appropriate length of look_back is selected, that is, the number of data selected forward. One item of data corresponds to one unit of time interval. The look_back item data and features before the prediction point are substituted into the LSTM model for prediction to obtain the component value corresponding to the current point.
[0217] From the labeling part, we know that some of the inlet and outlet data have been cut into 2h point data sets for processing. In the feature table selection, only the corresponding 2h point position is added to remove duplicate data to ensure the accuracy of the model. The data of the remaining points will be filled in by taking the forward average value after filling / prediction at the 2h point, so the results will be exactly the same from one odd integer point to the next odd integer point.
[0218] (3) LSTM-based process probe soft measurement
[0219] For continuously missing data, linear interpolation and nearest neighbor interpolation have very unsatisfactory results in filling in the missing data. The data changes are too monotonous and smooth, the calculation results are too simple, and the prediction or interpolation results are quite different from the original data. Therefore, the LSTM interpolation method is introduced to analyze and fill in the time series.
[0220] LSTM is used here to interpolate the gaps in the data after labeling and removing outliers. For most of the null values, there is data at the time point after this point, that is, for each missing point, there is not only forward information but also backward information. Therefore, bidirectional LSTM (BiLSTM) can be used for filling. BiLSTM can use contextual information to better predict / fill the output of each time step in the sequence.
[0221] The interpolation of data within a time span needs to be done in chronological order. This is because LSTM requires the data of the look_back points and their features before the prediction point to be non-empty, so the previous data must be filled before the next empty position can be filled. For this reason, when selecting the time length, additional data of at least the look_back length is often taken forward to ensure that even if the first point in the target time period is empty, it can be filled through the model.
[0222] by Figure 4 For example, Figure 4 The interpolation effect of A_DO_1 in two days is compared with the original abnormal data. The blue part is the abnormal point in the original data, and the orange part is the value after cleaning. The rule for judging abnormal values in this part is that the change amplitude of several abnormal points relative to the surrounding points is too large, and the values are obviously larger than other points in the nearby five minutes, so they are removed as abnormal values.
[0223] Figure 5 This is a relatively special case. A_DO_3 has a large number of abnormal continuous zero values from January to April 2022. After outliers are removed and cleaned, it is shown as the red line below. Since data such as year, month, and day are substituted as features, training and filling are performed to obtain the final result.
[0224] ASM mechanism model + AI data driven hybrid model correction
[0225] (1) Outlet water quality prediction based on LSTM
[0226] The LSTM prediction principle is no different from filling in. It also needs to predict backward in chronological order. It also trains the model and predicts by taking the target component items within a certain period of time before the target point and the features corresponding to the component. The new prediction result is then returned to the original data and substituted into the component data of the prediction slice of the next point.
[0227] What is different from interpolation is that the characteristic data of the predicted position is often unknown, so these features need to be temporarily filled in. For time, it is still split into parameters such as year, month, and day according to the original method; as for the characteristics of the water inlet part, since the water inlet data needs to be shifted 18 hours, in most predictions, the value of the water inlet part only needs to be filled in after the data is shifted; and the intermediate process quantity needs to be filled in with historical values, that is, filled with data from the same time point within three days.
[0228] (2) Kalman filter modification of LSTM model
[0229] 1) Filtering algorithm
[0230] Filtering refers to the process of extracting the count of useful signals from the received signal containing interference. It uses certain means to suppress useless signals, thereby enhancing the digital signal processing of useful signals. Useless signals, also known as noise, refer to signals that do not contribute to the system or interfere with the observed data.
[0231] 2) Kalman filter algorithm
[0232] Kalman filtering is an algorithm that uses the linear system state equation to optimally estimate the system state through the system input and output observation data. Since the observation data includes the influence of noise and interference in the system, the optimal estimation can also be regarded as a filtering process.
[0233] Data filtering is a data processing technology that removes noise and restores real data. Kalman filtering can estimate the state of a dynamic system from a series of data with measurement noise when the measurement variance is known.
[0234] Kalman filtering is a powerful tool for noise processing. Here, the dynamic information of the target is used to remove the influence of noise and obtain a good estimate of the target position.
[0235] 3) Kalman filter formula
[0236] Kalman's prediction equation is as follows:
[0237] State prediction value From the state prediction equation we can get:
[0238] Prediction covariance matrix:
[0239] Kalman's update equation is as follows:
[0240] Kalman gain matrix K under optimal estimation conditions k for:
[0241] Optimal estimate of state The state update equation can be obtained:
[0242] The estimated error variance matrix is:
[0243] in:
[0244] K k :Kalman gain represents the ratio of model prediction error (Predicted error) to measurement error (Measurement error) in the process of state optimal estimation
[0245] x k : The true value of the state;
[0246] The predicted value of the state, also called a prior state estimate;
[0247] The best estimate of the state, also called a posteriori state estimate;
[0248] z k : Observable quantity of the state matrix;
[0249] The covariance between the true and predicted values;
[0250] P k : The covariance between the true value and the optimal estimate;
[0251] H: state observation matrix;
[0252] A: state transfer matrix;
[0253] B: control input matrix;
[0254] R: measurement error covariance;
[0255] 4) Kalman filter correction of LSTM model
[0256] Since the input of LSTM filling is the target value corresponding to the K points before the prediction time point, time features, and other features that may exist, the target value of the prediction time is predicted. Since no features corresponding to the target time point are brought in, the filling here is prediction rather than regression. For the prediction results here, there is too obvious time periodicity, but in reality this periodicity is not obvious. The fluctuation of the data is also related to the actual components entering the sewage treatment plant in real time, and there may be some interference. As a result, a lot of noise is generated. In this case, it is particularly important to introduce Kalman to correct the filling estimate of the target position. Here, the result obtained by LSTM is taken as the predicted value, and the linear interpolation at both ends of the target filling time is taken as the observed value. Kalman filtering correction is performed to obtain the final interpolation result.
[0257] The results of Kalman compared with LSTM are as follows Figure 6 As shown in the figure, it can be seen that the Kalman filter obviously pulls the original predicted data to the normal point before and after the missing data.
[0258] Rolling calculation
[0259] (1) Rolling calculation function design
[0260] Some links in the sewage treatment process do not have monitoring instruments. The process simulation module can track the water quality throughout the entire process, use some monitoring data from the instrument, and calibrate to simulate the overall process status, such as the water quality of each structure, the growth of microorganisms, etc.
[0261] Based on the activated sludge process series models of the International Water Association (ASM1, ASM2d, ASM3, etc.), we established comprehensive models of carbon, nitrogen, phosphorus and special pollutants, built an online process simulation dynamic model, and simulated the biochemical reaction cycle of pollutants and the pollutant removal effect of multi-process linkage. Through on-site investigation and data collection, combined with actual operation data and online monitoring data, the sewage influent components were divided and the key model parameters were corrected to achieve model calibration and verification to meet the preset accuracy requirements.
[0262] "Basic" experiments are divided into steady-state and dynamic simulations. The experiment usually runs a long steady-state simulation first to obtain the microbial composition. The final value of the steady-state model is used as the initial condition of the dynamic simulation. Once the dynamic simulation is completed, the state variables at each moment will be stored in the database, and the next dynamic simulation will inherit the state variables at the start time of the simulation, that is, the model is re-initialized. The process of rolling calculation is as follows Figure 7 shown.
[0263] Influent flow, pH, COD, ammonia nitrogen, TP (PO4), TN;
[0264] Operating temperature, MLSS, DO, internal reflux, external reflux, sludge discharge, PAC dosage, sodium hypochlorite dosage;
[0265] Outlet flow, pH, COD, ammonia nitrogen, TP, TN, air flow of each branch pipe, PAC dosage (concentration), sodium hypochlorite dosage (concentration);
[0266] (2) Rolling calculation simulation results
[0267] The hydraulic retention time in sewage treatment operation is relatively long, and the conventional sewage treatment plant post-warning makes the operation lagging. Using the water quality prediction and warning function, the effluent quality can be simulated in advance, the effluent can be warned in advance, and the aeration volume can be adjusted in time or the carbon source addition can be increased to ensure that the effluent is stable and meets the standards.
[0268] Through a large amount of online data during the actual operation of the sewage treatment plant, the impact of internal disturbances such as the return of digestate, supernatant from the sludge thickening tank to the reaction tank, and changes in the operating conditions of the water pump on the sewage treatment plant is simulated in real time. The impact of external disturbances such as sudden changes in water volume, changes in pollutant load, and weather changes on the operating conditions and effluent quality of the sewage treatment plant is predicted in advance. Early warning is issued through threshold setting, realizing full-process simulation, online rolling calculation, and early warning prediction of intelligent sewage treatment plants.
[0269] The online rolling calculation results of the model basically match the water quality evolution trend of the sewage treatment plant. However, as the model simulation calculation cycle progresses, the model accuracy gradually decreases, and dynamic correction is required during the process.
[0270] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.
Claims
1. A method for optimizing the operation of a sewage treatment plant based on a prediction model, characterized in that: The following steps are involved: S1. Construct a sewage treatment plant operation prediction model; the sewage treatment plant operation prediction model includes an inlet prediction model and an outlet prediction model; wherein the inlet prediction model uses meteorological data and historical inlet load data as input to predict the inlet water quality and quantity of the sewage treatment plant; the outlet prediction model uses the inlet water quality and quantity data predicted by the inlet prediction model and the input sewage treatment plant operation plan as input, and simulates the sewage treatment process based on the sewage treatment plant operation plan to predict the outlet water quality of the sewage treatment plant; S2. With the goal of meeting the effluent quality standards and minimizing the energy and drug consumption, a genetic algorithm is used to solve the sewage treatment plant operation prediction model, and the input randomly initialized sewage treatment plant operation plan is optimized to obtain an optimized operation plan; S3. Use the optimized operation plan obtained in S2 to optimize the operation of the sewage treatment plant.
2. The method for optimizing the operation of a sewage treatment plant based on a prediction model according to claim 1, characterized in that: S1 also includes: learning and training the inlet prediction model through meteorological data and historical inlet load data; learning and training the effluent prediction model through inlet water quality and quantity data, sewage plant operation plan and corresponding effluent water quality data.
3. The method for optimizing the operation of a sewage treatment plant based on a prediction model according to claim 2, characterized in that: In S1, the effluent prediction model is also modified; the modification includes using a Kalman filter algorithm to modify the prediction results of the sewage plant operation prediction model.
4. The method for optimizing the operation of a sewage treatment plant based on a prediction model according to claim 1, characterized in that: The water inflow prediction model adopts a LSTM-based neural network model.
5. The method for optimizing the operation of a sewage treatment plant based on a prediction model according to claim 4, characterized in that: The water output prediction model adopts the ASM mechanism model.
6. The method for optimizing the operation of a sewage treatment plant based on a prediction model according to claim 5, characterized in that: The wastewater treatment parameters set in the ASM mechanism model include: heterotrophic bacteria yield coefficient Y H , heterotrophic bacteria attenuation coefficient b H , maximum specific growth rate of heterotrophic bacteria μ mH , the maximum specific growth rate of autotrophic bacteria μ mA , maximum specific hydrolysis rate K h .
7. The method for optimizing the operation of a sewage treatment plant based on a prediction model according to claim 6, characterized in that: Heterotrophic bacteria productivity coefficient Y H The calculation formula is: ΔCOD1=(COD TOT2 -CODE SOL2 )-(CODE TOT1 -CODE SOL1 ); ΔCOD2=(COD SOL1 -CODE SOL2 ); In the formula, COD TOT1 、COD TOT2 are the total COD of the mixed liquid before and after the reaction; COD SOL1 、COD SOL2 are the COD of the mixed liquor before and after the reaction; ΔCOD1 is the change of the COD of heterotrophic bacteria in the reactor; ΔCOD2 is the change of the soluble COD in the reactor; Heterotrophic bacteria attenuation coefficient b H The calculation formula is: In the formula, K d is the traditional attenuation coefficient; Y H is the heterotrophic bacteria productivity coefficient; f I is the proportion of inert particles in microorganisms, taking a typical value; Maximum specific growth rate of heterotrophic bacteria μ mH The calculation process includes: Calculate the change of DO in the reactor during sewage treatment lnOUR; plot lnOUR against time t, and the slope of the straight line is (μ mH -b H ); combined with the calculated heterotrophic bacteria attenuation coefficient b H , and the maximum specific growth rate μ of heterotrophic bacteria is obtained mH ; The maximum specific growth rate of autotrophic bacteria μ mA The calculation process includes: Calculate the natural logarithm of NOx-N concentration in the reactor during sewage treatment over time lnS NO ; with lnS NO Plotted against time t, the slope of the straight line is (μ mA -b A );Combined with the typical value of the attenuation coefficient b of the autotrophic bacteria A , the maximum specific growth rate μ of autotrophic bacteria is obtained mA ; Maximum specific hydrolysis rate K h The calculation process includes: Calculate the remaining insoluble substrate X in the reactor S Concentration: Construct a relationship expressing the hydrolysis rate in terms of oxygen consumption rate: Where t is any time after t0, te is the time for dissolved oxygen to return to the stable value before adding water sample, OUR(t) is the oxygen consumption rate that changes with time, OURe is the oxygen consumption rate generated by endogenous respiration; Y H is the heterotrophic bacteria productivity coefficient; The data calculated by the above two equations are plotted as X and Y coordinates, respectively, and the hydrolysis of the slowly degradable insoluble substrate is represented by the first-order reaction relationship: The maximum specific hydrolysis rate K was calculated h .
8. The method for optimizing the operation of a sewage treatment plant based on a prediction model according to claim 1, characterized in that: In S2, the process of solving the sewage treatment plant operation prediction model using a genetic algorithm includes: optimizing the sewage treatment plant operation plan in an iterative manner through preset operations until the goals of meeting effluent water quality standards and minimizing operating energy consumption and drug consumption are met; the preset operations include selection, crossover and mutation.
9. The method for optimizing the operation of a sewage treatment plant based on a prediction model according to claim 1, characterized in that: In S3, the process of optimizing the operation of the sewage treatment plant includes: inputting the optimized operation plan into the control system of the sewage treatment plant to achieve automatic optimization and control of the operation of the sewage treatment plant.
10. The method for optimizing the operation of a sewage treatment plant based on a prediction model according to claim 1, characterized in that: S3 also includes S4, which makes real-time adjustments and optimizations to the optimized operation plan based on the real-time monitored influent water quality and quantity data and effluent water quality data to ensure the stable operation of the sewage treatment plant and the compliance of the effluent water quality.
Citation Information
Cited By
Method, system and equipment for optimizing dosage of chemicals in semiconductor factory affair system
CN120952278A
System and method for carrying out sewage treatment by adopting superconducting magnet
CN120987439A
Method and system for treating wastewater containing heavy metal ions based on magnetic nano material
CN121292733A