A method for detecting hydrogen sulfide concentration in sulfur recovery process

By applying a hybrid attention mechanism of multi-channel multi-head attention mechanism and distributed GRU algorithm in sulfur recovery device, the problem of difficulty in online measurement of hydrogen sulfide concentration is solved, efficient and accurate hydrogen sulfide concentration detection is achieved, and production costs are reduced .

CN115825340BActive Publication Date: 2025-02-11BEIJING UNIV OF CHEM TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211426381.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-15
Publication Date
2025-02-11
Estimated Expiration
2042-11-15

AI Technical Summary

Technical Problem

During the sulfur recovery device (SRU), it is difficult to measure the concentration of hydrogen sulfide online, resulting in high production costs, unstable operation, and the prior art is difficult to effectively monitor the concentration of hydrogen sulfide in the exhaust gas.

Method used

A hybrid attention mechanism (HAT) composed of multi-channel multi-head attention mechanism and quality-related attention mechanism is adopted, combined with a distributed gated memory network (GRU) algorithm, a hydrogen sulfide emission module is constructed to extract and screen auxiliary variables in the process. and mass variables are used to construct a hydrogen sulfide concentration model.

Benefits of technology

The rapid online detection of hydrogen sulfide concentration during sulfur recovery process is achieved, which improves production efficiency, reduces production costs, and improves the accuracy of parameter detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115825340B_ABST
    Figure CN115825340B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for detecting hydrogen sulfide concentration in a sulfur recovery process. A hydrogen sulfide emission module of a distributed GRU neural network based on a multi-channel multi-head attention mechanism and a quality-related attention mechanism is constructed respectively, and spatial features between auxiliary variables and quality variables in the process are extracted and screened. The extracted features are used for a gated cyclic unit to overcome the SRU recovery process, and a hydrogen sulfide concentration model in the exhaust gas of the HAT-DGRU technology is constructed. A convenient, reliable and efficient SRU process emission concentration monitoring operation method is proposed, which can greatly improve production efficiency and reduce production costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chemical control technology, and more specifically, to a method for detecting hydrogen sulfide concentration in a sulfur recovery process. The present invention takes a sulfur recovery unit (SRU) process as an object, takes the concentration of hydrogen sulfide discharged in the recovery unit as a target, and involves a hybrid attention mechanism (HAT) composed of a multi-channel multi-head attention mechanism and a quality-related attention mechanism, and an integrated (HAT-DGRU) technology of a distributed gated memory network (GateRecurrent Unit, GRU) algorithm. Background Art

[0002] With the sustained and rapid development of my country's national economy, the demand for energy has increased significantly, and the import volume of crude oil has increased year by year, especially the import volume of sulfur-containing crude oil has increased significantly. With the heavy quality of imported crude oil resources and the continuous increase in sulfur content, the depth of crude oil processing and the quality of required products have been continuously improved, and the requirements for environmental protection have become increasingly stringent. The construction scale and design technology level requirements of sulfur recovery units have also increased rapidly. Due to the complex process conditions of SRU, it is not easy to measure the emission concentration with online instruments, and the instruments must be maintained and inspected frequently. Therefore, the use of process modeling and simulation technology, advanced control and optimization technology, production monitoring and safety technology has become the main means to reduce production costs, improve the level of recovery operation, and eliminate the "bottleneck" of the device to ensure the stable implementation of the enterprise's recovery strategy. Among them, the application of process modeling, control and optimization technology to guide the operation of the recovery device has become an urgent need for sulfur-containing recovery production enterprises in my country. Therefore, the study and application of advanced technology for intelligent detection of hydrogen sulfide concentration in the SRU recovery process has important theoretical significance and practical application value.

[0003] Artificial neural network is a data-driven adaptive method. It finds the intrinsic connection between input and output through learning and training according to the data provided by the process, so it has strong adaptability and flexibility in modeling implementation. Neural networks do not rely on prior knowledge and rules of the process and have strong nonlinear approximation capabilities. In addition, as the depth of the network increases, deep neural networks can extract deeper feature information from input data than shallow neural networks. Deep neural networks have better effects when processing downstream tasks based on highly complex nonlinear systems. Therefore, they are widely used in parameter estimation, operation process optimization and process system control in chemical processes. Gated recurrent unit (Gated Recurrent Unit) is a model in deep neural networks for processing time series data. Due to the existence of gated units, the model is dynamic and very suitable for dynamic modeling in process industries. However, due to the change of working conditions in process industries and the temporal relationship between quality variables and auxiliary variables in time steps, GRU will have a problem of reduced accuracy in the prediction process. A multi-channel multi-head self-attention mechanism and a quality-related attention mechanism are used to extract and filter the spatial features between auxiliary variables and quality variables. The extracted features are used to gate the recurrent unit to solve downstream modeling problems. Summary of the invention

