A precise aeration operation method for a sewage treatment plant

By collecting and processing bubble image features in the sewage treatment plant, combining DO content and power consumption models, and optimizing the aeration strategy using the DQN model, the problems of reaction lag and high power consumption in aeration control are solved, and efficient and energy-saving aeration operation and stable water quality are achieved.

CN119378404BActive Publication Date: 2025-05-13CHENGFA WATER (GONG JIA) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411920769.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-05-13
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

The control of the aeration system in the sewage treatment plant has problems such as reaction lag and over-aeration or insufficient aeration, resulting in unstable water quality and high power consumption.

Method used

The bubble images during the aeration process are collected by the camera, morphological processing and feature extraction are performed, and the correlation model between bubble characteristics and water quality is established based on the DO content, the future DO content is predicted, and the overall power consumption is calculated through the power consumption model, and an optimized aeration strategy is generated using the DQN model.

Benefits of technology

It improves the accuracy of the aeration operation of the sewage treatment plant, realizes efficient and energy-saving aeration operation, avoids water quality problems caused by over-aeration or insufficient aeration, and reduces power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378404B_ABST
    Figure CN119378404B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of sewage treatment, and specifically to a method for precise aeration operation of a sewage treatment plant, comprising: collecting bubble images during aeration through a camera and performing morphological processing and feature extraction on the images to obtain features such as the area, number of regions, deformation, trajectory curvature, and average speed of the bubbles; using a sensor to collect DO content, establishing a correlation model between bubble features and water quality, and predicting future DO content after aeration response; calculating the power consumption of the blower and water pump during the aeration process, establishing a power consumption model, and generating the overall power consumption of the aeration process; calculating an aeration reward value in combination with the overall power consumption and the future DO content, and generating an optimized aeration strategy using a DQN model based on the aeration reward value. The present invention can improve the accuracy of aeration operation in a sewage treatment plant and achieve efficient and energy-saving aeration operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of sewage treatment, and in particular to a precise aeration operation method for a sewage treatment plant. Background Art

[0002] Sewage treatment plants are important facilities in cities, and aeration systems are the core link in achieving biochemical treatment of sewage in sewage treatment plants. Aeration systems deliver oxygen to sewage and decompose organic pollutants by meeting the demand of microorganisms for dissolved oxygen (DO). However, the power consumption of aeration systems accounts for about 50% to 70% of the total power consumption of sewage treatment plants. Therefore, how to accurately control aeration to improve treatment efficiency and energy saving has become a research focus.

[0003] Traditional aeration systems usually monitor dissolved oxygen (DO) concentration in real time and use PID control models to adjust the operating frequency of the blower. However, due to the hysteresis of DO detection, it is difficult to quickly respond to dynamic changes in the oxygen transfer process, which often leads to hysteresis or over-aeration in the control strategy. To solve this problem, some solutions are based on historical DO data and combined with deep learning models to predict future DO changes, so as to adjust the aeration volume in advance to reduce the reaction hysteresis. However, the predicted future DO trend is usually based on the past DO change pattern. This type of method has a strong dependence on historical DO data and has a certain error in the actual reaction changes of the aeration process. In addition, some solutions use model-based control methods to optimize aeration control by building an accurate system dynamic model. Under the premise of sufficient computing resources and accurate models, model-based control methods can achieve better control effects, but the nonlinear and time-varying characteristics of the aeration system make it time-consuming and labor-intensive to establish a high-precision model. Once the model accuracy is insufficient, the control effect of the model-based control method will be greatly reduced.

[0004] Therefore, a precise aeration operation method for sewage treatment plants is proposed to improve the accuracy of aeration operation in sewage treatment plants. Summary of the invention

[0005] The purpose of the present invention is to provide a method for accurate aeration operation of a sewage treatment plant, which uses a camera to collect bubble images during aeration and performs morphological processing and feature extraction to obtain features such as the area, number of regions, deformation, trajectory curvature, and average speed of the bubbles; uses a sensor to collect DO content, establishes a correlation model between bubble features and water quality, and is used to predict future DO content after aeration response; calculates the power consumption of the blower and water pump during the aeration process, establishes a power consumption model, and generates the overall power consumption of the aeration process; calculates the aeration reward value in combination with the overall power consumption and the future DO content, and generates an optimized aeration strategy using a DQN model based on the aeration reward value. The present invention can improve the accuracy of aeration operation in a sewage treatment plant and achieve efficient and energy-saving aeration operation.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A precise aeration operation method for a sewage treatment plant, comprising:

[0008] Using a camera to obtain bubble images of an aeration process of a sewage treatment plant at a first time interval, preprocessing the bubble images to obtain a first image; using a sensor to collect DO content of the aeration process at a second time interval;

[0009] Performing morphological operations and connected domain labeling on the first image to obtain a labeling map including all independent bubble regions;

[0010] Extracting the bubble contour of the independent bubble area, and calculating the area of ​​the bubble contour; calculating the bubble mean and the bubble variance according to the area of ​​the bubble contour, and obtaining the first feature;

[0011] Counting the number of independent bubble regions to obtain a second feature;

[0012] Calculating bubble deformation according to the independent bubble region, and extracting a maximum deformation value and a standard deviation of the bubble deformation to obtain a third feature;

[0013] The KLT optical flow method is used to extract the motion trajectory and moving speed of the independent bubble area, and the curvature of the motion trajectory is calculated to obtain the fourth feature; the average speed of the moving speed is calculated to obtain the fifth feature;

[0014] Establishing a correlation model between bubble characteristics and water quality according to the first characteristic, the second characteristic, the third characteristic, the fourth characteristic, the fifth characteristic and the DO content, wherein the correlation model is used to predict the future DO content after the aeration response;

