Method for predicting and optimizing total nitrogen in effluent from condensate treatment system based on annealing algorithm-optimized SVM model
Through the support vector machine model optimized based on the annealing algorithm, the problem of accurate prediction and parameter optimization of total effluent nitrogen in the sludge dry condensate treatment system is solved, and efficient online monitoring and optimization of complex systems is achieved.
Patent Information
- Application Number
- CN202211579974.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-12-09
AI Technical Summary
The prior art is difficult to achieve accurate prediction of total nitrogen in the sludge dry condensate treatment system and full-process parameter optimization. The traditional method is time-consuming and complex, and there are problems such as large instrument errors and delayed test results. Traditional neural network models are prone to fall into local minimum values in nonlinear systems.
The support vector machine (SVM) model based on annealing algorithm optimization is used to determine the main influencing factors through principal component analysis, the SVM model is constructed using the radial basis function, and the model parameters are optimized using the simulated annealing algorithm until the preset conditions are met.
It realizes accurate prediction of total nitrogen in the effluent water of the sludge dry condensate treatment system and optimizes the whole process parameters, improves the stability and accuracy of the prediction results, and is suitable for complex multivariate systems.
Smart Images

Figure CN115774964B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of intelligent control and water treatment, and more specifically, to a method for predicting and optimizing the total nitrogen in effluent from a condensate treatment system based on an annealing algorithm-based SVM model optimization. Background Art
[0002] The treatment of industrial and municipal wastewater produces a large amount of sludge, rich in nutrients such as nitrogen, phosphorus, potassium, and organic matter. To reduce the processing burden, the sludge is heated and dried to remove excess water. The exhaust gas generated during the drying process condenses upon cooling to form sludge drying condensate. This wastewater is characterized by high total nitrogen and oil content, with total nitrogen often reaching around 500 mg / L, petroleum and animal and vegetable oils totaling up to 400 mg / L, and COD exceeding 3000 mg / L. This wastewater often requires multiple treatment processes to meet discharge standards. Total nitrogen is the most important effluent indicator. It primarily consists of ammonia nitrogen, nitrite nitrogen, and organic nitrogen. If ammonia nitrogen accumulates in nature, it poses a significant threat to human, animal, and plant health. The other nitrogen species also have varying degrees of negative impacts on the environment. Therefore, monitoring effluent total nitrogen is crucial for optimizing the operation of water treatment processes and protecting the ecological environment.
[0003] The traditional method for determining total nitrogen is alkaline potassium persulfate ultraviolet spectrophotometry, which involves first converting the nitrogen element of nitrogen-containing compounds into nitrates using potassium bisulfate and atomic oxygen generated by potassium persulfate under heating conditions. The value is then measured using ultraviolet spectrophotometry in conjunction with a standard curve. This method is not only time-consuming and complex, but also requires high reagent quality. The above test process is suitable for laboratory testing. Although online total nitrogen analyzers are available, they still suffer from widespread problems such as large instrument errors, delayed test results, and susceptibility to external environmental interference. These problems make it difficult to meet the needs of precise control of urban sewage treatment processes, and their application in actual sewage treatment processes is limited. In recent years, effluent index prediction models based on statistical learning theory have not only exhibited good nonlinear performance, but also possess strong small sample learning capabilities, good learning generalization performance, and good high-dimensional data processing capabilities. They have very broad application prospects in the field of sewage treatment.
[0004] Since the sludge drying condensate treatment system is a typical multivariable, nonlinear, strongly coupled and multi-disturbance complex system, it is very difficult to establish a total nitrogen prediction model for the effluent using a mechanistic method. Traditional neural network models have the disadvantages of easily falling into local minima and difficult parameter determination in water treatment research. Summary of the Invention
[0005] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method for predicting and optimizing the total nitrogen in the effluent of a condensate treatment system based on an annealing algorithm-based SVM model.
[0006] First, a method for predicting and optimizing the total nitrogen in the effluent of a condensate treatment system based on an annealing algorithm-based SVM model is provided, comprising:
[0007] Step 1: Obtain the main influencing factors affecting the total nitrogen in the effluent of the sludge drying condensate treatment process, and use the principal component analysis method to determine the most significant element among the main influencing factors;
[0008] Step 2: Build an SVM model based on the kernel function;
[0009] Step 3: Using the most significant element as the input of the SVM model, performing simulation training to obtain prediction and optimization results;
[0010] Step 4: When the output result of step 3 does not meet the preset conditions, use the simulated annealing algorithm (SA) to optimize the main parameters of the SVM model, and repeat step 3 until the output result meets the preset conditions.
[0011] Preferably, step 1 comprises:
[0012] Step 1.1: The main influencing factors are represented by an initial matrix, the data in the initial matrix is normalized, a decomposition matrix is obtained, and the covariance matrix and the principal component matrix T corresponding to the decomposition matrix are obtained;
[0013] Step 1.2: Calculate the cumulative variance using the characteristic root λ and principal component matrix T obtained from the covariance matrix.
[0014] Step 1.3: Identify multiple most significant elements among the main influencing factors.
[0015] Preferably, in step 2, the kernel function is a radial basis function, and the discriminant function of the radial basis function is:
[0016]
[0017] Among them, sgn is the sign function, a i represents the center point, n is the number of center points, K r is the radial basis function, x i is the eigenvector of the center point; r and b are both estimated parameters and are random constants;
[0018] The radial basis function is expressed as:
[0019]
[0020] Preferably, in step 4, define the function:
[0021]
[0022] Among them, y i is the jth sample instance, is the jth simulated sample instance, n is the number of simulated samples, st is the constraint (subject to), and appropriate C, g, and ε parameters are selected iteratively to minimize the function. The specific steps include:
[0023] Step 4.1, determine the initial parameters of the simulated annealing algorithm, initial temperature T0, termination temperature T e , initial state E o , and temperature cooling coefficient ε, 0<ε<1;
[0024] Step 4.2: Under the constraints, use the cooling function T n =T o *ρ, 0<ρ<1, perform annealing optimization, select a set of random parameters (C, g, ε) in the neighborhood as the original parameters of the support vector machine model, and obtain the temporary state E i ;
[0025] Step 4.3: Determine whether the temporary state satisfies E n <E o , and the significant difference is reasonable, that is A random number to decide whether to accept the temporary state as the current state;
[0026] Step 4.4: If E n >E o , then repeat steps 3.2 and 3.3 to continue searching for the best result; if E n <E o , then accept this state as the new temporary state until T n <T e , stop the algorithm and use the optimized parameters as the optimal parameters of the SVM model.
[0027] In a second aspect, a device for predicting and optimizing the total nitrogen in the effluent of sludge drying condensate based on the SA-SVM algorithm is provided, which is used to perform any of the methods for predicting and optimizing the total nitrogen in the effluent of the condensate treatment system based on the SA-SVM algorithm described in the first aspect, comprising:
[0028] An acquisition module is used to obtain the main influencing factors affecting the total nitrogen in the effluent of the sludge drying condensate treatment process, and to determine the most significant element among the main influencing factors using a principal component analysis method;
[0029] Construction module, used to build SVM model based on kernel function;
[0030] A simulation training module is used to use the most significant element as the input of the SVM model to perform simulation training to obtain prediction and optimization results;
[0031] The optimization module is used to use a simulated annealing algorithm (SA) to optimize the main parameters of the SVM model when the output result of step 3 does not meet the preset conditions, and repeat step 3 until the output result meets the preset conditions.
[0032] In a third aspect, a computer storage medium is provided, wherein a computer program is stored in the computer storage medium; when the computer program is run on a computer, the computer executes any of the methods described in the first aspect for predicting and optimizing the total nitrogen in the effluent of a condensate treatment system by optimizing the SVM model based on an annealing algorithm.
[0033] In a fourth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer executes any of the methods described in the first aspect for predicting and optimizing the total nitrogen in the effluent of a condensate treatment system based on an annealing algorithm-based SVM model.
[0034] The beneficial effects of the present invention are:
[0035] (1) Aiming at the problem that the total nitrogen in the effluent of the wastewater treatment process in the whole industry is difficult to measure online, the present invention proposes an intelligent prediction method for the total nitrogen in the effluent of the sludge drying condensate treatment process based on the annealing simulation-support vector machine algorithm, which realizes the real-time accurate prediction of the total nitrogen in the effluent of the whole process of this type of wastewater treatment and the optimization of the parameters of the whole process, and has broad application prospects.
[0036] (2) Compared with the original neural network model, the SA-SVM of the present invention has obvious advantages in solving nonlinear small sample data and high-dimensional pattern recognition. The simulated annealing algorithm performs a global optimization search on the three important parameters of the support vector machine, namely the penalty factor, insensitivity coefficient and kernel parameter, and then uses the principal component analysis method to analyze the factors affecting the total nitrogen in the effluent. The main influencing factors are selected as the model input, so that the prediction results have better stability and higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is a workflow diagram of the effluent total nitrogen prediction and optimization model for the sludge drying condensate treatment process provided by the present invention;
[0038] Figure 2 This is a schematic diagram of a sludge drying condensate treatment process;
[0039] Figure 3 This is the annealing simulation-support vector machine algorithm prediction result diagram provided by the present invention;
[0040] Figure 4 The annealing simulation-support vector machine algorithm prediction error graph provided by the present invention;
[0041] Figure 5 This is a schematic diagram of the structure of the device for predicting and optimizing the total nitrogen in the effluent from sludge drying condensate provided by the present invention;
[0042] Description of reference numerals: oil separation tank 1, electrolytic flotation tank 2, A 2 O pool 3, MBR pool 4, ozone catalytic oxidation pool 5, clean water pool 6, PLC control cabinet 7. DETAILED DESCRIPTION
[0043] The present invention will be further described below with reference to the following examples. The following examples are provided only to facilitate understanding of the present invention. It should be noted that, without departing from the principles of the present invention, it is possible for a person skilled in the art to make various modifications to the present invention, and such improvements and modifications fall within the scope of the claims of the present invention.
[0044] Example 1
[0045] Sludge drying condensate treatment process flow Figure 2 As shown, the PLC control cabinet 7 is used to control each device in the sludge drying condensate treatment system. The sludge drying condensate passes through the oil separation regulating tank 1, electrolytic flotation tank 2, A 2 O pool 3, MBR pool 4, ozone catalytic oxidation pool 5, and clear water pool 6 for treatment.
[0046] In order to effectively predict and optimize the total nitrogen in the effluent of the sludge drying condensate treatment process, the present invention provides a method for predicting and optimizing the total nitrogen in the effluent of the condensate treatment system based on the annealing algorithm to optimize the SVM model, such as Figure 1 Shown, including:
[0047] Step 1: Obtain the main influencing factors affecting the total nitrogen in the effluent of the sludge drying condensate treatment process, and use the principal component analysis method to determine the most significant elements among the main influencing factors.
[0048] For example, in step 1, the present invention selects a total of 19 factors that can affect the total nitrogen in the effluent of the sludge drying condensate treatment process as the main influencing factors, including: influent COD, influent ammonia nitrogen, influent nitrate-nitrite nitrogen, influent total nitrogen, influent TDS, influent volume, influent alkalinity, influent total oil, influent total phosphorus, influent turbidity, electrolytic flotation plate voltage, activated sludge SRT, MBR membrane backwash cycle, ozone dosage, aerobic tank DO, anoxic tank DO, aerobic tank MLSS, anoxic tank MLSS and biochemical tank temperature.
[0049] In order to find out the most significant factors affecting the total nitrogen in the effluent, the principal component analysis (PCA) of the influencing factors was performed using the SPSS system. This analysis method converts the original multiple variables with strong correlations such as a1, a2, a3...a n Recombination, that is, linear projection mapping through the matrix, can transform the original associated variables into multiple unrelated variables b1, b2, b3...b n These uncorrelated variables are the principal components, which are respectively called the first principal component, the second principal component...the nth principal component. Each principal component is a combination of the variables that originally had strong correlation after a certain transformation. They have no connection with each other and the information is not repeated. They can objectively reflect most of the information of the original variables and derive the weight of each factor.
[0050] If the research object is expressed by n vectors, X1, X2, X3…, X n Indicates that the n-dimensional random matrix is:
[0051]
[0052] where X i =(x 1i , x 2i , x 3i ,…x bi ), i = 1, 2, 3, ... n. Linear mapping is performed on the column vectors X1, X2, X3, ..., X3, and they are recombined to form a new n-dimensional vector Z, which can be expressed as:
[0053]
[0054] That is Y i =m 1i X1+m 2i X2+m 3i X3+…+m ni X n , i=1,2,3,…,p. Among them, m must be satisfied 1i 2 +m 2i 2 +m 3i 2 +…+m ni 2 =1,m i is a unit vector, m i 'm=1,Cov(Y i , Y j )=0, that is, Y i With Y j are irrelevant, and Y1, Y2, Y3, ... Y n The variance of Y1, Y2, Y3, ...Yn are the original variables X1, X2, X3, ...X n The first, second, third, ..., nth principal component of .
[0055] The specific steps of using principal component analysis to identify the most significant elements among the main influencing factors include:
[0056] Step 1.1: Use an initial matrix to represent the main influencing factors, normalize the data in the initial matrix, obtain the normalized matrix, and obtain the covariance matrix and principal component matrix T corresponding to the normalized matrix.
[0057] For example, the original data, i.e. the main influencing factors, are represented by the matrix X{ρ inCoD ,ρ inNH3 ,ρ inTN ,ρ inTDS …ρ ADO ,ρ ODO ,ρ AMLSs ,ρ OMLSs ,ρ T} means that the data in the matrix is normalized and the equation obtained is:
[0058]
[0059] Among them, i is the number of samples, j is the sample weight, is the jth sample mean, Sj is the standard deviation, X′ ij is the normalized matrix obtained.
[0060] Then, find the matrix X′ ij The covariance matrix of λ is sorted by the size of the characteristic root λ to obtain the eigenvector matrix U and the corresponding eigenvalue matrix V. And decompose the matrix X′ ij =TU T , and finally T is obtained as the principal component matrix.
[0061] Step 1.2: Calculate the cumulative variance using the characteristic root λ obtained from the covariance matrix and the principal component matrix T.
[0062] Step 1.3: Identify multiple most significant elements among the main influencing factors.
[0063] It was found that the most significant factors affecting the total nitrogen in the effluent were influent ammonia nitrogen, influent volume, influent TDS, aerobic pool MLSS, aerobic pool DO and biochemical pool temperature. The six principal components were selected as the input of the SVM model in the subsequent steps.
[0064] Step 2: Build an SVM model based on the kernel function.
[0065] In step 2, different functions can be used as kernel functions K(x, x) in SVM.i ), and can construct a learning machine whose initial input is different types of nonlinear optimal hyperplanes. The present invention uses radial basis function as kernel function, and the discriminant function of radial basis function is:
[0066]
[0067] Among them, sgn is the sign function, a i represents the center point, n is the number of center points, K r is the radial basis function, x i is the eigenvector of the center point; r and b are both estimated parameters and are random constants; when constructing the discriminant function, it is necessary to estimate r and a i , n, and x i .
[0068] The most commonly used kernel function is the Gaussian function, which is expressed as:
[0069]
[0070] Step 3: Using the most significant element as the input of the SVM model, performing simulation training to obtain prediction and optimization results;
[0071] Step 4: When the output result of step 3 does not meet the preset conditions, use the simulated annealing algorithm to optimize the main parameters of the SVM model, and repeat step 3 until the output result meets the preset conditions.
[0072] An annealing simulation support vector machine algorithm model is established. The annealing process can be characterized as an ongoing light and search to seek the global optimal solution. The present invention uses a simulated annealing algorithm to optimize the three main parameters of the support vector machine model. The simulated annealing algorithm can ensure that it does not fall into the local optimum while gradually approaching the global optimum.
[0073] In step 4, define the function:
[0074]
[0075] Among them, y i is the jth sample instance, is the jth simulated sample instance, n is the number of simulated samples; st is the constraint condition (subject to); the core idea of the algorithm is to iteratively select appropriate C, g, ε parameters to minimize the function. The specific steps include:
[0076] Step 4.1, determine the initial parameters of the simulated annealing algorithm, initial temperature T0, termination temperature T e , initial state E o , and temperature cooling coefficient ε, 0<ε<1;
[0077] Step 4.2: Under the constraints, use the cooling function T n =T o *ρ, 0<ρ<1, perform annealing optimization, select a set of random parameters (C, g, ε) in the neighborhood as the original parameters of the support vector machine model, and obtain the temporary state E i ;
[0078] Step 4.3: Determine whether the temporary state satisfies E n <E o , and the significant difference is reasonable, that is A random number to decide whether to accept the temporary state as the current state;
[0079] Step 4.4: If E n >E o , then repeat steps 3.2 and 3.3 to continue searching for the best result; if E n <E o , then accept this state as the new temporary state until T n <T e , stop the algorithm and use the optimized parameters as the optimal parameters of the SVM model. Finally, use the mean absolute error to evaluate the model to see if it meets expectations.
[0080] According to the results of the above data processing, the six main influencing factors affecting the total nitrogen in the effluent were finally obtained and used as the input of the SVM model.
[0081] The embodiment of the present invention is taken from the 2021 water quality monitoring data of the sludge drying condensate treatment system of the coal-fired coupled sludge power generation system in a thermal power plant in the south. There are a total of 150 groups of experimental sample data, 100 groups of which are used as training data and the remaining 50 groups are used as test data.
[0082] After the above steps, the present invention establishes a simulation prediction model for the total nitrogen in the effluent of the sludge drying condensate treatment process, and performs simulation training to obtain prediction and optimization results. The test sample data (50 groups) are used as the input of the trained SVM model, and the output of the support vector machine model is the prediction and optimization results of the total nitrogen in the effluent of the sludge drying condensate treatment process. The actual effluent total nitrogen concentration is different from the predicted effluent total nitrogen concentration. Figure 3 , X-axis: test sample point, unit is day, Y-axis: effluent total nitrogen, unit is mg / L, square data points represent measured values, triangle data points represent predicted values. The relative error between the actual effluent total nitrogen concentration and the predicted effluent total nitrogen concentration is as follows Figure 4 ,X-axis: test sample points, unit is day, Y-axis: relative error.,The relative error between the two sets of data is small,,which proves that this method is effective and feasible,,and has high prediction accuracy.
Claims
1. A method for predicting and optimizing the total nitrogen in the effluent of a condensate treatment system based on an annealing algorithm-optimized SVM model, characterized in that: include: Step 1: Obtain the main influencing factors affecting the total nitrogen in the effluent of the sludge drying condensate treatment process, and use the principal component analysis method to determine the most significant element among the main influencing factors; Step 2: Construct an SVM model based on the kernel function; in step 2, the kernel function is a radial basis function, and the discriminant function of the radial basis function is: Among them, sgn is the sign function, a i represents the center point, n is the number of center points, K r is the radial basis function, x i is the eigenvector of the center point, r and b are both estimated parameters and are random constants; The kernel function used is the Gaussian function, which is expressed as: Step 3: Using the most significant element as the input of the SVM model, performing simulation training to obtain prediction and optimization results; Step 4: If the output result of step 3 does not meet the preset conditions, use the simulated annealing algorithm to optimize the main parameters of the SVM model. Repeat step 3 until the output result meets the preset conditions. In step 4, define the simulated annealing algorithm optimization function: Among them, y i is the jth sample instance, is the jth simulated sample instance, n is the number of simulated samples, and st is the constraint condition. The function is minimized by iteratively selecting appropriate C, g, and ε parameters. The specific steps include: Step 4.1, determine the initial parameters of the simulated annealing algorithm, initial temperature T0, termination temperature T e , initial state E o , and the temperature cooling coefficient ε, 0<ε<1; Step 4.2: Under the constraints, use the cooling function T n =T o *ρ, 0<ρ<1, perform annealing optimization, select a set of random parameters (C, g, ε) in the neighborhood as the original parameters of the support vector machine model, and obtain the temporary state E i ; Step 4.3: Determine whether the temporary state satisfies E n <E o , and the significant difference is reasonable, that is A random number to decide whether to accept the temporary state as the current state; Step 4.4: If E n >E o , then repeat steps 3.2 and 3.3 to continue searching for the best result; if E n <E o , then accept this state as the new temporary state until T n <T e , stop the algorithm and use the optimized parameters as the optimal parameters of the SVM model.
2. The method for predicting and optimizing the total nitrogen in the effluent of a condensate treatment system based on an annealing algorithm-optimized SVM model according to claim 1, characterized in that: Step 1 includes: Step 1.1, the main influencing factors are represented by an initial matrix, the data in the initial matrix are normalized to obtain a normalized matrix, and the covariance matrix and principal component matrix T corresponding to the normalized matrix are obtained; Step 1.2: Calculate the cumulative variance using the characteristic root λ and principal component matrix T obtained from the covariance matrix. Step 1.3: Identify multiple most significant elements among the main influencing factors.
3. The device for predicting and optimizing the total nitrogen in the effluent of sludge drying condensate based on the annealing algorithm to optimize the SVM model is characterized by: The method for predicting and optimizing the total nitrogen in the effluent of a condensate treatment system based on the optimization of the SVM model using an annealing algorithm according to any one of claims 1 to 2 comprises: An acquisition module is used to obtain the main influencing factors affecting the total nitrogen in the effluent of the sludge drying condensate treatment process, and to determine the most significant element among the main influencing factors using a principal component analysis method; Construction module, used to build SVM model based on kernel function; A simulation training module is used to use the most significant element as the input of the SVM model to perform simulation training to obtain prediction and optimization results; The optimization module is used to use a simulated annealing algorithm to optimize the main parameters of the SVM model when the output result of step 3 does not meet the preset conditions, and repeat step 3 until the output result meets the preset conditions.
4. A computer storage medium, characterized in that The computer storage medium stores a computer program; when the computer program is run on a computer, the computer executes the method for predicting and optimizing the total nitrogen in the effluent of a condensate treatment system based on optimizing the SVM model with an annealing algorithm as described in any one of claims 1 to 2.
5. A computer program product, characterized in that When the computer program product is run on a computer, the computer is enabled to execute the method for predicting and optimizing the total nitrogen in the effluent of a condensate treatment system based on optimizing the SVM model using an annealing algorithm as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Wind turbine generator state parameter abnormity identification method based on combination prediction
CN105719002A
Water demand prediction method based on GASA-SVR
CN110163444A