A method for predicting the sedimentation performance of activated sludge based on deep learning

Through a deep learning-based method, the image prediction model of activated sludge settlement performance is established using the ResNet50 deep neural network, which solves the problems of slow monitoring and prediction of activated sludge settlement performance in the existing technology, and achieves rapid and accurate identification of sludge expansion, improving the operating stability of sewage treatment plants.

CN114998718BActive Publication Date: 2025-06-27NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210433941.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-24
Publication Date
2025-06-27
Estimated Expiration
2042-04-24

AI Technical Summary

Technical Problem

The prior art has problems such as slow detection speed, poor accuracy of results, and complex operation when monitoring and predicting activated sludge settlement performance, making it difficult to achieve timely and efficient early warning of sludge expansion.

Method used

Using a deep learning-based method, an image prediction model of activated sludge settlement performance is established through the ResNet50 deep neural network, and the activated sludge image data is used for binary classification to determine whether the sludge is expanded.

Benefits of technology

It achieves fast detection speed, accurate identification results, and simple operation. It can quickly identify whether activated sludge expands, and the prediction accuracy rate reaches 92.9%, providing guarantee for the stable operation of the sewage treatment plant.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114998718B_ABST
    Figure CN114998718B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for predicting the sedimentation performance of activated sludge based on deep learning, comprising the following steps: (1) Collecting a number of activated sludge samples and respectively obtaining their original image data, cleaning the original image data and unifying the size; (2) Measuring the sludge volume index SVI of each activated sludge sample; (3) Establishing an image prediction model for the sedimentation performance of activated sludge based on the ResNet50 deep neural network; (4) Predicting the sedimentation performance of the target activated sludge according to the prediction model established in step (3). Based on the collected activated sludge images, through simple data cleaning and adjusting the image size, the present invention uses the ResNet50 deep neural network to construct a binary classification model to realize the early warning of activated sludge bulking. The input of the model is the activated sludge image data, and the output of the model is whether the activated sludge bulks. The method provided by the present invention has the advantages of fast detection speed, accurate recognition result, simple operation, high efficiency, and can be widely applied to the recognition of the sedimentation performance of activated sludge in sewage treatment plants.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sewage treatment, and particularly relates to a method for predicting the sedimentation performance of sludge images based on deep learning. Background Art

[0002] The activated sludge process is the most widely used method in the treatment of urban sewage. However, in its biochemical treatment system, the incidence of sludge bulking is very high. Sludge bulking will cause phenomena such as loose sludge structure, reduced density, poor sedimentation performance, and difficulty in separating mud and water, thereby affecting the effluent quality. At the same time, once sludge bulking occurs, it takes a long time to regulate to restore the normal operation of the sewage treatment plant. In the sewage monitoring project of the sewage treatment plant, the monitoring periods of the sludge sedimentation ratio (SV) and the mixed liquor suspended solids concentration (MLSS) of the activated sludge are both daily inspections to calculate the sludge volume index (SVI) and judge the current sedimentation performance of the activated sludge. Therefore, timely, efficient, and accurate monitoring of the sedimentation performance of activated sludge can provide early warning information for sludge bulking and ensure the stable operation of the sewage treatment plant.

[0003] At present, the determination of the sludge bulking problem is generally through laboratory tests to measure its SVI. Although the method of measuring SVI is simple, it takes a long time. In the practical process, the sedimentation performance of activated sludge can also be judged by microscopic examination. The operation is simple and takes less time. However, this method requires manual observation, which will produce subjective errors and lead to poor accuracy of the judgment results. Chinese invention patent CN108898215A discloses an intelligent identification method for sludge bulking based on a type-2 fuzzy neural network, that is, a soft measurement model for predicting sludge SVI is established based on a self-organizing type-2 fuzzy neural network, realizing real-time monitoring of the sedimentation performance of sludge, and at the same time, the fault categories of sludge bulking can also be identified. However, when training the model, the input variables of the soft measurement model are: dissolved oxygen concentration DO, total nitrogen TN, sludge load F / M, pH value, and temperature T. This method requires a lot of input data to be measured, has a high cost, and the operation is relatively complex. Chinese invention patent CN112767362A discloses a method for predicting sludge bulking based on the phase contrast microscopic image of activated sludge. The method of the invention includes image fusion and segmentation, image feature extraction, model training, and SVI prediction. This method can effectively extract the morphological characteristics of sludge microorganisms and accurately predict the sludge SVI. However, this method requires multiple morphological feature extractions and preprocessings of the obtained images, and the input data includes not only morphological feature parameters but also on-line monitoring data such as MLSS, DO, pH, and SVI historical data. Therefore, the operation process of this method is relatively complex. Summary of the Invention