[0015] Establishing a power consumption model, wherein the power consumption model is used to calculate the overall power consumption generated by the aeration process;

[0016] An aeration reward value is calculated according to the overall power consumption and the future DO content; and an aeration strategy is generated for the aeration reward value using a DQN model.

[0017] Furthermore, the specific process of the pretreatment includes:

[0018] Using Gaussian filtering to remove noise in the bubble image to obtain denoised images of continuous frames;

[0019] Using histogram equalization to enhance bubble boundaries in the denoised image to obtain enhanced images of consecutive frames;

[0020] Using a Gaussian mixture model separation method to perform background segmentation on the enhanced image and extract dynamically changing areas to obtain changing images of consecutive frames;

[0021] The changed image is binarized to obtain the first image.

[0022] Furthermore, the process of acquiring the label map specifically includes:

[0023] Performing the morphological operation on the first image to obtain a second image;

[0024] The morphological operation includes an opening operation and a closing operation, wherein the opening operation is used to eliminate isolated noise points in the first image, and the closing operation is used to fill small holes in bubbles in the first image;

[0025] Mark each of the independent bubble regions in the second image using an eight-connectivity method;

[0026] The overlapping independent bubble regions are segmented using a watershed method, and a unique label is assigned to each independent bubble region to obtain the labeling map.

[0027] Furthermore, the statistical condition of the number of regions includes: when the area of ​​the bubble outline is greater than a first threshold, the number of regions is incremented by one.

[0028] Furthermore, the calculation process of the bubble deformation includes:

[0029] Using an ellipse fitting method to fit the independent bubble region, obtaining the bubble major axis and the bubble minor axis;

[0030] According to the major axis and minor axis of the bubble, the bubble deformation is calculated and expressed as:

[0031] ;

[0032] in, is the bubble deformation, is the major axis of the bubble, is the minor axis of the bubble.

[0033] Furthermore, the calculation process of the motion trajectory and moving speed of the marker image includes:

[0034] extracting the independent bubble region in the labeling image;

[0035] Extracting bubble corner points of the independent bubble area using the Shi-Tomasi corner point detection method;

[0036] The displacement vector of the bubble corner point in consecutive frames is tracked using the KLT optical flow method, which is expressed as:

[0037] ;

[0038] in, is the displacement vector including horizontal and vertical directions, is the bubble corner point at The coordinates of the moment, is the bubble corner point at The coordinates of the moment, is the first time interval;

[0039] The motion trajectory is obtained by recording the displacement vectors of consecutive frames, which is expressed as:

[0040] ;

[0041] in, is the motion trajectory, is the bubble corner point at The coordinates of the moment, is the bubble corner point at The coordinates of the moment, is the total time sequence number;

[0042] The displacement vector is divided by the first time interval to obtain the moving speed.

[0043] Furthermore, the process of establishing the association model includes:

[0044] The first feature, the second feature, the third feature, the fourth feature and the fifth feature are collected at the first time interval and recorded as bubble features; the DO content is collected at the second time interval;

[0045] The first time interval and the second time interval have the same interval point;

[0046] Matching the bubble feature with the DO content and performing feature preprocessing to obtain first data;

[0047] The first data is used to train the LSTM model to obtain the trained association model.

[0048] Furthermore, the process of establishing the power consumption model includes:

[0049] Obtaining the air flow, pressure difference and efficiency of the blower during the aeration process, and calculating the power consumption of the blower according to the air flow, the pressure difference and the efficiency;

[0050] If a water pump is used during the aeration process, the water density, gravity acceleration, head, water flow rate and water pump efficiency during the aeration process are obtained, and the water pump power consumption is calculated according to the water density, gravity acceleration, head, water flow rate and water pump efficiency; otherwise, the water pump power consumption is recorded as zero;

[0051] Adding the power consumption of the blower to the power consumption of the water pump to obtain a comprehensive power consumption;

[0052] The comprehensive power consumption is integrated at a third time interval to obtain the overall power consumption.

[0053] Furthermore, the calculation process of the aeration reward value includes:

[0054] Set a target DO content, and calculate the aeration reward value according to the target DO content, the overall power consumption and the future DO content, expressed as:

[0055] ;

[0056] in, is the aeration reward value, is the future DO content, is the target DO content, is the error sum of the third time interval, is the overall power consumption, and is the weight factor.

[0057] Furthermore, the generation process of the aeration strategy specifically includes:

[0058] acquiring an aeration equipment parameter, the DO content, the future DO content, and an environmental parameter at a third time interval;

[0059] The aeration equipment parameter is recorded as an aeration behavior, and the aeration equipment parameter, the DO content, the future DO content and the environmental parameter are recorded as an aeration state;

[0060] According to the current aeration state, a greedy strategy is used to generate the current optimal aeration strategy to obtain the current aeration behavior; the current aeration behavior is input into an aeration device to obtain the current aeration reward value and the aeration state of the next batch; the current aeration state, the current aeration behavior, the current aeration reward value and the aeration state of the next batch are combined to obtain an experience sample; the experience sample is stored in an experience replay pool, and the DQN model is trained according to the experience replay pool to obtain the optimized aeration strategy.

[0061] Compared with the prior art, the present invention has the following beneficial effects:

[0062] 1. Collect bubble images and DO content, and mine multi-dimensional features such as regional quantity, area, deformation, motion trajectory and speed of bubbles from bubble images, which can fully reflect the correlation between bubbles and dissolved oxygen changes. In addition, the association model between bubble characteristics and water quality changes is established using long short-term memory networks, which can accurately predict the future DO content after aeration response, avoiding water quality problems caused by over-aeration or under-aeration, thereby improving the accuracy of aeration operation in sewage treatment plants.

