A coking diagnosis method based on a Bayesian t-distribution mixture regression model
Through Bayesian t-distribution hybrid regression model and variation Bayesian method, the problem of insufficient model accuracy and robustness in coking diagnosis of ethylene cracking furnace is solved, and efficient coking diagnosis under complex data is achieved, which improves the adaptability and computing efficiency of the model.
Patent Information
- Application Number
- CN202311035357.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-16
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2043-08-16
AI Technical Summary
In the prior art, in the coking diagnosis of ethylene cracking furnaces, the accuracy and robustness of the model are insufficient, especially under the characteristics of multimodal, nonlinear and non-Gaussian, it is difficult to effectively deal with noise influence.
A Bayesian t-distribution hybrid regression model is adopted, combining the variational Bayesian method and discrete binary indicator variables, and a robust model variable is constructed. By training and predicting the coking state of the furnace tube, the Stirling formula is used to simplify the calculation of the degree of freedom parameter, and a predetermined end threshold is set to improve the model training efficiency.
It improves the accuracy and stability of the model in a noisy environment, simplifies the computational complexity, enhances the adaptability and clustering capabilities under complex data sets, and improves the accuracy and efficiency of coking diagnosis.
Smart Images

Figure CN117216723B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ethylene pyrolysis analysis, and more specifically, to a coking diagnosis method based on a Bayesian t-distribution mixture regression model. Background Art
[0002] Ethylene pyrolysis furnaces are key equipment in steam cracking production. The production capacity and technology level of pyrolysis furnaces directly determine the production scale, output, and product quality of the entire ethylene plant. Due to the particularity of hydrocarbon pyrolysis raw materials, coke particles will inevitably form and adhere to the inner wall of the furnace tubes during pyrolysis reactions at high temperatures, which is called furnace tube coking. Furnace tube coking is very harmful to ethylene production. It will reduce energy efficiency and the economic benefits of ethylene production at least, and even induce catastrophic accidents in severe cases. Therefore, it is of great significance to accurately predict the coking degree of furnace tubes in the industrial production process.
[0003] At present, the methods for coking diagnosis of ethylene pyrolysis furnaces mainly include two categories: soft measurement of coking diagnosis based on coking mechanism models and soft measurement of coking diagnosis based on data-driven. The coking diagnosis based on mechanism models started earlier, but there are problems that the accuracy of coking inference of the model is not high due to the difficulty in accurately obtaining the parameters of some important mechanism models. The soft measurement of coking diagnosis based on data-driven solves this problem. The available pyrolysis process parameters are used as input variables of artificial intelligence algorithms, and the relationship with coking thickness is obtained through feature extraction and modeling. The most widely used among them is the artificial neural network support vector machine to complete the recognition of working conditions, and a stochastic distribution system model of furnace tube outlet temperature is established, laying a foundation for the advanced stochastic distribution control of COT in the decoking process of ethylene pyrolysis furnaces. When modeling the data of pyrolysis furnaces, due to the characteristics of multi-modal, non-linear, and non-Gaussian of pyrolysis furnaces, the modeling method based on mixture models can well solve this problem, and the Gaussian mixture model (GMM) has been widely used. Based on the Gaussian mixture model (GMM), the Gaussian mixture regression model (GMR) can complete the prediction of output variables. In practical problems, the operating data will be affected by noise, and due to the short tail of the Gaussian distribution, the robustness is poor, resulting in poor accuracy of the model. The t-distribution mixture model can better immunize outliers because of its wider tail of the t-distribution. Summary of the Invention
[0004] The present invention aims to overcome at least one defect of the above-mentioned prior art, and provides a coking diagnosis method based on a Bayesian t-distribution mixture regression model, which is used to provide a model with higher accuracy and robustness to diagnose the furnace tubes of ethylene pyrolysis furnaces.
[0005] The technical solution adopted by the present invention is:
[0006] A coking diagnosis method based on a Bayesian t-distribution mixture regression model, the method comprising:
[0007] Select data related to furnace tube coking as auxiliary variables, and the furnace tube coking situation as the dominant variable;
[0008] Collect historical data of furnace tubes based on the selected auxiliary variables and dominant variables to construct a sample set;
[0009] Preprocess the data in the sample set;
[0010] Construct a Bayesian t-distribution mixture regression model;
[0011] Input the preprocessed sample set into the Bayesian t-distribution mixture regression model, train the model according to the sample set and update the variational posterior distribution and free parameters to obtain a trained model;
[0012] After preprocessing the furnace tube coking-related data to be predicted, input it into the trained model to obtain a predicted output result;
[0013] Calculate the coking state of the furnace tube according to the predicted output result.
[0014] By adopting a mixture regression model, it can well match the multimodal, nonlinear and non-Gaussian characteristics of the cracking furnace; at the same time, by constructing the model in combination with the t-distribution method, it can well ensure that the model has high accuracy under the influence of noise; further, the variational Bayesian method is adopted to estimate the parameters of the model, combined with model learning, so that the model can better predict the coking situation of the cracking furnace.
[0015] Further, the preprocessing of the data in the sample set includes preprocessing the auxiliary variables in the sample set, and the specific steps are as follows:
[0016] Based on the auxiliary variables of the sample set Construct robust variables and discrete binary indicator variables , where N is the number of samples in the sample set;
[0017] where , , , M is the number of member components for mixing, represents the indicator that the nth sample in the auxiliary variable comes from the mth member component;
[0018] , represents the robust coefficient that the nth sample in the corresponding auxiliary variable comes from the mth member component.
[0019] By introducing discrete binary indicator variables, it is possible to better handle complex sample sets and data sets, capture the potential structures in the sample sets and data sets, realize the modeling of data clustering and distribution, and provide a more flexible and adaptable model, which improves the wider application of the mixture model in tasks such as clustering and anomaly detection. At the same time, by introducing robust variables, the mixture model can perform more stably in more complex data sets, be better adapted to the situation with outliers, and simplify the solution of the parameters of the Bayesian t-distribution mixture regression model.
[0020] Further, the construction of the Bayesian t-distribution mixture regression model includes:
[0021] Bayesianize the parameters of the Bayesian t-distribution mixture regression model, and construct model variables based on the Bayesianized parameters of the Bayesian t-distribution mixture regression model , the model variables include latent variables and parameter variables , expressed as ;
[0022] where the latent variables include indicator variables and robust variables , expressed as ;
[0023] The parameter variables include the parameters of the Bayesian t-distribution mixture regression model, expressed as , is the mixing coefficient, is the mean of the member components of the mixture, the precision of the member components of the mixture, is the regression coefficient of the auxiliary variable and the dominant variable, and is the precision of the Gaussian distribution.
[0024] Further, the construction of the Bayesian t-distribution mixture regression model also includes:
[0025] According to the model variables , calculate the log-likelihood of its posterior , expressed as:
[0026]
[0027] where in the formula is the relative entropy in information theory and satisfies , called divergence, representing the true posterior distribution and the approximate posterior The distance between; X is an auxiliary variable, and Y is a leading variable, and respectively represent probability calculation and posterior distribution calculation; if and only if at this time, ; so there is , is the evidence lower bound of; by sequentially taking variational of each variable of , the variational posterior of variable can be obtained.
[0028] Furthermore, the construction of the Bayesian t-distribution mixture regression model further includes:
[0029] Using the conjugate prior property of the exponential distribution, assign corresponding conjugate prior distributions to the parameters in parameter variable , specifically including:
[0030] ;
[0031] represents the conjugate prior distribution of the mixing coefficient , represents the Dirichlet distribution, represents the hyperparameter of the conjugate prior distribution;
[0032] ;
[0033] represents the precision of the member components of the mixture of the conjugate prior distribution, represents the precision of the m-th member component of the mixture, represents the Wishart distribution, and are respectively the degrees of freedom and scale matrix of the Wishart distribution;
[0034] ;
[0035] represents the conjugate prior distribution of the mean of the member components of the mixture, represents the mean of the m-th member component of the mixture, represents the Gaussian distribution, and are respectively the mean and precision parameter of the Gaussian distribution;
[0036] The conjugate prior distribution of the degrees of freedom parameter is obtained by maximizing the lower bound;
[0037] In the output space, when there is a linear relationship between the auxiliary variable X and the dominant variable Y under each mixture t-distribution component, i.e.:
[0038] ;
[0039] According to this formula, we get:
[0040] ;
[0041] where, is the regression coefficient between the dominant variable and the auxiliary variable , is the regression coefficient between the dominant variable and the auxiliary variable of the m-th mixture's member component, represents the measurement noise of the m-th mixture's member component, , is the precision parameter of the Gaussian prior distribution, is the precision parameter of the Gaussian prior distribution of the m-th mixture's member component;
[0042] Furthermore, the conjugate prior distribution of the regression coefficient between the dominant variable and the auxiliary variable under each mixture's member component is calculated as:
[0043] ;
[0044] where, , is the precision parameter of the Gaussian prior distribution of, is the identity matrix;
[0045] and the conjugate prior distributions of are respectively:
[0046] ;
[0047] ;
[0048] where, and , and are respectively and the hyperparameters of the conjugate prior distributions of, , , ;
[0049] The hierarchical representation of the joint distribution between the model variables is:
[0050] 。
[0051] By separately modeling the prior distributions of the mean and precision matrices, each parameter can be modeled more flexibly. This enables the appropriate prior distributions to be selected respectively according to the prior knowledge and data characteristics of different parameters, thereby better capturing the uncertainty of the parameters and the distribution of the data. At the same time, the computational complexity of the model can be reduced, and when the input variables are high-dimensional, the solution of the model can be greatly simplified.
[0052] Further, inputting the preprocessed sample set into the Bayesian t-distribution mixture regression model, training the model according to the sample set and updating the variational posterior distribution and free parameters to obtain the trained model, the specific steps include:
[0053] S51: Input the preprocessed dominant variable Y and auxiliary variable X, and set the hyperparameters of the Bayesian t-distribution mixture regression model and a predetermined end threshold ;
[0054] S52: Initialize the variational posterior distributions of the input dominant variable Y, auxiliary variable X, and the parameters of the Bayesian t-distribution mixture regression model;
[0055] S53: Set the number of iterative learning times K and perform iterative learning;
[0056] S54: Calculate the expectations of the indicator variable Z and the robust variable U;
[0057] S55: Calculate and update the variational posterior and degrees of freedom parameters of each mixture member component corresponding to the elements in the model variables in accordance with the expectations of the indicator variable Z and the robust variable U calculated in step S54; ;
[0058] S56: Determine whether the preset predetermined end threshold is satisfied. When the predetermined end threshold is satisfied, end the learning; otherwise, repeat steps S54 - S56 until K times of iterative learning are completed.
[0059] Further, calculating and updating the variational posterior and degrees of freedom parameters of each mixture member component corresponding to the elements in the model variables includes: ,
[0060] Traverse and calculate to update the variational posterior of each mixture member component corresponding to each element in the model variables: 、 、 、 、 、 、 and , and the degree-of-freedom parameter ;
[0061] wherein the degree-of-freedom parameter is calculated as follows:
[0062] The degree-of-freedom parameter is calculated using Stirling's formula:
[0063] ;
[0064] It is calculated that:
[0065] ;
[0066] Factorize each variational posterior distribution to obtain:
[0067] .
[0068] Using Stirling's formula avoids solving conventional non-linear equations, greatly simplifies the calculation of the degree-of-freedom parameter, and greatly improves the efficiency of model training.
[0069] Furthermore, in the k-th iteration, the update criterion conforms to the VBEM algorithm, specifically as follows:
[0070] VB-E step:
[0071]
[0072] VB-M step:
[0073]
[0074] In the formula, represents the expectation of the variational posterior with respect to the variable, k represents the current iteration number, represents the expectation under the condition t, represents the exponential function, represents positive correlation; the above formula means that in the VB-E step, fix the distribution of the parameter variable, and use the current estimate of the parameter variable to update the latent variable , and in the VB-M step, fix the latent variable , and use the latent variable to re-update the parameters of the parameter variable .
[0075] Furthermore, determining whether to meet a preset predetermined end threshold, and ending the learning when the predetermined end threshold is met, specifically includes:
[0076] Calculate the maximized evidence lower bound for the current iteration , and the maximized evidence lower bound for the previous iteration , when the following conditions are met:
[0077]
[0078] Then end the iterative learning. In the formula, is the predetermined end threshold.
[0079] Set the predetermined end threshold, and set the judgment condition based on the maximized evidence lower bound. When the judgment condition of the predetermined end threshold is met, it is judged that the model has converged at this time, and the training is ended in advance, which greatly improves the efficiency of model training.
[0080] Further, calculating the coking state of the furnace tube according to the predicted output result includes:
[0081] Obtain the prediction result through the trained Bayesian t-distribution mixture regression model ;
[0082] Perform the following calculation on the prediction result According to the following formula:
[0083]
[0084] In the formula, and represent the preset coking degree level values, represents the coking degree level calculated according to the prediction result ;
[0085] The above formula means that compare the prediction result with each coking level value for calculation, and obtain the predicted coking degree level that meets the formula conditions .
[0086] In order to more clearly express the coking situation of the furnace tube through the predicted output result, further calculation and processing are performed on the prediction result to obtain the level value of the coking degree, which better intuitively reflects the coking situation of the furnace tube.
[0087] Compared with the prior art, the beneficial effects of the present invention are:
[0088] 1. By constructing a Bayesian t-distribution mixture regression model, the present invention can well match the characteristics of multimodality, nonlinearity, and non-Gaussianity of the cracking furnace. The model based on the t-distribution can well ensure that the model still has high accuracy under the influence of noise. At the same time, the variational Bayesian method is adopted during modeling to Bayesianize the parameters of the model for parameter estimation. Specifically, by separately modeling the prior distributions of the mean and precision in the parameters, each parameter can be modeled more flexibly, so that a suitable prior distribution can be selected for different parameters, better capturing the uncertainty of the parameters and the distribution of the data, while reducing the computational complexity of the model, simplifying the solution of the model, and greatly improving the learning efficiency of the model.
[0089] 2. By introducing discrete binary indicator variables, the present invention can better process complex sample sets, capture the potential structure in the sample sets, realize the modeling of data clustering and distribution, and provide a more flexible and adaptable model, improving the wider application of the mixture model in tasks such as clustering and outlier detection. At the same time, by introducing robust variables, the mixture model can perform more stably in more complex data sets, better adapt to the situation with outliers, and simplify the solution of the parameters of the Bayesian t-distribution mixture regression model.
[0090] 3. The present invention uses Stirling's formula to solve the degrees of freedom parameter, avoiding the solution of conventional nonlinear equations, greatly simplifying the calculation of the degrees of freedom parameter, and greatly improving the efficiency of model training.
[0091] 4. By setting a predetermined end threshold and setting a judgment condition based on maximizing the evidence lower bound, when the judgment condition for the predetermined end threshold is met, it is judged that the model has converged at this time, and the training is ended in advance, greatly improving the efficiency of model training. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 is the step flow chart of the coking diagnosis method of the present invention.
[0093] Figure 2 is the training step flow chart of the Bayesian t-distribution mixture regression model of the present invention.
[0094] Figure 3 is the curve of the probability density function of the t-distribution varying with the degrees of freedom changing.
[0095] Figure 4 is the prediction result diagram of the PLSR model, GPR model, GMR model, and STMR model of Example 2 for industrial data. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0096] The accompanying drawings of the present invention are only for illustrative purposes and should not be construed as limiting the present invention. To better illustrate the following embodiments, some components in the drawings will be omitted, enlarged or reduced, which do not represent the dimensions of the actual product; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0097] Embodiment 1
[0098] For better explanation, the technical knowledge covered in this embodiment will be briefly described first. First, the probability density function of the t-distribution is:
[0099]
[0100] In the formula: is the mean, is the precision, is the degrees of freedom parameter, is the data dimension, represents the gamma function, represents the matrix transpose. The curve of the probability density function of the t-distribution changing with the degrees of freedom is as shown in Figure 3 . When the degrees of freedom parameter , the t-distribution in the formula converges to the Gaussian distribution.
[0101] Since it is difficult to obtain an analytical solution by directly performing maximum likelihood estimation on the t-distribution, the t-distribution is usually regarded as an infinite mixture of multiple Gaussian distributions with the same mean, that is:
[0102]
[0103] In the formula is the robust variable represents the probability density function of the Gaussian distribution, represents the probability density function of the gamma distribution, represents the inverse matrix.
[0104] Based on the above content, this embodiment provides a coking diagnosis method based on a Bayesian t-distribution mixture regression model
[0105] As shown in Figure 1 , the method includes:
[0106] S1: Select the data related to furnace tube coking as the auxiliary variable and the furnace tube coking situation as the dominant variable;
[0107] In this step, the data collected related to the coking of the furnace tubes may include: and / or the outlet temperature of the furnace tubes, and / or the inlet temperature of the furnace tubes, and / or the outer surface temperature of the furnace tubes, and / or the absolute pressure ratio, and / or the cross-section pressure, and / or the Venturi pressure; other relevant data may also be included, which can be specifically obtained by expert judgment; in a preferred embodiment, all the above data are selected as auxiliary variables;
[0108] Specifically, the auxiliary variable is denoted as , and the dominant variable is denoted as , where N is the number of samples, and the data dimension of the auxiliary variable is denoted as h;
[0109] The form of the Bayesian t-distribution mixture regression model includes:
[0110] In the output space, the auxiliary variable X is composed of M t-distributions mixed, and its probability density function is:
[0111]
[0112] In the formula, M is the number of member components for mixing, is the mixing coefficient, represents the prior probability value of the th member component, The limiting condition of is is the mean of the member components for mixing, represents the mean of the mth member component for mixing, is the precision of the member components for mixing, represents the precision of the mth member component for mixing, is the degrees of freedom parameter, represents the precision of the mth member component for mixing; represents the probability density function of the t-distribution.
[0113] S2: Based on the selected auxiliary variables and dominant variables, collect the historical data of the furnace tubes to construct a sample set;
[0114] The sample set includes a training set for training the Bayesian t-distribution mixture regression model and a test set for testing the Bayesian t-distribution mixture regression model;
[0115] S3: Preprocess the data in the sample set;
[0116] The preprocessing of the sample set includes normalizing the auxiliary variable X and the dominant variable Y. Among them, in order to facilitate subsequent variational processing, the preprocessing of the auxiliary variable X also includes: for the Construct discrete binary indicator variables and robust variables , where N is the number of samples in the sample set;
[0117] where , , , M is the number of member components for mixing, then represents the indicator that the nth sample in the auxiliary variable comes from the mth member component; when , it means that the corresponding is used as a mixing component for mixing, and conversely when , it means that the corresponding does not participate in mixing; , represents the robust coefficient that the corresponding auxiliary variable comes from the mth member component.
[0118] It should be particularly noted that each sample can only correspond to form one member component to participate in mixing. The mixing coefficient of each member component given above is used to characterize the weight of each member component of the t-distribution in the mixing model. Therefore, the conditional probability functions of the indicator variable Z and the robust variable U can be expressed as:
[0119] ;
[0120] ;
[0121] ;
[0122] ;
[0123] In the formula, represents the probability density function of the gamma distribution, represents the degree-of-freedom parameter corresponding to the mth member component.
[0124] S4: Construct a Bayesian t-distribution mixture regression model;
[0125] Specifically, constructing a Bayesian t-distribution mixture regression model includes two aspects:
[0126] On the one hand, the parameters of the model need to be set first. In this embodiment, the parameters of the Bayesian t-distribution mixture regression model are Bayesianized, and model variables are constructed based on the Bayesianized parameters of the Bayesian t-distribution mixture regression model. The model variables include latent variables and parameter variables , expressed as ;
[0127] Among them, the latent variables include the indicator variables and the robust variables , expressed as ;
[0128] The parameter variables include the parameters of the Bayesian t-distribution mixture regression model, expressed as , is the mixing coefficient, is the mean of the member components of the mixture, the precision of the member components of the mixture, is the regression coefficient of the auxiliary variable and the dominant variable, and is the precision of the Gaussian distribution.
[0129] On the other hand, a conjugate prior distribution is selected for the parameters of the Bayesian t-distribution mixture regression model. In this embodiment, the conjugate prior characteristics of the exponential distribution are used to select a specific prior distribution for the parameters of the Bayesian t-distribution mixture regression model in the above-mentioned parameter variables , specifically as follows:
[0130] Denote the corresponding probability calculation, then:
[0131] ;
[0132] Denote the conjugate prior distribution of the mixing coefficient , denote the Dirichlet distribution, denote the hyperparameters of the conjugate prior distribution;
[0133] ;
[0134] Denote the conjugate prior distribution of the precision of the member components of the mixture, denote the Wishart distribution, and are the degrees of freedom and scale matrix of the Wishart distribution respectively;
[0135] ;
[0136] It represents the conjugate prior distribution of the mean of the member components of the mixture, denote the Gaussian distribution, and are the mean and precision parameters of the Gaussian distribution respectively;
[0137] Degree-of-freedom parameter The conjugate prior distribution is calculated by maximizing the lower bound;
[0138] In the output space, when there is a linear relationship between the auxiliary variable X and the dominant variable Y under each mixture t-distribution component, i.e.:
[0139] ;
[0140] According to this formula, we get:
[0141] ;
[0142] where, is the dominant variable and the auxiliary variable is the regression coefficient between them, is the regression coefficient between the dominant variable and the auxiliary variable of the m-th member component of the mixture, represents the measurement noise of the m-th member component of the mixture, , is the precision parameter of the Gaussian prior distribution, is the precision parameter of the Gaussian prior distribution of the m-th member component of the mixture;
[0143] Furthermore, the conjugate prior distribution of the regression coefficient between the dominant variable and the auxiliary variable under each member component of the mixture is calculated:
[0144] ;
[0145] where, , is the precision parameter of the Gaussian prior distribution, is the identity matrix;
[0146] Since and are represented as the precision of the Gaussian distribution in the model, so and the conjugate prior distributions of are respectively:
[0147] ;
[0148] ;
[0149] where, and , and respectively and are the hyperparameters of the conjugate prior distribution, , , ;
[0150] The hierarchical representation of the joint distribution between the model variables is expressed as:
[0151] .
[0152] S5: Input the preprocessed sample set into the Bayesian t-distribution mixture regression model, train the model according to the sample set, and update the variational posterior distribution and free parameters to obtain a trained model;
[0153] Specifically, this step further includes the following steps:
[0154] S51: Input the preprocessed dominant variable Y and auxiliary variable X, and set the hyperparameters of the Bayesian t-distribution mixture regression model and a predetermined end threshold ;
[0155] S52: Initialize the variational posterior distributions of the input dominant variable Y, auxiliary variable X, and the parameters of the Bayesian t-distribution mixture regression model;
[0156] S53: Set the number of iterative learning times K and perform iterative learning;
[0157] S54: Calculate the expectations of the indicator variable Z and the robust variable U;
[0158] More specifically, in this step, the calculation of the expectations specifically includes:
[0159] Traverse and calculate each element in the indicator variable Z and the robust variable U. Specifically, traverse each element in the indicator variable Z and each element in the robust variable U , and then calculate the expectation of each and ;
[0160] The expectation of each element in the indicator variable Z is expressed as:
[0161] ;
[0162] where
[0163] In the formula, is the mixing coefficient, represents the prior probability value of the th member component, is the mean of the m-th mixture's member component, is the precision of the m-th mixture's member component, is the degrees of freedom parameter of the m-th mixture's member component, is the precision parameter of the Gaussian distribution of the m-th mixture's member component, is the dimension of the input data, is the gamma function, is the calculation formula of the mathematical expectation, represents the exponential function, represents pi;
[0164] Each element in the robust variable U has an expectation expressed as:
[0165] ;
[0166] where, , ;
[0167] Furthermore, we obtain ;
[0168] where is digamma function.
[0169] S55: Calculate and update the variational posterior and degrees of freedom parameter of each mixture's member component corresponding to the elements in the model variable according to the expectation of the indicator variable Z and the robust variable U calculated in step S54;
[0170] More specifically, in this step, calculating the variational posterior of each mixture's member component specifically includes:
[0171] Traverse and calculate the variational posterior of each mixture's member component corresponding to each element in the updated model variable: , , , , , , and ;
[0172] The specific form of
[0173] First, consider the approximate posterior , and the log-likelihood can be expressed as:
[0174]
[0175] where in the formula is the relative entropy in information theory and satisfies , which is called divergence, representing the distance between the true posterior distribution and the approximate posterior . and represent probability calculation and posterior distribution calculation respectively. If and only if , . So there is , is 's evidence lower bound. By taking variational on each variable of in turn, the variational posterior of the model variable can be obtained.
[0176] The variational posterior calculation formulas of each variable are as follows:
[0177] The posterior distribution of the indicator variable ; ;
[0178] In the formula, represents the exponential function, represents a proportional relationship;
[0179] The posterior distribution of the robustness coefficient U ;
[0180] In the formula, , , represents the gamma distribution;
[0181] The posterior distribution of the mixing coefficient is . In the formula, , ; represents 's conjugate prior distribution hyperparameter;
[0182] Calculated as:
[0183] ;
[0184] In the formula, is the calculation formula of the mathematical expectation, is digamma function;
[0185] The posterior distribution of the mean is . Further, , where:
[0186] ;
[0187] ;
[0188] and are the mean and precision parameters of the Gaussian distribution, respectively
[0189] It is calculated that:
[0190] ;
[0191] ;
[0192] Precision The posterior distribution of , furthermore, , where:
[0193] ;
[0194] ;
[0195] and are the degrees of freedom and scale matrix of the Wishart distribution, respectively;
[0196] It is calculated that:
[0197] ;
[0198] ;
[0199] Regression coefficient The posterior distribution of , furthermore, , where:
[0200] ;
[0201] ;
[0202] In the formula, represents the identity matrix;
[0203] It is calculated that:
[0204] ;
[0205] ;
[0206] The posterior distribution of , furthermore, , where:
[0207] ;
[0208] ;
[0209] and is the hyperparameter of the conjugate prior distribution of;
[0210] It is calculated that:
[0211] ;
[0212] ;
[0213] the posterior distribution of , furthermore, , where:
[0214] ;
[0215] ;
[0216] and is the hyperparameter of the conjugate prior distribution of
[0217] It is calculated that:
[0218] ;
[0219] ;
[0220] It can be obtained through the above formula calculation that each variable in the model variable is independent of each other, so the variational posterior distribution can be factorized, that is:
[0221] .
[0222] In this step, it also includes calculating the updater degrees of freedom parameter :
[0223] The degrees of freedom parameter Since there is no information on the prior distribution and in order to simplify the numerical calculation, in this embodiment, the Stirling formula is used to calculate the degrees of freedom parameter , and the specific formula is as follows:
[0224] ;
[0225] It is calculated that:
[0226] ;
[0227] The Stirling formula is used to calculate the degrees of freedom parameter , which greatly simplifies the complexity of calculating the degrees of freedom parameter and improves the calculation efficiency.
[0228] In each iterative learning, based on the above formula, the variational posterior of the Bayesian t-distribution mixture regression model parameters and the degrees of freedom parameter are updated. At the same time, in the k-th iteration, the update criterion conforms to the VBEM algorithm. The specific update criterion is as follows:
[0229] VB-E step:
[0230]
[0231] VB-M step:
[0232]
[0233] In the formula, denotes the expectation of the variational posterior with respect to the variable, k denotes the current iteration number, denotes the expectation under the condition t, denotes the calculation of the posterior distribution in the k-th iteration, denotes the exponential function, denotes positive correlation; the above formula means that in the VB-E step, fixing the distribution of the parameter variable, using the current estimate of the parameter variable to update the latent variable , and in the VB-M step, fixing the latent variable , and using the latent variable to re-update the parameters of the parameter variable .
[0234] S56: Determine whether the preset predetermined end threshold is satisfied. When the predetermined end threshold is satisfied, the learning ends; otherwise, repeat steps S54 - S56 until the K-th iterative learning is completed.
[0235] More specifically, in this step, the maximized evidence lower bound of the current iteration is calculated through the parameters updated in step S55 , combined with the maximized evidence lower bound of the previous iteration , and based on and to determine whether the preset predetermined end threshold is satisfied. The judgment formula is as follows:
[0236]
[0237] That is, when the judgment formula is satisfied, it can be determined that the model has converged, and then the iterative learning is terminated, reducing the number of redundant iterative learning times and improving the efficiency of iterative learning.
[0238] Among them, maximizing the evidence lower bound is calculated as:
[0239]
[0240] Where:
[0241]
[0242]
[0243]
[0244]
[0245]
[0246]
[0247]
[0248]
[0249]
[0250]
[0251]
[0252]
[0253]
[0254]
[0255]
[0256]
[0257]
[0258]
[0259] 。
[0260] S5: After preprocessing the data related to furnace tube coking that needs to be predicted, input it into the trained model to obtain the predicted output result;
[0261] This step specifically includes:
[0262] Preprocess the data related to the coking of the furnace tubes that need to be predicted ;
[0263] Calculate the posterior probability of the preprocessed as follows:
[0264]
[0265] In the formula, M is the number of member components for mixing, is the indicator variable for the , , , and are respectively the mixing coefficient, mean, precision, and degrees of freedom parameter of the m-th mixing member component of the , denotes the expectation calculation, denotes the t-distribution probability density function;
[0266] Calculate the conditional probability distribution of the coking situation of the furnace tubes that need to be predicted with respect to the as follows:
[0267]
[0268] In the formula, denotes the Gaussian distribution, and are the precision parameters of the Gaussian distribution of the m-th mixing member component, , denotes the m-th mixing member component of the n-th sample element in is the Gaussian prior distribution precision parameter of is the identity matrix, is the n-th element in
[0269] Finally, calculate the prediction result of the according to the following formula ;
[0270] ;
[0271] In the formula, , N is the number of sample elements in the , denotes the The nth sample element given in
[0272] S7: Calculate the coking state of the furnace tubes according to the predicted output result.
[0273] In this step, it specifically includes:
[0274] Take the said prediction result Use the following formula for calculation:
[0275]
[0276] In the formula, represents the coking degree level value, which can be expressed as , corresponding to normal, mild coking, moderate coking and severe coking of the coking levels, represents according to the prediction result The coking degree level calculated;
[0277] The above formula means that by traversing each coking level value Take the said prediction result Compare and calculate with each coking level value Assign the coking level value that meets the conditions to the predicted coking degree level .
[0278] Embodiment 2
[0279] This embodiment uses a coking diagnosis method based on a Bayesian t-distribution mixture regression model provided in Embodiment 1 to conduct a comparative experiment with other models; the experimental data of this embodiment is actually randomly collected from an industrial ethylene cracking device, and the outlet temperature of the furnace tubes, the inlet temperature of the furnace tubes, the outer surface temperature of the furnace tubes, the absolute pressure ratio, the cross-section pressure and the Venturi pressure are selected as auxiliary variables, and at the same time, the coking degree of the furnace tubes is set to four levels: normal, mild coking, moderate coking and severe coking.
[0280] This embodiment collects 5000 samples, among which the number of samples in the training set is 2000, and the number of samples in the prediction set is 3000. Using the root mean square error RMSE as an index, calculate the prediction accuracy of the STMR model constructed by the method based on Embodiment 1 and other models.
[0281] Such as Figure 4As shown in the figure, the prediction result diagrams of the PLSR model, GPR model, GMR model, and STMR model for industrial data are given. It can be seen from the figure that the prediction effect of the PLSR model is the worst, while the prediction effect of the STMR model is the best. At the same time, as shown in Table 1 below, compared with the other three models, the STMR model has the smallest RMSE value and the best model performance. The error distribution of the STMR model is reduced by 90.6%, 67.5%, and 62.8% compared with the PLSR model, GPR model, and GMR model, respectively. The main reason for this is that when dealing with experimental data containing noise, the STMR model is less affected and has better robustness.
[0282] Table 1 Prediction Results of the Models
[0283]
[0284] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solutions of the present invention, rather than limitations on the specific implementation manners of the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the claims of the present invention shall be included within the protection scope of the claims of the present invention.
Claims
1. A coking diagnosis method based on a Bayesian t-distribution mixture regression model, characterized in that The method includes: Selecting data related to furnace tube coking as auxiliary variables and the furnace tube coking condition as the dominant variable; Collecting historical data of furnace tubes based on the selected auxiliary variables and the dominant variable to construct a sample set; Preprocessing the data in the sample set; Constructing a Bayesian t-distribution mixture regression model; Inputting the preprocessed sample set into the Bayesian t-distribution mixture regression model, training the model according to the sample set, and updating the variational posterior distribution and free parameters to obtain a trained model; Preprocessing the furnace tube coking-related data to be predicted and then inputting it into the trained model to obtain a predicted output result; Calculating the coking state of the furnace tube according to the predicted output result; The constructing of the Bayesian t-distribution mixture regression model includes: Bayesianize the parameters of the Bayesian t-distribution mixture regression model, and construct model variables based on the Bayesianized parameters of the Bayesian t-distribution mixture regression model , the model variables include latent variables and parameter variables , denoted as ; where the latent variable includes an indicator variable and a robust variable , denoted as ; Parameter variable including the parameters of the Bayesian t-distribution mixture regression model, denoted as , is the mixing coefficient, is the mean of the member components of the mixture, the precision of the member components of the mixture, is the regression coefficient of the auxiliary variable and the dominant variable, and is the precision of the Gaussian distribution; Based on the model variables , calculate its posterior log-likelihood, expressed as: where is the relative entropy in information theory and satisfies , called divergence, representing the distance between the true posterior distribution and the approximate posterior ; X is the auxiliary variable, Y is the leading variable, and represent probability calculation and posterior distribution calculation respectively; if and only if , ; so there is , is the evidence lower bound of; by taking the variational of each variable of in turn, the variational posterior of the variable can be obtained; Using the conjugate prior property of the exponential distribution, assign the corresponding conjugate prior distribution to the parameter in the parameter variable .
2. The coking diagnosis method based on the Bayesian t-distribution mixture regression model according to claim 1, wherein The preprocessing of the data in the sample set includes preprocessing the auxiliary variables in the sample set, and the specific steps are as follows: Auxiliary variables based on the sample set Construct robust variables and discrete binary indicator variables , where N is the number of samples in the sample set; Among them , , , M is the number of member components for mixing, indicates the indicator that the nth sample in the auxiliary variable comes from the mth member component; , represents the robustness coefficient that the n-th sample in the corresponding auxiliary variable comes from the m-th member component.
3. A coking diagnosis method based on a Bayesian t-distribution mixture regression model according to claim 1, characterized in that, Using the conjugate prior property of the exponential distribution, a corresponding conjugate prior distribution is assigned to the parameter in the parameter variable as follows: ; Denotes the mixing coefficient of the conjugate prior distribution, denotes the Dirichlet distribution, denotes the hyperparameter of the conjugate prior distribution; ; Represents the precision of the member components of the mixture The conjugate prior distribution of Represents the precision of the member components of the m-th mixture Represents the Wishart distribution And Are the degrees of freedom and the scale matrix of the Wishart distribution, respectively ; Denote the mean of the member components of the mixture The conjugate prior distribution of Denote the mean of the member components of the m-th mixture Denote the Gaussian distribution And Are the mean and precision parameter of the Gaussian distribution respectively; Degree-of-freedom parameter The conjugate prior distribution is calculated by maximizing the lower bound; In the output space, when the auxiliary variable X and the dominant variable Y under each mixture t-distribution component obey a linear relationship, that is: ; Obtained according to this formula: ; Among them, is the leading variable and the auxiliary variable between the regression coefficients, is the regression coefficient between the leading variable and the auxiliary variable of the m-th mixed member component, represents the measurement noise of the m-th mixed member component, , is the precision parameter of the Gaussian prior distribution, is the precision parameter of the Gaussian prior distribution of the m-th mixed member component; Furthermore, the dominant variables under each member component of the mixture are calculated and the auxiliary variables The regression coefficients between The conjugate prior distribution of: ; Among them, , is the precision parameter of the Gaussian prior distribution, is the identity matrix; and the conjugate prior distributions of are as follows: ; ; Among them, and 、 and are respectively and hyperparameters of the conjugate prior distribution of , , ; The hierarchical representation of the joint distribution between the model variables is: 。 4. The coking diagnosis method based on the Bayesian t-distribution mixture regression model according to claim 3, characterized in that, The inputting of the preprocessed sample set into the Bayesian t-distribution mixture regression model, training the model according to the sample set, and updating the variational posterior distribution and free parameters to obtain a trained model, the specific steps include: S51: Input the preprocessed leading variable Y and auxiliary variable X, set the hyperparameters of the Bayesian t-distribution mixture regression model and a predetermined end threshold ; S52: Initializing the variational posterior distribution of the input dominant variable Y, auxiliary variable X, and the Bayesian t-distribution mixture regression model parameters; S53: Setting the number of iterative learning times K and performing iterative learning; S54: Calculating the expectations of the indicator variable Z and the robust variable U; S55: Calculate the updated model variables based on the expectations of the indicator variable Z and the robust variable U calculated in step S54 for each mixture member component corresponding to the elements in ; S56: Judging whether a preset predetermined end threshold is satisfied. When the predetermined end threshold is satisfied, the learning ends; otherwise, steps S54 - S56 are repeated until the K -th iterative learning is completed.
5. The coking diagnosis method based on the Bayesian t-distribution mixture regression model according to claim 4, characterized in that The calculation updates the model variables The variational posterior of each mixed member component corresponding to the element in including: Traverse the calculation to update the variational posterior of each mixed member component corresponding to each element in the model variable: , , , , , , and , and the degree-of-freedom parameter ; Among them, the degree-of-freedom parameter is calculated as follows: Degree of freedom parameter Calculated using Stirling's formula: ; wherein, is the pi; Calculated to obtain: ; Factorizing each variational posterior distribution to obtain: 。 6. The coking diagnosis method based on the Bayesian t-distribution mixture regression model according to claim 5, wherein In the k-th iteration, the update criterion conforms to the VBEM algorithm, specifically as follows: VB - E step: VB - M step: In the formula, represents the expectation of the variational posterior with respect to the variable, k represents the current iteration number, represents the expectation under the condition t, represents the calculation of the posterior distribution in the k-th iteration, represents the exponential function, represents positive correlation; The above formula indicates that in the VB - E step, the distribution of the fixed parameter variables is used, and the current estimate of the parameter variables is utilized to update the latent variables . In the VB - M step, the latent variables are fixed, and the parameter variables are re - updated using the latent variables .
7. The coking diagnosis method based on the Bayesian t-distribution mixture regression model according to claim 6, characterized in that, The judging whether a preset predetermined end threshold is satisfied. When the predetermined end threshold is satisfied, the learning ends, specifically includes: Calculate the maximized evidence lower bound for the current iteration , and the maximized evidence lower bound for the previous iteration , when the following condition is met: Then the iterative learning ends, where is the predetermined end threshold.
8. A coking diagnosis method based on a Bayesian t-distribution mixture regression model according to claim 7, characterized in that The calculating of the coking state of the furnace tube according to the predicted output result includes: Obtain a prediction result through the trained Bayesian mixture regression model with t-distribution ; The predicted result is calculated according to the following formula: In the formula, and represent the preset coking degree level values, represents the coking degree level calculated according to the prediction result ; The above formula indicates that the predicted result is compared and calculated with each coking level value to obtain the predicted coking degree level that meets the formula conditions .
Citation Information
Patent Citations
Online estimation method of oxygen content in primary reformer of ammonia synthesis process based on semi-supervised Bayesian Gaussian mixture model
CN108664706A