[0004] In view of the above problems, the present invention proposes a method for detecting hydrogen sulfide concentration in a sulfur recovery process, constructs a hydrogen sulfide emission module of a distributed GRU neural network based on a multi-channel multi-head attention mechanism and a quality-related attention mechanism, extracts and screens the spatial features between auxiliary variables and quality variables in the process, and uses the extracted features to control the gated cyclic unit to overcome the SRU recovery process, constructs a hydrogen sulfide concentration model in the exhaust gas of the HAT-DGRU technology, and proposes a convenient, reliable and efficient SRU process emission concentration monitoring operation method, which can greatly improve production efficiency and reduce production costs.

[0005] A method for detecting hydrogen sulfide concentration in a sulfur recovery process, comprising:

[0006] A data preprocessing module, which preprocesses the SRU recovery reaction data collected by the device sensor and uses it as training data for modeling the hydrogen sulfide concentration in the exhaust gas of the SRU recovery device;

[0007] The sample selection module divides the training data output by the data preprocessing module into training samples for deep neural network modeling and verification samples for neural network integration;

[0008] The time series data construction module divides the training samples output by the sample selection module using a moving time window to obtain individual neural network training samples with time steps;

[0009] The deep neural network processing module uses a multi-channel multi-head attention mechanism to extract the spatiotemporal features between auxiliary variables from the individual neural network training samples with time steps, and then adaptively discovers the time features related to the quality variables through the quality-related attention multi-channel and gives weights. The distributed GRU unit is used to extract the dynamic information in the multi-channel features, and the result obtained after further splicing and calculation through the fully connected layer is used as the final output.

[0010] Furthermore, the preprocessing of the data preprocessing module includes supplementing missing data, correcting abnormal data and filtering noise data, thereby generating an output value v including 5 groups of sampling values ​​and 1 group of analysis values. i (n), (i=1,2,...,6), after data preprocessing, v1~v5, a total of 5 groups of analysis values ​​constitute the training data of the HAT-DGRU deep neural network, and the data enhancement method is used to construct the data block as follows:

[0011] x(t)=[v1(t) ... v5(t) v1(t-5) ... v5(t-5) v1(t-7) ... v5(t-7) v1(t-9) ... v5(t-9)].

[0012] Furthermore, after the sample selection module extracts 30% of the training data as verification samples, the remaining data is used as training samples of the deep neural network and the training samples are subjected to maximum-minimum normalization processing.

[0013] Furthermore, the time series input data constructed by the time series data construction module is as follows:

[0014]

[0015] The training data of the HAT-DGRU deep neural network is composed of 5 groups of analysis values ​​from v1 to v5 and v6 after data preprocessing:

[0016] Ω train ={X,Y}={X(t),Y(t),t=1,2,....N}={v1(t),...,v5(t),v6(t),t=1,2,....N}.

[0017] Furthermore, the deep neural network processing module selects network hyperparameters, including the number of iterations, batch size, learning rate, the number of multi-heads of multi-head attention, and the number of hidden layers of GRU units; sends a batch of data into the network for learning, calculates the mean square error, updates the parameters by the chain rule, loops to the maximum number of iterations, obtains the final model, sends the input data of the test set into the model to obtain the output value, and denormalizes the output value to obtain the predicted value.

[0018] The technical advantages achieved by the present invention are:

[0019] (1) The present invention adopts a new type of deep neural network - gated recurrent unit (Gated Recurrent Unit) model to process time series input data. Compared with the traditional BP network and RBF neural network, the GRU model is dynamic and more suitable for process industry modeling problems. At the same time, under the premise of ensuring the generalization ability of the network, the network parameters of this model are compared with the long short-term memory network (LSTM), with fewer learnable parameters and faster training speed, which provides a new idea for the modeling of hydrogen sulfide emission concentration in the sulfur recovery process in the oil refining industry.