[0063] 2. By collecting the operating data of the blower and water pump during the aeration process, a comprehensive power consumption model of the blower and water pump is established to accurately evaluate the overall power consumption generated by the aeration process. The reward function is designed based on the overall power consumption, aeration target DO content, and future DO content to obtain a real-time reward value. Through the dynamic optimization of the reward value, the sewage treatment plant can minimize power consumption while achieving water quality standards, thereby improving the accuracy of the aeration operation of the sewage treatment plant.

[0064] 3. Use the greedy strategy to generate the initial aeration strategy, introduce the experience replay pool to store historical decision data, and regularly randomly sample from the experience replay pool to train the DQN model, which effectively breaks the data correlation and improves the generalization ability of the DQN model. According to the actual operating environment, the long-term reward value of different aeration strategies is evaluated in real time, and the aeration strategy is continuously optimized, thereby improving the accuracy and intelligent operation level of the sewage treatment plant's aeration operation, meeting the high-efficiency and low-consumption operation goals. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 A schematic diagram of a flow chart of a precise aeration operation method for a sewage treatment plant provided by an embodiment of the present invention;

[0066] Figure 2 A schematic diagram of the bubble feature extraction process provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0068] Embodiment 1

[0069] See also Figure 1 to Figure 2 The present invention provides a precise aeration operation method for a sewage treatment plant, and the technical solution is as follows:

[0070] A small domestic sewage treatment plant is equipped with blowers, pumps, sensors and industrial cameras, and uses a PID controller for aeration operation. However, during operation, when the effluent quality fluctuates greatly, the DO content in some aeration stages is too high, resulting in power consumption waste, and the DO content in some stages is insufficient, affecting the effluent quality and making it difficult to meet the discharge standards. Therefore, a new precise aeration operation method is needed to improve the accuracy of precise aeration operation in sewage treatment plants.

[0071] Figure 1 A schematic flow chart of a precise aeration operation method for a sewage treatment plant provided in an embodiment of the present invention.

[0072] like Figure 1 As shown, a precise aeration operation method for a sewage treatment plant specifically includes:

[0073] Step S1: using a camera to obtain bubble images of an aeration process of a sewage treatment plant at a first time interval, preprocessing the bubble images to obtain a first image; and using a sensor to collect DO content of the aeration process at a second time interval.

[0074] Among them, in this embodiment, the first time interval is 1 second; the second time interval is also 1 second, but the second time interval starts 10 seconds later than the first time interval to obtain the DO content after the aeration reaction; in addition, the DO content is the dissolved oxygen concentration, which directly reflects the oxygen content of the water body and is an important criterion for measuring the quality of water.

[0075] Furthermore, the specific process of the pretreatment includes:

[0076] Using Gaussian filtering to remove water impurities and high-frequency noise caused by the camera in the bubble image, while retaining the characteristic information of the image, to obtain a denoised image of continuous frames;

[0077] In this embodiment, the filter window size used by the Gaussian filter is 5×5.

[0078] Using histogram equalization to enhance the bubble boundaries in the denoised image by adjusting the grayscale value distribution of image pixels, thereby obtaining an enhanced image of continuous frames;

[0079] Using a Gaussian mixture model separation method to perform background segmentation on the enhanced image, extract the dynamically changing area, exclude the interference of the pool wall and ripples, and obtain a continuous frame change image;

[0080] Binarizing the changed image to obtain the first image;

[0081] In this embodiment, the Otsu adaptive threshold method is used to determine the optimal segmentation threshold.

[0082] Through the pretreatment process, the complexity of the aeration environment of the sewage treatment plant is fully considered, and the accuracy and reliability of bubble image processing are improved, thereby ensuring the effect of subsequent DO content prediction and aeration strategy optimization.

[0083] Step S2: performing morphological operations and connected domain labeling on the first image to obtain a labeling map including all independent bubble regions.

[0084] Among them, the independent bubble area is the area marked by morphological operations and connected domains. Each area represents a complete bubble. After marking each bubble, it can provide a clear regional basis for subsequent feature extraction.

[0085] Furthermore, the process of acquiring the label map specifically includes:

[0086] Performing the morphological operation on the first image to obtain a second image;

[0087] The morphological operation includes an opening operation and a closing operation, wherein the opening operation is used to eliminate isolated noise points in the first image, and the closing operation is used to fill small holes in bubbles in the first image;

[0088] Specifically, the morphological operation is used to further remove unnecessary details. In this embodiment, a morphological kernel size of 5×5 is used to remove the remaining tiny noise such as floating particles in the water, and then fill the small holes in the bubbles to enhance the coherence of the bubble outline.

[0089] Mark each independent bubble region in the second image using an eight-connectivity method;

[0090] Specifically, the eight-connectivity method can check the neighboring pixels above, below, left, right, and diagonally of the current pixel to determine whether they are in the same area. If they are in the same area as the neighboring pixels, continue to perform the same check and marking on this neighboring pixel until the entire area is completely marked.

[0091] The overlapping independent bubble regions are segmented using a watershed method, and a unique label is assigned to each independent bubble region to obtain the labeling map.

[0092] Specifically, the watershed method can find the boundary line of each independent bubble area. First, the gradient of the independent bubble area is calculated, and whether there is an overlapping area is determined based on the gradient change. If there is an overlapping area, the area with lower gradient is gradually filled by simulating the process of water flow transitioning from low points (low gradient) to high points (high gradient), and a dividing line is generated when the "water flow" converges from different starting points, thereby dividing it into two independent bubble areas.

[0093] By using the eight-connectivity method and the watershed method, each bubble area can be effectively marked. Especially when dealing with overlapping areas, the watershed method can segment bubbles based on the gradient map and obtain all independent bubble areas containing labels, which is convenient for subsequent bubble feature extraction and analysis, thereby improving the accuracy of aeration operation in sewage treatment plants.

