Robustness hydrogenation process overtemperature risk prediction and early warning method, system, equipment and medium
Through the robust time convolution network model and the robust loss function designed by the anomaly worthy segment, combined with causal expansion convolution and dual attention mechanism, the problem of low warning accuracy caused by the missing sensor data and abnormality in chemical technology is solved, and the additional High-precision prediction and early warning of the risk of overtemperature of hydrogen process.
Patent Information
- Application Number
- CN202411190294.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-06
AI Technical Summary
The existing chemical process accident risk prediction and early warning methods are low when facing the missing, abnormal and noise data collected by the sensor, and cannot effectively prevent the occurrence of overtemperature accidents in the hydrogenation process.
Using the robust time convolution network (R-TCN) model, a robust loss function is designed through anomaly value-segment, combined with causal expansion convolution and dual attention mechanism, a robust hydrogenation process overtemperature risk early warning method is constructed to predict fractionation Tower top temperature and set a temperature warning threshold to prevent accidents.
It improves the robustness and reliability of prediction, can achieve high-precision prediction in the absence of data and abnormal data, avoids early warning inaccuracy caused by data problems, and enhances the early warning ability to overtemperature risks of hydrogen refueling process.
Smart Images

Figure CN119090271A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of chemical risk early warning, and in particular to a method, system, equipment and medium for predicting and warning overtemperature risks in a robust hydrogenation process. Background Art
[0002] Hydrogenation, a relatively mature process and a common reaction process in chemical companies, is one of the most regulated hazardous chemical processes. The petrochemical industry is currently highly automated, and chemical equipment failures are a significant contributing factor to frequent accidents. Therefore, achieving real-time monitoring and predictive early warning of key equipment parameters in chemical processes is crucial for ensuring stable performance of these equipment.
[0003] Hydrogenation production equipment consists of multiple independent units that are fixed, continuous, and precisely interconnected. Oil fractionation is the most common operation in hydrocracking and subsequent secondary processing. Failure in a fractionator can significantly reduce separation efficiency, lead to poor product quality, and even cause accidents. However, fault diagnosis can accurately predict parameter trends before abnormal conditions occur, preventing accidents. This can generate alarms and enable proactive measures to prevent incidents.
[0004] There are two main types of existing chemical process accident risk prediction and early warning methods:
[0005] The first type is the physical model-based method, which uses physical models to describe and predict the temperature behavior of the reactor. However, establishing a physical model requires considering complex processes and parameters and has poor generalization ability, resulting in large errors and uncertainties.
[0006] The second category is based on data-driven models. This method models historical data during equipment operation and is simpler than physical models. However, data-driven models are greatly affected by data quality. In actual production, the on-site environment is more complex and there are many influencing factors, such as weather conditions, acquisition equipment performance, and uncertainties in the production process. As a result, the data collected by sensors inevitably contain missing, anomalies, and noise. There is a large gap between the prediction and warning accuracy of the model from theory to practice.
[0007] Therefore, the above problems need to be solved urgently. Summary of the Invention
[0008] Purpose of the invention: The purpose of the present invention is to provide a robust hydrogenation process overtemperature risk prediction and early warning method, which improves the robustness and reliability of the prediction and solves problems such as low model effectiveness or prediction accuracy caused by missing, abnormal, and noisy data collected by sensors in actual scenarios.
[0009] Technical solution: To achieve the above objectives, the present invention discloses a robust hydrogenation process overtemperature risk prediction and early warning method, comprising the following steps:
[0010] (1) The key parameters that affect the tray temperature are selected as key influencing factors, and the data of the key influencing factors in the hydrogenation process are collected as the original data set Z = (z1, z2, ..., z L ), divide the time window into α (1 < α < L), and the key impact factor subsequence of each window is x n =(z n ,…,z n+α-1 ), the corresponding tray temperature target value is n∈{1, 2, ..., L-α}, so the training data set is Where NNN = L - α;
[0011] (2) According to the original data set Z = (z1, z2, ..., z L ) Calculate the outlier score;
[0012] (3) Construct a robust temporal convolutional network model, namely the R-TCN model;
[0013] (4) Initialize the R-TCN model, design a robust loss function based on the outlier score, iteratively update the model parameters through the loss, and obtain the trained R-TCN model;
[0014] (5) Predict the future temperature of the distillation tower top using the trained R-TCN model, and evaluate the prediction results using the root mean square error (RMSE) indicator function;
[0015] (6) Set the temperature warning threshold. When the predicted value exceeds the threshold, the warning will continue until the actual value exceeds the threshold. When the actual value exceeds the threshold, an alarm will be issued.
[0016] Among them, the key influencing factors in step (1) include the top temperature of the distillation tower, the hot oil flow rate, the reflux flow rate, the liquid level at the bottom of the distillation tower, the top pressure of the light oil fractionation tower, the bottom temperature of the light oil fractionation tower, the top temperature, the feed temperature, the distillation tower plate temperature and the bottom liquid level.
[0017] Preferably, step (2) includes the following specific steps:
[0018] The original data set Z = (z1, z2, ..., z L ) is brought into formula (1) to obtain the trend of the original data S = {s1, s2, ..., s L}, where S is calculated as follows:
[0019]
[0020] According to formula (2), the outlier score is calculated.
[0021] Design anomaly score function:
[0022]
[0023] where k is the input x n length, and is x n and s n The kth value of It represents the degree of abnormality at time step k. δ(k) is designed as a non-decreasing weighting function. When k < K′, δ(k) = 0, and when K > k ≥ K′, δ(k) = 1.
[0024] Furthermore, step (3) includes the following specific steps:
[0025] The R-TCN model consists of an input layer, a hidden layer, and an output layer. The training dataset T is input. If there is missing data in the training dataset before input, the missing data is completed by the adjacent load, that is, the average of the adjacent values is taken, and the abnormal values are not processed. The hidden layer uses causal convolution and dilated convolution, that is, causal dilated convolution, for feature extraction. The training dataset T is input into two different causal dilated convolutions for convolution processing.
[0026] Input x at time t n The corresponding hidden layer output after causal dilation convolution is:
[0027]
[0028] Among them, the expansion filter P=(p1, p2, ..., p E ), P(j) is the filtering operation for the j-th input, d is the expansion coefficient, and E is the filter window size;
[0029] A dual attention mechanism is introduced to evaluate the correlation between features and target values with soft attention scores, and the hard attention mechanism selects key feature factors to implement a direct feedback adjustment mechanism between feature screening and prediction results, thereby enhancing the robustness of the model. i , the initial value is set to 1, and the input of the model is obtained by multiplying it with different inputs, that is, a i ·x n , will not affect the characteristics, a i Indicates the degree of attention the model pays to the i-th feature. The larger the value, the greater the impact on the prediction result. The hard attention mechanism rule is to discard abnormal features to improve the model's robustness to abnormal features and completely eliminate their influence on the prediction results. However, the hard attention mechanism is non-differentiable and cannot be optimized by the backpropagation algorithm. Therefore, the only way to achieve adaptive feature selection is to use a semi-binarization function as the hard attention mechanism at the end of training to truncate all healthy features with a score lower than v.
[0030] Design a new v-value determination rule:
[0031] First, sort the attention scores from high to low, and then calculate the distance r between adjacent scores g , g∈(1, 2, i-1), determine the r with the largest value max , take the maximum value r max The attention score on the right is the threshold v, which is used to filter out data outliers and features with low correlation with the target value, achieving a robust effect;
[0032] The hidden layers are connected through residuals to realize the stacking of multiple residual modules. The residuals are used to connect the hidden layers and the output of the causal dilation convolution is O(x n ) is connected to the input of the previous layer to form a residual connection, and dimensionality reduction is achieved through 1*1 convolution to obtain the output of the residual module;
[0033] The residual connection output is: w = Activation (x n +O(x n ))
[0034] The stacked residual blocks are finally fully connected through the output layer to obtain the R-TCN model, and the output layer result is the temperature value.
[0035] Furthermore, step (4) includes the following specific steps:
[0036] Initialize the model parameters and hyperparameters as follows:
[0037] The number of iterations E = 1000, the batch size M = 5 (for robustness, M should not be too large), the dilation factors d = 1, 2, 4, 8, 16, the filter window size E = 3, the dynamic learning rate size = 0.01-0.001, the number of neurons per layer = 128, the activation = LeakyReLU, α = 15, L = 3015, β = 0.3, μ = 0.2;
[0038] Design a robust loss function Loss, iteratively update the model parameters through Loss, and obtain the trained RTCN model;
[0039] The robust loss function is designed as: Where R() is designed as an exponential function, the value is 1 when the condition is met, otherwise it is 0, l() is MSE; C(x n ) is the outlier score function;
[0040] The model weight parameters are continuously updated through the back-propagation algorithm to make the Loss infinitely close to 0. After finding the optimal parameters, the trained model is saved.
[0041] Based on the same inventive concept, the present invention discloses a robust hydrogenation process overtemperature risk prediction and early warning system, comprising:
[0042] The data acquisition module is used to select key parameters that affect the tray temperature as key influencing factors. The key influencing factors include the top temperature of the distillation tower, the hot oil flow rate, the reflux flow rate, the bottom liquid level of the distillation tower, the top pressure of the light oil fractionation tower, the bottom temperature of the light oil fractionation tower, the top temperature, the feed temperature, the tray temperature of the distillation tower and the bottom liquid level of the tower; the data of the key influencing factors in the hydrogenation process are collected as the original data set Z = (z1, z2, ..., z L ), divide the time window into α (1 < α < L), and the key impact factor subsequence of each window is x n =(z n ,…,z n+α-1 ), the corresponding tray temperature target value is The training data set is thus obtained as Where NNN = L - α;
[0043] The outlier calculation module is used to calculate the outlier value based on the original data set Z = (z1, z2, ..., z L ) Calculate the outlier score;
[0044] Building module for building a robust temporal convolutional network model, namely the R-TCN model;
[0045] The training module is used to initialize the R-TCN model, design a robust loss function based on the outlier score, and iteratively update the model parameters through the loss to obtain the trained R-TCN model;
[0046] The prediction module is used to predict the future temperature of the distillation tower top using the trained R-TCN model and evaluate the prediction results using the root mean square error (RMSE) indicator function.
[0047] The early warning module is used to set the temperature warning threshold. When the predicted value exceeds the threshold, it will continue to warn until the actual value exceeds the threshold. When the actual value exceeds the threshold, it will alarm.
[0048] Among them, in the outlier calculation module, the original data set Z=(z1,z2,…,z L) is brought into formula (1) to obtain the trend of the original data S = {s1, s2, ..., s L}, where S is calculated as follows:
[0049]
[0050] According to formula (2), the outlier score is calculated.
[0051] Design anomaly score function:
[0052]
[0053] where k is the input x n length, and is x n and s n The kth value of It represents the degree of abnormality at time step k. δ(k) is designed as a non-decreasing weighting function. When k < K′, δ(k) = 0, and when K > k ≥ K′, δ(k) = 1.
[0054] Preferably, the R-TCN model in the construction module includes an input layer, a hidden layer, and an output layer. The training data set T is input. If there is missing data in the training data set before input, the missing data filling method is selected as the adjacent load, that is, the average of the adjacent values is taken, and the abnormal values are not processed; the hidden layer uses causal convolution and dilated convolution, that is, causal dilated convolution for feature extraction, and the training data set T is input into two different causal dilated convolutions for convolution processing;
[0055] Input x at time t n The corresponding hidden layer output after causal dilation convolution is:
[0056]
[0057] Among them, the expansion filter P=(p1, p2, ..., p E ), P(j) is the filtering operation for the j-th input, d is the expansion coefficient, and E is the filter window size;
[0058] A dual attention mechanism is introduced to evaluate the correlation between features and target values with soft attention scores, and the hard attention mechanism selects key feature factors to implement a direct feedback adjustment mechanism between feature screening and prediction results, thereby enhancing the robustness of the model. i , the initial value is set to 1, and the input of the model is obtained by multiplying it with different inputs, that is, a i ·x n , will not affect the characteristics, a iIndicates the degree of attention the model pays to the i-th feature. The larger the value, the greater the impact on the prediction result. The hard attention mechanism rule is to discard abnormal features to improve the model's robustness to abnormal features and completely eliminate their influence on the prediction results. However, the hard attention mechanism is non-differentiable and cannot be optimized by the backpropagation algorithm. Therefore, the only way to achieve adaptive feature selection is to use a semi-binarization function as the hard attention mechanism at the end of training to truncate all healthy features with a score lower than v.
[0059] Design a new v-value determination rule:
[0060] First, sort the attention scores from high to low, and then calculate the distance r between adjacent scores g , g∈(1, 2, i-1), determine the r with the largest value max , take the maximum value r max The attention score on the right is the threshold v, which is used to filter out data outliers and features with low correlation with the target value, achieving a robust effect;
[0061] The hidden layers are connected through residuals to realize the stacking of multiple residual modules. The residuals are used to connect the hidden layers and the output of the causal dilation convolution is O(x n ) is connected to the input of the previous layer to form a residual connection, and dimensionality reduction is achieved through 1*1 convolution to obtain the output of the residual module;
[0062] The residual connection output is: w = Activation (x n +O(x n ))
[0063] The stacked residual blocks are finally fully connected through the output layer to obtain the R-TCN model, and the output layer result is the temperature value;
[0064] The model parameters are initialized in the training module, and the hyperparameters are used as follows:
[0065] The number of iterations E = 1000, the batch size M = 5 (for robustness, M should not be too large), the dilation factors d = 1, 2, 4, 8, 16, the filter window size E = 3, the dynamic learning rate size = 0.01-0.001, the number of neurons per layer = 128, the activation = LeakyReLU, α = 15, L = 3015, β = 0.3, μ = 0.2;
[0066] Design a robust loss function Loss, iteratively update the model parameters through Loss, and obtain the trained R-TCN model;
[0067] The robust loss function is designed as: Where R() is designed as an exponential function, the value is 1 when the condition is met, otherwise it is 0, l() is MSE; C(x n ) is the outlier score function;
[0068] The model weight parameters are continuously updated through the back-propagation algorithm to make the Loss infinitely close to 0. After finding the optimal parameters, the trained model is saved.
[0069] The present invention provides an electronic device, comprising a processor and a memory.
[0070] The memory is used to store a computer program, which is executed by the processor to execute the above-mentioned robust hydrogenation process overtemperature risk prediction and early warning method.
[0071] The present invention provides a computer storage medium storing a computer program. The computer program is run by a processor to execute the above-mentioned robust hydrogenation process overtemperature risk prediction and early warning method.
[0072] Beneficial effects: Compared with the existing technology, the present invention has the following significant advantages: the present invention designs a robust loss function based on the outlier score, so that the prediction method is not restricted to the network model itself, thereby improving the model accuracy; the network model of the present invention is different from the existing model in the processing of missing values. There is no need to detect, hypothesize, and then train. In actual use, the data does not need to be processed and can be directly used as a training data set, which is more suitable for the adaptive optimization of the model and has strong anti-interference ability; the present invention will not cause the discontinuity problem caused by the abnormal data removal method, and achieves high-precision prediction through sample selection and robustness loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 A simplified flow chart of the fractionation process of the present invention;
[0074] Figure 2 It is a schematic diagram of the process of the present invention;
[0075] Figure 3 Schematic diagram of the v value determination rule in the present invention;
[0076] Figure 4 This is a diagram of the dual attention mechanism in the present invention;
[0077] Figure 5 The prediction results of the present invention Figure 1 ;
[0078] Figure 6 The prediction results of the present invention Figure 2 . DETAILED DESCRIPTION
[0079] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0080] like Figure 2 As shown, the present invention provides a method for predicting and warning overtemperature risk of a robust hydrogenation process, comprising the following steps:
[0081] (1) During the hydrogenation process, the low-distillate oil enters the distillation tower C101 system, the light oil fractionation tower C-103 system, and the stabilization tower C-102 system from the high and low pressure separation system to obtain the products No. 1 solvent oil and No. 2 solvent oil; the simplified flow chart of the fractionation process is as follows: Figure 1 As shown. In this process, the change of the light oil fractionation tower column temperature is crucial. If the column temperature is too high, it will cause more C10 fractions to precipitate from the top of the column, reducing the yield of the main product tower bottoms, increasing the load of the light oil fractionation tower, and causing the fractionation tower overheating explosion accident; Based on the industrial data of the paraffin fractionation tower DCS system, more than 100 monitoring data points were collected. According to the fractionation tower HAZOP analysis report and the experience of on-site operators, 10 key parameters affecting the tower plate temperature were selected as key influencing factors through correlation analysis. The key influencing factors include the top temperature of the distillation tower, hot oil flow rate, reflux flow rate, the bottom liquid level of the distillation tower, the top pressure of the light oil fractionation tower, the bottom temperature of the light oil fractionation tower, the tower top temperature, the feed temperature, the tower plate temperature of the distillation tower and the tower bottom liquid level; The data of the key influencing factors in the hydrogenation process were collected as the original data set Z = (z1, z2, ..., z L ), divide the time window into α (1 < α < L), and the key impact factor subsequence of each window is x n =(z n ,…,z n+α-1 ), the corresponding tray temperature target value is The training data set is thus obtained as Where NNN = L - α;
[0082] (2) Calculate the outlier score based on the original data set Z = (z_1, z_2, ..., z_L);
[0083] The original data set Z = (z1, z2, ..., z L ) is brought into formula (1) to obtain the trend of the original data S = {s1, s2, ..., s L}, where S is calculated as follows:
[0084]
[0085] According to formula (2), the outlier score is calculated.
[0086] Design anomaly score function:
[0087]
[0088] where k is the input xn length, and is x n and s n The kth value of Indicates the degree of abnormality at time step k. δ(k) is designed as a non-decreasing weighting function. When k < K′, δ(k) = 0, and when K > k ≥ K′, δ(k) = 1.
[0089] (3) Construct a robust temporal convolutional network model, namely the R-TCN model;
[0090] The R-TCN model consists of an input layer, a hidden layer, and an output layer. The training dataset T is input. If there is missing data in the training dataset before input, the missing data is completed by the adjacent load, that is, the average of the adjacent values is taken, and the abnormal values are not processed. The hidden layer uses causal convolution and dilated convolution, that is, causal dilated convolution, for feature extraction. The training dataset T is input into two different causal dilated convolutions for convolution processing.
[0091] Input x at time t n The corresponding hidden layer output after causal dilation convolution is:
[0092]
[0093] Among them, the expansion filter P=(p1, p2, ..., p E ), P(j) is the filtering operation for the j-th input, d is the expansion coefficient, and E is the filter window size;
[0094] A dual attention mechanism is introduced to evaluate the correlation between features and target values with soft attention scores, and the hard attention mechanism selects key feature factors to implement a direct feedback adjustment mechanism between feature screening and prediction results, thereby enhancing the robustness of the model. i , the initial value is set to 1, and the input of the model is obtained by multiplying it with different inputs, that is, a i ·x n , will not affect the features, such as Figure 4 As shown, a i Indicates the degree of attention the model pays to the i-th feature. The larger the value, the greater the impact on the prediction result. The hard attention mechanism rule is to discard abnormal features to improve the model's robustness to abnormal features and completely eliminate their influence on the prediction results. However, the hard attention mechanism is non-differentiable and cannot be optimized by the backpropagation algorithm. Therefore, the only way to achieve adaptive feature selection is to use a semi-binarization function as the hard attention mechanism at the end of training to truncate all healthy features with a score lower than v.
[0095] Design a new v-value determination rule:
[0096] First, sort the attention scores from high to low, and then calculate the distance r between adjacent scores g , g∈(1, 2, i-1), determine the r with the largest value max , take the maximum value r max The attention score on the right is the threshold v, such as Figure 3 As shown, it is possible to filter out data outliers and features with a small correlation with the target value to achieve a robust effect;
[0097] The hidden layers are connected through residuals to realize the stacking of multiple residual modules. The residuals are used to connect the hidden layers and the output of the causal dilation convolution is O(x n ) is connected to the input of the previous layer to form a residual connection, and dimensionality reduction is achieved through 1*1 convolution to obtain the output of the residual module;
[0098] The residual connection output is: w = Activation (x n +O(x n ))
[0099] The stacked residual blocks are finally fully connected through the output layer to obtain the R-TCN model, and the output layer result is the temperature value;
[0100] (4) Initialize the R-TCN model, design a robust loss function based on the outlier score, iteratively update the model parameters through the loss, and obtain the trained R-TCN model;
[0101] Initialize the model parameters and hyperparameters as follows:
[0102] The number of iterations E = 1000, the batch size M = 5 (for robustness, M should not be too large), the dilation factors d = 1, 2, 4, 8, 16, the filter window size E = 3, the dynamic learning rate size = 0.01-0.001, the number of neurons per layer = 128, the activation = LeakyReLU, α = 15, L = 3015, β = 0.3, μ = 0.2;
[0103] Design a robust loss function Loss, iteratively update the model parameters through Loss, and obtain the trained R-TCN model;
[0104] The robust loss function is designed as: Where R() is designed as an exponential function, the value is 1 when the condition is met, otherwise it is 0, and l() is the MSE;
[0105] The model weight parameters are continuously updated through the back-propagation algorithm to make the Loss infinitely close to 0. After finding the optimal parameters, the trained model is saved.
[0106] (5) Predict the future temperature of the distillation tower top using the trained R-TCN model, and evaluate the prediction results using the root mean square error (RMSE) indicator function; y t is the true temperature value, For the predicted value, the smaller the performance index value is, the closer the predicted value is to the true value, the better the fitting degree is, and the smaller the error between the two is, as shown in Table 1;
[0107] Table 1 Prediction performance evaluation table
[0108] Evaluation Criteria TCN (Loss is mse) TCN (Robust Loss) RTCN RMSE 0.33 0.25 0.1
[0109] (6) Set the temperature warning threshold to 182. When the predicted value exceeds the threshold, the system will continue to warn until the actual value exceeds the threshold. When the actual value exceeds the threshold, the system will alarm.
[0110] like Figure 5 and Figure 6 As shown in the figure, from the prediction results, it can be found that the proposed method has strong anti-interference ability while ensuring accuracy, is better at predicting the overall trend, and is suitable for overtemperature risk warning.
[0111] Example 2
[0112] Based on the same inventive concept, the present invention discloses a robust hydrogenation process overtemperature risk prediction and early warning system, comprising:
[0113] The data acquisition module is used to select key parameters that affect the tray temperature as key influencing factors. The key influencing factors include the top temperature of the distillation tower, the hot oil flow rate, the reflux flow rate, the bottom liquid level of the distillation tower, the top pressure of the light oil fractionation tower, the bottom temperature of the light oil fractionation tower, the top temperature, the feed temperature, the tray temperature of the distillation tower and the bottom liquid level of the tower; the data of the key influencing factors in the hydrogenation process are collected as the original data set Z = (z1, z2, ..., z L ), divide the time window into α (1 < α < L), and the key impact factor subsequence of each window is x n =(z n ,…,z n+α-1 ), the corresponding tray temperature target value is n∈{1, 2, ..., L-α}, so the training data set is Where NNN = L - α;
[0114] The outlier calculation module is used to calculate the outlier value based on the original data set Z = (z1, z2, ..., z L ) Calculate the outlier score;
[0115] Among them, in the outlier calculation module, the original data set Z=(z1,z2,…,z L) is brought into formula (1) to obtain the trend of the original data S = {s1, s2, ..., s L}, where S is calculated as follows:
[0116]
[0117] According to formula (2), the outlier score is calculated.
[0118] Design anomaly score function:
[0119]
[0120] where k is the input x n length, and is x n and s n The kth value of It represents the degree of abnormality at time step k. δ(k) is designed as a non-decreasing weighting function. When k < K′, δ(k) = 0, and when K > k ≥ K′, δ(k) = 1.
[0121] Building module for building a robust temporal convolutional network model, namely the R-TCN model;
[0122] Preferably, the R-TCN model in the construction module includes an input layer, a hidden layer, and an output layer. The training data set T is input. If there is missing data in the training data set before input, the missing data filling method is selected as the adjacent load, that is, the average of the adjacent values is taken, and the abnormal values are not processed; the hidden layer uses causal convolution and dilated convolution, that is, causal dilated convolution for feature extraction, and the training data set T is input into two different causal dilated convolutions for convolution processing;
[0123] Input x at time t n The corresponding hidden layer output after causal dilation convolution is:
[0124]
[0125] Among them, the expansion filter P=(p1, p2, ..., p E ), P(j) is the filtering operation for the j-th input, d is the expansion coefficient, and E is the filter window size;
[0126] A dual attention mechanism is introduced to evaluate the correlation between features and target values with soft attention scores, and the hard attention mechanism selects key feature factors to implement a direct feedback adjustment mechanism between feature screening and prediction results, thereby enhancing the robustness of the model. i , the initial value is set to 1, and the input of the model is obtained by multiplying it with different inputs, that is, a i ·x n, will not affect the characteristics, a i Indicates the degree of attention the model pays to the i-th feature. The larger the value, the greater the impact on the prediction result. The hard attention mechanism rule is to discard abnormal features to improve the model's robustness to abnormal features and completely eliminate their influence on the prediction results. However, the hard attention mechanism is non-differentiable and cannot be optimized by the backpropagation algorithm. Therefore, the only way to achieve adaptive feature selection is to use a semi-binarization function as the hard attention mechanism at the end of training to truncate all healthy features with a score lower than v.
[0127] Design a new v-value determination rule:
[0128] First, sort the attention scores from high to low, and then calculate the distance r between adjacent scores g , g∈(1, 2, i-1), determine the r with the largest value max , take the maximum value r max The attention score on the right is the threshold v, which is used to filter out data outliers and features with low correlation with the target value, achieving a robust effect;
[0129] The hidden layers are connected through residuals to realize the stacking of multiple residual modules. The residuals are used to connect the hidden layers and the output of the causal dilation convolution is O(x n ) is connected to the input of the previous layer to form a residual connection, and dimensionality reduction is achieved through 1*1 convolution to obtain the output of the residual module;
[0130] The residual connection output is: w = Activation (x n +O(x n ))
[0131] The stacked residual blocks are finally fully connected through the output layer to obtain the R-TCN model, and the output layer result is the temperature value;
[0132] The training module is used to initialize the R-TCN model, design a robust loss function based on the outlier score, and iteratively update the model parameters through the loss to obtain the trained R-TCN model;
[0133] Initialize the model parameters in the training module, and the hyperparameters are used as follows:
[0134] The number of iterations E = 1000, the batch size M = 5 (for robustness, M should not be too large), the dilation factors d = 1, 2, 4, 8, 16, the filter window size E = 3, the dynamic learning rate size = 0.01-0.001, the number of neurons per layer = 128, the activation = LeakyReLU, α = 15, L = 3015, β = 0.3, μ = 0.2;
[0135] Design a robust loss function Loss, iteratively update the model parameters through Loss, and obtain the trained R-TCN model;
[0136] The robust loss function is designed as: Where R() is designed as an exponential function, the value is 1 when the condition is met, otherwise it is 0, l() is MSE; C(x n ) is the outlier score function;
[0137] The model weight parameters are continuously updated through the back-propagation algorithm to make the Loss infinitely close to 0. After finding the optimal parameters, the trained model is saved.
[0138] The prediction module is used to predict the future temperature of the distillation tower top using the trained R-TCN model and evaluate the prediction results using the root mean square error (RMSE) indicator function.
[0139] The early warning module is used to set the temperature warning threshold. When the predicted value exceeds the threshold, it will continue to warn until the actual value exceeds the threshold. When the actual value exceeds the threshold, it will alarm.
[0140] Example 3
[0141] Corresponding to the method of embodiment 1 of the present invention, embodiment 3 of the present invention further provides an electronic device,
[0142] In this embodiment 3, the electronic device includes: at least one communication bus, at least one processor, at least one memory, at least one network interface, and at least one peripheral interface. The memory contains programs and data.
[0143] A communication bus may be a communication device for transmitting data between components inside an electronic device, such as an internal bus (CPU and memory bus), an external bus (Universal Serial Bus port, Peripheral Component Interconnect Express port, etc.).
[0144] The memory may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0145] The processor calls the program and data stored in the memory to execute a robust hydrogenation process overtemperature risk prediction and early warning method provided in Example 1 of the present invention.
[0146] The peripheral interface is used to connect to peripherals, which are external devices. External devices may include but are not limited to keyboards, displays, cursor control devices (such as mice, touchpads or touch screens), video input devices, etc.
[0147] The network interface provides wired or wireless communication with an external network (eg, the Internet, an intranet, a local area network, a mobile communication network, etc.).
[0148] Example 4
[0149] Corresponding to the method of Example 1 of the present invention, Example 4 of the present invention also provides a computer storage medium for data collection and reception, wherein the computer storage medium stores a computer program, which is run by a processor to execute a robust hydrogenation process overtemperature risk prediction and early warning method provided in Example 1 of the present invention.
[0150] The functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware, software functional units, or a combination of software and hardware.
[0151] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a mobile hard disk, a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0152] The present invention provides a method, system, device, and storage medium for predicting shaft vibration of a steam turbine generator. The foregoing description is merely a preferred embodiment of the present invention. It should be noted that those skilled in the art may make various improvements and modifications without departing from the principles of the present invention, and such improvements and modifications are also within the scope of protection of the present invention. Any components not specified in this embodiment may be implemented using existing technologies.
Claims
1. A robust hydrogenation process overtemperature risk prediction and early warning method, characterized in that: The steps include: (1) Select the key parameters affecting the tray temperature as the key influencing factors, and collect the data of the key influencing factors in the hydrogenation process as the original data set Z = (z1, z2, …, z L ). Divide the time window α (1 < α < L), and the subsequence of the key influencing factors in each window is x n = (z n , …, z n+α-1 ), and the corresponding target value of the tray temperature is n ∈ {1, 2, …, L - α}, and thus the training data set is obtained as where N = L - α; (2) According to the original data set Z = (z1, z2, …, z L ) Calculate the outlier score; (3) Construct a robust temporal convolutional network model, namely the R-TCN model; (4) Initialize the R-TCN model, design a robust loss function based on the outlier score, iteratively update the model parameters through the Loss, and obtain the trained R-TCN model; (5) Predict the future top temperature of the fractionation tower using the trained R-TCN model, and evaluate the prediction results using the root mean square error (RMSE) indicator function; (6) Set a temperature warning threshold. When the predicted value exceeds the threshold, the warning will continue until the actual value exceeds the threshold. When the actual value exceeds the threshold, an alarm will be issued.
2. A robust hydrogenation process overtemperature risk prediction and early warning method according to claim 1, characterized in that: The key influencing factors in step (1) include the top temperature of the distillation tower, the hot oil flow rate, the reflux flow rate, the bottom liquid level of the distillation tower, the top pressure of the light oil fractionation tower, the bottom temperature of the light oil fractionation tower, the top temperature, the feed temperature, the distillation tower plate temperature and the bottom liquid level.
3. The method for predicting and warning overtemperature risk of a robust hydrogenation process according to claim 1, characterized in that: The step (2) comprises the following specific steps: The original data set Z = (z1, z2, ..., z L ) into formula (1) to obtain the trend of the original data S = {s1, s2, ..., s L }, where S is calculated as follows: According to formula (2), the outlier score is calculated. Design anomaly score function: where k is the input x n Length, and is x n and n The kth value of Indicates the degree of abnormality at time step k. δ(k) is designed as a non-decreasing weighting function. <K ′ ,δ(k)=0,when K>k≥K ′ ,δ(k)=1.
4. A robust hydrogenation process overtemperature risk prediction and early warning method according to claim 3, characterized in that: The step (3) comprises the following specific steps: The R-TCN model includes an input layer, a hidden layer, and an output layer. The training data set T is input. If there is missing data in the training data set before input, the missing data filling method is selected as adjacent load, that is, the average of adjacent values is taken, and abnormal values are not processed; the hidden layer uses causal convolution and dilated convolution, that is, causal dilated convolution, for feature extraction, and the training data set T is input into two different causal dilated convolutions for convolution processing; Input x at time t n The corresponding hidden layer output after causal dilation convolution is: Among them, the expansion filter P = (p1, p2, ..., p E ), P(j) is the filtering operation for the j-th input, d is the expansion coefficient, and E is the filter window size; A dual attention mechanism is introduced to evaluate the correlation between features and target values with soft attention scores, and the hard attention mechanism selects key feature factors to implement a direct feedback adjustment mechanism between feature screening and prediction results, thus enhancing the robustness of the model; soft attention mechanism = a i , the initial value is set to 1, and the input of the model is obtained by multiplying it with different inputs, that is, a i ·x n , will not affect the characteristics, a i Indicates the degree of attention paid by the model to the i-th feature. The larger the value, the greater the impact on the prediction result. The hard attention mechanism rule is to discard abnormal features. In order to improve the robustness of the model to abnormal features, it completely loses its influence on the prediction results. However, the hard attention mechanism is not differentiable and cannot be optimized by the back propagation algorithm. Therefore, the semi-binarization function can only be used as the hard attention mechanism at the end of training to truncate all healthy features with scores lower than υ to achieve adaptive feature selection. Design a new rule for determining υ value: First, sort the attention scores from high to low, and then calculate the distance r between adjacent scores g , g∈(1,2,i-1), determine the r with the largest value max , take the maximum value r max The attention score on the right is the threshold υ, which is used to filter out data outliers and features with a small correlation with the target value, achieving a robust effect; The hidden layers are connected through residual connections to achieve the stacking of multiple residual modules. The residual connections are used to connect the output of the causal dilated convolution process O(x n ) is connected to the input of the previous layer to form a residual connection, and dimensionality reduction is achieved through 1*1 convolution to obtain the output of the residual module; The residual connection output is: w = Activation (x n +O(x n )) The stacked residual blocks are finally fully connected through the output layer to obtain the R-TCN model, and the output layer result is the temperature value.
5. A robust hydrogenation process overtemperature risk prediction and early warning method according to claim 4, characterized in that: The step (4) comprises the following specific steps: Initialize the model parameters and hyperparameters as follows: The number of iterations E = 1000, the batch size M = 5, for the sake of method robustness, M should not be too large, the dilation factor d = 1, 2, 4, 8, 16, the filter window size E = 3, the dynamic learning rate size = 0.01 ~ 0.001, the number of neurons per layer = 128, Activation = LeakyReLU, α = 15, L = 3015, β = 0.3, μ = 0.2; Design a robust loss function Loss, iteratively update the model parameters through Loss, and obtain the trained RTCN model; The robust loss function is designed as: Where R() is designed as an exponential function, the value is 1 when the condition is met, otherwise it is 0, l() is MSE; C(x n ) is the outlier score function; The model weight parameters are continuously updated through the back propagation algorithm to make the Loss infinitely close to 0. After finding the optimal parameters, the trained model is saved.
6. A robust hydrogenation process overtemperature risk prediction and early warning system, characterized in that: include: A data acquisition module, which is used to select the key parameters affecting the tray temperature as the key influencing factors. The key influencing factors include the top temperature of the distillation column, the hot oil flow rate, the reflux flow rate, the bottom liquid level of the distillation column, the top pressure of the light oil fractionation column, the bottom temperature of the light oil fractionation column, the top temperature, the feed temperature, the tray temperature of the distillation column, and the bottom liquid level; collect the data of the key influencing factors in the hydrogenation process as the original data set Z = (z1, z2, …, z L ), divide the time window α (1 < α < L), and the subsequence of the key influencing factors in each window is x n = (z n , …, z n+α-1 ), and the corresponding target value of the tray temperature is n ∈ {1, 2, …, L - α}, and thus the training data set is obtained as where N = L - α; The outlier calculation module is used to calculate the outlier value according to the original data set Z = (z1, z2, ..., z L ) Calculate the outlier score; Building module for building a robust temporal convolutional network model, namely the R-TCN model; The training module is used to initialize the R-TCN model, design a robust loss function based on the outlier score, and iteratively update the model parameters through the Loss to obtain the trained R-TCN model. The prediction module is used to predict the future top temperature value of the fractionation tower through the trained R-TCN model, and evaluate the prediction results through the indicator function root mean square error RMSE; The early warning module is used to set the temperature early warning threshold. When the predicted value exceeds the threshold, it will continue to warn until the actual value exceeds the threshold. When the actual value exceeds the threshold, an alarm will be issued.
7. A robust hydrogenation process overtemperature risk prediction and early warning method according to claim 6, characterized in that: In the outlier calculation module, the original data set Z=(z1, z2, ..., z L ) into formula (1) to obtain the trend of the original data S = {s1, s2, ..., s L }, where S is calculated as follows: According to formula (2), the outlier score is calculated. Design anomaly score function: where k is the input x n Length, and is x n and n The kth value of Indicates the degree of abnormality at time step k. δ(k) is designed as a non-decreasing weighting function. <K ′ ,δ(k)=0,when K>k≥K ′ ,δ(k)=1.
8. A robust hydrogenation process overtemperature risk prediction and early warning method according to claim 7, characterized in that: The R-TCN model in the construction module includes an input layer, a hidden layer and an output layer. The training data set T is input. If there is missing data in the training data set before input, the missing data filling method is selected as adjacent load, that is, the average of adjacent values is taken, and abnormal values are not processed; the hidden layer uses causal convolution and dilated convolution, that is, causal dilated convolution, for feature extraction, and the training data set T is input into two different causal dilated convolutions for convolution processing; Input x at time t n The corresponding hidden layer output after causal dilation convolution is: Among them, the expansion filter P = (p1, p2, ..., p E ), P(j) is the filtering operation for the j-th input, d is the expansion coefficient, and E is the filter window size; A dual attention mechanism is introduced to evaluate the correlation between features and target values with soft attention scores, and the hard attention mechanism selects key feature factors to implement a direct feedback adjustment mechanism between feature screening and prediction results, thus enhancing the robustness of the model; soft attention mechanism = a i , the initial value is set to 1, and the input of the model is obtained by multiplying it with different inputs, that is, a i ·x n , will not affect the characteristics, a i Indicates the degree of attention the model pays to the i-th feature. The larger the value, the greater the impact on the prediction result. The hard attention mechanism rule is to discard abnormal features. In order to improve the robustness of the model to abnormal features, it completely loses its influence on the prediction results. However, the hard attention mechanism is not differentiable and cannot be optimized by the back propagation algorithm. Therefore, the semi-binarization function can only be used as the hard attention mechanism at the end of training to truncate all healthy features with scores lower than υ to achieve adaptive feature selection. Design a new rule for determining υ value: First, sort the attention scores from high to low, and then calculate the distance r between adjacent scores g , g∈(1,2,i-1), determine the r with the largest value max , take the maximum value r max The attention score on the right is the threshold v, which is used to filter out data outliers and features with a small correlation with the target value, achieving a robust effect; The hidden layers are connected through residual connections to achieve the stacking of multiple residual modules. The residual connections are used to connect the output of the causal dilated convolution process O(x n ) is connected to the input of the previous layer to form a residual connection, and dimensionality reduction is achieved through 1*1 convolution to obtain the output of the residual module; The residual connection output is: w = Activation (x n +O(x n )) The stacked residual blocks are finally fully connected through the output layer to obtain the R-TCN model, and the output layer result is the temperature value; The model parameters are initialized in the training module, and the hyperparameters are used as follows: The number of iterations E = 1000, the batch size M = 5, for the sake of method robustness, M should not be too large, the dilation factor d = 1, 2, 4, 8, 16, the filter window size E = 3, the dynamic learning rate size = 0.01 ~ 0.001, the number of neurons per layer = 128, Activation = LeakyReLU, α = 15, L = 3015, β = 0.3, μ = 0.2; Design a robust loss function Loss, iteratively update the model parameters through Loss, and obtain the trained R-TCN model; The robust loss function is designed as: Where R() is designed as an exponential function, the value is 1 when the condition is met, otherwise it is 0, l() is MSE; C(x n ) is the outlier score function; The model weight parameters are continuously updated through the back propagation algorithm to make the Loss infinitely close to 0. After finding the optimal parameters, the trained model is saved.
9. An electronic device, characterized in that: including a processor and memory, A memory for storing a computer program, wherein the computer program is executed by a processor to perform the method according to any one of claims 1 to 5.
10. A computer storage medium, characterized in that: The computer storage medium stores a computer program, which is executed by a processor to perform the method according to any one of claims 1 to 5.