[0020] (2) The present invention provides a multi-channel multi-head attention mechanism to address the problem of huge data volume in process industries. After the input data features are subjected to multi-channel multi-head attention to extract the spatiotemporal features between samples, multiple attention heads are obtained to avoid the problems of excessive calculation and information redundancy. At the same time, a quality-related attention mechanism is provided for multi-channel features to adaptively calculate the temporal correlation between the features of each channel and the quality variables, providing quality-related information for subsequent dynamic modeling.

[0021] (3) In order to further improve the accuracy of the GRU model, the present invention adopts a distributed GRU model structure. Due to the widespread application of distributed control systems, the amount of process industry data is increasing. Processing a large amount of data with a single GRU model will lead to a decrease in prediction accuracy. Multiple GRU models are used to dynamically process the multi-channel model respectively. The obtained dynamic features are spliced ​​and fused, and then sent to the fully connected layer for calculation as the output of the model. The present invention applies the distributed GRU neural network to intelligent detection in the sulfur recovery process, which can not only realize rapid online detection of product concentration, but also improve the accuracy of parameter detection.

[0022] (4) The present invention overcomes the problem of lack of online measurement methods for key variables in the SRU recovery process, and realizes the prediction of hydrogen sulfide emissions by conducting application research on distributed GRU technology based on multi-channel multi-head attention mechanism and quality-related attention mechanism. Experiments have proved that the method can be applied to actual industry to improve the economic benefits of enterprises. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flow chart of SRU recovery;

[0024] Figure 2 is a structural diagram of the method of the present invention;

[0025] Figure 3 This is a diagram of the multi-head attention structure;

[0026] Figure 4 This is a diagram of the quality-related attention mechanism structure;

[0027] Figure 5 This is a diagram of the gated recurrent unit structure;

[0028] Figure 6 The present invention is a flowchart of the method described in the present invention. DETAILED DESCRIPTION

[0029] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. It should be noted that the materials described in the patent of the present invention can all be purchased, and the commercial software and the manufacturing equipment can also be purchased.

[0030] Example 1

[0031] The Sulfur Recovery Unit (SRU) removes environmental pollutants from the acidic gas stream before it is released into the atmosphere. In addition, elemental sulfur is recovered as a valuable by-product. The SRU receives two types of acid gases as input. The first one is rich in H2S, called MEA gas, and comes from the gas scrubbing plant; the second one is called SWS gas, rich in H2S and NH3 (ammonia), and comes from the sour water stripping (SWS) unit. The acid gases are burned in the reactor and the H2S is converted into pure sulfur by partial oxidation reaction with air. The gas combustion products from the furnace are cooled, resulting in the production of liquid sulfur, which is collected in a sump and then passed through a high temperature converter where further reactions result in the formation of water vapor and sulfur. The remaining unconverted gas (less than 5%) is fed to the Maxisulfur unit for the final conversion stage. The final gas stream (tail gas) from the SRU contains residual H2S and SO2.

[0032] like Figure 1The figure shows the SRU recovery reaction flow chart, which consists of a reactor divided into two independent combustion chambers. The main chamber is supplied with MEA gas, and in case of insufficient air, the combustion is regulated by supplying sufficient air flow (air to MEA). The secondary combustion chamber is mainly supplied with SWS gas and provides a suitable air flow (air to SWS). The combustion of SWS gas is carried out in a separate chamber with excess air to prevent the formation of ammonium salts in the equipment, which produces nitrogen and nitrogen oxides. When the SWS gas flow is too low, the gas input flow in the secondary chamber is kept constant by adding some MEA gas (MEA SPILLING). Therefore, a sufficient air flow (MEA SPILLING air) is added. The air flow is controlled by the plant operator to ensure the correct stoichiometric ratio in the tail gas. Control is improved by a closed-loop algorithm, which adjusts the further air flow (air to MEA2) according to the analysis of the tail gas composition. The air that provides oxygen for the reaction is an important parameter in the H2S conversion process and acts on the tail gas composition. In particular, an excess air flow tends to increase the concentration of SO2 relative to H2S, while a low air flow leads to the opposite. Online analyzers are used to measure the concentration of hydrogen sulfide and sulfur dioxide in the tail gas of each sulfur pipeline. The analyzers used are able to measure hydrogen sulfide and sulfur dioxide to monitor the performance of the conversion process and control the air-to-feed ratio in the SRU to improve the sulfur extraction process. Hydrogen sulfide and sulfur dioxide often cause damage to the sensors, which usually need to be removed for maintenance. Therefore, there is a need to design soft sensors that can predict the concentration of H2S and SO2.