[0094] Figure 2 The bubble feature extraction process diagram provided in the embodiment of the present invention extracts five features of the independent bubble region for predicting the future DO content.

[0095] Step S3: Figure 2 As shown, extract the bubble contour of the independent bubble area, and calculate the area of ​​the bubble contour; calculate the bubble mean and the bubble variance according to the area of ​​the bubble contour to obtain the first feature;

[0096] Specifically, the area of ​​the bubble is calculated by counting the number of pixel areas in the independent bubble area. Assuming that the area of ​​each pixel is 1 unit, the area is the number of pixel areas in the contour. Based on the calculated areas of all the bubble contours, the bubble mean and bubble variance are calculated, and the bubble mean and bubble variance are recorded as the first feature. This first feature reflects the amplitude of the change in the bubble area. If the variance is large, it means that the bubble size varies greatly, which may be uneven aeration or equipment fluctuations; if the variance is small, it means that the bubble size is relatively consistent, indicating that the aeration process is relatively stable, which helps to understand the law of bubble changes and provides support for precise operation.

[0097] Counting the number of independent bubble regions to obtain a second feature;

[0098] Furthermore, the statistical condition of the number of regions includes: when the area of ​​the bubble outline is greater than a first threshold, the number of regions is incremented by one.

[0099] Among them, in this embodiment, the first threshold is set to 10 pixels. Areas that are too small may be due to impurities in the water body that have not been eliminated, so setting the first threshold can ignore areas with an area of ​​less than 10 pixels. Bubble areas with an area greater than 10 pixels will be counted as valid bubbles and included in the number of independent bubble areas. The second feature indirectly reflects the operating status of the aeration system. If the number of areas is large, it means that the aeration system is operating efficiently; if the number of areas is small, it means that the aeration intensity is insufficient, resulting in the inability to fully disperse the air; if the number of areas is abnormally large, it means that the aeration volume is too large and needs to be adjusted. Extracting the second feature can be used as a reference for judging whether the aeration volume is reasonable, and can also provide support for control strategies, thereby improving the accuracy of aeration operation in sewage treatment plants.

[0100] Calculating bubble deformation according to the independent bubble region, and extracting a maximum deformation value and a standard deviation of the bubble deformation to obtain a third feature;

[0101] Furthermore, the calculation process of the bubble deformation includes:

[0102] Using an ellipse fitting method to fit the independent bubble region, obtaining the bubble major axis and the bubble minor axis;

[0103] According to the major axis and minor axis of the bubble, the bubble deformation is calculated and expressed as:

[0104] ;

[0105] in, is the bubble deformation, is the major axis of the bubble, is the minor axis of the bubble.

[0106] Specifically, bubble deformation can reflect the stress state of bubbles in the water body. If the deformation is small, it means that the bubbles are relatively stable in the water body; if the deformation is large, it may mean that the water flow is strong. For example, there are three bubbles with major axes of 30, 50 and 40, and minor axes of 28, 25 and 35, respectively. The bubble deformations are 1.07, 2 and 1.14, respectively, and the maximum deformation is 2. According to the maximum deformation, the bubble area with significant stress can be obtained. In addition, the standard deviation is 0.31, indicating that the deformation distribution is relatively uniform and the water flow is relatively stable. By calculating the maximum deformation and the standard deviation of the deformation, the water flow intensity distribution can be analyzed in real time, and then the aeration distribution can be obtained, which provides data support for aeration operation, thereby improving the accuracy of aeration operation in sewage treatment plants.

[0107] The KLT optical flow method is used to extract the motion trajectory and moving speed of the independent bubble area, and the curvature of the motion trajectory is calculated to obtain the fourth feature; the average speed of the moving speed is calculated to obtain the fifth feature;

[0108] Among them, the KLT optical flow method is used to calculate the movement of a specific point in the image in continuous frames, which is suitable for tracking small displacements of bubbles. In addition, the curvature reflects the degree of change in the motion trajectory and can reflect the intensity of the disturbance to the water flow environment. If the curvature is large, it means that the trajectory fluctuates significantly; if the curvature is small, the trajectory tends to be stable. The average speed is calculated from the moving speed of each bubble, which reflects the stability and force state of the bubble in the water body and can evaluate the intensity of the water flow.

[0109] Furthermore, the calculation process of the motion trajectory and moving speed of the marker image includes:

[0110] extracting the independent bubble region in the labeling image;

[0111] Extracting bubble corner points of the independent bubble area using the Shi-Tomasi corner point detection method;

[0112] The displacement vector of the bubble corner point in consecutive frames is tracked using the KLT optical flow method, which is expressed as:

[0113] ;

[0114] in, is the displacement vector including horizontal and vertical directions, is the bubble corner point at The coordinates of the moment, is the bubble corner point at The coordinates of the moment, is the first time interval;

[0115] The motion trajectory is obtained by recording the displacement vectors of consecutive frames, which is expressed as:

[0116] ;

[0117] in, is the motion trajectory, is the bubble corner point at The coordinates of the moment, is the bubble corner point at The coordinates of the moment, is the total time sequence number;

[0118] The displacement vector is divided by the first time interval to obtain the moving speed.

[0119] Specifically, assuming that the coordinates of bubble A in three consecutive frames are (1,1), (2,2) and (4,3), at frame t=2, the moving speeds of the x and y coordinates are both 1, and at frame t=3, the moving speeds of the x and y coordinates are 2 and 1, respectively. Then the acceleration at frame t=2 is 1 and 0, and the curvature is calculated using acceleration and velocity, expressed as:

[0120] ;

[0121] in, is the curvature, and is the moving speed of x and y coordinates at frame t=2, and are the accelerations of the x and y coordinates at frame t=2.