[0004] Object of the Invention: The present invention aims to provide a method for predicting the sedimentation performance of activated sludge based on deep learning, which has a fast detection speed, accurate recognition results, simple operation, and high efficiency.

[0005] Technical solution: The method for predicting the sedimentation performance of activated sludge based on deep learning of the present invention includes the following steps:

[0006] (1) Collect a number of activated sludge samples and respectively obtain their original image data, clean the original image data and unify the size.

[0007] (2) Measure the sludge volume index SVI of each activated sludge sample.

[0008] (3) Establish an image prediction model for the sedimentation performance of activated sludge based on the ResNet50 deep neural network.

[0009] (301) According to the sludge volume index SVI of each activated sludge sample, divide it into an expanded sample set and a non-expanded sample set.

[0010] (302) Amplify the sample set with fewer samples in the expanded sample set and the non-expanded sample set.

[0011] (303) Divide the data set into a training set, a validation set and a test set, and adjust and optimize the model hyperparameters.

[0012] (304) Select the best model hyperparameters, train the image prediction model for the sedimentation performance of activated sludge and evaluate the classification performance of the model using the test set data.

[0013] (4) Predict the sedimentation performance of the target activated sludge according to the prediction model established in step (3).

[0014] Further, in step (2), the image data of the activated sludge sample is obtained by a high-throughput image acquisition system, and the original image data is cleaned by removing blurred images and incorrect samples.

[0015] Further, in step (2), the sludge volume index SVI data of the activated sludge sample is calculated from the sludge sedimentation ratio SV and the mixed liquor suspended solid concentration MLSS measured by experiments, and the calculation formula is;

[0016]

[0017] Further, in step (301), set the SVI threshold. When the SVI of the activated sludge is less than the SVI threshold, the activated sludge image sample is judged as an expanded sample, otherwise it is a non-expanded sample, and the SVI threshold is 150-190 mL·g -1 .

[0018] Further, in step (302), the method for amplifying the image data is to perform rotation amplification operations on the image data at 90°, 180° and 270° respectively.

[0019] Further, in step (303), the data set is divided into a training set and a test set according to a ratio; during the model training process, the divided training set is automatically divided into an actual training set and a validation set according to a ratio.

[0020] Further, in step (303), the hyperparameters in the model hyperparameters to be adjusted and optimized include an optimizer, and the optimizer adopts the stochastic gradient descent method. The learning rate is optimized using the callback function ReduceLROnPlateau to accelerate the network convergence speed.

[0021] Further, in step (304), the cross-entropy loss function is used to calculate the loss function during the process of training the sludge image sedimentation performance prediction model.

[0022] Further, in step (304), when evaluating the classification performance of the model using the test set data, the accuracy, precision, recall, and F1 score are used to measure and evaluate the classification performance of the network model; the calculation formula for the accuracy is:

[0023]

[0024] The calculation formula for the precision is:

[0025]

[0026] The calculation formula for the recall is:

[0027]

[0028] The calculation formula for the F1 score is:

[0029]

[0030] Where TP represents that the positive sample is judged as a positive sample; TN represents that the negative sample is judged as a negative sample; FP represents that the negative sample is judged as a positive sample; FN represents that the positive sample is judged as a negative sample.

[0031] Further, applying the prediction model to predict the activated sludge sedimentation performance includes the following steps:

[0032] (401) Obtain the image data of the activated sludge sample to be measured, and use high-throughput imaging to obtain the image data of the target activated sludge sample;

[0033] (402) Automatically adjust the size of the image data of the activated sludge sample to be measured.

[0034] (403) Input the image data of the activated sludge sample to be measured into the trained prediction model to obtain the operation output result, and then the expansion of the measured target activated sludge can be quickly identified.

[0035] Based on the collected activated sludge images, after simple data cleaning and resizing the image size, a binary classification model is constructed using the ResNet50 deep neural network to achieve early warning of activated sludge expansion. The input of the model is the image data of the activated sludge, and the output of the model is whether the activated sludge expands.