[0033] The structural diagram of the present invention is as follows Figure 2 As shown in the figure, the input data is divided into time series data blocks according to the moving window method, and features are extracted in multiple subspaces through multi-channel multi-head attention. Then, each attention head obtains quality-related spatial features through multiple quality-related attention channels to increase the robustness of the prediction. Finally, the spatial features are used to capture dynamic information through distributed gated recurrent units, and the features processed layer by layer are spliced ​​and the final output is obtained by calculation using the fully connected layer.

[0034] The attention mechanism is to filter out a small amount of important information from a large amount of information, and give a larger weight to the important information and a smaller weight to the unimportant information. Generally speaking, the input of the attention mechanism is three variables: query, key and value. Generally speaking, the query and key are the same. The similarity or correlation is calculated by the query and key to obtain the weight coefficient of the value variable corresponding to each key value, and then the value variable is weighted to finally obtain the attention value.

[0035] Multi-head attention can be simplified as multiple attention mechanisms running in parallel. The flowchart of the multi-head attention mechanism is as follows: Figure 2As shown. Consider using the moving window method to obtain the input matrix, then the query is q∈R L×d , key is k∈R L×d and value is v∈R L×d , L is the time step length, d is the dimension of the auxiliary variable in the soft measurement. Linear represents a fully connected layer without bias, and Concat represents a concatenation layer. Assume that the number of heads of the multi-head attention is m. First, the input vector is processed, and each head corresponds to the query variable q i , key variable k i and value variable v i Through linear changes, it is mapped to the corresponding attention matrix, that is, the corresponding features that need to be paid attention to are extracted. The calculation formula is as follows:

[0036] Q h =W i Q q i

[0037] K h =W i K k i

[0038] V h =W i V v i

[0039] Among them, W i Q , W i K , W i V is the linear fully connected layer corresponding to the i-th head. After the input variable is linearly transformed, the Q of each head is obtained. h ,K h ,V h Matrix, calculates a single attention head query variable Q h and Key variable K h The similarity value α h , as shown in the following formula:

[0040]

[0041] In practical applications, it is divided by a scaling factor d q,k So that d q,k Represents the dimension of the query variable or key variable. The similarity value is normalized using the softmax function. The softmax function formula is as follows:

[0042]

[0043] The self-attention value of each head is obtained by multiplying the similarity value by the value variable. The formula is as follows:

[0044] head i =α h V h

[0045] The obtained head1, head2, ..., head m As the output of the multi-head attention mechanism, it represents the spatial information features extracted from the input space. The essence of the multi-head attention mechanism is the parallel calculation of multiple independent self-attention mechanisms, which is an integrated function. Each attention head is only responsible for a subspace in the input variable, avoiding the problem of information redundancy and excessive calculation when the input space is too large.

[0046] Multi-head attention can capture important spatial information features in the input variables, but lacks information related to quality variables, which will lead to a decrease in prediction accuracy. Therefore, the present invention designs a quality-related attention mechanism, such as Figure 3 As shown. By introducing the quality variable, the quality variable is used as the query variable, the similarity between the quality variable and the spatial information is calculated, and the weight is obtained by normalization using the softmax function. Finally, the weight is assigned to the extracted spatial information features so that the spatial information features and the quality variable are correlated with each other. The model can adaptively perceive information related to the quality variable, thereby improving the accuracy of the prediction. The specific algorithm flow is as follows:

[0047] Assume that the query variable Q = query = [y 1 (t-1),....,y L (t-1)], L is the time step length. Perform a linear transformation on the key variable, The value variable is V i =key=head i ,i=1,2,...,m. The key variable is the multi-channel multi-head attention output head i The similarity is calculated using the dot product formula, and the attention weight is obtained by normalization through the softmax layer:

[0048]

[0049] α Qr The vector is replicated L times in the column direction so that α Qr Expand to match the dimension of the spatial information features with time steps. The final attention value is obtained by the following formula:

[0050] attention i Qr =αi Qr V i