[0122] By extracting the motion trajectory and movement speed, the local complexity and overall flow velocity characteristics of the bubble motion can be captured simultaneously, which can help accurately determine the motion state of the bubbles under different water flow conditions, thereby facilitating the dynamic adjustment of the aeration process and improving the accuracy of aeration operation in sewage treatment plants.

[0123] Step S4: establishing a correlation model between bubble characteristics and water quality based on the first characteristic, the second characteristic, the third characteristic, the fourth characteristic, the fifth characteristic and the DO content, wherein the correlation model is used to predict the future DO content after aeration response.

[0124] Furthermore, the process of establishing the association model includes:

[0125] The first feature, the second feature, the third feature, the fourth feature and the fifth feature are collected at the first time interval and recorded as bubble features; the DO content is collected at the second time interval;

[0126] The first time interval and the second time interval have the same interval point;

[0127] Matching the bubble feature with the DO content and performing feature preprocessing to obtain first data;

[0128] Specifically, DO content data is collected synchronously, normalized, and the delayed DO content is paired with the bubble features one by one to form a time series training data set, namely, the first data.

[0129] The first data is used to train the LSTM model to obtain the trained association model.

[0130] Specifically, LSTM (Long Short-Term Memory Network) is a special recurrent neural network suitable for predicting time series data such as DO content with dynamic changes. Input bubble features to the LSTM model, and the LSTM model outputs the future DO content. After 600 rounds of training, the mean square error is 0.086 and the determination coefficient is 0.985. In order to prove the effect of the present invention, it is compared with the LSTM model based on historical DO content. The test results are that the mean square error of the present invention is 0.0937 and the determination coefficient is 0.973, while the LSTM model based on historical DO content has a mean square error of 0.1357 and a determination coefficient of 0.935. The present invention inputs more comprehensive real-time feature data, can capture more dynamic information related to DO content changes, and the prediction accuracy is better than the LSTM model based on historical DO content, thereby improving the accuracy of aeration operation in sewage treatment plants.

[0131] Step S5: Establish a power consumption model, which is used to calculate the overall power consumption generated by the aeration process.

[0132] Furthermore, the process of establishing the power consumption model includes:

[0133] The air flow, pressure difference and efficiency of the blower during the aeration process are obtained, and the power consumption of the blower is calculated based on the air flow, the pressure difference and the efficiency, which is expressed as:

[0134] ;

[0135] in, is the blower power consumption, is the air flow rate of the blower, is the difference between the blower's inlet pressure and outlet pressure. is the blower efficiency.

[0136] In this embodiment, the air flow is obtained in real time through a blower flow meter, the inlet pressure and the outlet pressure are measured by a pressure sensor, and the efficiency is the rated efficiency, which is obtained from the blower equipment manual.

[0137] If a water pump is used during the aeration process, the water density, gravity acceleration, head, water flow rate and water pump efficiency during the aeration process are obtained. The water pump power consumption is calculated based on the water density, gravity acceleration, head, water flow rate and water pump efficiency. The water pump power consumption is expressed as:

[0138] ;

[0139] in, is the power consumption of the water pump, is the density of water, is the acceleration due to gravity, For lift, is the water flow rate, is the pump efficiency.

[0140] Among them, in this embodiment, the water flow is measured by a flow meter installed at the outlet of the water pump, the head is calculated using data provided by the water pump manufacturer, the water pump efficiency is obtained from the equipment manual, the gravitational acceleration is a constant with a value of 9.81, and the water density is obtained by looking up the table based on the water temperature.

[0141] If the water pump is not used during the aeration process, the power consumption of the water pump is recorded as zero;

[0142] Among them, some sewage treatment plants are not equipped with water pumps and only transmit DO through air supply, so the power consumption of water pumps is selectively calculated.

[0143] Adding the power consumption of the blower to the power consumption of the water pump to obtain a comprehensive power consumption;

[0144] The comprehensive power consumption is integrated at a third time interval to obtain the overall power consumption, which is expressed as:

[0145] ;

[0146] in, is the overall power consumption, for The comprehensive power consumption at the moment, For the last moment, For the current moment, For between and The time points between

[0147] In this embodiment, the third time interval is 5 minutes, and the overall power consumption is the integral of the comprehensive power consumption during these 5 minutes.

[0148] The power consumption of blowers and pumps is the main source of energy consumption in the aeration process. By establishing a power consumption model, the power consumption of aeration equipment can be accurately calculated and monitored, thereby helping sewage treatment plants manage energy costs and improve the accuracy and efficiency of aeration operations.

[0149] Step S6: Calculate an aeration reward value according to the overall power consumption and the future DO content; and generate an aeration strategy for the aeration reward value using a DQN model.

[0150] Furthermore, the calculation process of the aeration reward value includes:

[0151] Set a target DO content, and calculate the aeration reward value according to the target DO content, the overall power consumption and the future DO content, expressed as:

[0152] ;

[0153] in, is the aeration reward value, is the future DO content, is the target DO content, is the error sum of the third time interval, is the overall power consumption, and is the weight factor.

[0154] Among them, in this embodiment, is the DO content error within 5 minutes; the target DO content is 2mg / L, and an error of plus or minus 0.5mg / L is allowed. Therefore, for an error within plus or minus 0.5mg / L , and the value is 0. In addition, more attention is paid to the DO content reaching the standard, so and Set to 0.7 and 0.3 respectively.

[0155] By calculating the aeration bonus value, the relationship between oxygen supply and energy consumption in the sewage treatment process can be effectively balanced. The weights of DO content and power consumption can also be adjusted according to actual conditions, achieving precise adjustment based on target DO content and actual energy consumption, thereby improving the accuracy of aeration operation.

