Activated carbon canister carbon change prediction method
By establishing a multivariate linear regression model and optimizing parameters using gradient descent algorithm, accurate prediction and automatic carbon change control of activated carbon carbon canister daily carbon change is achieved, and the problem of inability to accurately judge the daily carbon change in the existing technology is solved, the utilization rate and adsorption stability of activated carbon are improved, and the operating costs of sewage plants are reduced.
Patent Information
- Application Number
- CN202510167983.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-06-06
AI Technical Summary
The existing technology cannot accurately judge the daily carbon change amount during the activated carbon canister, resulting in a decrease in the adsorption capacity of the carbon canister and unstable effluent water quality, which increases the operating cost of the sewage plant.
Through the collection of test data, determination of feature variables, normalization of data preprocessing, establishment of a multivariate linear regression model and optimization of parameters using gradient descent algorithm, accurate prediction of the daily carbon change amount of activated carbon carbon tanks and automatic carbon change control are achieved.
Accurate prediction and control of the daily carbon exchange amount of activated carbon canister is achieved, the utilization rate and adsorption stability of activated carbon are improved, and the operating costs of sewage plants are reduced.
Smart Images

Figure BDA0005273081070000031 
Figure BDA0005273081070000032 
Figure FDA0005273081040000011
Abstract
Description
Technical Field
[0001] The invention relates to a method for predicting carbon replacement of an activated carbon canister. Background Art
[0002] With the continuous development of sewage treatment plants, more and more activated carbon canisters are used in order to improve the effluent quality. There are two methods for replacing activated carbon canisters: one-time overall replacement and partial replacement. In the first method, as the canister is used, the overall adsorption capacity of the canister gradually decreases, and the adsorption stability also gradually decreases; in the second method, it is impossible to determine the amount of carbon replacement for each partial replacement, and it is necessary to test the adsorption capacity of the activated carbon in the canister layer by layer, which is complicated and inefficient. How to improve the utilization rate of activated carbon, stabilize the adsorption capacity of the canister, ensure the effluent quality of the canister, how to determine the daily replacement amount of the activated carbon canister, and create value for reducing costs and increasing efficiency of sewage treatment plants are problems that need to be solved urgently by existing technologies. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a method for predicting carbon replacement of an activated carbon canister in view of the shortcomings of the above prior art.
[0004] The technical solution of the present invention to solve the above technical problems is: a method for predicting the replacement of activated carbon canisters, which specifically includes the following steps:
[0005] S1: Laboratory data collection: Take the activated carbon from the carbon tank observation port, test the activated carbon saturation, calculate the carbon replacement amount for the day, and synchronize the water treatment volume and the carbon tank inlet and outlet water TOC as basic data;
[0006] S2: Determine characteristic variables based on assay data and TOC data;
[0007] S3: normalize and preprocess the data;
[0008] S4: Establish a multivariate linear regression model, train the model based on the basic data, and use the gradient descent algorithm to calculate the best fitting parameters;
[0009] S5: Verify the multivariate linear model based on the test set;
[0010] S6: Based on the actual operation data, optimize the multivariate linear model parameters, predict the amount of activated carbon replacement and automatically replace the carbon.
[0011] The present invention further defines the scheme:
[0012] Preferably, the adsorption iodine value of activated carbon is used as a criterion for judging whether the activated carbon is saturated in S1, and 70% of the basic data in S1 is used as a model training set and 30% is used as a test set.
[0013] Preferably, the variables in S2 are the carbon tank inlet and outlet water concentrations, the daily treated water volume, and the total amount of TOC removed on the day.
[0014] Preferably, in S3, the data is normalized and preprocessed, and the formula is:
[0015] where x 化 is the laboratory data in the training set, x is the normalized data set; s is the high value of the range of each factor in the training set.
[0016] Preferably, the training model in S4 includes determining a hypothesis function and a loss function,
[0017] The assumed function is: y = θ 0 +θ 1 *x 1 +θ 2 *x 2 +θ 3 *x 3 +θ 4 *x 4
[0018] where θ 0 ,θ 1 ,θ 2 ,θ 3 ,θ 4 is the variable to be calculated, x 1 is the normalized inflow volume, x 2 is the normalized TOC adsorption amount, x 3 is the normalized influent TOC concentration, x 4 is the normalized effluent TOC concentration, and y is the predicted value of carbon replacement amount.
[0019] Loss function:
[0020] Where m is the number of samples in each training set, x (i) represents the i-th sample data in the sample, h θ (x (i) ) means to convert x (i) Substituting the assumed function into the (i) The corresponding predicted value of carbon replacement, y (i) Represents x (i) The corresponding actual value of carbon replacement in the sample.
[0021] Preferably, the gradient descent algorithm in S4 is as follows:
[0022] θ 0 i+1 =θ 0 i -αJ′(θ0 )
[0023] θ 1 i+1 =θ 1 i -αJ′(θ 1 )
[0024] θ 2 i+1 =θ 2 i -αJ′(θ 2 )
[0025] θ 3 i+1 =θ 3 i -αJ′(θ 3 )
[0026] θ 4 i+1 =θ 4 i -αJ′(θ 4 )
[0027] where θ is the vector [θ 0 ,θ 1 ,θ 2 ,θ 3 ,θ 4 ], the initial value is [0,0,0,0,0], θ i represents the value of θ at the i-th iteration, θ i+1 represents the value of θ at the i+1th iteration; J' represents the partial function of the loss function J, and α is the learning rate.
[0028] The beneficial effects of the present invention are:
[0029] The present invention can accurately predict the daily carbon replacement amount of the carbon canister, precisely control the carbon replacement of the carbon canister, fully explore the adsorption capacity of activated carbon, reduce the cost of using activated carbon, and effectively solve the problem of being unable to determine the daily amount of activated carbon to be replaced or the use and storage of activated carbon during the use of activated carbon canisters in sewage treatment plants. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0031] Example 1
[0032] This embodiment provides a method for predicting the replacement of activated carbon canisters, which specifically includes the following steps:
[0033] S1: Laboratory data collection: Take the activated carbon from the observation port of the carbon canister, test the activated carbon saturation, calculate the carbon replacement amount for the day, and synchronize the water treatment volume and the TOC of the carbon canister inlet and outlet water as the basic data. Use the adsorption iodine value of the activated carbon as the criterion for judging whether the activated carbon is saturated. Take 70% of the basic data as the training set and 30% as the test set;
[0034] S2: Determine characteristic variables based on the test data and TOC data. The variables are the carbon tank inlet and outlet water concentrations, the daily water treatment volume, and the total amount of TOC removed on the day;
[0035] S3: Normalize and preprocess the data:
[0036]
[0037] where x 化 is the laboratory data in the training set, x is the normalized data set; s is the high value of the range of each factor in the training set;
[0038]
[0039] S4: Establish a multivariate linear regression model, train the model based on the basic data, and use the gradient descent algorithm to calculate the best fitting parameters;
[0040] The hypothesis function is determined as follows:
[0041] y=θ 0 +θ 1 *x 1 +θ 2 *x 2 +θ + *x + +θ , *x ,
[0042] where θ 0 ,θ 1 ,θ 2 ,θ 3 ,θ 4 is the variable to be calculated, x 1 is the normalized inflow volume, x 2 is the normalized TOC adsorption amount, x 3 is the normalized influent TOC concentration, x 4 is the normalized effluent TOC concentration, and y is the predicted value of carbon replacement amount.
[0043] Determine the loss function:
[0044]
[0045] Where m is the number of samples in each training set, the number of samples in the training set is 13800, and x (i) represents the i-th sample data in the sample, h θ (x (i) ) means to convert x (i) Substituting the assumed function into the (i) The corresponding predicted value of carbon replacement amount; y (i) Represents x (i) The actual value of the carbon replacement amount in the corresponding sample. The sum of the squared differences of each sample is the loss function value. When the loss function value is the smallest, the fit is optimal;
[0046] (1) The gradient descent algorithm is as follows:
[0047] θ 0 i+1 =θ 0 i -αJ′(θ 0 )
[0048] θ 1 i+1 =θ 1 i -αJ′(θ 1 )
[0049] θ 2 i+1 =θ 2 i -αJ′(θ 2 )
[0050] θ 3 i+1 =θ 3 i -αJ′(θ 3 )
[0051] θ 4 i+1 =θ 4 i -αJ′(θ 4 )
[0052] where θ is the vector [θ 0 ,θ 1 ,θ 2 ,θ 3 ,θ 4 ], the initial value is [0,0,0,0,0], θ i represents the value of θ at the i-th iteration, θ i+1represents the value of θ at the i+1th iteration; J' represents the partial function of the loss function J, α is the learning rate, and the values can be 0.001, 0.003, 0.01, 0.03, 0.1 according to experience. In the gradient descent algorithm, increasing the learning rate will converge faster, but if the learning rate is set too high, it will oscillate repeatedly after approaching the optimal value and it will be difficult to converge. Choosing a suitable α can make the gradient descent algorithm converge faster and have better results. The number of cycles is set to 5, and the results are as follows:
[0053] α J(θ) J(θ) J(θ) J(θ) J(θ) 0.001 8323.5 8238.2 8153.7 8070.2 7987.5 0.003 8152.43 7903.04 7661.32 7427.04 7199.97 0.01 7567.684 6810.411 6129.377 5516.907 4966.098 0.03 6017.585 4309.611 3090.130 2219.428 1597.752 0.1 1999.194 502.009 152.323 70.632 51.531 1 145300 252260 4380800 7608000 13212000
[0054] It can be concluded that when α is 0.1, it decreases faster and has a better effect. When α is 1, it is in a divergent state and cannot be used for model training.
[0055] According to the characteristics of the gradient descent algorithm, as the number of cycles increases, J(θ) is closer to the minimum value. The number of cycles is 100, 500, 1000, and 2000 respectively, and the training results of the high-efficiency period are as follows:
[0056] Cycle times J(θ) <![CDATA[θ 0 ]]> <![CDATA[θ 1 ]]> <![CDATA[θ 2 ]]> <![CDATA[θ 3 ]]> <![CDATA[θ 4 ]]> 100 38.868 30.416 28.688 14.587 24.347 29.876 500 29.119 45.982 38.412 -11.595 20.063 36.683 1000 26.569 58.750 45.106 -22.892 15.928 33.420 2000 24.510 76.5623 52.5731 -29.0905 9.9502 20.8433 5000 21.797 276.562 -77.497 105.795 -361.154 188.130
[0057] When the value of J(θ) twice is less than 10 -4 , at this point the model is considered to have converged, and the value of θ 0 ,θ 1 ,θ 2 ,θ 3 ,θ 4 , making J(θ) infinitely close to the minimum value. The high efficiency period linear regression model can be obtained as follows:
[0058]
[0059] Take the test set data and perform a performance test on the multivariate linear regression model. After the data is normalized by the mean, the prediction function is used. The results are as follows:
[0060] Use Case 1 Use Case 2 Use Case 3 Use Case 4 Use Case 5 Use Case 6 Use Case 7 Use Case 8 Water treatment capacity 20012 20325 20123 20412 21147 21041 19877 18989 TOC Removal 190.1 205.3 209.3 220.5 224.2 223 220.6 203.2 Influent TOC concentration 24.8 25.2 25.1 25.7 26.2 26 25.8 25.5 Outlet TOC concentration 15.3 15.1 14.7 14.9 15.6 15.4 14.7 14.8 Actual value 123 129 122 125 137 134 128 120 Predicted value 133 132 131 130 130 131 128 128 deviation 8.1% 2.3% 7.3% 4% 5.1% 2.2% 0% 6.6%
[0061] The error is controlled within 10%.
[0062] S5: Verify the multivariate linear model based on the test set;
[0063] S6: Based on the actual operation data, optimize the multivariate linear model parameters, predict the amount of activated carbon to be replaced and automatically replace the carbon. After each carbon unloading, reinstall the activated carbon. The activated carbon inlet and outlet water data need to be fed back to the data processing system, and the model is continuously optimized to ensure that the outlet COD value is less than a certain set value, while the amount of activated carbon loaded and unloaded is minimal. In addition to the above embodiments, the present invention can also have other implementation methods. Any technical solution formed by equivalent substitution or equivalent transformation falls within the protection scope required by the present invention.
Claims
1. A method for predicting the replacement of activated carbon canisters, characterized in that: The specific steps include: S1: Laboratory data collection: Take the activated carbon from the carbon tank observation port, test the activated carbon saturation, calculate the carbon replacement amount for the day, and synchronize the water treatment volume and the carbon tank inlet and outlet water TOC as basic data; S2: Determine characteristic variables based on assay data and TOC data; S3: normalize and preprocess the data; S4: Establish a multivariate linear regression model, train the model based on the basic data, and use the gradient descent algorithm to calculate the best fitting parameters; S5: Verify the multivariate linear model based on the test set; S6: Based on the actual operation data, optimize the multivariate linear model parameters, predict the amount of activated carbon replacement and automatically replace the carbon.
2. The activated carbon canister replacement prediction method according to claim 1, characterized in that: In the S1, the adsorption iodine value of the activated carbon is used as a criterion for judging whether the activated carbon is saturated. Meanwhile, 70% of the basic data in S1 is used as a model training set, and 30% is used as a test set.
3. The method for predicting carbon replacement of activated carbon canister according to claim 1, characterized in that: The variables in S2 are the inlet and outlet water concentrations of the carbon tank, the amount of water treated on the day, and the total amount of TOC removed on the day.
4. The method for predicting the replacement of activated carbon canister according to claim 1, characterized in that: In S3, the data is normalized and preprocessed, and the formula is: where x 化 is the laboratory data in the training set, x is the normalized data set; s is the high value of the range of each factor in the training set.
5. The method for predicting the replacement of activated carbon canister according to claim 1, characterized in that: The training model in S4 includes determining a hypothesis function and a loss function. Assume that the function is: y = θ0 + θ1*x1 + θ2*x2 + θ3*x + +θ4*x4 Among them, θ0, θ1, θ2, θ3, and θ4 are the variables that need to be calculated, x1 is the normalized inlet water volume, x2 is the normalized TOC adsorption amount, x3 is the normalized inlet TOC concentration, x4 is the normalized effluent TOC concentration, and y is the predicted value of the carbon replacement amount. Loss function: Where m is the number of samples in each training set, x (i) represents the i-th sample data in the sample, h θ (x (i) ) means to convert x (i) Substituting the assumed function into the (i) The corresponding predicted value of carbon replacement, y (i) Represents x (i) The corresponding actual value of carbon replacement in the sample.
6. The method for predicting carbon replacement of activated carbon canister according to claim 1, characterized in that: The gradient descent algorithm in S4 is as follows: θ0 i+1 =θ0 i -αJ′(θ0) θ1 i+ 1=θ1 i -αJ′(θ1) θ2 i+1 =θ2 i -αJ′(θ2) θ3 i+1 =θ3 i -αJ′(θ3) θ4 i+1 =θ4 i -αJ′(θ4) Where θ is the vector [θ0,θ1,θ2,θ3,θ4], and its initial value is [0,0,0,0,0]. i represents the value of θ at the i-th iteration, θ i+1 represents the value of θ at the i+1th iteration; J' represents the partial function of the loss function J, and α is the learning rate.