[0051] The quality-related attention value i Qr They are sent to the distributed GRU units for learning. The structure diagram of the GRU unit is as follows Figure 4 As shown, where r t Represents the reset gate, z t represents the update gate, x t Represents the new input, assuming that the number of GRU internal units is s. The hidden state of GRU at time t is From the hidden state of the previous moment and candidate hidden states The specific formula is as follows:

[0052]

[0053] in, Obtained by the update gate, it determines the extent to which the hidden state is updated. The calculation formula of the update gate is as follows:

[0054]

[0055]

[0056] ⊙ represents Hadamard product, when r t When it is close to 0, the reset gate will read the new input and forget the previous calculation state, and the reset gate The calculation formula is as follows:

[0057]

[0058] The GRU unit can effectively capture dynamic information in the input and can be used to extract dynamic time series features in the process industry for prediction tasks. However, since the sampled data is too large, in order to ensure that important information can be preserved as much as possible in the huge information flow and the training speed is fast enough, the present invention adopts a distributed structure. The distributed structure allows a large amount of data to be shunted to the subnet for calculation, ensuring the integrity of the information in the data, reducing the loss of effective information, and at the same time avoiding the problems of reduced prediction accuracy and long calculation time due to excessive load on a single network.

[0059] The dynamic behavior of the distributed GRU in extracting features [h t1 ,h t2 ,h t3 ,...,h tm ] are concatenated into H and sent to the fully connected layer to calculate the predicted hydrogen sulfide emission concentration

[0060]

[0061] like Figure 6 The figure shows the workflow diagram of the present invention. (1) Data preprocessing: Data preprocessing process: This process is mainly carried out before the neural network integrated modeling, and processes the missing data, abnormal data and noise data in the field sampling data, and matches the sampling data and analysis auxiliary variable data on a time scale. (2) Sample selection process: This process mainly divides the preprocessed training data into a training sample set and a verification sample set, and uses the moving window method to divide the window data of the training set and the verification sample set, so as to obtain a time series data set. (3) Network modeling process: Set the appropriate number of iterations and batch size, send the training set to the established network for training, and use the error feedback algorithm (BP) to adjust the network parameters. At the same time, set the training error standard during the modeling process to ensure that the trained network has a high training accuracy.

[0062] Table 1 is the input and output variable table of the soft sensor model of hydrogen sulfide in the sulfur recovery unit. In the SRU recovery production process, it is necessary to ensure that the ratio of the input exhaust gas and air is constant so that the combustion is complete. Therefore, the factors affecting the hydrogen sulfide content in the exhaust gas include the air flow provided to the MEA gas combustion (air to MEA), the air flow provided to the secondary combustion chamber for the complete combustion of the SWS gas (air to SWS), the MEA supplementary gas to ensure the stability of the air flow (MEA SPILLING, MEA SPILLINGair), and the air flow adjusted according to the exhaust gas composition analysis (air to MEA 2).

[0063] Table 1

[0064]

[0065] During the SRU reaction process, errors in measuring instruments, equipment failures, and operational errors can cause data loss or data errors exceeding a certain range. The present invention uses the nearest distance method to process missing data, the absolute mean method to correct abnormal data, and the sliding mean method to remove noise in the collected data. In addition, for a total of 5 field measurement points from v1 to v5, the sampling interval of each field measurement point is 1 minute, and the analysis interval for the hydrogen sulfide concentration unit consumption of SRU emissions is 1 hour, so the fixed mean method is used to achieve time matching of sampling data and analysis data. The specific preprocessing process is as follows:

[0066] (1) Fill in missing data. Read the field collected value v at the i-th measurement point at the current time k according to the sampling interval. i (k), determine the current measurement value vi (k) Is it missing? If there is a missing value, the nearest distance method is used to fill the missing value. The calculation formula is as follows:

[0067]

[0068] where v i (k p ) and v i (k q ) is the non-missing value closest to the kth moment in the collected values ​​of the i-th measurement point, and its corresponding moments are k p and k q .

[0069] (2) Abnormal data correction. First, we need to determine whether the current data is abnormal data: set a sliding window with the current time as the end point and a fixed width of L, and calculate the mean of all sample values ​​in the window.

[0070] The calculation formula is as follows:

[0071]

[0072] in is the mean of the sampled values ​​in the sliding window. The judgment of abnormal data is as follows:

[0073]

[0074] where k p Take the empirical value as 4. If this formula holds, it means that the collected value v of the measuring point i at the kth moment is i (k) is abnormal data. When v i (k) When the data is abnormal, the above Replace the current sampling value v i (k).

