Rural domestic sewage treatment system and method for controlling A2O reaction process based on energy detection
By controlling the A2O reaction process through energy detection and neural network models, the problems of unstable sludge circulation and water quality and quantity fluctuations in traditional A2O processes for rural domestic sewage treatment have been solved, achieving efficient and stable sewage treatment results and reducing operating costs.
Patent Information
- Application Number
- CN202511169127.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-12-12
AI Technical Summary
Traditional A2O processes for rural domestic sewage treatment suffer from problems such as unstable sludge circulation, difficulty in adapting to fluctuations in water quality and quantity, and high operating costs, resulting in low treatment efficiency.
The A2O reaction process is controlled by an energy detection-based neural network model. Wastewater temperature and water level are monitored by distributed fiber optic temperature and level sensors. Combined with a long short-term memory network (LSTM) and particle swarm optimization fuzzy logic algorithm, the internal reflux ratio and aeration intensity are adjusted in real time to optimize the microbial reaction environment.
It enables accurate prediction of the response process in rural domestic sewage treatment, improves treatment efficiency, reduces operating costs, and enhances the system's adaptability and stability.
Smart Images

Figure CN121107595A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of sewage treatment, and particularly relates to a rural domestic sewage treatment system and method based on energy detection control of A 2 O reaction process. BACKGROUND
[0002] In rural areas, effective treatment of domestic sewage is crucial for environmental protection and the improvement of residents' quality of life. If the nitrogen, phosphorus and other pollutants contained in domestic sewage are not properly treated and directly discharged, they will cause serious pollution to the ecological environment such as water bodies and soil, and lead to problems such as water eutrophication and soil fertility decline.
[0003] At present, A 2 O process is widely used in rural domestic sewage treatment. A 2 O biological denitrification and phosphorus removal process combines traditional activated sludge process, biological nitrification and denitrification process and biological phosphorus removal process, and through the synergistic effect of anaerobic zone, anoxic zone and aerobic zone, the removal of carbon, nitrogen and phosphorus in wastewater is realized. In the anaerobic zone, the facultative anaerobic fermentation bacteria in the system return sludge convert the biodegradable organic matter in the wastewater into volatile fatty acids (VFA, small molecule fermentation products) and polyphosphorus bacteria release the polyphosphate stored in the cell and absorb VFA to store as poly-β-hydroxyalkanoate (PHA), part of the carbon is removed; in the anoxic zone, denitrifying bacteria use the nitrate returned from the aerobic zone and biodegradable organic matter in the wastewater for denitrification reaction to achieve carbon and nitrogen removal; in the aerobic zone, polyphosphorus bacteria decompose PHA and absorb excess soluble phosphorus, and nitrifying bacteria complete ammonification and nitrification to convert nitrogen into and , and the is brought into the anoxic zone for further denitrification by the subsequent return of mixed liquor.
[0004] However, the traditional A 2 O process has significant defects in practical application. Due to the large sludge return operation, various denitrifying and phosphorus removing microorganisms coexist in the same sludge system, but the requirements of different microorganisms for dissolved oxygen concentration, sludge age, nutrient type and concentration are quite different. This difference makes the circulation of A 2 O process system sludge make some microorganisms in a certain stage in an unfavorable environment, leading to competition among bacterial flora for environmental conditions, living space and nutrients, thereby affecting the overall treatment efficiency of the system, making it difficult to achieve ideal sewage treatment effect, and the operation cost is high.
[0005] In addition, rural domestic sewage has the characteristics of large fluctuation of water quality and quantity, and the traditional A 2The O process is difficult to adapt to these changes. When the sewage volume suddenly increases, the treatment effect will be obviously affected; when the water quality changes, the growth and metabolism of microorganisms will also be disturbed, further reducing the treatment efficiency. Therefore, an innovative sewage treatment system and method are urgently needed to solve the problems of the traditional A 2 O process in rural domestic sewage treatment, improve the sewage treatment effect, reduce the treatment cost, and realize the efficient and stable treatment of rural domestic sewage. SUMMARY
[0006] The technical problem to be solved by the present application is to provide a rural domestic sewage treatment system and method based on energy detection control A 2 O reaction process, which can solve the sewage treatment defects of the A 2 O process.
[0007] To solve the above technical problems, the technical solution adopted by the present application is: The rural domestic sewage treatment system based on energy detection control A 2 O reaction process, comprising an anaerobic tank, an anoxic tank, an aerobic tank and a sedimentation tank, the mixed liquid is returned to the anoxic tank through an internal reflux pump in the aerobic tank, distributed optical fiber temperature sensors and liquid level sensors are arranged in the anaerobic tank, the anoxic tank and the aerobic tank, the water level of each section is monitored by the liquid level sensor to determine the volume of the current sewage, and the sewage temperature of each section is monitored by the distributed optical fiber temperature sensor, the monitoring signals of the distributed optical fiber temperature sensors and the liquid level sensors are sent to the input end of the controller, the control signals of the internal reflux pump and the sludge reflux pump are output from the output end of the controller, a neural network model is deployed in the controller, the neural network model is used to learn the monitoring data, and the heat released by each section of anaerobic, anoxic and aerobic is corresponding to the current carbon removal, nitrogen removal and phosphorus removal reaction process; different reaction processes correspond to different heat release characteristics, the neural network model can accurately judge the degree of reaction by learning the heat release characteristics; according to the judgment result of the reaction process, the internal reflux ratio parameter from the aerobic zone to the anoxic zone is determined, so as to adjust and control the internal reflux pump.
[0008] The sedimentation tank returns the settled sludge to the anaerobic tank through the sludge reflux pump.
[0009] The outlet end of the sedimentation tank is connected with the water outlet well.
[0010] The inlet end of the anaerobic tank is connected with the adjusting tank, and the inlet end of the adjusting tank is connected with the grid well.
[0011] The internal reflux pump is a variable frequency pump, the internal reflux pump is electrically connected with a frequency converter, and the frequency converter receives the control signal of the controller.
[0012] The above-mentioned rural domestic sewage treatment system based on energy detection control A 2The sewage treatment method of the rural domestic sewage treatment system of the reaction process, the treatment steps are: Step 1, data preparation; the distributed optical fiber temperature sensor collects the temperature data of the sewage in the anaerobic, anoxic and aerobic sections in real time, and the liquid level sensor synchronously collects the water level data of each section. The temperature data and water level data are received by the controller, normalized and mapped to the interval [0, 1] for comparison of data of different magnitudes and convenient processing by the neural network model; Step 2, construct an input feature vector; the normalized temperature and water level data are organized into an input feature vector in time sequence. Considering the dynamics of the reaction process, the data in a certain time window are selected as the model input to form a feature vector containing multiple time steps, and each time step contains temperature and water level information of the anaerobic, anoxic and aerobic sections; Step 3, neural network model structure and training; the long short-term memory network LSTM model is adopted, which is composed of an input gate, a forgetting gate, an output gate and a memory unit. The input gate determines how much of the current input information is added to the memory unit; the forgetting gate controls which information in the memory unit is retained or discarded; the output gate determines which information in the memory unit will be output for prediction at the current time; in the training stage, the LSTM model is trained using historical monitoring data and its corresponding actual reaction process labels; during the training process, the model continuously adjusts the weights through the back propagation algorithm to minimize the error between the predicted results and the actual labels; Step 4, reaction process prediction; the trained LSTM model will make predictions based on the learned time series features and reaction process relationships when receiving new input feature vectors; the memory unit inside the model will save information from previous time steps and combine it with the current input for comprehensive analysis to predict the carbon removal, nitrogen removal and phosphorus removal reaction processes in the anaerobic, anoxic and aerobic sections, and output the quantitative evaluation results of the reaction process; Step 5, calculation and adjustment of internal reflux ratio; based on the reaction process results predicted by the LSTM model, the best internal reflux ratio is calculated using the fuzzy logic algorithm based on particle swarm optimization, and the controller controls the frequency of the internal reflux pump according to the calculated internal reflux ratio.
[0013] In Step 3 above, the long short-term memory network LSTM model introduces the core kinetic parameters of the activated sludge model to construct an “energy-reaction process” correlation model, realizing prediction of the carbon removal, nitrogen removal and phosphorus removal processes in the anaerobic, anoxic and aerobic sections.
[0014] The process of constructing the “energy-reaction process” correlation model includes: Step3.1, Construction of input feature vector; input features include temperatures of anaerobic, anoxic and aerobic zones collected by distributed fiber-optic temperature sensors , water level calculated from water level sensor , and key parameters based on activated sludge model: Anaerobic zone: phosphorus release rate of PAO r P,release , volatile fatty acid (VFA) generation rate r VFA ; Anoxic zone: denitrification rate r denit ; Aerobic zone: nitrification rate r nit , phosphorus uptake rate of PAO r P,uptake ; The feature vector is in the form of: ; wherein the rate parameters are calculated based on the activated sludge model: Phosphorus release rate of PAO: ; wherein, is the phosphorus release rate constant of PAO ( ); is the PAO concentration (gCOD / L); is the volatile fatty acid concentration (mg / L); is the VFA saturation constant (mg / L); Denitrification rate: ; wherein, is the maximum specific growth rate of heterotrophic bacteria ( ); is the heterotrophic bacteria concentration (gCOD / L); is the nitrate concentration (mgN / L); is the nitrate saturation constant (mgN / L); is the degradable COD concentration (mg / L); is the COD saturation constant (mg / L); Step3.2, Objective function and constraint conditions; Objective function: The cross-entropy loss between predicted reaction progress quantified value and actual progress y is minimized, combined with energy balance constraints: ; in, The loss function value combines cross-entropy loss and energy balance error; t N represents the time step (min); N is the length of the time series. The actual reaction process at time t is represented by 0-1, where 0 represents the initial stage and 1 represents the final stage, calculated from the pollutant concentration detected offline. The reaction process predicted by the LSTM model at time t (0-1); ; Theoretically, activated sludge generates heat. This is the energy balance weighting coefficient; Constraints: Kinetic constraints: The reaction rate in each section must meet the constraints of the activated sludge model; Equipment constraints: Internal recirculation ratio R ∈ [100%, 300%], sludge recirculation ratio r ∈ [50%, 100%]; Process constraints: 0 represents the initial stage of the reaction, and 1 represents the final stage of the reaction; Step 3.3: Iterative training and optimization; The parameters of the LSTM model are updated using the Adam optimizer, as follows: Calculate the gradient: ; in, Let be the gradient at time t. These are the model parameters at time t; they include the mapping weights of the kinetic parameters in the activated sludge. Update the first and second moment estimates: ; ; in, This is a first-order moment estimate; It is a second-order moment estimate; The first-order moment attenuation coefficient; The second-order moment attenuation coefficient; Update parameters after correcting for deviations: ; ; in, This is the correction value for the first moment estimate. This is a correction value for the second-order moment estimate; Learning rate is a numerical stability constant; iteration termination condition: the loss function converges or the number of iterations reaches 1000.
[0015] Step 4 above comprehensively analyzes and predicts the current reaction process, and outputs a quantitative evaluation result of the reaction process as follows: Step 4.1: Correspondence between heat release and reaction stages: Anaerobic zone carbon removal + phosphorus release: when and When the fermentation is active, the phosphorus release rate of polyphosphate-accumulating bacteria is >70%. Nitrogen removal in hypoxic zones: when and At that time, it was determined to be the "high-efficiency period of denitrification"; aerobic zone nitrification + phosphorus uptake: when and At that time, it was determined to be the "peak nitrification period"; Step 4.2, Predicted Output and Parameter Adjustment: After the model outputs the quantified values of the reaction process in each section, the internal reflux ratio R is adjusted according to the following formula: ; When the nitrification completion rate in the aerobic zone is higher than that in the anoxic zone, increase the reflux ratio to supplement nitrate.
[0016] The specific process of normalizing the temperature and water level data in Step 1 above is as follows: Assuming the original temperature data is Water level data is The normalization formulas are as follows:
[0017]
[0018] in, , These are the minimum and maximum values of the temperature data. , These are the minimum and maximum values of the water level data. Then, the normalized data is divided into multiple samples according to the time series. Each sample contains temperature and water level data at a set time step, which are used as input to the neural network model.
[0019] This invention provides an energy detection control A 2 The rural domestic sewage treatment system and method based on the O reaction process has the following beneficial effects: 1. Precise response process prediction improves processing effectiveness Capturing Complex Dynamic Relationships: Traditional wastewater treatment methods struggle to effectively address the significant fluctuations in water quality and quantity in rural domestic sewage due to their inability to precisely control the reaction process. This invention utilizes an LSTM neural network model capable of capturing the long-term dependencies of time-series data such as temperature and water level during wastewater treatment. In the anaerobic zone, the process of phosphorus release and absorption of small-molecule fermentation products by polyphosphate-accumulating bacteria is influenced by temperature and wastewater volume. The LSTM model can accurately determine whether the anaerobic process is in its early, middle, or late stages based on these data trends. For example, when the temperature in the anaerobic zone gradually increases while the water level stabilizes, the model can promptly identify active anaerobic fermentation, thereby predicting the phosphorus release by polyphosphate-accumulating bacteria and providing an accurate basis for subsequent treatment.
[0020] Optimized treatment strategy: By accurately predicting the reaction process, the treatment strategy can be optimized according to the needs of different stages. In the anoxic zone, the model can adjust the internal recirculation ratio based on the prediction results to ensure that denitrifying bacteria have sufficient nitrates and organic matter for denitrification, thereby improving nitrogen removal efficiency. In the aerobic zone, the aeration intensity and time can be precisely controlled, allowing nitrifying bacteria and polyphosphate-accumulating bacteria to carry out nitrification and phosphorus uptake reactions in the optimal environment, reducing pollutant emissions, improving the overall wastewater treatment effect, and ensuring that the treated water quality more consistently meets discharge standards.
[0021] 2. Adaptability to the characteristics of rural sewage Addressing Fluctuations in Water Quality and Quantity: Rural domestic sewage experiences significant fluctuations in both water quality and quantity, making traditional A2 / O processes ill-suited to these changes. The LSTM model of this invention possesses strong adaptive capabilities, dynamically adjusting its predictions of the reaction process based on real-time monitored temperature and water level changes. Employing a sliding time window (including data from the past hour) to capture dynamic changes in temperature and volume, and combining this with the dynamic reaction pattern of "hydrolysis-fermentation-metabolism" in the activated sludge model, the model exhibits a response delay of ≤5 minutes to sudden increases in water volume or abrupt changes in water quality (such as a sharp rise in COD). When sewage volume suddenly increases, the model can quickly identify this change and, based on historical data and the current state, predict changes in the reaction process of each section, adjusting treatment parameters in a timely manner to ensure stable operation of the sewage treatment system under various operating conditions.
[0022] Based on the fuzzy logic algorithm of Particle Swarm Optimization (PSO), the internal reflux ratio is adjusted in real time according to the reaction process prediction results, and the effluent water quality can still meet the standards when the influent flow rate fluctuates by ±30%.
[0023] Flexible adjustment of treatment parameters: The model can flexibly adjust key parameters such as internal recirculation ratio and aeration intensity based on water quality changes in different seasons and time periods. For example, in summer when the temperature is high, microbial metabolism is more active, and the model can predict that the reaction process will accelerate, thereby appropriately reducing the aeration intensity or adjusting the internal recirculation ratio to avoid overtreatment, improve treatment efficiency, and reduce energy consumption.
[0024] 3. Reduce operating costs Optimized resource utilization: Precise reaction process prediction enables wastewater treatment systems to utilize resources more rationally. By accurately controlling the internal recirculation ratio and aeration intensity, unnecessary energy and chemical consumption is reduced. In traditional processes, excessive energy and chemical inputs are often used to ensure treatment effectiveness, leading to increased operating costs. The method of this invention, however, can precisely control the usage of these resources based on the actual reaction process, thereby reducing the operating costs of wastewater treatment.
[0025] Reduced maintenance costs: Because the model can predict abnormal situations in the reaction process in advance, such as decreased reaction efficiency due to abnormal microbial metabolism, it can issue early warning signals in a timely manner, enabling staff to take timely measures for adjustment and maintenance. This can prevent equipment from being damaged due to prolonged abnormal operating conditions, reduce the frequency of equipment repair and replacement, and further reduce maintenance costs.
[0026] 4. Data-driven intelligent decision-making Accumulating data to optimize the model: As data accumulates continuously during wastewater treatment, the LSTM model can learn and optimize over time. Through the analysis and mining of large amounts of historical data, the model can discover more hidden patterns and features, improving the accuracy and reliability of predictions. Simultaneously, model optimization can provide a reference for improving wastewater treatment processes, promoting the continuous development of wastewater treatment technologies.
[0027] Remote monitoring and intelligent management: The method of this invention can be combined with a remote monitoring system to achieve real-time remote monitoring and intelligent management of rural sewage treatment systems. Staff can access the operating status and reaction process predictions of the sewage treatment system anytime, anywhere via mobile phone or computer, enabling timely decision-making and adjustments. This intelligent management approach improves the efficiency of sewage treatment management and reduces the workload and errors associated with manual intervention. Attached Figure Description
[0028] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This invention is based on energy detection and control A 2 A schematic diagram of the structure of a rural domestic sewage treatment system for the O reaction process; Figure 2 This is a schematic diagram of the wastewater treatment method of the present invention.
[0029] The components include: 1. Anaerobic tank; 2. Anoxic tank; 3. Aerobic tank; 4. Sedimentation tank; 5. Effluent well; 6. Distributed fiber optic temperature sensor; 7. Internal return pump; 8. Sludge return pump; 9. Bar screen well; 10. Equalization tank; 11. Liquid level sensor; and 12. Lift pump. Detailed Implementation
[0030] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0031] Example 1: like Figure 1 and 2 As shown, based on energy detection control A 2 A rural domestic sewage treatment system with an O-reaction process includes an anaerobic tank 1, an anoxic tank 2, an aerobic tank 3, and a sedimentation tank 4. The aerobic tank 3 uses an internal return pump 7 to return the mixed liquor to the anoxic tank 2. Distributed fiber optic temperature sensors 6 and level sensors 11 are installed in the anaerobic tank 1, anoxic tank 2, and aerobic tank 3. The level sensors 11 monitor the water level in each section to determine the current sewage volume, and the distributed fiber optic temperature sensors 6 monitor the sewage temperature in each section. The monitoring signals from the distributed fiber optic temperature sensors 6 and level sensors 11 are sent to the input terminal of the controller. The controller's output... The controller outputs control signals for the internal return pump 7 and the sludge return pump 8. A neural network model is deployed within the controller. The neural network model learns from the monitoring data and correlates the heat released in each of the anaerobic, anoxic, and aerobic stages with the current progress of the carbon removal, nitrogen removal, and phosphorus removal reactions. Different reaction processes correspond to different heat release characteristics. By learning the heat release characteristics, the neural network model can accurately determine the degree of reaction progress. Based on the determination of the reaction progress, the internal return ratio parameter from the aerobic zone to the anoxic zone is determined, thereby regulating and controlling the internal return pump 7.
[0032] A reasonable adjustment of the internal reflux ratio can optimize the living environment of microorganisms, allowing different nitrogen and phosphorus removal microorganisms to exert their maximum efficiency under their respective suitable conditions, reducing competition among microbial communities for environmental conditions, living space, and nutrients, thereby achieving the best reaction effect, improving the purification effect, and reducing the consumption cost of the sewage treatment plant.
[0033] To solve the problem of traditional A 2To address the low treatment efficiency of the O process, the microorganisms in the process are maximized in each section. The heat release process in each section is monitored. The water level in each section determines the current volume of wastewater, and the temperature of the wastewater is related to its volume and the heat released by the reaction in each section. A neural network model is used to learn from the monitoring data and correlate the heat released in the anaerobic, anoxic, and aerobic sections with the current progress of carbon removal, nitrogen removal, and phosphorus removal reactions. This determines the internal recirculation ratio parameter from the aerobic zone to the anoxic zone, thereby achieving the best reaction effect, making the purification effect more obvious, and reducing the consumption cost of the wastewater treatment plant.
[0034] The sedimentation tank 4 described above uses a sludge return pump 8 to return the settled sludge to the anaerobic tank 1.
[0035] The outlet end of the sedimentation tank 4 is connected to the effluent well 5.
[0036] The inlet end of the anaerobic tank 1 is connected to the equalization tank 10, and the inlet end of the equalization tank 10 is connected to the grid well 9.
[0037] The aforementioned internal reflux pump 7 is a variable frequency pump. The internal reflux pump 7 is electrically connected to the frequency converter, and the frequency converter receives the control signal from the controller.
[0038] Using the above-mentioned energy detection-based control A 2 The wastewater treatment method for rural domestic sewage treatment systems using the O-reaction process involves the following steps: Step 1: Data preparation; Distributed fiber optic temperature sensor 6 collects temperature data of wastewater in anaerobic, anoxic, and aerobic sections in real time, and liquid level sensor 11 collects water level data of each section simultaneously. Temperature and water level data are received by the controller, which normalizes the temperature and water level data and maps them to the [0, 1] interval to make data of different magnitudes comparable and facilitate neural network model processing. Temperature data reflects the activity level of microbial reactions within each section, as biochemical reactions are typically accompanied by heat changes; the more vigorous the reaction, the more pronounced the temperature change. Water level data is used to calculate wastewater volume, and combining it with temperature data allows for a more accurate assessment of the heat release from the reaction. Step 2: Construct the input feature vector; organize the normalized temperature and water level data into an input feature vector in chronological order. Considering the dynamic nature of the reaction process, select data within a certain time window as the model input, such as temperature and water level data collected every 10 minutes in the past hour, forming a feature vector containing multiple time steps. The feature vector of each time step contains the temperature and water level information of the anaerobic zone, anoxic zone, and aerobic zone; that is, [anaerobic zone temperature 1, anaerobic zone water level 1, anoxic zone temperature 1, anoxic zone water level 1, aerobic zone temperature 1, aerobic zone water level 1, …, anaerobic zone temperature 6, anaerobic zone water level 6, anoxic zone temperature 6, anoxic zone water level 6, aerobic zone temperature 6, aerobic zone water level 6]; Step 3: Neural Network Model Structure and Training; A Long Short-Term Memory (LSTM) model is used, which can effectively process time-series data and capture long-term dependencies. The LSTM model consists of an input gate, a forget gate, an output gate, and memory units. The input gate determines how much of the current input information is added to the memory unit; the forget gate controls which information in the memory unit is retained or discarded; the output gate determines which information in the memory unit will be output for prediction at the current moment. During the training phase, a large amount of historical monitoring data and its corresponding actual reaction process labels are used to train the LSTM model. The actual reaction process labels are determined through detailed analysis and professional judgment of the wastewater treatment process. For example, based on the changing trends of carbon, nitrogen, and phosphorus concentrations in wastewater, combined with the principles of microbial reaction, the degree of phosphorus release by polyphosphate-accumulating bacteria in the anaerobic zone, the denitrification efficiency in the anoxic zone, and the nitrification and phosphorus uptake in the aerobic zone are judged, thereby determining the anaerobic, anoxic, and aerobic process stages (such as initial, middle, and late stages). During training, the model continuously adjusts the weights through the backpropagation algorithm to minimize the error between the prediction results and the actual labels. Step 4: Reaction process prediction; When the trained LSTM model receives a new input feature vector, it will make predictions based on the learned time series features and the relationship between the reaction process; The memory unit inside the model will save the information of the previous time step and combine it with the current input for comprehensive analysis to predict the carbon removal, nitrogen removal and phosphorus removal reaction process of each anaerobic, hypoxic and aerobic segment, and output the quantitative evaluation results of the reaction process. Step 5: Calculation and adjustment of internal reflux ratio; Based on the reaction process results predicted by the LSTM model, the optimal internal reflux ratio is calculated using a fuzzy logic algorithm based on particle swarm optimization. The controller performs frequency conversion control on the internal reflux pump 7 according to the calculated internal reflux ratio.
[0039] This algorithm combines the global search capability of particle swarm optimization with the uncertainty handling capability of fuzzy logic, enabling it to find the optimal internal reflux ratio under complex reaction conditions. The intelligent variable frequency speed control device adjusts the speed of the internal reflux pump based on the calculated internal reflux ratio, while the automatic valve control system synchronously adjusts the valve opening, achieving precise control of the reaction process, improving wastewater treatment efficiency, and reducing costs.
[0040] A deep convolutional neural network (LSTM) model was constructed, which possesses powerful feature learning capabilities. By training on a large amount of historical monitoring data (including temperature, water level, and corresponding reaction process data), the LSTM model can automatically learn the complex nonlinear relationships between heat release and decarbonization, denitrification, and dephosphorization processes in anaerobic, hypoxic, and aerobic stages, thereby accurately predicting the current reaction process.
[0041] In Step 3 above, the Long Short-Term Memory (LSTM) network model incorporates the core kinetic parameters of the activated sludge model to construct an "energy-reaction process" correlation model, enabling accurate prediction of carbon removal, nitrogen removal, and phosphorus removal processes in the anaerobic, anoxic, and aerobic stages.
[0042] The process of constructing the "energy-reaction process" correlation model mentioned above includes: Step 3.1: Construction of the input feature vector; the input features include the temperatures of anaerobic, hypoxic, and aerobic zones collected by distributed fiber optic temperature sensors. Wastewater volume calculated from water level data collected by a level sensor. And key parameters based on the activated sludge model: Anaerobic zone: Phosphorus release rate of polyphosphate-accumulating bacteria (PAO) r P,release , rate of formation of volatile fatty acids (VFA) r VFA ; Anoxic zone: Denitrification rate r denit ; Aerobic zone: nitrification rate r nit Phosphorus uptake rate of polyphosphate-accumulating bacteria r P,uptake ; The feature vector is in the form of: ; The rate parameter was calculated based on the activated sludge model: Phosphorus release rate of polyphosphate-accumulating bacteria: ; in, denoted as the phosphorus release rate constant of polyphosphate-accumulating bacteria (d⁻¹). The concentration of polyphosphate-accumulating bacteria (gCOD / L); The concentration of volatile fatty acids (mg / L); The VFA saturation constant (mg / L) is 5. Denitrification rate: ; in, The maximum specific growth rate (d⁻¹) of heterotrophic bacteria is 4-6; The concentration of heterotrophic bacteria (gCOD / L); Nitrate concentration (mgN / L); The value is the nitrate saturation constant (mgN / L), ranging from 0.3 to 0.8. The concentration of degradable COD (mg / L) is used. The COD saturation constant (mg / L) is 20. Step 3.2: Objective function and constraints; Objective function: Quantified by predicted reaction process The objective is to minimize the cross-entropy loss with respect to the actual process y, combined with energy balance constraints: ; in, The loss function value combines cross-entropy loss and energy balance error; t N represents the time step (min); N is the length of the time series. The actual reaction process at time t (0-1, 0 for the initial stage and 1 for the final stage) is calculated from the pollutant concentration detected offline. The reaction process predicted by the LSTM model at time t (0-1); ; Theoretical heat generation for activated sludge (anaerobic zone) Aerobic zone ); This is the energy balance weighting coefficient; Constraints: Kinetic constraints: The reaction rate in each zone must meet the limitations of the activated sludge model, such as the effective nitrification rate when dissolved oxygen (DO ≥ 2 mg / L) is available in the aerobic zone; Equipment constraints: internal recirculation ratio (R∈[100%, 300%]), sludge recirculation ratio (r∈[50%, 100%]); Process constraints: (0 represents the initial stage of the reaction, and 1 represents the final stage of the reaction). Step 3.3: Iterative training and optimization; The parameters of the LSTM model (weight matrix W, bias vector b) are updated through the Adam optimizer, as follows: Calculate the gradient: ; in, Let be the gradient at time t. The model parameters at time t (weight matrix, bias vector) include the weights mapped to the kinetic parameters in the activated sludge. Update the first and second moment estimates: ; ; in, This is a first-order moment estimate (gradient mean); This is a second-order moment estimate (gradient variance). The first-order moment attenuation coefficient; The second-order moment attenuation coefficient; =0.9, =0.999; Update parameters after correcting for deviations: ; ; in, This is the correction value for the first moment estimate. This is a correction value for the second-order moment estimate; =0.001 is the learning rate. It is the numerical stability constant; Iteration termination condition: The loss function converges ( (or the number of iterations reaches 1000).
[0043] Step 4 above comprehensively analyzes and predicts the current reaction process, and outputs a quantitative evaluation result of the reaction process as follows: Step 4.1: Correspondence between heat release and reaction stages: Anaerobic zone carbon removal + phosphorus release: when and At that time, it is determined to be the "active fermentation period" (corresponding to...) At this point, the phosphorus release rate of polyphosphate-accumulating bacteria is >70%; Nitrogen removal in hypoxic zones: when and At that time, it is determined to be the "high-efficiency period of denitrification" (corresponding to...). ); aerobic zone nitrification + phosphorus uptake: when and At that time, it was determined to be the "peak nitrification period" (corresponding to...). ); Step 4.2, Predicted Output and Parameter Adjustment: After the model outputs the quantified values of the reaction process in each section, the internal reflux ratio R is adjusted according to the following formula: ; When the nitrification completion rate in the aerobic zone is higher than that in the anoxic zone, increase the reflux ratio to supplement nitrate.
[0044] The specific process of normalizing the temperature and water level data in Step 1 above is as follows: Assuming the original temperature data is Water level data is The normalization formulas are as follows:
[0045]
[0046] in, , These are the minimum and maximum values of the temperature data. , These are the minimum and maximum values of the water level data. Then, the normalized data is divided into multiple samples according to the time series. Each sample contains temperature and water level data at a set time step, which are used as input to the neural network model.
Claims
1. Energy detection and control A 2 A rural domestic sewage treatment system based on the O-reaction process is characterized by, The system includes an anaerobic tank (1), an anoxic tank (2), an aerobic tank (3), and a sedimentation tank (4). The aerobic tank (3) uses an internal reflux pump (7) to return the mixed liquor to the anoxic tank (2). The anaerobic tank (1), the anoxic tank (2), and the aerobic tank (3) are equipped with distributed fiber optic temperature sensors (6) and liquid level sensors (11). The liquid level sensor (11) monitors the water level of each section to determine the current volume of sewage, and the distributed fiber optic temperature sensor (6) monitors the sewage temperature of each section. The monitoring signals from the distributed fiber optic temperature sensor (6) and the liquid level sensor (11) are sent to the input terminal of the controller. The controller outputs control signals for the internal return pump (7) and the sludge return pump (8). The controller is equipped with a neural network model. The neural network model is used to learn the monitoring data and correlate the heat released in each of the anaerobic, anoxic, and aerobic stages with the current carbon removal, nitrogen removal, and phosphorus removal process. Different reaction processes correspond to different heat release characteristics. The neural network model can accurately judge the degree of reaction by learning the heat release characteristics. Based on the judgment result of the reaction process, the internal return ratio parameter from the aerobic zone to the anoxic zone is determined, thereby regulating and controlling the internal return pump (7).
2. The energy detection control A according to claim 1 2 A rural domestic sewage treatment system based on the O-reaction process is characterized by, The sedimentation tank (4) uses a sludge return pump (8) to return the settled sludge to the anaerobic tank (1).
3. The energy detection control A according to claim 2 2 A rural domestic sewage treatment system based on the O-reaction process is characterized by, The outlet end of the sedimentation tank (4) is connected to the effluent well (5).
4. The energy detection control A according to claim 3 2 A rural domestic sewage treatment system based on the O-reaction process is characterized by, The inlet end of the anaerobic tank (1) is connected to the regulating tank (10), and the inlet end of the regulating tank (10) is connected to the grid well (9).
5. The energy detection control A according to claim 4 2 A rural domestic sewage treatment system based on the O-reaction process is characterized by, The internal reflux pump (7) is a variable frequency pump. The internal reflux pump (7) is electrically connected to the frequency converter, and the frequency converter receives the control signal from the controller.
6. Using the energy detection-based control A as described in claim 5 2 A wastewater treatment method for a rural domestic wastewater treatment system based on the O-reaction process, characterized in that... The processing steps are as follows: Step 1, Data preparation; Distributed fiber optic temperature sensor (6) collects temperature data of wastewater in anaerobic, anoxic and aerobic sections in real time, and liquid level sensor (11) collects water level data of each section synchronously. Temperature data and water level data are received by the controller, and the temperature data and water level data are normalized and mapped to the [0, 1] interval to make data of different magnitudes comparable and facilitate neural network model processing; Step 2: Construct the input feature vector; organize the normalized temperature and water level data into an input feature vector in chronological order; considering the dynamic nature of the reaction process, select data within a certain time window as the model input to form a feature vector containing multiple time steps. Each time step's feature vector contains temperature and water level information for the anaerobic, anoxic, and aerobic zones. Step 3: Neural Network Model Structure and Training; A Long Short-Term Memory (LSTM) model is adopted. The LSTM model consists of an input gate, a forget gate, an output gate, and memory units. The input gate determines how much of the current input information is added to the memory unit; the forget gate controls which information in the memory unit is retained or discarded; the output gate determines which information in the memory unit will be output for the prediction at the current time step. During the training phase, the LSTM model is trained using historical monitoring data and its corresponding actual response process labels; During training, the model continuously adjusts the weights through the backpropagation algorithm to minimize the error between the predicted results and the actual labels; Step 4: Reaction process prediction; When the trained LSTM model receives a new input feature vector, it will make predictions based on the learned time series features and the relationship between the reaction process; The memory unit inside the model will save the information of the previous time step and combine it with the current input for comprehensive analysis to predict the carbon removal, nitrogen removal and phosphorus removal reaction process of each anaerobic, hypoxic and aerobic segment, and output the quantitative evaluation results of the reaction process. Step 5: Calculation and adjustment of internal reflux ratio; Based on the reaction process results predicted by the LSTM model, the optimal internal reflux ratio is calculated using a fuzzy logic algorithm based on particle swarm optimization. The controller performs frequency conversion control on the internal reflux pump (7) according to the calculated internal reflux ratio.
7. The energy detection control A according to claim 6 2 A wastewater treatment method for a rural domestic wastewater treatment system based on the O-reaction process, characterized in that... In Step 3, the Long Short-Term Memory (LSTM) network model incorporates the kinetic parameters of the activated sludge model to construct an "energy-reaction process" correlation model, enabling the prediction of carbon removal, nitrogen removal, and phosphorus removal processes in the anaerobic, anoxic, and aerobic stages.
8. The energy detection control A according to claim 7 2 A wastewater treatment method for a rural domestic wastewater treatment system based on the O-reaction process, characterized in that... The process of constructing the "energy-reaction process" correlation model includes: Step 3.1: Construction of the input feature vector; the input features include the temperatures of the anaerobic, hypoxic, and aerobic zones collected by distributed fiber optic temperature sensors. Wastewater volume calculated from water level data collected by a level sensor. And key parameters based on the activated sludge model: Anaerobic zone: Phosphorus release rate of polyphosphate-accumulating bacteria (PAO) r P,release , rate of formation of volatile fatty acids (VFA) r VFA ; Anoxic zone: Denitrification rate r denit ; Aerobic zone: nitrification rate r nit Phosphorus uptake rate of polyphosphate-accumulating bacteria r P,uptake ; The feature vector is in the form of: ; The rate parameter was calculated based on the activated sludge model: Phosphorus release rate of polyphosphate-accumulating bacteria: ; in, The phosphorus release rate constant of polyphosphate-accumulating bacteria ( ); The concentration of polyphosphate-accumulating bacteria (gCOD / L); The concentration of volatile fatty acids (mg / L); VFA saturation constant (mg / L); Denitrification rate: ; in, The maximum specific growth rate of heterotrophic bacteria ( ); The concentration of heterotrophic bacteria (gCOD / L); Nitrate concentration (mgN / L); is the nitrate saturation constant (mgN / L); The concentration of degradable COD (mg / L) is used. COD saturation constant (mg / L); Step 3.2: Objective function and constraints; Objective function: Quantified by predicted reaction process The objective is to minimize the cross-entropy loss with respect to the actual process y, combined with energy balance constraints: ; in, The loss function value combines cross-entropy loss and energy balance error; t N represents the time step (min); N is the length of the time series. The actual reaction process at time t is represented by 0-1, where 0 represents the initial stage and 1 represents the final stage, calculated from the pollutant concentration detected offline. The reaction process predicted by the LSTM model at time t (0-1); ; Theoretically, activated sludge generates heat. This is the energy balance weighting coefficient; Constraints: Kinetic constraints: The reaction rate in each section must meet the constraints of the activated sludge model; Equipment constraints: Internal recirculation ratio R ∈ [100%, 300%], sludge recirculation ratio r ∈ [50%, 100%]; Process constraints: 0 represents the initial stage of the reaction, and 1 represents the final stage of the reaction; Step 3.3: Training and iterative optimization; The parameters of the LSTM model are updated using the Adam optimizer, as follows: Calculate the gradient: ; in, Let be the gradient at time t. These are the model parameters at time t; they include the mapping weights of the kinetic parameters in the activated sludge. Update the first and second moment estimates: ; ; in, This is a first-order moment estimate; It is a second-order moment estimate; The first-order moment attenuation coefficient; It is the second-order moment attenuation coefficient; Update parameters after correcting for deviation: ; ; in, This is the correction value for the first-order moment estimate. This is a correction value for the second-order moment estimate; For learning rate, It is the numerical stability constant; Iteration termination condition: The loss function converges or the number of iterations reaches 1000.
9. The energy detection control A according to claim 8 2 A wastewater treatment method for a rural domestic wastewater treatment system based on the O-reaction process, characterized in that... Step 4, which involves comprehensive analysis and prediction of the current reaction process, outputs a quantitative evaluation result of the reaction process as follows: Step 4.1: Correspondence between heat release and reaction stages: Anaerobic zone carbon removal + phosphorus release: when and When the fermentation is active, the phosphorus release rate of polyphosphate-accumulating bacteria is >70%. Nitrogen removal in hypoxic zones: when and At that time, it was determined to be the "high-efficiency period of denitrification"; aerobic zone nitrification + phosphorus uptake: when and At that time, it was determined to be the "peak nitrification period"; Step 4.2, Predicted Output and Parameter Adjustment: After the model outputs the quantified values of the reaction process in each section, the internal reflux ratio R is adjusted according to the following formula: ; When the nitrification completion rate in the aerobic zone is higher than that in the anoxic zone, increase the reflux ratio to supplement nitrate.
10. The energy detection control A according to claim 9 2 A wastewater treatment method for a rural domestic wastewater treatment system based on the O-reaction process, characterized in that... The specific process of normalizing the temperature and water level data in Step 1 is as follows: Assuming the original temperature data is Water level data is The normalization formulas are as follows: ; ; in, , These are the minimum and maximum values of the temperature data. , These are the minimum and maximum values of the water level data. Then, the normalized data is divided into multiple samples according to the time series. Each sample contains temperature and water level data at a set time step, which are used as input to the neural network model.
Citation Information
Patent Citations
Method for optimizing sewage treatment process
CN102249411A
Sewage treatment process and method for controlling biochemical link thereof based on neural network
CN110606620A
Sewage treatment water quality monitoring automatic control method based on multi-task learning
CN114386579A
Production model and control method based on sewage treatment big data technology
CN116151458A
Online monitoring device and method for concentration and flow rate of channel type internal reflux sludge of sewage plant
CN117585809A
Cited By
Accurate temperature regulation and control method and system for co-pyrolysis reactor
CN121635576A