[0156] Furthermore, the generation process of the aeration strategy specifically includes:

[0157] acquiring an aeration equipment parameter, the DO content, the future DO content, and an environmental parameter at a third time interval;

[0158] In this embodiment, the aeration equipment parameter is the air flow rate of the blower. and water flow of the pump , used to regulate the DO content in water. Environmental parameters are water temperature, pollutant concentration, air pressure, water pH and humidity.

[0159] The aeration equipment parameter is recorded as an aeration behavior, and the aeration equipment parameter, the DO content, the future DO content and the environmental parameter are recorded as an aeration state;

[0160] According to the current aeration state, a greedy strategy is used to generate the current optimal aeration strategy to obtain the current aeration behavior; the current aeration behavior is input into an aeration device to obtain the current aeration reward value and the aeration state of the next batch; the current aeration state, the current aeration behavior, the current aeration reward value and the aeration state of the next batch are combined to obtain an experience sample; the experience sample is stored in an experience replay pool, and the DQN model is trained according to the experience replay pool to obtain the optimized aeration strategy.

[0161] Specifically, the DQN (Deep Q-Network) model is a deep reinforcement learning model that learns the optimal strategy through interaction with the environment. Since there are multiple dynamic factors involved in aeration operation, including DO content, aeration equipment parameters, future DO content and environmental parameters, traditional models may have difficulty in handling complex state spaces, resulting in insufficient accuracy of aeration operation. DQN is able to handle high-dimensional and complex state spaces by using deep neural networks, and is well adapted to the changing aeration environment. In addition, in DQN, the experience generated by the agent through interaction with the environment (the current aeration state, the current aeration behavior, the current aeration reward value, the next batch of aeration states) is stored in the experience replay pool. DQN randomly extracts a batch of experience from the experience replay pool for training, which reduces the correlation between data and improves the accuracy of aeration operation.

[0162] In order to prove the effect of the DQN model, a PID control model based on the future DO content is used. The PID control model uses the DO value predicted by the present invention as the set value to adjust the aeration equipment parameters. The DQN and PID control models are compared in the same aeration experimental environment. As shown in Table 1, the PID model generates higher power consumption and a poor compliance rate. The DQN model can dynamically adapt to changes in working conditions and can achieve a higher water quality compliance rate while saving power consumption.

[0163] Table 1 Comparison of model results

[0164]

[0165] The present invention was applied to a small domestic sewage treatment plant. After one week of operation test, compared with the small domestic sewage treatment plant one week ago, the power consumption of the aeration process was reduced by about 12%, and the effluent water quality compliance rate was stabilized at more than 90%.

[0166] The present invention extracts multiple features of bubble images and combines them with DO content to establish a correlation model between bubble features and water quality, thereby achieving accurate prediction of future DO content. When real-time data is obtained, it helps to avoid over-aeration or under-aeration problems, thereby achieving standard sewage treatment effects. The aeration power consumption is quantified by comprehensively evaluating the power consumption during the aeration process. The aeration reward value is optimized based on a comprehensive evaluation of power consumption and aeration effect, thereby providing a scientific basis for generating aeration strategies. The DQN model is used to generate dynamic aeration strategies, thereby achieving adaptive optimization control for complex environments and dynamic water quality conditions, improving the real-time and accuracy of aeration response, and effectively reducing energy waste, thereby helping sewage treatment plants reduce operating costs while achieving environmental goals.

[0167] Embodiment 2

[0168] An industrial wastewater treatment plant is equipped with multiple blowers and high-lift pumps, and cameras and DO sensors are installed in different aeration zones. The water quality in different aeration zones is different. Using the same control parameters for different aeration zones results in over-aeration in some areas and under-aeration in others. Therefore, a precise aeration operation method for wastewater treatment plants is used to solve this problem and improve the accuracy of precise aeration operation in wastewater treatment plants.

[0169] A precise aeration operation method for a sewage treatment plant, comprising:

[0170] Using a camera to obtain bubble images of an aeration process of a sewage treatment plant at a first time interval, preprocessing the bubble images to obtain a first image; using a sensor to collect DO content of the aeration process at a second time interval;

[0171] Performing morphological operations and connected domain labeling on the first image to obtain a labeling map including all independent bubble regions;

[0172] Extracting the bubble contour of the independent bubble area, and calculating the area of ​​the bubble contour; calculating the bubble mean and the bubble variance according to the area of ​​the bubble contour, and obtaining the first feature;

[0173] Counting the number of independent bubble regions to obtain a second feature;

[0174] Calculating bubble deformation according to the independent bubble region, and extracting a maximum deformation value and a standard deviation of the bubble deformation to obtain a third feature;

[0175] The KLT optical flow method is used to extract the motion trajectory and moving speed of the independent bubble area, and the curvature of the motion trajectory is calculated to obtain the fourth feature; the average speed of the moving speed is calculated to obtain the fifth feature;

[0176] Establishing a correlation model between bubble characteristics and water quality according to the first characteristic, the second characteristic, the third characteristic, the fourth characteristic, the fifth characteristic and the DO content, wherein the correlation model is used to predict the future DO content after the aeration response;

[0177] Establishing a power consumption model, wherein the power consumption model is used to calculate the overall power consumption generated by the aeration process;

[0178] An aeration reward value is calculated according to the overall power consumption and the future DO content; and an aeration strategy is generated for the aeration reward value using a DQN model.

[0179] Furthermore, the specific process of the pretreatment includes:

[0180] Using Gaussian filtering to remove noise in the bubble image to obtain denoised images of continuous frames;

[0181] Using histogram equalization to enhance bubble boundaries in the denoised image to obtain enhanced images of consecutive frames;