[0075] (3) Noise data filtering. For field data mixed with a large amount of noise, the sliding mean algorithm is used to achieve data filtering and denoising. The sliding mean algorithm used first sets a sliding window with a fixed width, which slides along the time series and takes the arithmetic mean of the data in the window as the output value after filtering.

[0076] Among them, the filtering algorithm formula is:

[0077]

[0078] in is the sliding window size used for data filtering, v′ i (k) is the output value of measurement point i after filtering at the kth moment.

[0079] After the sample preprocessing is completed, the sample selection process is carried out. First, considering the process dynamics, the present invention adopts the data enhancement method to construct the data block, the data block size is 20×1, and each training is sent to the model for training in blocks. The specific data blocks are as follows:

[0080] x(t)=[v1(t) ... v5(t) v1(t-5) ... v5(t-5) v1(t-7) ... v5(t-7) v1(t-9) ... v5(t-9)]

[0081] 70% of the data is selected from all the data to form the training data of the HAT-DGRU deep neural network, and the training data is normalized using the maximum minimization method. Then, the moving window method is used to obtain the time series data after the division. The specific steps are as follows: Select the moving window size as L, construct the moving window data, and its training data is: Ω train ={X,Y}={X(t),Y(t),t=9,10,....N},

[0082] The constructed input data matrix size is 20×4 and can be listed as follows:

[0083]

[0084] The following introduces the hyperparameter selection of the proposed invention. First, select a suitable batch size N, select N = 256. Then select a suitable learning rate and maximum number of iterations. The learning rate is more suitable between 0.1 and 0.0001, and the maximum number of iterations is 300. The matrix size of the multi-channel multi-head attention is 20, the number of heads of the multi-head attention and the number of gated recurrent units is m = 4, and the W corresponding to each head is i Q , W i K and W i Q The dimension size is 5×5, and the number of hidden units of the GRU unit is s=10. The weights that need to be updated during the learning process are as follows:

[0085]

[0086] The following is an introduction to the deep neural network feature extraction and modeling process of the proposed invention: a batch of data is fed into the network for training, where q = k = v = X(t). Linear represents a fully connected layer without bias, and Concat represents a concatenation layer. Encode the input variables:

[0087] Q h =W i Q q i

[0088] K h =W i K k i

[0089] V h =W i V v i

[0090] Among them, W i Q , W i K , W i V is the linear fully connected layer corresponding to the i-th head. The input variable is encoded by linear transformation to obtain the Q of each head. h ,K h ,V h Matrix, calculates a single attention head query variable Q h and Key variable K h The similarity value α h ,, using softmax function normalization:

[0091]

[0092] Multiply the similarity value by the value variable to get the self-attention value of each head:

[0093] head i =α h V h

[0094] Assume that the query variable Q = query = [y 1 (t-1),....y L (t-1)], L is the time step length. Perform a linear transformation on the key variable, In order to ensure that feature information is not lost, the value variable is a multi-channel multi-head attention feature, V i =key=head i ,i=1,2,3,4. The key variable is the multi-channel multi-head attention output head i The similarity is calculated using the dot product formula, and the attention weight is obtained by normalization through the softmax layer:

[0095]

[0096] α Qr The vector is replicated L times in the column direction so that α Qr Expand to match the dimension of the spatial information features with time steps. The final attention value is obtained by the following formula:

[0097] attention i Qr =α i Qr V i

[0098] The quality-related attention value i Qr They are sent to the distributed GRU units for extraction. t Represents the reset gate, z t represents the update gate, x t Represents new input, which is attention i Qr The hidden state of GRU at time t is From the hidden state of the previous moment and candidate hidden states Linear interpolation yields:

[0099]

[0100] in, Obtained by the update gate, it determines the extent to which the hidden state is updated. The calculation formula of the update gate is as follows:

[0101]

[0102]

[0103] ⊙ represents Hadamard product, when r t When it is close to 0, the reset gate will read the new input and forget the previous calculation state, and the reset gate The calculation formula is as follows:

[0104]

[0105] The dynamic behavior of the distributed GRU in extracting features [h t1 ,h t2 ,h t3 ,h t4 ] are concatenated into H, and H is sent to the fully connected layer to calculate the predicted hydrogen sulfide emission concentration:

[0106]