[0036] Beneficial effects: Compared with the prior art, the present invention has the following remarkable advantages:

[0037] (1) Reliable, efficient and accurate results: The input data is simple and easy to obtain, which can greatly shorten the detection time. When the SVI threshold is set to 190 mL·g -1 , the prediction accuracy can reach 92.9%;

[0038] (2) Fast detection speed and simple operation: The image can be directly used as the input data for model training without complex preprocessing of the image and operations such as image feature extraction. Brief description of the drawings

[0039] Figure 1 It is a flow schematic diagram of the present invention;

[0040] Figure 2 It is a schematic diagram of the ResNet50 deep neural network structure of the present invention;

[0041] Figure 3 It is the loss function curve of network training when the SVI threshold of the present invention is set to 150 mL·g -1 ;

[0042] Figure 4 It is the loss function curve of network training when the SVI threshold of the present invention is set to 190 mL·g -1 ;

[0043] Figure 5 It is a schematic diagram of the classification result confusion matrix when the SVI threshold of the present invention is set to 150 mL·g -1 ;

[0044] Figure 6 It is a schematic diagram of the classification result confusion matrix when the SVI threshold of the present invention is set to 190 mL·g -1 ;

[0045] Figure 7 It is a schematic diagram of the classification result confusion matrix when the SVI threshold of the present invention is set to 190 mL·g -1Receiver Operating Characteristic (ROC) curve of the network model. Detailed implementation manners

[0046] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0047] As Figure 1 shown, a method for predicting the sedimentation performance of activated sludge based on deep learning according to the present invention specifically includes the following steps:

[0048] (1) Sample collection, image acquisition and image processing:

[0049] Sample collection: Activated sludge samples are taken from the aerobic tanks of 41 domestic sewage treatment plants. The collected sludge samples are stored in a refrigerator at 4°C, and the time interval between image acquisition and sample collection shall not exceed 24 hours. The obtained activated sludge samples are diluted at different multiples. 10 portions of the original activated sludge sample, the activated sludge sample diluted by one time, and the activated sludge sample diluted by four times are each taken 100 μL and placed in a well plate.

[0050] Image acquisition: Use the EVOS TM M7000 fully automatic intelligent live cell imaging system to capture the image data of activated sludge, with a magnification of 40×, and the obtained image size is 26000×26000.

[0051] Image cleaning and size adjustment: In the obtained original dataset, since there are some duplicate or incorrect samples in the image data, the data needs to be cleaned to remove duplicate and blurred data samples. At the same time, to ensure the consistency of the network input image size, the size of all image data is set to 288×288.

[0052] (2) Determination of SVI of activated sludge:

[0053] Take 1 L of activated sludge mixed liquor in the aeration tank and place it in a 1000 mL clean measuring cylinder. After mixing the mud and water evenly, let it stand for 30 min and then record the scale value V0 (mL) at the junction of the precipitated activated sludge layer and the supernatant. Calculate the sludge volume index (SVI):

[0054]

[0055] Put a 0.45μm quantitative filter paper into an oven at 105°C for 2 hours until it reaches a constant weight. After placing it in a dry and cool place, weigh it and record the weighing result as m0. Take 100 mL of activated sludge mixed liquor, filter it using a funnel and the pre-weighed and dried filter paper. Put the filter paper with the activated sludge into an oven at 105°C for 2 hours until it reaches a constant weight. After placing it in a dry and cool place, weigh it and record the weighing result as m1. Calculate the mixed liquor suspended solids concentration (MLSS):

[0056]

[0057] Calculate the sludge volume index (SVI):

[0058]

[0059] (3) Establish an image prediction model for the sedimentation performance of activated sludge based on the ResNet50 deep neural network

[0060] (301) Establish a data set: According to the SVI thresholds of 150 mL·g -1 and 190 mL·g -1 , divide the image data into the swelling category and the non-swelling category. That is, when the SVI is less than the set threshold, the activated sludge is identified as the non-swelling type; when the SVI is greater than the threshold, the activated sludge is identified as the swelling type. Use the discrimination of whether the activated sludge swells based on the above two SVI thresholds as the labels of the images to train the model respectively, and compare the prediction results of the two models.