[0182] Using a Gaussian mixture model separation method to perform background segmentation on the enhanced image and extract dynamically changing areas to obtain changing images of consecutive frames;

[0183] The changed image is binarized to obtain the first image.

[0184] Furthermore, the process of acquiring the label map specifically includes:

[0185] Performing the morphological operation on the first image to obtain a second image;

[0186] The morphological operation includes an opening operation and a closing operation, wherein the opening operation is used to eliminate isolated noise points in the first image, and the closing operation is used to fill small holes in bubbles in the first image;

[0187] Mark each of the independent bubble regions in the second image using an eight-connectivity method;

[0188] The overlapping independent bubble regions are segmented using a watershed method, and a unique label is assigned to each independent bubble region to obtain the labeling map.

[0189] Furthermore, the statistical condition of the number of regions includes: when the area of ​​the bubble outline is greater than a first threshold, the number of regions is incremented by one.

[0190] Furthermore, the calculation process of the bubble deformation includes:

[0191] Using an ellipse fitting method to fit the independent bubble region, obtaining the bubble major axis and the bubble minor axis;

[0192] According to the major axis and minor axis of the bubble, the bubble deformation is calculated and expressed as:

[0193] ;

[0194] in, is the bubble deformation, is the major axis of the bubble, is the minor axis of the bubble.

[0195] Furthermore, the calculation process of the motion trajectory and moving speed of the marker image includes:

[0196] extracting the independent bubble region in the labeling image;

[0197] Extracting bubble corner points of the independent bubble area using the Shi-Tomasi corner point detection method;

[0198] The displacement vector of the bubble corner point in consecutive frames is tracked using the KLT optical flow method, which is expressed as:

[0199] ;

[0200] in, is the displacement vector including horizontal and vertical directions, is the bubble corner point at The coordinates of the moment, is the bubble corner point at The coordinates of the moment, is the first time interval;

[0201] The motion trajectory is obtained by recording the displacement vectors of consecutive frames, which is expressed as:

[0202] ;

[0203] in, is the motion trajectory, is the bubble corner point at The coordinates of the moment, is the bubble corner point at The coordinates of the moment, is the total time sequence number;

[0204] The displacement vector is divided by the first time interval to obtain the moving speed.

[0205] Furthermore, the process of establishing the association model includes:

[0206] The first feature, the second feature, the third feature, the fourth feature and the fifth feature are collected at the first time interval and recorded as bubble features; the DO content is collected at the second time interval;

[0207] The first time interval and the second time interval have the same interval point;

[0208] Matching the bubble feature with the DO content and performing feature preprocessing to obtain first data;

[0209] The first data is used to train the LSTM model to obtain the trained association model.

[0210] Furthermore, the process of establishing the power consumption model includes:

[0211] Obtaining the air flow, pressure difference and efficiency of the blower during the aeration process, and calculating the power consumption of the blower according to the air flow, the pressure difference and the efficiency;

[0212] If a water pump is used during the aeration process, the water density, gravity acceleration, head, water flow rate and water pump efficiency during the aeration process are obtained, and the water pump power consumption is calculated according to the water density, gravity acceleration, head, water flow rate and water pump efficiency; otherwise, the water pump power consumption is recorded as zero;

[0213] Adding the power consumption of the blower to the power consumption of the water pump to obtain a comprehensive power consumption;

[0214] The comprehensive power consumption is integrated at a third time interval to obtain the overall power consumption.

[0215] Furthermore, the calculation process of the aeration reward value includes:

[0216] Set a target DO content, and calculate the aeration reward value according to the target DO content, the overall power consumption and the future DO content, expressed as:

[0217] ;

[0218] in, is the aeration reward value, is the future DO content, is the target DO content, is the error sum of the third time interval, is the overall power consumption, and is the weight factor.

[0219] Furthermore, the generation process of the aeration strategy specifically includes:

[0220] acquiring an aeration equipment parameter, the DO content, the future DO content, and an environmental parameter at a third time interval;

[0221] The aeration equipment parameter is recorded as an aeration behavior, and the aeration equipment parameter, the DO content, the future DO content and the environmental parameter are recorded as an aeration state;

[0222] According to the current aeration state, a greedy strategy is used to generate the current optimal aeration strategy to obtain the current aeration behavior; the current aeration behavior is input into an aeration device to obtain the current aeration reward value and the aeration state of the next batch; the current aeration state, the current aeration behavior, the current aeration reward value and the aeration state of the next batch are combined to obtain an experience sample; the experience sample is stored in an experience replay pool, and the DQN model is trained according to the experience replay pool to obtain the optimized aeration strategy.

[0223] Specifically, in a certain industrial wastewater treatment plant, the method of the present invention was used to test aeration zone A, aeration zone B and aeration zone C respectively. After one month of operation, the overall power consumption of the plant was reduced by about 16% compared with the original solution, and the effluent compliance rate was stabilized at more than 87%. At the same time, the power consumption of each aeration zone was balanced, effectively reducing the equipment operating load and maintenance cost.

