A real-time prediction method for nitrogen oxide concentration in flue gas system of thermal power plant based on random forest
By using a random forest algorithm in coal-fired thermal power plants to screen variables and establish a NOx concentration prediction model, the accurate prediction problem in NOx emission governance is solved, the calculation cost is reduced and the prediction accuracy is improved, and the effective control of NOx emissions is achieved.
Patent Information
- Application Number
- CN202211653525.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-22
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-12-22
AI Technical Summary
It is difficult to establish an accurate predictive model of NOx concentration in coal-fired thermal power plants, resulting in poor NOx emission control effect, and high-dimensional historical data redundancy leads to high calculation costs and low model accuracy.
Using a random forest-based method, the optimal input variables of the real-time prediction model of NOx emission concentration are screened out through the maximum information coefficient and variable importance, a random forest regression algorithm model is established, and online deployment is carried out to achieve real-time prediction of NOx concentration.
It effectively reduces the calculation cost, improves the prediction accuracy and generalization performance of the model, reduces the hysteresis of the flue gas emission monitoring system, supports the advanced regulation of ammonia injection volume, and improves the effects of combustion optimization and NOx emission control.
Smart Images

Figure CN116227663B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of flue gas denitrification in coal-fired thermal power plants, and specifically relates to a real-time prediction method for nitrogen oxide concentration in a flue gas system of a thermal power plant based on random forest. Background Art
[0002] Various pollutants produced by coal combustion, such as nitrogen oxides and sulfides, are important sources of atmospheric pollutants. my country has a strict regulation on nitrogen oxides (NO x ) emission control standards are becoming stricter. At present, most domestic coal-fired power plants use selective catalytic reduction (SCR) flue gas denitrification systems to achieve NO x However, due to the changes in the operating conditions of the power plant and the lag of instrument measurement data, the control of the ammonia injection system lags behind the controlled variable, making it difficult to ensure the optimal ammonia-nitrogen ratio, which will affect NO x emissions and safe operation of boilers.
[0003] Establish accurate NO x The concentration advance prediction model is crucial. At present, most power plants are equipped with distributed control systems (DCS) and supervisory information systems (SISs) that can record the real-time operation data of thermal power plants. Based on the real-time operation data of thermal power plants, a data-driven approach is used to establish NO x The concentration prediction model does not require complex mechanistic knowledge and has good accuracy.
[0004] The control system of a thermal power plant stores a massive amount of historical data. These historical data are often high-dimensional and contain a large amount of redundant information. On the one hand, this redundant information will affect the accuracy of the model, and on the other hand, it will also lead to an increase in computing costs. How to discover effective information from historical data has become a problem that needs to be solved in data processing.
[0005] Establish fast and accurate NO through feature screening and data modeling x The concentration prediction model can realize NO x Concentration warning and advance adjustment of ammonia injection amount are effective in reducing NO x It is of great significance to the emission volume and safe operation of boilers. Summary of the invention
[0006] In view of the problems that there are many variables in actual industrial data, variable selection is difficult, data redundancy is high during modeling, there are many irrelevant variables, and a single model modeling is difficult to provide a model with good robustness and robustness, the present invention proposes a real-time prediction method for nitrogen oxide concentration in the flue gas system of a thermal power plant based on random forest. The method has a reasonable design, solves the shortcomings of the existing technology, and has good results.
[0007] In order to achieve the purpose of the invention, the following technical solutions are adopted:
[0008] A real-time prediction method for nitrogen oxide concentration in flue gas system of thermal power plant based on random forest comprises the following steps:
[0009] Step 1: Obtain the historical operation data set of the boiler flue gas system of the thermal power plant and remove abnormal samples in the data set, including null values and wild points, to achieve data standardization;
[0010] Step 2: According to the maximum information coefficient and random forest variable importance, filter out NO in the data set x The optimal input variables of the emission concentration real-time prediction model and the construction of the optimal variable data set;
[0011] Step 3: Based on the optimal variable data set, the random forest regression algorithm is used to establish NO x Real-time prediction model of emission concentration, adjustment of model parameters and online deployment.
[0012] Furthermore, the step 1 specifically includes:
[0013] Obtain the historical operation data set D(X,Y)={X1,X2,X3,...,X m ,Y}, a total of n samples, m process variables, Y is NO x Concentration, the original process variables in the data set are standardized using Min-Max to compress the value range of the process variables between 0 and 1, and the training set and the test set are divided;
[0014] The normalization formula is as follows:
[0015]
[0016] Among them, x normalization is the normalized value of sample data x, x max and x min The variables X m The maximum and minimum values of .
[0017] Furthermore, the step 2 specifically includes the following sub-steps:
[0018] Step 2.1: Calculate the process variables and NO in the training set x Maximum information coefficient between concentrations;
[0019] Step 2.2: Set the threshold v according to the maximum information coefficient value mic , delete the training set with NO x Process variables with very weak concentration dependence can be used to achieve preliminary screening of variables and construct a variable subset S;
[0020] Step 2.3: Use the random forest algorithm to train the variable subset S selected in step 2.2 and calculate the generalization accuracy of out-of-bag samples;
[0021] Step 2.4: threshold v mic Perform iterative updates and use this to determine the variable subset S mic Selection of
[0022] Step 2.5: Use variable subset S mic Train the random forest model and calculate the importance of each process variable;
[0023] Step 2.6: Set the threshold v according to the importance of each process variable RF , delete the variable subset S mic The process variables with extremely low importance are selected again to construct the corresponding variable subset S mic ';
[0024] Step 2.7: Substitute the variable subset S selected in step 2.6 mic 'Use the random forest algorithm for training and calculate the generalization accuracy of out-of-bag samples;
[0025] Step 2.8: threshold v RF Perform iterative updates and use this to determine the optimal variable set S RF Selection.
[0026] Furthermore, the step 2.1 specifically includes:
[0027] The mutual information I(X,Y) of two random variables X and Y is:
[0028]
[0029] Where p(x,y) is the joint probability distribution function of random variables X and Y, and p(x) and p(y) are the marginal probability distribution functions of random variables X and Y respectively;
[0030] The maximum information coefficient calculation formula is as follows:
[0031]
[0032] Among them, I*(D,x,y) is the maximum mutual information under xy grid division, B(n) is the upper limit of the number of grids, and n is the number of features.
[0033] Furthermore, the step 2.2 specifically includes:
[0034] Set the threshold v mic The minimum value of the maximum information coefficient MIC is obtained by deleting the training set with NOx For variables with extremely weak concentration dependence, process variables with MIC values greater than the threshold are screened into the variable subset S to achieve preliminary screening of variables.
[0035] Furthermore, the steps 2.3 and 2.7 specifically include:
[0036] In the random forest, for each node of the base decision tree, first select the variable subsets S and S mic 'A subset of variables is randomly selected, and then an optimal attribute is selected from this subset to divide the nodes; the CART algorithm is used to minimize the cost function, that is, to divide the nodes in a way that minimizes the mean square error MSE:
[0037]
[0038] Among them, m node is the total number of samples of the current node, y, are the sample target variable of the current node and its mean, respectively.
[0039] For a single variable k and split point t k , the CART regression cost function is as follows:
[0040]
[0041] Among them, m left 、m right , m are the number of training samples of the left child node after segmentation, the number of training samples of the right child node, and the number of all training samples of the current node, respectively. left , MSE right They are the mean square error of the left child node and the mean square error of the right child node after segmentation;
[0042] When training each decision tree, the bootstrap repeated sampling method is used to train the variable subsets S and S mic 'Perform repeated random sampling with replacement to obtain several subsets as training sets for generating random forest models. Each subset trains a base decision tree model. The final prediction result of the random forest model is the mean of the prediction results of all base decision trees.
[0043] Assume that the variable subset S or S mic 'The size is N. Each time a sample is drawn, the probability of each sample being selected is Repeating random sampling with replacement N times, the probability p that a sample has never been selected is:
[0044]
[0045] When N is large enough,
[0046]
[0047] For each decision tree, there will eventually be about 36.8% of training instances that have not been sampled, called out-of-bag samples; use the out-of-bag samples as the validation set to calculate the generalization accuracy of the random forest model.
[0048] Furthermore, the step 2.4 specifically includes:
[0049] Step 2.4.1, within the range of the maximum information coefficient value calculated in step 2.1, appropriately adjust the maximum information coefficient threshold v, select the process variables greater than the threshold in the variable subset S as the variable subset S', use the variable subset S' to train the random forest model, and calculate the out-of-bag sample generalization accuracy;
[0050] Step 2.4.2: If the generalization accuracy of the corresponding out-of-bag samples is improved under the threshold v in step 2.4.1, update the threshold v. mic =v, when the threshold v mic Stop updating when the generalization accuracy of out-of-bag samples is the highest;
[0051] Step 2.4.3: Set the MIC value in S' to be greater than the threshold v mic The process variables are selected as variable subset S mic .
[0052] Furthermore, the step 2.5 specifically includes:
[0053] The importance of a feature is calculated by combining the proportion of samples contributed by the feature with the reduction of impurity produced during segmentation. i The importance of a node k is:
[0054] VIM k =ω k *G k -ω left *G left -ω right *G right (7)
[0055] Among them, ω k ,ω left ,ω right are the ratio of the number of training samples in node k and its left and right child nodes to the total number of training samples, G k , G left , G right are the impurities of node k and its left and right child nodes respectively. The impurity is the mean square error (MSE). After calculating the importance of a node, a feature f is calculated by formula (8): iImportance of i-importance :
[0056]
[0057] The feature importance is normalized by formula (9) to obtain the variable importance value:
[0058]
[0059] Furthermore, the step 2.6 specifically includes:
[0060] Set the threshold v RF Delete the variable subset S, which is the minimum value of the variable importance value calculated in step 2.5. mic Variables with extremely low importance in the variable subset S are selected to filter the process variables with variable importance values greater than the threshold into a new variable subset S mic ', realize the re-screening of variables.
[0061] Furthermore, the step 2.8 specifically includes:
[0062] Step 2.8.1: Within the variable importance range calculated in step 2.5, adjust the variable importance threshold v appropriately and set the variable subset S mic 'The process variables that are larger than the threshold are selected as a new variable subset, and the random forest model is trained with this variable subset to calculate the generalization accuracy of out-of-bag samples;
[0063] Step 2.8.2: If the generalization accuracy of the corresponding out-of-bag samples is improved under the threshold v in step 2.8.1, update the threshold v. RF =v, when the threshold v RF Stop updating when the generalization accuracy of out-of-bag samples is the highest;
[0064] Step 2.8.3: Subset variable S mic 'The importance value of the variable is greater than the threshold v RF The process variables are selected as the optimal variable subset S RF .
[0065] Furthermore, the step 3 specifically includes:
[0066] Use the optimal feature subset S RF Reconstruct the random forest regression model, that is, NO x The real-time prediction model of emission concentration obtains the online data set, normalizes the online data set, and uses it as the input of the random forest regression model to obtain the prediction results and deploy it online.
[0067] Beneficial technical effects brought by the present invention:
[0068] The present invention provides a real-time prediction method for nitrogen oxide concentration in flue gas system of thermal power plant based on random forest, which mainly includes optimal process variable screening and establishing random forest NOx emission concentration real-time prediction model. Through variable screening, high-dimensional historical operation data of flue gas system of coal-fired thermal power plant is effectively reduced in dimension, redundant variables and irrelevant variables are eliminated, and the optimal variable set for modeling is obtained, which can reduce the calculation cost and improve the prediction accuracy and generalization performance of the model. The real-time prediction model for NOx emission concentration is established by using random forest algorithm, which can reduce the influence of hysteresis in the detection of continuous monitoring system of flue gas emission, and provide a model basis for combustion optimization and advanced regulation of ammonia injection. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 It is a specific flow chart of the method of the present invention;
[0070] Figure 2 This is a partial test effect diagram of the method of the present invention on a historical operation data set of a coal-fired thermal power plant; DETAILED DESCRIPTION
[0071] The specific implementation of the present invention is further described below in conjunction with specific embodiments:
[0072] The present invention provides a real-time prediction method for nitrogen oxide concentration in flue gas system of thermal power plant based on random forest. After obtaining the historical operation data set of flue gas system of coal-fired thermal power plant, NO is screened out by combining the maximum information coefficient with the variable screening algorithm of random forest. x The optimal input variables of the real-time prediction model of emission concentration are selected; after selecting the optimal input variables, the random forest algorithm is used to establish the NO x The emission concentration real-time prediction model is built. After the model is built, the operation data of the flue gas system of the thermal power plant is collected online, and the data is input into the model after data processing. After online analysis, NO x Predicted values of emission concentrations.
[0073] like Figure 1 As shown, the method specifically comprises the following steps:
[0074] Step 1: Obtain the historical operation data set of the boiler flue gas system of the thermal power plant and remove abnormal samples in the data set, including null values and wild points, to achieve data standardization;
[0075] Obtain the historical operation data set D(X,Y)={X1,X2,X3,...,X m ,Y}, a total of m process variables, including primary air volume, secondary air volume, main steam temperature, etc., but not limited to these, each process variable X includes n sample data, Y is NO xIn order to eliminate the impact of dimensional differences between process variables, the original process variables are standardized. For sample data x, the standardized formula is as follows:
[0076]
[0077] Among them, x normalization is the normalized value of sample data x, x max and x min The variables X m The maximum and minimum values of .
[0078] Step 2: According to the maximum information coefficient and random forest variable importance, filter out NO in the data set x The optimal input variables of the emission concentration real-time prediction model and the construction of the optimal variable data set;
[0079] Step 2 specifically includes the following sub-steps:
[0080] Step 2.1: Calculate the process variables X1, X2, X3, ..., X m with NO x The maximum information coefficient between concentrations Y;
[0081] Among them, the calculation of the maximum information coefficient requires mutual information, which is used to measure the strength of the correlation between two random variables. The mutual information I(X,Y) of two random variables X and Y is:
[0082]
[0083] Where p(x,y) is the joint probability distribution function of process variables X and Y, and p(x) and p(y) are the marginal probability distribution functions of process variables X and Y respectively;
[0084] The maximum information coefficient is mainly used to measure the degree of correlation between two variables X and Y, linear or nonlinear strength. The basic principle of the maximum information coefficient uses the concept of mutual information, but it has higher accuracy than mutual information. The maximum information coefficient calculation formula is as follows:
[0085]
[0086] Where I*(D,x,y) is the maximum mutual information under the xy grid division, B(n) is the upper limit of the number of grids, and n is the number of features. In this embodiment, B(n)=n 0.6 .
[0087] The maximum information coefficient (MIC) value between each variable and the label in the training set is calculated by formula (3). The value range of MIC is between [0,1]. The larger the MIC value, the stronger the correlation between the variable and the label, and the more important the variable; the smaller the MIC value, the weaker the correlation between the variable and the label, and the less important the variable.
[0088] Step 2.2: Set the threshold v according to the maximum information coefficient value mic , delete the training set with NO x Process variables with very weak concentration dependence can be used to achieve preliminary screening of variables and construct a variable subset S;
[0089] Set the threshold v according to the MIC value calculated in step 2.1 mic , the threshold is the minimum value of MIC, and the training set with NO is deleted x For variables with extremely weak concentration dependence, process variables with MIC values greater than the threshold are screened into the variable subset S to achieve preliminary screening of variables.
[0090] Step 2.3: Use the random forest algorithm to train the variable subset S selected in step 2.2 and calculate the generalization accuracy of out-of-bag samples;
[0091] A random forest regression model is constructed with the variable subset S constructed in step 2.2, and the out-of-bag samples are used as the validation set to calculate the generalization accuracy of the random forest model.
[0092] Among them, the specific steps of building a random forest regression model are as follows:
[0093] (1) Using the bootstrap method, N samples are extracted from the variable subset S with replacement in each round, and a total of q rounds of extraction are performed to obtain q subsets as the training set for each base decision tree;
[0094] Assuming the size of the variable subset is N, each time sampling, the probability of each sample being selected is The probability p that a sample has never been selected is:
[0095]
[0096] When N is large enough,
[0097]
[0098] For each decision tree, there will eventually be about 36.8% of training instances that have not been sampled, called out-of-bag samples; use the out-of-bag samples as the validation set to calculate the generalization accuracy of the random forest model.
[0099] (2) Using the decision tree algorithm, a base decision tree model is trained for each subset, and a total of q base decision tree models are obtained. The final prediction result of each decision tree is the mean of the leaf node where the sample point is located;
[0100] Use the CART algorithm to minimize the cost function, that is, to divide the nodes in a way that minimizes the mean square error MSE:
[0101]
[0102] Among them, m node is the total number of samples of the current node, y, are the sample target variable of the current node and its mean, respectively.
[0103] For a single variable k and split point t k , the CART regression cost function is as follows:
[0104]
[0105] Among them, m left 、m right , m are the number of training samples of the left child node after segmentation, the number of training samples of the right child node, and the number of all training samples of the current node, respectively. left , MSE right They are the mean square error of the left child node and the mean square error of the right child node after segmentation;
[0106] When constructing the base decision tree, starting from the root node, for the existing variables of the current node, recursively calculate the CART regression cost of the current node for each variable and any split point, select the optimal variable and optimal split point for the current node, and perform node splitting. The conditions for stopping node splitting are:
[0107] ①The depth of the decision tree reaches the specified threshold;
[0108] ②The number of sample subsets is less than the minimum number of leaf nodes;
[0109] ③The minimum cost function is less than the threshold;
[0110] (3) The final prediction result of the random forest model is the mean of the prediction results of all base decision trees.
[0111] Step 2.4: threshold v mic Perform iterative updates and use this to determine the variable subset S mic Selection of
[0112] Step 2.4.1, within the range of the maximum information coefficient value calculated in step 2.1, appropriately adjust the maximum information coefficient threshold v, select the process variables greater than the threshold in the variable subset S as the variable subset S', use the variable subset S' to train the random forest model, and calculate the out-of-bag sample generalization accuracy;
[0113] Step 2.4.2: If the generalization accuracy of the corresponding out-of-bag samples is improved under the threshold v in step 2.4.1, update the threshold v. mic =v, when the threshold v mic When the out-of-bag sample generalization accuracy is the highest, that is, the out-of-bag error is the smallest, stop updating;
[0114] Step 2.4.3: select the variable subset S' whose MIC value is greater than the threshold v mic The process variables are selected as variable subset S mic .
[0115] Step 2.5: Use variable subset S mic Train the random forest model and calculate the importance of each process variable;
[0116] Feature importance is used to indicate the degree of influence of a feature on the prediction result. The higher the feature importance, the greater the impact on the performance of the model. In random forest, the proportion of samples contributed by the feature is combined with the reduction of impurity generated during segmentation to calculate the importance of a feature. i The importance of a node k is:
[0117] VIM k =ω k *G k -ω left *G left -ω right *G right (7)
[0118] Among them, ω k ,ω left ,ω right are the ratio of the number of training samples in node k and its left and right child nodes to the total number of training samples, G k , G left , G right , are the impurities of node k and its left and right child nodes respectively, and the impurity is the mean square error MSE; after calculating the importance of a certain node, a certain feature f is calculated by formula (8) i Importance of i-importance :
[0119]
[0120] The feature importance is normalized by formula (9) to obtain the variable importance value:
[0121]
[0122] Step 2.6: Set the threshold v according to the importance of each process variable RF , delete the variable subset S mic The process variables with extremely low importance are selected again to construct the corresponding variable subset S mic ';
[0123] According to the variable importance value calculated in step 2.5, set the threshold v RF For the minimum value of the variable importance value, delete the variable subset S mic Variables with extremely low importance in the variable subset S are selected to filter the process variables with variable importance greater than the threshold into the new variable subset S mic ', to achieve the re-screening of variables.
[0124] Step 2.7: Substitute the variable subset S selected in step 2.6 mic 'Use the random forest algorithm for training and calculate the generalization accuracy of out-of-bag samples; the specific steps are the same as step 2.3, except that the variable subset is S mic ', the rest of the content will not be repeated.
[0125] Step 2.8: threshold v RF Perform iterative updates and use this to determine the optimal variable set S RF Selection of
[0126] Step 2.8 includes the following sub-steps:
[0127] Step 2.8.1: Within the variable importance range calculated in step 2.5, adjust the variable importance threshold v appropriately and set the variable subset S mic 'The process variables that are larger than the threshold are selected as a new variable subset, and the random forest model is trained with this variable subset to calculate the generalization accuracy of out-of-bag samples;
[0128] Step 2.8.2: If the generalization accuracy of the corresponding out-of-bag samples is improved under the threshold v in step 2.8.1, update the threshold v. RF =v, when the threshold v RF When the out-of-bag sample generalization accuracy is the highest, that is, the out-of-bag error is the smallest, stop updating;
[0129] Step 2.8.3: Subset variable S mic 'The importance value of the variable is greater than the threshold v RF The process variables are selected as the optimal variable subset S RF.
[0130] Step 3: Based on the optimal variable data set, the random forest regression algorithm is used to rebuild the random forest regression model, adjust the model parameters and deploy it online.
[0131] Use the optimal feature subset S in the training set RF Reconstruct the random forest regression model, that is, NO x The real-time prediction model of emission concentration obtains the online data set, normalizes the online data set, uses it as the input of the random forest regression model, obtains the prediction results, and deploys it online.
[0132] Experimental verification:
[0133] The experimental data used are the historical operation data of the flue gas system of the No. 2 unit of a domestic coal-fired thermal power plant. There are 51,840 groups in total, with a sampling period of 1 second, including 429 groups of characteristic variables such as boiler load, primary air volume, secondary air volume, total coal volume, main steam temperature, etc., and there are multiple correlations between the variables. Label Y is the NO at the economizer outlet. x Emission concentration (mg / m 3 ).
[0134] According to the actual operation sampling cycle of the coal-fired unit, a 20s resampling cycle is set to resample the original data. The data set obtained by the first resampling is used as the test set. After the original data is removed from the test set, a resampling cycle of 20s is performed again. The data set obtained by the second resampling is used as the training set. The effectiveness of the method described in the present invention is verified on the new data set. The variable subset S is obtained using the original feature set and the method described in the present invention respectively. mic and the optimal feature subset S RF The model is built and the root mean square error is used as the evaluation index of the model. The statistical results of the number of variables in the variable set and the generalization performance of the model on the test set are shown in Table 1.
[0135] Table 1 The number of different set variables and the accuracy of the constructed random forest regression model
[0136] Original variable collection <![CDATA[Variable subset S mic > <![CDATA[Optimal feature subset S RF > Number of variables 429 400 47 Test set root mean square error 6.259 6.221 5.535
[0137] As can be seen from Table 1, this method reduces the original input feature dimension from 429 to 47, which can effectively screen feature variables, reduce the computational cost of the model, and also greatly improve the generalization accuracy of the model, indicating the reliability of the method of the present invention. Figure 2 It can be seen that the test effect of the method of the present invention is good.
[0138] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the essential scope of the present invention should also fall within the protection scope of the present invention.
Claims
1. A real-time prediction method for nitrogen oxide concentration in flue gas system of thermal power plant based on random forest, characterized in that: The steps include: Step 1: Obtain the historical operation data set of the flue gas system of the thermal power plant boiler. The historical operation data set includes primary air volume, secondary air volume, and main steam temperature. Remove abnormal samples in the data set. The abnormal samples include null values and wild points to achieve data standardization. Step 2: According to the maximum information coefficient and random forest variable importance, filter out NO in the data set x The optimal input variables of the emission concentration real-time prediction model and the construction of the optimal variable data set; Step 3: Based on the optimal variable data set, the random forest regression algorithm is used to establish NO x Real-time prediction model for emission concentration, setting model parameters and online deployment; The step 2 specifically includes the following sub-steps: Step 2.1: Calculate the process variables and NO in the training set x Maximum information coefficient between concentrations; Step 2.2: Set the threshold v according to the maximum information coefficient value mic , delete the training set with NO x Process variables with very weak concentration dependence can be used to achieve preliminary screening of variables and construct a variable subset S; Step 2.3: Use the random forest algorithm to train the variable subset S selected in step 2.2 and calculate the generalization accuracy of out-of-bag samples; Step 2.4: threshold v mic Perform iterative updates and use this to determine the variable subset S mic Selection of Step 2.5: Use variable subset S mic Train the random forest model and calculate the importance of each process variable; Step 2.6: Set the threshold v according to the importance of each process variable RF , delete the variable subset S mic The process variables with extremely low importance are selected again to construct the corresponding variable subset S mic '; Step 2.7: Substitute the variable subset S selected in step 2.6 mic 'Use the random forest algorithm for training and calculate the generalization accuracy of out-of-bag samples; Step 2.8: threshold v RF Perform iterative updates and use this to determine the optimal variable set S RF Selection of The step 2.1 specifically includes: The mutual information I(X,Y) of two random variables X and Y is: Where p(x,y) is the joint probability distribution function of random variables X and Y, and p(x) and p(y) are the marginal probability distribution functions of random variables X and Y respectively; The maximum information coefficient calculation formula is as follows: Among them, I*(D,x,y) is the maximum mutual information under the xy grid division, B(n) is the upper limit of the number of grids, and n is the number of features; The step 2.2 specifically includes: Set the threshold v mic The minimum value of the maximum information coefficient MIC is obtained by deleting the training set with NO x For variables with very weak concentration dependence, process variables with MIC values greater than the threshold are screened into the variable subset S to achieve preliminary screening of variables; The steps 2.3 and 2.7 specifically include: In the random forest, for each node of the base decision tree, first select the variable subsets S and S mic 'A subset of variables is randomly selected, and then an optimal attribute is selected from this subset to divide the nodes; the CART algorithm is used to minimize the cost function, that is, to divide the nodes in a way that minimizes the mean square error MSE: Among them, m node is the total number of samples of the current node, y, are the sample target variables and their means of the current node respectively; For a single variable k and split point t k , the CART regression cost function is as follows: Among them, m left 、m right , m are the number of training samples of the left child node after segmentation, the number of training samples of the right child node, and the number of all training samples of the current node, respectively. left , MSE right They are the mean square error of the left child node and the mean square error of the right child node after segmentation; When training each decision tree, the bootstrap repeated sampling method is used to train the variable subsets S and S mic 'Perform repeated random sampling with replacement to obtain several subsets as training sets for generating random forest models. Each subset trains a base decision tree model. The final prediction result of the random forest model is the mean of the prediction results of all base decision trees. Assume that the variable subset S or S mic 'The size is N. Each time a sample is drawn, the probability of each sample being selected is Repeating random sampling with replacement N times, the probability p that a sample has never been selected is: When N is large enough, For each decision tree, there will be 36.8% of training instances that have not been sampled, called out-of-bag samples. Use the out-of-bag samples as the validation set to calculate the generalization accuracy of the random forest model. The step 2.4 specifically includes: Step 2.4.1, within the range of the maximum information coefficient value calculated in step 2.1, appropriately adjust the maximum information coefficient threshold v, select the process variables greater than the threshold in the variable subset S as the variable subset S', use the variable subset S' to train the random forest model, and calculate the out-of-bag sample generalization accuracy; Step 2.4.2: If the generalization accuracy of the corresponding out-of-bag samples is improved under the threshold v in step 2.4.1, update the threshold v. mic =v, when the threshold v mic Stop updating when the generalization accuracy of out-of-bag samples is the highest; Step 2.4.3: select the variable subset S' whose MIC value is greater than the threshold v mic The process variables are selected as variable subset S mic ; In step 2.5, the importance of a feature is calculated by combining the proportion of samples contributed by the feature with the reduction of impurity produced during segmentation. i The importance of a node k is: VIM k =ω k *G k -oh left *G left -oh right *G right (7) Among them, ω k ,ω left ,ω right are the ratio of the number of training samples in node k and its left and right child nodes to the total number of training samples, G k , G left , G right are the impurities of node k and its left and right child nodes respectively, and the impurity is the mean square error (MSE). After calculating the importance of a node, a feature f is calculated by formula (8): i Importance of i-importance : The feature importance is normalized by formula (9) to obtain the variable importance value: The step 2.6 specifically includes: Set the threshold v RF Delete the variable subset S, which is the minimum value of the variable importance value calculated in step 2.
5. mic Variables with extremely low importance in the variable subset S are selected to filter the process variables with variable importance values greater than the threshold into a new variable subset S mic ', realize the re-screening of variables; The step 2.8 specifically includes: Step 2.8.1: Within the variable importance range calculated in step 2.5, adjust the variable importance threshold v appropriately and set the variable subset S mic 'The process variables that are larger than the threshold are selected as a new variable subset, and the random forest model is trained with this variable subset to calculate the generalization accuracy of out-of-bag samples; Step 2.8.2: If the generalization accuracy of the corresponding out-of-bag samples is improved under the threshold v in step 2.8.1, update the threshold v. RF =v, when the threshold v RF Stop updating when the generalization accuracy of out-of-bag samples is the highest; Step 2.8.3: Subset variable S mic 'The importance value of the variable is greater than the threshold v RF The process variables are selected as the optimal variable subset S RF .
2. The method for real-time prediction of nitrogen oxide concentration in flue gas system of thermal power plant based on random forest according to claim 1 is characterized in that: The step 1 specifically includes: Obtain the historical operation data set D(X,Y)={X1,X2,X3,...,X m ,Y}, there are m process variables in total, each process variable includes n sample data, Y is NO x Concentration, the original process variables in the data set are standardized using Min-Max to compress the value range of the process variables between 0 and 1, and the training set and the test set are divided; The normalization formula is as follows: Among them, x normalization is the normalized value of sample data x, x max and x min The process variables X m The maximum and minimum values of .
3. The method for real-time prediction of nitrogen oxide concentration in flue gas system of thermal power plant based on random forest according to claim 2 is characterized in that: The step 3 specifically includes: Use the optimal feature subset S RF Reconstruct the random forest regression model, that is, NO x The real-time prediction model of emission concentration obtains the online data set, normalizes the online data set, and uses it as the input of the random forest regression model to obtain the prediction results and deploy it online.