[0061] (302) Amplify the swelling sample set: Since the amount of data in the swelling category is relatively small, and the imbalance in the amount of data between categories may lead to model overfitting, in order to reduce the negative impact of data imbalance and ensure the reliability of the data, perform 90°, 180°, and 270° rotation amplification operations on the small-category samples to obtain a total of 3595 activated sludge image samples to form the data set for model construction.

[0062] (303) Divide the data set into a training set and a test set according to the ratio of 8:2; during the model training process, the divided training set is automatically divided into an actual training set and a validation set according to the ratio of 8:2.

[0063] (304) Prediction model training: The ResNet50 deep neural network is adopted, and the obtained image data is used as the input of the model, while the label indicating whether the activated sludge in the image bulges is used as the output of the model. The hyperparameters of the model are adjusted and optimized. The hyperparameters to be adjusted include the optimizer. In terms of optimizer selection, the Stochastic Gradient Descent (SGD) method is adopted; the initial learning rate is 0.001, and ReduceLROnPlateau is used for learning rate optimization to accelerate the network convergence speed; the number of iterations is 200 times. After selecting the optimal model hyperparameters, the prediction model for the sedimentation performance of activated sludge images is trained. During the model training process, the CrossEntropyLoss function is used as the loss function, and the obtained loss function curve is as shown in Figure 3 and Figure 4 described.

[0064] Model evaluation: 719 test data are used to evaluate the classification performance of the model. The accuracy (Accuracy), precision (Precision), recall (Recall), and F1-score are used to measure and evaluate the classification performance of the network model; the calculation formula for accuracy is:

[0065]

[0066] The calculation formula for precision is:

[0067]

[0068] The calculation formula for recall is:

[0069]

[0070] The calculation formula for the F1-score is:

[0071]

[0072] Among them, TP (True Positive) represents that the positive sample is judged as a positive sample; TN (True Negative) represents that the negative sample is judged as a negative sample; FP (False Positive) represents that the negative sample is judged as a positive sample; FN (False Negative) represents that the positive sample is judged as a negative sample.

[0073] Finally, for the completed trained prediction model, on the 719 test data set, when the SVI threshold is set to 150 mL·g -1When the SVI threshold was set to 190 mL·g, among 169 images of bulking sludge, 158 were predicted to be of the bulking category and 11 were predicted to be of the non-bulking category. Among 550 images of non-bulking sludge, 470 were predicted to be of the non-bulking category and 80 were predicted to be of the non-bulking category. The confusion matrix of the classification results is as shown in Figure 5 shown. The accuracy rate of the model was 87.3%. The precision, recall rate, and F1-score values are shown in the following table:

[0074]

[0075] For the trained prediction model on the 719-test-dataset, when the SVI threshold was set to 190 mL·g -1 Among 148 images of bulking sludge, 129 were predicted to be of the bulking category and 19 were predicted to be of the non-bulking category. Among 571 images of non-bulking sludge, 539 were predicted to be of the non-bulking category and 32 were predicted to be of the non-bulking category. The confusion matrix of the classification results is as shown in Figure 6 shown. The prediction accuracy rate of the model was 92.9%. The precision, recall rate, and F1-score values are shown in the following table:

[0076]

[0077] When the SVI threshold was set to 190 mL·g -1 The Receiver Operating Characteristic (ROC) curve of the network model is as shown in Figure 7 shown. The Area Under Curve (AUC) value of the curve was 0.908. Therefore, the confidence level of the network prediction was relatively high and the reliability of the model was good.

[0078] (4) Predict the sedimentation performance of the activated sludge in the target sewage treatment plant according to the established prediction model

[0079] (401) Process the taken activated sludge mixed liquor sample and use the EVOS TM M7000 fully automatic intelligent live cell imaging system to take the image data of the activated sludge in the sewage treatment plant to be measured. The specific method and steps are the same as those in (1).

[0080] (402) Clean the image and adjust the image size to 288×288. The specific method and steps are the same as those in (1).

[0081] (403) Input the image data into the trained deep learning prediction model with the SVI threshold set to 190 mL·g -1 to obtain the running output result. The obtained activated sludge category is that sludge bulking did not occur.

[0082] The activated sludge categories obtained by the deep learning model of the present invention are consistent with the determination results of the SVI of the actual measured activated sludge, and the prediction accuracy rate is 92.9%.

Claims