[0224] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A precise aeration operation method for a sewage treatment plant, characterized in that: include: Acquire a bubble image of an aeration process of a sewage treatment plant at a first time interval, and preprocess the bubble image to obtain a first image; collecting the DO content of the aeration process at a second time interval; Performing morphological operations and connected domain labeling on the first image to obtain a labeling map including all independent bubble regions; Extracting the bubble contour of the independent bubble region, and calculating the area of ​​the bubble contour; Calculating a bubble mean and a bubble variance according to the area of ​​the bubble contour to obtain a first feature; Counting the number of independent bubble regions to obtain a second feature; Calculating bubble deformation according to the independent bubble region, and extracting a maximum deformation value and a standard deviation of the bubble deformation to obtain a third feature; The KLT optical flow method is used to extract the motion trajectory and moving speed of the independent bubble area, and the curvature of the motion trajectory is calculated to obtain the fourth feature; Calculating an average speed of the moving speed to obtain a fifth feature; Establishing a correlation model based on the first feature, the second feature, the third feature, the fourth feature, the fifth feature and the DO content, wherein the correlation model is used to predict the future DO content after the aeration response; Establishing a power consumption model, wherein the power consumption model is used to calculate the overall power consumption generated by the aeration process; Calculating an aeration bonus value according to the overall power consumption and the future DO content; Generate an aeration strategy for the aeration reward value using a DQN model; The generation process of the aeration strategy specifically includes: acquiring an aeration equipment parameter, the DO content, the future DO content, and an environmental parameter at a third time interval; The aeration equipment parameter is recorded as an aeration behavior, and the aeration equipment parameter, the DO content, the future DO content and the environmental parameter are recorded as an aeration state; According to the current aeration state, a greedy strategy is used to generate the current optimal aeration strategy to obtain the current aeration behavior; the current aeration behavior is input into an aeration device to obtain the current aeration reward value and the aeration state of the next batch; the current aeration state, the current aeration behavior, the current aeration reward value and the aeration state of the next batch are combined to obtain an experience sample; the experience sample is stored in an experience replay pool, and the DQN model is trained according to the experience replay pool to obtain the optimized aeration strategy.

2. A method for precise aeration operation of a sewage treatment plant according to claim 1, characterized in that: The specific process of the pretreatment includes: Using Gaussian filtering to remove noise in the bubble image to obtain denoised images of continuous frames; Using histogram equalization to enhance bubble boundaries in the denoised image to obtain enhanced images of consecutive frames; Using a Gaussian mixture model separation method to perform background segmentation on the enhanced image and extract dynamically changing areas to obtain changing images of consecutive frames; The changed image is binarized to obtain the first image.

3. A method for precise aeration operation of a sewage treatment plant according to claim 1, characterized in that: The process of obtaining the label map specifically includes: Performing the morphological operation on the first image to obtain a second image; The morphological operation includes an opening operation and a closing operation, wherein the opening operation is used to eliminate isolated noise points in the first image, and the closing operation is used to fill small holes in bubbles in the first image; Mark each of the independent bubble regions in the second image using an eight-connectivity method; The overlapping independent bubble regions are segmented using a watershed method, and a unique label is assigned to each independent bubble region to obtain the labeling map.

4. The precise aeration operation method for a sewage treatment plant according to claim 1, characterized in that: The statistical condition of the number of regions includes: when the area of ​​the bubble outline is greater than a first threshold, the number of regions is incremented by one.

5. The precise aeration operation method for a sewage treatment plant according to claim 1, characterized in that: The calculation process of the bubble deformation includes: Using an ellipse fitting method to fit the independent bubble region, obtaining the bubble major axis and the bubble minor axis; According to the major axis and minor axis of the bubble, the bubble deformation is calculated and expressed as: ; in, is the bubble deformation, is the major axis of the bubble, is the minor axis of the bubble.

6. A method for precise aeration operation of a sewage treatment plant according to claim 1, characterized in that: The calculation process of the motion trajectory and moving speed of the marked image includes: extracting the independent bubble region in the labeling image; Extracting bubble corner points of the independent bubble area using the Shi-Tomasi corner point detection method; The displacement vector of the bubble corner point in consecutive frames is tracked using the KLT optical flow method, which is expressed as: ; in, is the displacement vector including horizontal and vertical directions, is the bubble corner point at The coordinates of the moment, is the bubble corner point at The coordinates of the moment, is the first time interval; The motion trajectory is obtained by recording the displacement vectors of consecutive frames, which is expressed as: ; in, is the motion trajectory, is the bubble corner point at The coordinates of the moment, is the bubble corner point at The coordinates of the moment, is the total time sequence number; The displacement vector is divided by the first time interval to obtain the moving speed.

7. The precise aeration operation method for a sewage treatment plant according to claim 1, characterized in that: The process of establishing the association model includes: The first feature, the second feature, the third feature, the fourth feature and the fifth feature are collected at the first time interval and recorded as bubble features; the DO content is collected at the second time interval; The first time interval and the second time interval have the same interval point; Matching the bubble feature with the DO content and performing feature preprocessing to obtain first data; The first data is used to train the LSTM model to obtain the trained association model.

8. The precise aeration operation method for a sewage treatment plant according to claim 1, characterized in that: The process of establishing the power consumption model includes: Obtaining the air flow, pressure difference and efficiency of the blower during the aeration process, and calculating the power consumption of the blower according to the air flow, the pressure difference and the efficiency; If a water pump is used during the aeration process, the water density, gravity acceleration, head, water flow rate and water pump efficiency during the aeration process are obtained, and the water pump power consumption is calculated according to the water density, gravity acceleration, head, water flow rate and water pump efficiency; otherwise, the water pump power consumption is recorded as zero; Adding the power consumption of the blower to the power consumption of the water pump to obtain a comprehensive power consumption; The comprehensive power consumption is integrated at a third time interval to obtain the overall power consumption.

9. The precise aeration operation method for a sewage treatment plant according to claim 1, characterized in that: The calculation process of the aeration reward value includes: Set a target DO content, and calculate the aeration reward value according to the target DO content, the overall power consumption and the future DO content, expressed as: ; in, is the aeration reward value, is the future DO content, is the target DO content, The sum of the errors in the DO content during the third time interval is, is the overall power consumption, and is the weight factor.

Citation Information

Patent Citations

  • High-concentration microcluster bubble form identification and trajectory tracking speed measurement method

    CN114463653A

  • Biological aeration detection and identification method based on YOLOv5-Segment instance segmentation

    CN117115517A