[0107] The predictions for each input in a batch are calculated through the fully connected layer and the true value Y i The sum of the mean square errors of (t):

[0108]

[0109] Using the error back propagation and time back propagation algorithms, J(θ) is used to update the weights through the chain rule until the number of iterations is reached. After the model training is completed, the model is used in online measurement. The input data of the test set is sent to the model to obtain the output value, and the output value is denormalized to obtain the predicted hydrogen sulfide concentration value. In summary, through data preprocessing, sample selection, construction of time series data and network training, the online measurement and online estimation of hydrogen sulfide variables in the SRU recovery process are realized.

[0110] In summary, the present invention aims at the problems of complex process technology of sulfur recovery unit (SRU) in industrial oil refining, difficulty in online measurement of key quality variables, high operating cost of production process, etc. The present invention adopts data correction and data mining technology to carry out data preprocessing, finds rules from production and analysis data; adopts deep neural network technology to establish intelligent soft measurement instrument and hydrogen sulfide waste gas displacement model; adopts attention mechanism technology to capture the spatial characteristics between input and output, improves the modeling accuracy of gated cyclic unit network, and finally forms a set of intelligent detection methods for hydrogen sulfide concentration in exhaust gas of SRU process. The invention has the characteristics of fast response time, high modeling accuracy, strong reasoning ability and convenient management, which provides help to ensure the safe production and recovery of SRU, reduce environmental pollutants and save production costs.

[0111] The examples of the present invention are described in detail above in conjunction with the embodiments, but the present invention is not limited to the above examples. Various changes can be made within the knowledge scope of ordinary technicians in the field without departing from the purpose of the present invention, and should also be regarded as the protection scope of the present invention.

Claims

1. A method for detecting hydrogen sulfide concentration in a sulfur recovery process, characterized in that: include: A data preprocessing module, which preprocesses the SRU recovery reaction data collected by the device sensor and uses it as training data for modeling the hydrogen sulfide concentration in the exhaust gas of the SRU recovery device; The sample selection module divides the training data output by the data preprocessing module into training samples for deep neural network modeling and verification samples for neural network integration; The time series data construction module divides the training samples output by the sample selection module using a moving time window to obtain individual neural network training samples with time steps; The deep neural network processing module extracts the spatiotemporal features between auxiliary variables through the multi-channel multi-head attention mechanism through the individual neural network training samples with time steps, and then adaptively discovers the time features related to the quality variables through the quality-related attention multi-channel and gives weights. The distributed GRU unit is used to extract the dynamic information in the multi-channel features, and the result obtained by further splicing and calculating through the fully connected layer is used as the final output; The preprocessing of the data preprocessing module includes supplementing missing data, correcting abnormal data and filtering noise data, thereby generating an output value v including 5 sets of sampling values ​​and 1 set of analysis values. i (n), (i=1,2,...,6), after data preprocessing, v1~v5, a total of 5 groups of analysis values ​​constitute the training data of the HAT-DGRU deep neural network, and the data enhancement method is used to construct the data block as follows: x(t)=[v1(t)...v5(t)v1(t-5)...v5(t-5)v1(t-7)...v5(t-7)v1(t-9)...v5(t-9)]; The time series input data constructed by the time series data construction module is as follows: The training data of the HAT-DGRU deep neural network is composed of 5 groups of analysis values ​​from v1 to v5 and v6 after data preprocessing: Ω train ={X,Y}={X(t),Y(t),t=1,2,....N}={v1(t),...,v5(t),v6(t),t=1,2,....N}; The deep neural network processing module selects the hyperparameters of the network, including the number of iterations, batch size, learning rate, the number of multi-heads of multi-head attention, and the number of GRU unit hidden layers; A batch of data is sent into the network for learning, the mean square error is calculated, the parameters are updated by the chain rule, the cycle is repeated to the maximum number of iterations to obtain the final model, the input data of the test set is sent into the model to obtain the output value, and the output value is denormalized to obtain the predicted value.

2. The method for detecting hydrogen sulfide concentration in a sulfur recovery process according to claim 1, characterized in that: After the sample selection module extracts 30% of the training data as verification samples, the remaining data is used as training samples of the deep neural network and the training samples are subjected to maximum minimization normalization processing.

Citation Information

Patent Citations

  • Dynamic sulfur recovery soft measurement modeling method based on parameterized FIR model

    CN110442991A