1. A method for predicting the sedimentation performance of activated sludge based on deep learning, characterized in that, It includes the following steps: (1) Collect several activated sludge samples and respectively obtain their original image data, clean the original image data and unify the size. (2) Measure the sludge volume index SVI of each activated sludge sample. (3) Establish an image prediction model for the sedimentation performance of activated sludge based on the ResNet50 deep neural network. In step (3), establishing an image prediction model for the sedimentation performance of activated sludge based on the ResNet50 deep neural network includes the following steps: (301) According to the sludge volume index SVI of each activated sludge sample, divide it into an expanded sample set and a non-expanded sample set. (302) Amplify the sample set with fewer samples in the expanded sample set and the non-expanded sample set. (303) Divide the data set into a training set, a validation set and a test set, and adjust and optimize the model hyperparameters. (304) Select the best model hyperparameters, train the image prediction model for the sedimentation performance of activated sludge and evaluate the classification performance of the model using the test set data. (4) Predict the sedimentation performance of the target activated sludge according to the prediction model established in step (3).

2. The method for predicting the settling performance of activated sludge based on deep learning according to claim 1, wherein In step (1), the image data of the activated sludge sample is obtained through a high-throughput image acquisition system, and the original image data is cleaned by removing blurred images and incorrect samples.

3. The method for predicting the settling performance of activated sludge based on deep learning according to claim 1, wherein In step (2), the sludge volume index SVI data of the activated sludge sample is calculated from the sludge sedimentation ratio SV and the mixed liquor suspended solid concentration MLSS determined by experiments, and the calculation formula is; 4. The method for predicting the sedimentation performance of activated sludge based on deep learning according to claim 1, wherein In step (301), an SVI threshold is set. When the SVI of the activated sludge is less than the SVI threshold, the activated sludge image sample is determined to be a bulking sample; otherwise, it is a non-bulking sample. The SVI threshold is 150 - 190 mL·g -1 .

5. The method for predicting the sedimentation performance of activated sludge based on deep learning according to claim 1, wherein, In step (302), the method for amplifying the image data is to perform rotation amplification operations of 90°, 180° and 270° on the image data respectively.

6. The method for predicting the settling performance of activated sludge based on deep learning according to claim 1, wherein In step (303), divide the data set into a training set and a test set according to a ratio; during the model training process, the divided training set is automatically divided into an actual training set and a validation set according to a ratio.

7. The method for predicting the sedimentation performance of activated sludge based on deep learning according to claim 1, wherein In step (303), the hyperparameters in adjusting and optimizing the model hyperparameters include an optimizer, and the optimizer uses the stochastic gradient descent method, and the learning rate is optimized using the callback function ReduceLROnPlateau to accelerate the network convergence speed.

8. The method for predicting the sedimentation performance of activated sludge based on deep learning according to claim 1, characterized in that In step (304), the cross-entropy loss function is used to calculate the loss function during the process of training the sludge image sedimentation performance prediction model.

9. The method for predicting the settling performance of activated sludge based on deep learning according to claim 1, wherein In step (304), in evaluating the classification performance of the model using the test set data, the accuracy Accuracy, precision Precision, recall Recall, and F1 score value are used to measure and evaluate the classification performance of the network model; the calculation formula for accuracy is: The calculation formula for precision is: The calculation formula for recall is: The calculation formula for the F1 score value is: Where TP represents that the positive sample is judged as a positive sample; TN represents that the negative sample is judged as a negative sample; FP represents that the negative sample is judged as a positive sample; FN represents that the positive sample is judged as a negative sample.

10. The method for predicting the sedimentation performance of activated sludge based on deep learning according to claim 1, wherein, In step (4), applying the prediction model to predict the sedimentation performance of activated sludge includes the following steps: (401) Obtain the image data of the activated sludge sample to be measured, and use the high-throughput image acquisition system to obtain the image data of the activated sludge sample of the target sewage treatment plant. (402) Automatically adjust the size of the image data of the activated sludge sample to be measured. (403) Input the image data of the activated sludge sample to be measured into the trained prediction model to obtain the running output result, and then the expansion of the measured target activated sludge can be quickly identified.

Citation Information

Patent Citations

  • Sludge expansion intelligent identification method based on type II fuzzy neural network

    CN108898215A

  • Sludge bulking prediction method based on activated sludge phase difference microscopic image

    CN112767362A