Sludge digestion state evaluation method and equipment based on least square support vector machine
Through the sludge digestion status evaluation method based on the least squares support vector machine, the acidification risk of the sludge anaerobic digestion system is monitored in real time, and the problem of difficulty in real-time warning of the acidification risk in the existing technology is solved, and the stable operation and efficient management of the sludge digestion system are achieved.
Patent Information
- Application Number
- CN202510203096.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-06-24
AI Technical Summary
The existing anaerobic digestive system of sludge is difficult to effectively monitor and warn of the risk of acidification in real time, resulting in system performance degradation or collapse.
The sludge digestion state evaluation method based on the least squares support vector machine is used. By determining the ratio of volatile fatty acids to alkalinity as the status evaluation index, and combining the feed flow, liquid level, temperature and pH value of the digester as input variables, a prediction model is constructed for online continuous prediction.
Real-time online prediction of the status of the sludge digestive system is achieved, reducing the risk of system collapse and improving the stability and efficiency of the system.
Smart Images

Figure CN120199346A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of sludge treatment, and particularly relates to a method and device for evaluating the sludge digestion state based on least squares support vector machine. Background Technique
[0002] In recent years, the problem of sludge treatment and disposal has become an environmental problem that urgently needs to be solved in China. Anaerobic digestion of sludge can not only achieve the harmlessness, stabilization and reduction of sludge, but also produce utilizable biogas to realize the resource utilization of sludge. Therefore, it has been widely used in many countries, and mesophilic anaerobic digestion is the most commonly used. Anaerobic sludge digestion systems are usually designed under stable conditions, that is, it is assumed that the load does not change with time. However, in actual engineering, the composition, concentration, etc. of organic matter in sludge change with time, and the digestion process is carried out under the action of many influencing factors without a definite relationship model. The design and operation of the digestion system are mostly based on empirical data. Therefore, without proper control, it often leads to a decline in the performance of the digestion system and even tends to fail. Anaerobic digestion, as a key technology for municipal sludge treatment, uses microorganisms to convert it into green energy substances such as methane, hydrogen and organic acids. The digested residue can be used as fertilizer or soil conditioner to simultaneously achieve the reduction, harmlessness and resource utilization of municipal sludge. During the anaerobic digestion process, the hydrolysis rate of the organic components in municipal sludge is fast, and it is easy to cause system acidification due to the large accumulation of short-chain fatty acids, resulting in unstable digestion or even system collapse. At present, the state monitoring of anaerobic digestion of municipal sludge usually adopts the method of off-line sampling combined with laboratory analysis. The measurement procedure is complex and the cycle is long. A large number of experiments are required to determine the appropriate operating state, resulting in a large consumption of manpower, material resources and financial resources, and it is difficult to effectively warn of the acidification risk in the anaerobic process of sludge. Summary of the Invention
[0003] The present invention provides a method and device for evaluating the sludge digestion state based on least squares support vector machine to solve the technical problems existing in the known technology.
[0004] The technical solution adopted by the present invention to solve the technical problems existing in the known technology is:
[0005] A method for evaluating the sludge digestion state based on the least squares support vector machine. This method is based on the mechanism of the sludge digestion process, determines the state evaluation index and input variables of the sludge digestion process, and uses the least squares support vector machine modeling method to construct a prediction model of the sludge digestion process state with the state evaluation index as the output; collects the historical data of the sludge digestion process as the original sample data, performs normalization preprocessing on the original sample data and makes it into a training set, and uses the training set to perform offline training on the prediction model; collects the sludge digestion process data in real time and online, preprocesses the collected data in real time and inputs it into the prediction model that has completed offline training, corrects the parameters of the prediction model online and outputs the state prediction data, so as to realize the online continuous prediction of the sludge digestion system state.
[0006] Further, determine the following state evaluation indexes of the sludge digestion process: the ratio of volatile fatty acids to alkalinity; determine the following input variables of the prediction model: the feed flow rate of the digestion tank, the liquid level in the tank, the temperature in the tank, and the pH value in the tank.
[0007] Further, set the following sludge digestion state evaluation rules: when the ratio of volatile fatty acids to alkalinity > 0.3, it indicates that the feed load of the anaerobic fermentation system is heavy; when the ratio of volatile fatty acids to alkalinity is 0.1 - 0.3, it indicates that the feed load of the anaerobic fermentation system is appropriate.
[0008] Further, the method for constructing the prediction model of the sludge digestion process state includes the following method steps:
[0009] Let k be the serial number of the input vector of the prediction model; x k be the k-th input vector of the prediction model; y k be the output of the prediction model corresponding to x k ; select a non-linear function and use the high-dimensional feature mapping to construct the following prediction model of the sludge digestion process state:
[0010]
[0011] Based on the principle of structural risk minimization, construct the following objective function for solving the optimal parameters of the prediction model:
[0012]
[0013] In the formula:
[0014] w is the variable of the high-dimensional mapping model;
[0015] b is the variable of the high-dimensional mapping model;
[0016] N is the total number of data vectors collected in each period;
[0017] e kFor the corresponding x k of the fitting error;
[0018] γ is the penalty factor;
[0019] Use the Lagrange method to solve the minimum value of the objective function.
[0020] Furthermore, the method of using the Lagrange method to solve the minimum value of the objective function includes the following method steps:
[0021] First, use the Lagrange multiplier method to eliminate the constraints of the objective function to obtain an optimization function in the following form:
[0022]
[0023] In the formula: α k is the Lagrange multiplier corresponding to x k ;
[0024] According to the KKT conditions in optimization theory, organize to obtain the following linear matrix equation system:
[0025]
[0026] Among them:
[0027] Y = (y1, y2,..., y N ) T ;
[0028] E1 = (1, 1,..., 1) T ;
[0029] A = (α1, α2,..., α N ) T ;
[0030]
[0031] In the above formulas:
[0032] Q kl is an intermediate variable;
[0033] I is the identity matrix;
[0034] x l is the l-th input vector of the prediction model;
[0035] K() represents the kernel function;
[0036] σ is the parameter of the radial basis kernel function;
[0037] ‖‖ represents the Euclidean distance;
[0038] α1, α2,..., α NAnd b are the fitting parameters of the least squares support vector machine.
[0039] Furthermore, the grid search combined with cross - validation method is used to optimize the hyperparameters in the objective function. The specific method is as follows:
[0040] Take the hyperparameters γ and σ as the optimization objects;
[0041] Establish a grid coordinate system, let f = [-5, 5], g = [-5, 5], the step size is 1, and the hyperparameters γ and σ are respectively selected as γ = e f , σ = e g ;
[0042] Divide the training set into n subsets equally;
[0043] For each group of γ and σ in the grid, take any one subset as the test set, and the remaining n - 1 subsets as the training set. After training the model, make predictions on the test set and calculate the mean absolute error:
[0044]
[0045] In the formula:
[0046] is the model prediction value;
[0047] S is the actual value of the sample;
[0048] Successively replace another subset as the test set, and the remaining subsets as the training set. Take the average value of the n - group mean square errors as the prediction error of this group of hyperparameters;
[0049] Change the parameter combination, calculate the prediction error of the model under each parameter combination in turn and compare them one by one. The parameter combination with the smallest average error is the best parameter combination.
[0050] Furthermore, perform a robust estimation on the least squares support vector machine to resist the influence of measurement noise. The specific method is as follows:
[0051] Let e k = α k / γ; Suppose v k is the weight vector corresponding to e k ; Through v k weight e k and filter the noise contained in the data actually collected at the sludge digestion site, so as to realize the robust estimation of the parameters of the least squares support vector machine; After weighting e k , the objective function becomes:
[0052]
[0053] Eliminate the constraints to obtain the following KKT system:
[0054]
[0055] Wherein:
[0056] Y = (y1, y2, …, y N ) T ;
[0057]
[0058] E1 = (1, 1, …, 1) T ;
[0059]
[0060] A′ = (α1′, α2′, …, α N ′) T ;
[0061]
[0062] In the above formulas:
[0063] V γ is a diagonal matrix;
[0064] γ is a penalty factor;
[0065] O kl is an intermediate variable;
[0066] I is an identity matrix;
[0067] x l is the l-th input vector;
[0068] w′ is the variable of the high-dimensional mapping model of robust estimation;
[0069] e k ′ is the fitting error of robust estimation;
[0070] α k ′ is the robust estimation parameter of the least squares support vector machine; k = 1, 2, …, N;
[0071] b′ is the robust estimation parameter of the least squares support vector machine;
[0072] K() represents a kernel function;
[0073] σ is the parameter of the radial basis kernel function;
[0074] ‖‖ represents the Euclidean distance;
[0075] According to the deviation degree of the fitting error of the unweighted least squares support vector machine parameters, select the corresponding weight value according to the following method:
[0076] When is the case, v k = 1;
[0077] When
[0078] When is the case, v k = 0;
[0079] wherein, c1 and c2 are constants; 2.0 ≤ c1 < c2 ≤ 3.0;
[0080] is the robust estimation of the standard deviation of the least squares support vector machine fitting error, The calculation formula of is as follows:
[0081]
[0082] wherein, MAD() represents the median function;
[0083] By solving the weighted linear equations, the output of the following robust least squares support vector machine regression model is obtained:
[0084]
[0085] x is the input variable of the regression model;
[0086] y(x) is the output of the regression model.
[0087] Furthermore, for the sludge digestion process data collected in real time, a data window with a fixed length is established in the time axis direction, and the continuously updated window data is continuously input into the prediction model to obtain the online updated output of the model.
[0088] Furthermore, the original sample data is preprocessed by mean normalization; the data collected in real time is preprocessed by noise filtering and mean normalization.
[0089] The present invention also provides a device for a sludge digestion state evaluation method based on a least squares support vector machine, including a memory and a processor, the memory is used for storing a computer program; the processor is used for executing the computer program and implementing the steps of the sludge digestion state evaluation method based on the least squares support vector machine as described above when executing the computer program.
[0090] The advantages and positive effects of the present invention are:
[0091] Through the robust estimation of the least squares support vector machine, the present invention greatly improves the anti-noise ability of the data model, effectively deals with various measurement noises in the actual industrial field, and improves the accuracy of the model.
[0092] The present invention utilizes real-time updated data in the industrial field to supplement new data and eliminate old data, ensuring the timeliness and effectiveness of the data, reducing the dimension of model solution, and realizing the real-time prediction of key state indicators in the sludge digestion process.
[0093] The present invention conducts online modeling of the sludge digestion process through an online robust least squares support vector machine, realizes the real-time prediction of key indicators, and comprehensively reduces the risk of system collapse in the digestion process.
[0094] The present invention can accurately predict the performance change of the system under the change of substrate and environmental conditions, so that measures can be taken in advance to create the best reaction conditions and ensure the stable and efficient operation of the system. Brief Description of the Drawings
[0095] Figure 1 is a flow chart of a method for evaluating the sludge digestion state based on least squares support vector machine according to the present invention.
[0096] Figure 2 is a schematic diagram showing the modeling effect of sludge digestion state constructed by a method for evaluating the sludge digestion state based on least squares support vector machine according to the present invention. Detailed Embodiments
[0097] The present invention will be described in detail below with reference to the drawings and in conjunction with embodiments. It should be understood that the preferred embodiments described herein are only for illustrating and explaining the present invention, and are not used to limit the present invention.
[0098] The Chinese interpretations of the following English words, abbreviations and phrases are as follows:
[0099] VFA / ALK: the ratio of volatile fatty acid to alkalinity.
[0100] RBF: Gaussian radial basis function.
[0101] KKT system: a system that satisfies the Karush Kuhn Tucker conditions.
[0102] Please refer to Figures 1 to 2, A method for evaluating the sludge digestion state based on least squares support vector machine. This method determines the state evaluation indicators and input variables of the sludge digestion process based on the mechanism of the sludge digestion process, and uses the least squares support vector machine modeling method to construct a prediction model of the sludge digestion process state with the state evaluation indicators as the output; collects the historical data of the sludge digestion process as the original sample data, performs normalization preprocessing on the original sample data and makes it into a training set, and uses the training set to perform offline training on the prediction model; collects the data of the sludge digestion process in real time and online, preprocesses the real-time collected data and inputs it into the prediction model that has completed offline training, corrects the parameters of the prediction model online and outputs the state prediction data, realizing the online continuous prediction of the sludge digestion system state.
[0103] Preferably, the following state evaluation indicators of the sludge digestion process can be determined: the ratio of volatile fatty acids to alkalinity; the following input variables of the prediction model can be determined: the feed flow rate of the digestion tank, the liquid level in the tank, the temperature in the tank, and the pH value in the tank.
[0104] Preferably, the following sludge digestion state evaluation rules can be set: when the ratio of volatile fatty acids to alkalinity > 0.3, it indicates that the feed load of the anaerobic fermentation system is heavy; when the ratio of volatile fatty acids to alkalinity is 0.1 - 0.3, it indicates that the feed load of the anaerobic fermentation system is appropriate.
[0105] Preferably, the method for constructing the prediction model of the sludge digestion process state can include the following method steps:
[0106] Let k be the serial number of the input vector of the prediction model; x k be the k-th input vector of the prediction model; y k be the output of the prediction model corresponding to x k Select a non-linear function Using high-dimensional feature mapping, construct the following prediction model of the sludge digestion process state:
[0107]
[0108] Based on the principle of structural risk minimization, construct the following objective function for solving the optimal parameters of the prediction model:
[0109]
[0110] In the formula:
[0111] w is the variable of the high-dimensional mapping model;
[0112] b is the variable of the high-dimensional mapping model;
[0113] N is the total number of data vectors collected in each period;
[0114] ek For the fitting error corresponding to x k ;
[0115] γ is the penalty factor;
[0116] Use the Lagrange method to solve the minimum value of the objective function.
[0117] Preferably, the method of using the Lagrange method to solve the minimum value of the objective function may include the following method steps:
[0118] First, use the Lagrange multiplier method to eliminate the constraints of the objective function, and the following form of the optimization function can be obtained:
[0119]
[0120] In the formula: α k is the Lagrange multiplier corresponding to x j ;
[0121] According to the KKT conditions in optimization theory, the following linear matrix equation system can be sorted out:
[0122]
[0123] Where:
[0124] Y = (y1, y2,..., y N ) T ;
[0125] y1 is the output of the prediction model corresponding to x1; y2 is the output of the prediction model corresponding to x2; y N is the output of the prediction model corresponding to x N ;
[0126] E1 = (1, 1,..., 1) T ;
[0127] A = (α1, α2,..., α N ) T ;
[0128] α1 is the Lagrange multiplier corresponding to x1; α2 is the Lagrange multiplier corresponding to x2; α N is the Lagrange multiplier corresponding to x N ;
[0129]
[0130] In the above formulas:
[0131] Q kl is an intermediate variable;
[0132] I is the identity matrix;
[0133] x l is the l-th input vector of the prediction model;
[0134] K() represents the kernel function;
[0135] σ is the parameter of the radial basis kernel function;
[0136] ‖‖ represents the Euclidean distance;
[0137] α1, α2, …, α N and b are the fitting parameters of the least squares support vector machine.
[0138] Preferably, the hyperparameters in the objective function can be optimized and adjusted by using the grid search combined with the cross-validation method. The specific method is as follows:
[0139] Take the hyperparameters γ and σ as the optimization objects;
[0140] Establish a grid coordinate system, let f = [-5, 5], g = [-5, 5], the step size is 1, and the hyperparameters γ and σ are respectively selected as γ = e f , σ = e g ;
[0141] Divide the training set into n subsets equally;
[0142] For each group of γ and σ in the grid, take any one subset as the test set, and the remaining n - 1 subsets as the training set. After training the model, predict the test set and calculate the mean absolute error:
[0143]
[0144] In the formula:
[0145] is the model prediction value;
[0146] S is the actual value of the sample;
[0147] Successively replace another subset as the test set, and the remaining subsets as the training set. Take the average of the n groups of mean square errors as the prediction error of this group of hyperparameters;
[0148] Change the parameter combination, calculate the prediction error of the model under each parameter combination in turn and compare them one by one. The parameter combination with the smallest average error is the best parameter combination.
[0149] Preferably, the least squares support vector machine can be robustly estimated to resist the influence of measurement noise. The specific method is as follows:
[0150] Let e k = α k / γ; Let v k correspond to ek The weight vector; it can be through v k weight e k to filter the noise contained in the data actually collected at the sludge digestion site, so as to realize the robust estimation of the parameters of the least squares support vector machine; after weighting e k the objective function can become:
[0151]
[0152] Eliminating the constraints can obtain the following KKT system:
[0153]
[0154] where:
[0155] Y = (y1, y2,..., y N ) T ;
[0156]
[0157] E1 = (1, 1,..., 1) T ;
[0158]
[0159] A′ = (α1′, α2′,..., α N ′) T ;
[0160]
[0161] In the above formulas:
[0162] V γ is a diagonal matrix;
[0163] γ is the penalty factor;
[0164] O kl is an intermediate variable;
[0165] I is the identity matrix;
[0166] x l is the l-th input vector;
[0167] w′ is the variable of the high-dimensional mapping model of the robust estimation;
[0168] e k ′ is the fitting error of the robust estimation;
[0169] α k ′ is the robust estimation parameter of the least squares support vector machine; k = 1, 2,..., N;
[0170] b′ is the robust estimation parameter of the least squares support vector machine;
[0171] K() represents the kernel function;
[0172] σ is the parameter of the radial basis kernel function;
[0173] ‖‖ represents the Euclidean distance;
[0174] According to the deviation degree of the fitting error of the unweighted least squares support vector machine parameters, the corresponding weights can be selected according to the following method:
[0175] When v k = 1;
[0176] When
[0177] When v k = 0;
[0178] where c1 and c2 are constants; 2.0 ≤ c1 < c2 ≤ 3.0;
[0179] is the robust estimation of the standard deviation of the fitting error of the least squares support vector machine, The calculation formula of is as follows:
[0180]
[0181] where MAD() represents the median function;
[0182] By solving the weighted linear equations, the output of the following robust least squares support vector machine regression model is obtained:
[0183]
[0184] x is the input variable of the regression model;
[0185] y(x) is the output of the regression model.
[0186] Preferably, for the sludge digestion process data collected in real time, a data window with a fixed length can be established in the time axis, and the continuously updated window data is continuously input into the prediction model to obtain the online updated output of the model.
[0187] Preferably, the original sample data can be preprocessed by mean normalization; the data collected in real time can be preprocessed by noise filtering and mean normalization.
[0188] The present invention also provides a device for the sludge digestion state evaluation method based on least squares support vector machine, including a memory and a processor, where the memory is used to store computer programs; the processor is used to execute the computer programs and implement the steps of the sludge digestion state evaluation method based on least squares support vector machine as described above when executing the computer programs.
[0189] A preferred embodiment of the present invention is used to further illustrate the working process and working principle of the present invention:
[0190] As Figure 1 shown, in order to cope with the risk of system collapse in the sludge digestion process, the present invention proposes an online sludge digestion state evaluation method based on robust least squares support vector machine. The specific steps are as follows:
[0191] Step 1, according to the characteristic mechanism analysis of the sludge digestion process, determine that the state evaluation output variable (evaluation index) is the ratio of volatile fatty acid (VFA) to alkalinity (ALK); define the evaluation rule: when VFA / ALK > 0.3, it indicates that the feed load of the anaerobic fermentation system is heavy; when VFA / ALK is 0.1 - 0.3, it indicates that the feed load of the anaerobic fermentation system is appropriate; determine the input variables of the state evaluation model: the feed flow rate of the digestion tank, the liquid level in the tank, the temperature in the tank, and the pH value in the tank.
[0192] Step 2, collect the historical data of the sludge digestion process, and perform normalization preprocessing on the original sample data. The normalization scheme adopts the mean normalization method, as shown in Equation (1):
[0193]
[0194] In the formula: x' is the normalized data, x o is the original data, μ' is the mean of the original data, and σ' is the variance of the original data.
[0195] Step 3, adopt the least squares support vector machine modeling method to realize the offline data modeling of the VFA / ALK state index of the sludge digestion process, specifically as follows:
[0196] Let k be the serial number of the input vector of the prediction model; x k be the k-th input vector of the prediction model; y k be the output of the prediction model corresponding to x k of.
[0197] Use the normalized historical data to define the model training data Input data x k ∈R n , output data y k∈R, where k is the serial number of the data vector collected in each period, and N is the total number of data vectors collected in each period.
[0198] Build a sludge digestion state evaluation model. The input data are the feed flow rate of the digestion tank, the liquid level in the tank, the temperature in the tank, and the pH value in the tank, and the output data is VFA / ALK. Select a non-linear function Using high-dimensional feature mapping, construct a linear expression of the modeling data in the high-dimensional space, as shown in Equation (2):
[0199]
[0200] Based on the principle of structural risk minimization, construct an optimization objective function under equality constraints:
[0201]
[0202] where e k is the fitting error corresponding to x k ; γ is the penalty factor.
[0203] Use the Lagrangian method to solve this optimization problem. First, use the Lagrange multiplier method to eliminate the optimization constraints and obtain an optimization function in the following form:
[0204]
[0205] where α k is the Lagrange multiplier (support value) corresponding to x k , and w, b, e k are all parameters in the original optimization function. It can be seen from the above formula that this optimization function contains 4 variables (i.e., w, b, e k , α k ). According to the KKT (Karush Kuhn Tucker) conditions in optimization theory, organize to obtain the corresponding linear matrix equation system, as shown in Equation (5):
[0206]
[0207] where:
[0208] where:
[0209] Y = (y1, y2,..., y N ) T ;
[0210] E1 = (1, 1,..., 1) T ;
[0211] A = (α1, α2,..., α N ) T ;
[0212]
[0213] In the above formulas:
[0214] Q kl is an intermediate variable;
[0215] I is the identity matrix;
[0216] x l is the l-th input vector of the prediction model;
[0217] K() represents the kernel function;
[0218] σ is the parameter of the radial basis kernel function;
[0219] ‖‖ represents the Euclidean distance;
[0220] α1, α2, …, α N and b are the fitting parameters of the least squares support vector machine.
[0221] The kernel function is selected as the RBF radial basis kernel function:
[0222]
[0223] Step 4: Optimize and adjust the hyperparameters γ and σ by using grid search combined with ten-fold cross-validation. Specifically as follows:
[0224] Establish a grid coordinate system. Let f = [-5, 5], g = [-5, 5], with a step size of 1. The hyperparameters γ and σ are respectively selected as γ = e f , σ = e g .
[0225] Divide the dataset into 10 equal subsets.
[0226] For each group of γ and σ in the grid, take any one subset as the test set, and the remaining 9 subsets as the training set. After training the model, predict the test set and calculate the mean absolute error:
[0227]
[0228] where is the model prediction value; S is the actual sample value.
[0229] Successively replace another subset as the test set, and the remaining subsets as the training set. Take the average of the 10 mean squared errors as the prediction error of this group of hyperparameters.
[0230] Replace the parameter combination, successively calculate the prediction errors of the model under each parameter combination and compare them one by one. The parameter combination with the smallest average error is the best parameter combination.
[0231] Step 5: Perform a robust estimation on the least squares support vector machine to resist the influence of measurement noise. The specific method is as follows:
[0232] Let e k = α k / γ; Let v k be the weight vector; Through v k weight e k and filter the noise contained in the data actually collected at the sludge digestion site, so as to achieve a robust estimation of the parameters of the least squares support vector machine. After weighting the error, the aforementioned optimization problem can be described as:
[0233]
[0234] Eliminate the optimization conditions to obtain the KKT system:
[0235]
[0236] where:
[0237] Y = (y1, y2,..., y N ); T ;
[0238] E1 = (1, 1,..., 1) T ;
[0239]
[0240] A' = (α1', α2',..., α N '); T ;
[0241]
[0242] In the above formulas:
[0243] Q kl is an intermediate variable;
[0244] I is the identity matrix;
[0245] x l is the l-th input vector;
[0246] w' is the variable of the high-dimensional mapping model of the robust estimation;
[0247] e k ' is the fitting error of the robust estimation;
[0248] α k ' is the robust estimation parameter of the least squares support vector machine; k = 1, 2,..., N;
[0249] b' is the robust estimation parameter of the least squares support vector machine;
[0250] K() represents the kernel function;
[0251] σ is the parameter of the radial basis kernel function;
[0252] ‖‖ represents the Euclidean distance;
[0253] V γ is a diagonal matrix.
[0254] Among them, the diagonal matrix V γ is expressed as follows:
[0255]
[0256] According to the deviation degree of the fitting error of the unweighted least squares support vector machine parameters, the corresponding weights are selected, specifically as follows:
[0257] (1) When , v x = 1;
[0258] (2) When
[0259] (3) When , v k = 0;
[0260] In the formula is the robust estimation of the standard deviation of the fitting error of the least squares support vector machine, The calculation formula of
[0261]
[0262] Among them, MAD() represents the median function.
[0263] The constant c1 is selected as 2.5 and c2 is selected as 3.0.
[0264] By solving the weighted linear equations, the output of the robust least squares support vector machine regression model is obtained:
[0265]
[0266] x is the input variable of the regression model;
[0267] y(x) is the output of the regression model.
[0268] Step six, using the moving window data processing technology, the real-time data of the digestion process is used to update the aforementioned data model online to realize the online monitoring of the VFA / ALK index.
[0269] Step six is specifically as follows:
[0270] Introduce the moving window method in data processing into the robust least squares support vector machine, establish a data window with a fixed length in the time axis, and use the continuous update of the window data to realize the continuous correction of the model.
[0271] According to the moving window method, redefine the process input and output data sets:
[0272] x k =(x k , x k+1 , …, x k+d-1 )(12)
[0273] y k =(y k , y k+1 , …, y k+d-1 )(13)
[0274] where d is the window length.
[0275] The aforementioned linear equations are transformed into the following form:
[0276]
[0277] And further obtain the online update output of the transformed least squares support vector machine:
[0278]
[0279] where:
[0280] y k =(y k-m+1 , y k-m+2 , …, y k ); T ;
[0281] E1=(1, 1, …, 1) T ;
[0282] A′ k =(α′ k-d+1 , α′ k-d+2 , …, α′ k ); T ;
[0283]
[0284] α k ′ is the robust estimation parameter of the least squares support vector machine; k = 1, 2, …, N;
[0285] b′ kis the robust estimation parameter of the least squares support vector machine based on data moving window processing;
[0286] X is the input variable of the least squares support vector machine based on data moving window processing;
[0287] y(X) is the output of the least squares support vector machine based on data moving window processing;
[0288] α′ k-d+1 ,α′ k-d+2 ,…,α′ k ,b′ k are the fitting parameters of the online robust least squares support vector machine.
[0289] Figure 2 is an example of the actual engineering field data applied in the present invention. The data comes from the sludge digestion treatment facility in actual operation, which reflects the effective modeling of VFA / ALK in the sludge digestion process by the present invention.
[0290] Table 1 shows the comparison of the model performance of the method of the present invention and the standard least squares support vector machine for the sludge digestion state evaluation index data. The method of the present invention has better performance in two core indexes of mean square error (MSE) and coefficient of determination (R2).
[0291] Table 1: Comparison of the modeling indexes of the method of the present invention and the standard least squares support vector machine
[0292]
[0293] The above-mentioned functional modules and algorithms such as the least squares support vector machine, grid search, and ten-fold cross-validation can all adopt the applicable functional modules and algorithms in the prior art, or adopt the functional modules and algorithms in the prior art and be constructed by conventional technical means.
[0294] The above-described embodiments are only used to illustrate the technical ideas and characteristics of the present invention, and the purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The patent scope of the present invention cannot be limited only by this embodiment, that is, any equivalent changes or modifications made according to the spirit disclosed by the present invention still fall within the patent scope of the present invention.
Claims
1. A method for evaluating sludge digestion status based on least squares support vector machine, characterized in that: The method is based on the mechanism of sludge digestion process, determines the state evaluation index and input variables of the sludge digestion process, adopts the least squares support vector machine modeling method, and constructs a prediction model of the sludge digestion process state with the state evaluation index as the output; collects the historical data of the sludge digestion process as the original sample data, performs normalization preprocessing on the original sample data and prepares a training set, and uses the training set to perform offline training on the prediction model; The sludge digestion process data is collected online in real time, and the real-time collected data is preprocessed and input into the prediction model that has completed offline training. The prediction model parameters are corrected online and the state prediction data is output to realize the online continuous prediction of the sludge digestion system state.
2. The sludge digestion state assessment method based on least squares support vector machine according to claim 1, characterized in that: The following status evaluation indicators of the sludge digestion process were determined: the ratio of volatile fatty acids to alkalinity; the following input variables of the prediction model were determined: digester tank feed flow, tank liquid level, tank temperature and tank pH value.
3. The sludge digestion state assessment method based on least squares support vector machine according to claim 1, characterized in that: The following sludge digestion status evaluation rules are set: when the ratio of volatile fatty acids to alkalinity is >0.3, it indicates that the feed load of the anaerobic fermentation system is heavy; when the ratio of volatile fatty acids to alkalinity is 0.1-0.3, it indicates that the feed load of the anaerobic fermentation system is appropriate.
4. The sludge digestion state assessment method based on least squares support vector machine according to claim 1, characterized in that: The method for constructing a prediction model for the state of the sludge digestion process comprises the following steps: Let k be the input vector number of the prediction model; x k is the kth input vector of the prediction model; y k For the corresponding x k The output of the prediction model; choose a nonlinear function Using high-dimensional feature mapping, the following prediction model of the sludge digestion process status is constructed: Based on the principle of structural risk minimization, the following objective function for solving the optimal parameters of the prediction model is constructed: Where: w is a high-dimensional mapping model variable; b is the high-dimensional mapping model variable; N is the total number of data vectors collected in each cycle; e k For the corresponding x k The fitting error of γ is the penalty factor; The Lagrangian method is used to find the minimum value of the objective function.
5. The sludge digestion state assessment method based on least squares support vector machine according to claim 4, characterized in that: The method of solving the minimum value of the objective function using the Lagrangian method includes the following steps: First, the Lagrange multiplier method is used to eliminate the constraints of the objective function and obtain the optimization function in the following form: Where: α k For the corresponding x k The Lagrange multiplier of ; According to the KKT conditions in optimization theory, the following linear matrix equations are obtained: in: Y=(y1,y2,…,y N ) T ; E1=(1,1,…,1) T ; A=(α1,α2,…,α N ) T ; In the above formulas: Q kl is an intermediate variable; I is the identity matrix; x l is the lth input vector of the prediction model; K() represents the kernel function; σ is the radial basis kernel function parameter; ‖‖ represents the Euclidean distance; α1,α2,…,α N and b are the fitting parameters of the least squares support vector machine.
6. The sludge digestion state assessment method based on least squares support vector machine according to claim 5, characterized in that: The grid search combined with the cross-validation method is used to optimize the hyperparameters in the objective function. The specific method is as follows: Take the hyperparameters γ and σ as optimization objects; Establish a grid coordinate system, set f = [-5, 5], g = [-5, 5], the step size is 1, and the hyperparameters γ and σ are selected as γ = e f ,σ=e g ; Divide the training set into n subsets; For each set of γ and σ in the grid, take any subset as the test set and the remaining n-1 subsets as the training set. After training the model, predict the test set and calculate the mean absolute error: Where: is the model prediction value; S is the actual value of the sample; Replace another subset as the test set in turn, and use the remaining subsets as the training set. Take the average of the mean square errors of n groups as the prediction error of this group of hyperparameters; Change the parameter combination, calculate the prediction error of the model under each parameter combination in turn and compare them one by one. The parameter combination with the smallest average error is the optimal parameter combination.
7. The sludge digestion state assessment method based on least squares support vector machine according to claim 4, characterized in that: The least squares support vector machine is robustly estimated to resist the influence of measurement noise. The specific method is as follows: Let e k =α k / γ; let v k For the corresponding e k The weight vector of k For k The noise contained in the data actually collected at the sludge digestion site is filtered by weighting, so as to achieve robust estimation of the least squares support vector machine parameters; k After weighting, the objective function becomes: Eliminating the constraints gives the following KKT system: in: Y=(y1,y2,…,y N ) T ; E1=(1,1,…,1) T ; A′=(α1′,α2′,…,α N ′) T ; In the above formulas: V γ is a diagonal matrix; γ is the penalty factor; Q kl is an intermediate variable; I is the identity matrix; x l is the lth input vector; w′ is a high-dimensional mapping model variable for robust estimation; e k ′ is the fitting error of the robust estimate; α k ′ is the robust estimation parameter of the least squares support vector machine; k = 1, 2, …, N; b′ is the robust estimation parameter of the least squares support vector machine; K() represents the kernel function; σ is the radial basis kernel function parameter; ‖‖ represents the Euclidean distance; According to the deviation degree of the unweighted least squares support vector machine parameter fitting error, the corresponding weights are selected as follows: when When k =1; when when When k =0; Where c1 and c2 are constants; 2.0≤c1 <c2≤3.0; is a robust estimate of the standard deviation of the least squares support vector machine fitting error, The calculation formula is as follows: Among them, MAD() stands for median function; By solving the weighted linear equations, the following robust least squares support vector machine regression model output is obtained: x is the input variable of the regression model; y(x) is the output of the regression model.
8. The sludge digestion state assessment method based on least squares support vector machine according to claim 1, characterized in that: For the real-time collected sludge digestion process data, a data window of fixed length is established on the time axis, and the continuously updated window data is continuously input into the prediction model to obtain the online updated output of the model.
9. The sludge digestion state assessment method based on least squares support vector machine according to claim 1, characterized in that: The original sample data is preprocessed by mean normalization; the real-time collected data is preprocessed by noise filtering and mean normalization.
10. A device for evaluating sludge digestion status based on least squares support vector machine, comprising a memory and a processor, characterized in that: The memory is used to store a computer program; the processor is used to execute the computer program and implement the steps of the sludge digestion state assessment method based on the least squares support vector machine as described in any one of claims 1 to 9 when executing the computer program.