A method for estimating the concentration of sulfur dioxide and hydrogen sulfide in a sulfur recovery unit based on TWIMLESN
Patent Information
- Application Number
- CN202611112636.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-27
AI Technical Summary
[0007]本发明旨在提供一种基于TWIMLESN的硫回收装置二氧化硫和硫化氢浓度估计方法,以解决现有技术中训练样本需求量大、学习时间长、对强非线性系统拟合能力不足的问题
[0057]本发明直接以硫回收装置辅助变量作为TWIMLESN输入,取消传统方法中时间序列建模前置步骤,通过范数项隐含处理时间动态特征,简化建模流程;
Smart Images

Figure CN122986505A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of soft measurement technology in chemical processes, and relates to a method for estimating the concentrations of hydrogen sulfide (H2S) and sulfur dioxide (SO2) in a sulfur recovery device based on a dual-row multilayer echo state network (TWIMLESN) with dynamic gain and time curvature invariance. Specifically, it is a method for estimating the concentrations of sulfur dioxide and hydrogen sulfide in a sulfur recovery device based on TWIMLESN. Background Technology
[0002] In the chemical processes of sulfur recovery units in oil refineries, real-time online monitoring of sulfur dioxide (SO2) and hydrogen sulfide (H2S) plays a crucial role in preventing environmental pollution and ensuring quality control during the production of sulfur-containing byproducts. The chemical processes in sulfur recovery units often operate in high-temperature, high-radiation, and rapidly changing environments. Direct, timely, and accurate measurement and data acquisition are not only extremely costly but also present challenges in maintaining the measurement and acquisition equipment. Furthermore, the highly nonlinear characteristics of the numerical curves for sulfur dioxide and hydrogen sulfide generation make it very difficult to estimate the output variables using existing technologies.
[0003] Over the past decade, neural network-based soft sensing technology has developed rapidly and has been applied in practical chemical processes by many enterprises and research institutions, achieving good results. However, existing neural network soft sensing modeling methods generally suffer from the "black box problem" of neural network models. For functions with strongly nonlinear characteristic curves, large datasets are required for learning and training, resulting in long learning times, high learning costs, and the inability to quickly achieve high learning accuracy in real time. Consequently, the measurement accuracy of the measured variables cannot meet the relevant accuracy requirements of fine chemical engineering.
[0004] In 2006, a technical report on time-warping invariant echo state networks was published. This report proposed a single-layer echo state network that is essentially invariant to the time warping of the input. It uses a leaky integral neuron with a nonlinear activation function to directly feed the original input signal into a specially designed ESN, while simultaneously performing preprocessing steps such as dynamic time warping (DTW) for data processing. However, TWIESNs have the following shortcomings: (1) They are single-layer single-column structures and lack the ability to extract the deep dynamic features of complex time series in layers; (2) They use nonlinear activation functions, which leads to nonlinear distortion in the state space of the reservoir, which is not conducive to linear solutions under small sample conditions; (3) TWIESNs are general time series processing methods and are not specifically designed for the specific strongly nonlinear industrial scenario of H2S and SO2 concentration estimation in sulfur recovery devices; (4) The parameters in the time-warping invariant algorithm, i.e., dynamic time warping (DTW), are fixed parameters and cannot match the gain changes of adjacent time points in the dynamic data change process in real time.
[0005] In its previous research, the applicant proposed a soft measurement method for sulfur recovery devices based on Leakage Integral Echo State Network (LiESN). It adopts a single-column multilayer structure, but still includes a tanh activation function. The ridge regression algorithm is used to solve the output weights, and more than 3,000 training samples are required to achieve high accuracy.
[0006] Therefore, there is an urgent need for a soft measurement method that can achieve high-precision concentration estimation of strongly nonlinear systems under small sample conditions. Summary of the Invention
[0007] The present invention aims to provide a method for estimating the concentrations of sulfur dioxide and hydrogen sulfide in a sulfur recovery device based on TWIMLESN, in order to solve the problems of large training sample requirements, long learning time, and insufficient fitting ability for strongly nonlinear systems in the prior art.
[0008] To achieve the above objectives, the present invention provides a method for estimating the concentrations of sulfur dioxide and hydrogen sulfide in a sulfur recovery device based on TWIMLESN, comprising the following steps:
[0009] (1) Data acquisition: Collect key variable data of the sulfur recovery unit in the chemical process, including auxiliary variables u1, u2, u3, u4, u5 and dominant variables y1, y2;
[0010] Where u1 is the flow rate of MEA gas rich in H2S, u2 is the air flow rate entering the main combustion chamber, u3 is the air flow rate entering the second combustion chamber, u4 is the flow rate of SWS gas rich in H2S and NH3, u5 is the air flow rate mixed with SWS gas for combustion, y1 is the H2S concentration in the exhaust gas, and y2 is the SO2 concentration in the exhaust gas.
[0011] (2) Offline learning: The first 1 / 50 samples collected are used as the training dataset to start offline learning. The output weights of the neural network under the training set are obtained through TWIMLESN's reservoir learning algorithm.
[0012] (3) Online estimation: The output weights of the neural network under the training set obtained by the offline learning algorithm of the reservoir are used as the output weights of the dominant variable estimation under the subsequent test set for online estimation to obtain the concentration estimates at subsequent time points, i.e., the estimated values of H2S and SO2 concentrations. The mean square error (MSE) is used as the evaluation index of the network estimation accuracy. If the MSE does not meet the engineering requirements, the relevant parameters of TWIMLESN and the number of training sets are manually adjusted to perform a second offline learning and online estimation.
[0013] The TWIMLESN is a multi-layer echo state network with dual-column misaligned connections and no activation function.
[0014] The TWIMLESN calculates the norm of the input variable at adjacent time points using a dynamic gain time-curvature invariant method. And use it as a parameter for the leakage integral term; the norm is the L2 norm, that is, the L2 norm of the input variable at the current time n and the input variable at the previous time n-1; a parameter that is invariant to time curvature. ,in, This represents the average norm on the training dataset. This represents the dynamic gain when running the neural network.
[0015] In step (2), the pseudo-inverse method is used to calculate the output weights of the neural network. : ,in for The generalized inverse matrix, in the formula Transpose to get .
[0016] In step (2), the number of samples in the training dataset is 1 / 50 of the total number of samples.
[0017] The mean squared error of the H2S concentration learning was as high as 9 × 10⁻⁵ when trained on a dataset representing 1 / 50 of the total sample size. -19 The mean square error of the SO2 concentration learning is as high as 1×10⁻⁶. -26 Under the test set (the number of samples in the test dataset is 49 / 50 of the total number of samples), the mean square error of the predicted H2S concentration is no greater than 4 × 10⁻⁶. -4 The mean square error of the SO2 concentration prediction is no greater than 4 × 10⁻⁶. -4 .
[0018] The TWIMLESN has 10 layers (l=10) and R neurons per layer. N =50; the sampling period for the auxiliary and dominant variables is 1 minute.
[0019] The state update function of TWIMLESN is:
[0020] ;
[0021] in, Let n be the state variable of the l-th layer at time n. Let n be the input of the l-th layer at time n. Leakage rate, For time-invariant bending parameters, Let n be the input variable of the neural network at time n. Let n be the output variable of the neural network at time n-1. Let be the input connection weight matrix of the l-th layer neural network. Let be the internal connection weight matrix of the reservoir of the l-th layer neural network. This is the feedback connection weight matrix for outputting feedback to the reserve pool.
[0022] The method also includes an accuracy judgment step: based on expert experience, it is judged whether the accuracy of the learning error meets the production requirements. If the mean square error (MSE) does not meet the engineering requirements, the relevant parameters of TWIMLESN and the number of training sets are manually adjusted to perform a second offline learning until the accuracy meets the requirements before entering online estimation.
[0023] The auxiliary variables collected in step (2) are the first 500 datasets obtained from sampling, which are used as training datasets. The neural network output weights and network output estimates under the training dataset are obtained by the reservoir learning algorithm based on dynamic gain TWIMLESN.
[0024] The offline learning step (2) includes the following steps:
[0025] 1) TWIMLESN network structure and variable definitions:
[0026] TWIMLESN is a multi-layer echo-state network without activation functions. The input layer dimension R of the TWIMLESN network is set. K =10, Number of neurons in a single hidden layer R N =50, Output layer dimension R Q =1, the number of ESN layers (echo state network layers) in TWIMLESN is l=10, and the input layer, hidden layer, and output layer variables of the network at time n are defined as follows:
[0027] ,
[0028] in, For K-dimensional input variables, their vector form is: , represents the K-dimensional input of the network at time n (composed of auxiliary variables);
[0029] Here is the state vector for each layer of the l-th neural network: ;
[0030] The output variable is Q-dimensional, and its vector form is: When Q=1, it is a scalar, and in this paper it is represented as the concentration of H2S or SO2 estimated by the network output at time n;
[0031] The input connection weight matrix, the internal connection weight matrix of the SR, the output connection weight matrix, and the feedback connection weight matrix from the output to the SR of the l-th layer of the network are respectively expressed as:
[0032] : No. The input connection weight matrix of the layer, dimension ;
[0033] : Internal connection weight matrix of the reserve pool, dimension ;
[0034] Output connection weight matrix (i.e., the output weights to be learned), dimension N×l;
[0035] The feedback connection weight matrix from the output to the reservoir has a dimension of N×l;
[0036] 2) Data preparation:
[0037] Given a tutor input / output sequence of length T=500 The data is then processed into a time series using the following formula, resulting in 5 input variables and 1 output variable. These are then fed into the network to train the TWIMLESN network to output... Approaching the mentor's output ;
[0038] 3) Network initialization: SR initial state x (l) (0) Randomly select values and input the connection weight matrix. and feedback connection weight matrix Take values that follow a normal uniform distribution, SR internal connection weight matrix The sparse connection coefficients and the sparse matrix with sparsity of min(10 / N, 1);
[0039] 4) State update: The state of the reservoir at each time step is calculated in chronological order using the state update equation based on the time curvature invariance of dynamic gain (including the input norm and leakage integral of adjacent time steps).
[0040] The state update equation for TWIMLESN at time n in layer l-1 is:
[0041]
[0042] Among them, when At that time, take , ;
[0043] The input for the l-th reservoir layer is:
[0044]
[0045] State matrix Dimension is ;
[0046] The state update equation for TWIMLESN at time n in layer l is:
[0047] ;
[0048] 5) State Collection: Concatenate the inputs, states, and outputs from the previous time step into a state collection matrix M, and collect all (u(n+1), x(n+1), y(n)) values from all time steps in the training set into the state collection matrix. ;
[0049] 6) Output weight calculation: The output weights of the neural network are calculated using the pseudo-inverse method. : ,in for The generalized inverse matrix, in the formula Transpose to get ;
[0050] 7) Send the input variable u(n+1) that needs to be predicted at time (n+1) to step 4) to calculate the state variable x(n+1), then proceed to step 5) to collect the state matrix, and finally calculate the output equation according to the following: Predict the output at the next moment.
[0051] The method described in this invention further includes an accuracy determination step, specifically:
[0052] (1) After obtaining the output weights through the pseudo-inverse method, calculate the mean square error of network training according to the MSE (mean square error) formula;
[0053] MSE=(d(n)−y(n)) 2
[0054] (2) Based on expert experience, determine whether the learning error accuracy in the learning process meets the production requirements. If it does, proceed to online estimation; otherwise, restart offline learning by increasing the number of learning samples until the learning accuracy meets the expert experience requirements.
[0055] This invention employs a multi-layer (L=10) stacked structure, achieving hierarchical extraction of complex dynamic features through inter-layer state transfer. Existing technology TWIESNs uses leaky integral neurons with nonlinear activation functions; this invention eliminates activation functions in all layers, avoiding state-space distortion caused by nonlinear mapping, and facilitating linear solutions using pseudo-inverse methods under small sample conditions. TWIESNs is a general dynamic pattern recognition method that improves upon the static parameter setting in the original time-curvature invariant method by using dynamic parameter setting. Specifically, it uses the reciprocal of the sum of the norms of input data at adjacent time points as the dynamic gain parameter, which not only improves the matching degree of time-curvature invariance between input data at adjacent time points but also enhances the correlation of intrinsic information in dynamic data changes. This invention specifically addresses the problem of highly nonlinear estimation of H2S and SO2 concentrations in sulfur recovery devices through a systematic design.
[0056] The present invention discloses a method for estimating sulfur dioxide and hydrogen sulfide concentrations in a sulfur recovery device based on TWIMLESN, the advantages of which are as follows:
[0057] This invention directly uses the auxiliary variables of the sulfur recovery unit as TWIMLESN input, eliminating the pre-step time series modeling in traditional methods, and simplifying the modeling process by implicitly handling time dynamic features through norm terms;
[0058] A dual-column, multi-layer TWIMLESN structure without activation functions is constructed to avoid nonlinear distortion caused by activation function mapping. The multi-layer structure achieves hierarchical extraction of complex dynamic features through inter-layer state transfer. Furthermore, the elimination of activation functions in this invention avoids nonlinear distortion of the state space.
[0059] The time curvature invariance method based on dynamic gain is used to calculate the input norm at adjacent time points as the leakage integral parameter. The strong nonlinear signal is transformed into a smooth rate of change and introduced into the state matrix of the reservoir. It has essential invariance to the time curvature of the concentration curve and enhances the approximation capability of the strong dynamic nonlinear system of chemical process.
[0060] The pseudo-inverse method is used for offline linear solution of the output weights, reducing the number of training samples. Only 500 training samples (less than 1 / 50 of the total samples) are needed to achieve an MSE of 3.33×10 for H2S test samples. -4 SO2 test sample MSE 3.98×10 -4 The training sample error reached 10. -19 ~10 -26The algorithm achieves high-precision prediction at the order of magnitude, reducing the number of training samples required by more than 3,000 in existing literature by orders of magnitude. It is simple, fast, and meets the real-time requirements of industrial sites. By constructing the state sequences of x(n-1) and x(n), historical state collection is achieved. While retaining the advantages of the multi-layer structure of deep echo state networks, it avoids gradient problems and preserves time-dependent information in a simpler way.
[0061] In summary, this invention has achieved significant results in simplifying the modeling process, reducing the need for training samples, and improving prediction accuracy and real-time performance. Attached Figure Description
[0062] Figure 1 This is a schematic diagram of a sulfur recovery unit.
[0063] In the diagram, 1-MEA gas inlet, 2-SWS gas inlet, 3-combustion furnace, 4-water condensation equipment, 5-first catalytic reactor, 6-first condenser, E104-heat exchanger, 7-second catalytic reactor, 8-second condenser, D104-sulfur storage tank.
[0064] Figure 2 This is a schematic diagram of the TWIMLESN network structure;
[0065] Figure 3 The H2S learning error curve of the offline learning algorithm for the reservoir;
[0066] Figure 4 To obtain the H2S error curve for the online learning algorithm;
[0067] Figure 5 The SO2 learning error curve for the offline learning algorithm of the reservoir;
[0068] Figure 6 The SO2 error curve for entering the online learning algorithm;
[0069] Figure 7 This is a workflow diagram. Detailed Implementation
[0070] Example 1
[0071] The present invention discloses a method for estimating sulfur dioxide and hydrogen sulfide concentrations in a sulfur recovery unit based on TWIMLESN. This method is applied to a sulfur recovery unit in an oil refinery, and the steps are as follows:
[0072] (1) Data acquisition: Collect key variable data of the sulfur recovery unit in the chemical process, including auxiliary variables u1, u2, u3, u4, u5 and dominant variables y1, y2;
[0073] Where u1 is the flow rate of MEA gas rich in H2S, u2 is the air flow rate entering the main combustion chamber, u3 is the air flow rate entering the second combustion chamber, u4 is the flow rate of SWS gas rich in H2S and NH3, u5 is the air flow rate mixed with SWS gas for combustion, y1 is the H2S concentration in the exhaust gas, and y2 is the SO2 concentration in the exhaust gas; unit: m 3 / h;
[0074] The dominant variables are the H2S concentration y1 and SO2 concentration y2 in the exhaust gas, in cubic meters per second (m³). 3 / h; The sampling period for all variables is 1 minute, and a total of 10080 samples are collected; The collected data is stored in the database, with the first 500 samples used as the training dataset and the last 9580 samples used as the test dataset;
[0075] (2) Offline learning: The first 1 / 50 samples collected are used as the training dataset to start offline learning. The output weights and estimated network output values of the neural network are obtained through TWIMLESN's reservoir learning algorithm, which includes the following steps:
[0076] 1) TWIMLESN network structure and variable definitions:
[0077] TWIMLESN is a multi-layer echo-state network without activation functions. The input layer dimension R of the TWIMLESN network is set. K =10, Number of neurons in a single hidden layer R N =50, Output layer dimension R Q =1, the number of ESN layers (echo state network layers) in TWIMLESN is l=10, and the input layer, hidden layer, and output layer variables of the network at time n are defined as follows:
[0078] ,
[0079] in, For K-dimensional input variables, their vector form is: , represents the K-dimensional input of the network at time n (composed of auxiliary variables);
[0080] Here is the state vector for each layer of the l-th neural network: ;
[0081] The output variable is Q-dimensional, and its vector form is: When Q=1, it is a scalar, and in this paper it is represented as the concentration of H2S or SO2 estimated by the network output at time n;
[0082] The input connection weight matrix, the internal connection weight matrix of the SR, the output connection weight matrix, and the feedback connection weight matrix from the output to the SR of the l-th layer of the network are respectively expressed as:
[0083] : No. The input connection weight matrix of the layer, dimension ;
[0084] : Internal connection weight matrix of the reserve pool, dimension ;
[0085] Output connection weight matrix (i.e., the output weights to be learned), dimension N×l;
[0086] The feedback connection weight matrix from the output to the reservoir has a dimension of N×l;
[0087] 2) Data preparation:
[0088] Given a tutor input / output sequence of length T=500 The data is then processed into a time series using the following formula, resulting in 5 input variables and 1 output variable. These are then fed into the network to train the TWIMLESN network to output... Approaching the mentor's output ;
[0089] 3) Network initialization: SR initial state x (L) (0) Randomly select values and input the connection weight matrix. and feedback connection weight matrix Take values that follow a normal uniform distribution, SR internal connection weight matrix The sparse connection coefficients and the sparse matrix with sparsity of min(10 / N, 1);
[0090] 4) State update: The state of the reservoir at each time step is calculated in chronological order using the time-curvature invariant state update equation (including the input norm and leakage integral of adjacent time steps);
[0091] The state update equation for TWIMLESN at time n in layer l-1 is:
[0092]
[0093] Among them, when At that time, take , ;
[0094] The input for the l-th reservoir layer is:
[0095]
[0096] State matrix ;
[0097] The state update equation for TWIMLESN at time n in layer l is:
[0098] ;
[0099] in, .
[0100] 5) State Collection: Concatenate the inputs, states, and outputs from the previous time step into a state collection matrix M, and collect all (u(n+1), x(n+1), y(n)) values from all time steps in the training set into the state collection matrix. ;
[0101] 6) Output weight calculation: The output weights of the neural network are calculated using the pseudo-inverse method. : ,in for The generalized inverse matrix, in the formula Transpose to get ;
[0102] 7) Send the input variable u(n+1) that needs to be predicted at time (n+1) to step 4) to calculate the state variable x(n+1), then proceed to step 5) to collect the state matrix, and finally calculate the output equation according to the following: Predict the output at the next moment;
[0103] The TWIMLESN method calculates the norm of the input variable at adjacent time points using the time curvature invariant method. And use it as a parameter for the leakage integral term; the norm is the L2 norm, that is, the L2 norm of the input variable at the current time n and the input variable at the previous time n-1; a parameter that is invariant to time curvature. ,in, This represents the average norm on the training dataset. This represents the dynamic gain when running the neural network.
[0104] The method further includes a precision determination step, specifically:
[0105] (1) After obtaining the output weights through the pseudo-inverse method, calculate the mean square error of network training according to the MSE (mean square error) formula;
[0106] MSE=(d(n)−y(n)) 2
[0107] (2) Based on expert experience, determine whether the learning error accuracy in the learning process meets the production requirements. If it does, proceed to online estimation; otherwise, restart offline learning by increasing the number of learning samples until the learning accuracy meets the expert experience requirements.
[0108] (3) Online estimation: The network output weights obtained from the offline learning algorithm in the reservoir are used as the output weights for estimating the dominant variables in the subsequent test set. Online estimation is then performed to obtain the concentration estimates at subsequent time points, i.e., the estimated concentrations of H2S and SO2. The mean square error (MSE) is used as the evaluation index for the network estimation accuracy. If the MSE does not meet the engineering requirements, the relevant parameters of TWIMLESN and the number of training sets are manually adjusted for a second offline learning and online estimation.
[0109] Accuracy verification and training conditions:
[0110] In this embodiment, the MSE of the test set (9580 samples) is calculated after training is completed:
[0111] The predicted MSE for H2S concentration is 3.326640306113185e-04;
[0112] The predicted MSE for SO2 concentration is 3.981019300797816e-04.
[0113] The training error of the training samples reached:
[0114] H2S training sample error: 9.697747306734562e-19;
[0115] SO2 training sample error: 1.534317840519294e-26.
[0116] Based on expert experience, the above precision meets the production requirements of sulfur recovery units (typically requiring an MSE of no more than 5 × 10⁻⁶). -4 5×10 -4 If the requirements are not met, the number of training samples is increased (e.g., to 600) and offline learning is repeated until the accuracy meets the requirements.
[0117] Figure 1This is a schematic diagram of a sulfur recovery unit. The function of a sulfur recovery unit (SRU) is to recover sulfur from sulfur-containing gases to the greatest extent possible before emission. To reduce environmental pollution from exhaust emissions, soft-sensor modeling and prediction of sulfur dioxide and hydrogen sulfide gas concentrations in the sulfur recovery unit are essential. The unit is shown in the figure. The SRU mainly processes two types of acidic gases: one rich in hydrogen sulfide, also known as MEA gas, which mainly comes from the gas scrubbing unit; and the other rich in hydrogen sulfide and ammonia, also known as SWS gas, which mainly comes from the wastewater stripping unit. The acidic gases are combusted with air in combustion furnace F101, which consists of two combustion chambers. MEA gas is combusted in the first combustion chamber, and SWS gas is combusted in the second combustion chamber. The combustion products sequentially enter the water condenser E101, catalytic reactor R101 and condenser E102, and catalytic reactor R102 and condenser E103, ultimately collecting approximately 90% of the sulfur. The air supply in the combustion furnace F101 plays a crucial role in the combustion of acidic gases. A sufficient air supply ensures complete combustion of the acidic gases. Insufficient air supply will result in excessive hydrogen sulfide and sulfur dioxide in the exhaust gas. Therefore, accurately measuring the concentrations of sulfur dioxide and hydrogen sulfide to control the air supply in the combustion furnace is essential.
[0118] Figure 2 This is a schematic diagram of the TWIMLESN network structure. TWIMLESN is a designed dual-column multilayer neural network structure based on ESN. Unlike traditional deep echo state networks, its main feature is its ability to memorize state variables at time n-1 and update them using the state variable calculation formula at time n. Specifically, the input of the l-th layer of the neural network at time n in the right column comes not only from the state variables of the l-1 layer at time n, but also from the state variables of the l+1 layer at time n in the left column. This structure enhances the useful historical information in the data structure and improves prediction accuracy. Furthermore, TWIMLESN eliminates the activation function, avoiding nonlinear distortion caused by activation function mapping. It uses a time-curvature invariant method based on dynamic gain to calculate the input norm of adjacent time steps as the leakage integral parameter, transforming the strong nonlinear signal into data with a smoother rate of change and introducing it into the reservoir state matrix, further enhancing its ability to approximate the strongly dynamic nonlinear system of chemical processes.
[0119] Figure 3 The figure shows the H2S learning error curve of the offline learning algorithm for the reserve pool. Under offline learning, the training dataset contains 500 data points. As can be seen from the figure, the prediction accuracy of TWIMLESN can reach MSE of 9.697747306734562e-19.
[0120] Figure 4The H2S error curve for the online learning algorithm is shown. Under online learning, the test dataset contains 9580 samples. As can be seen from the figure, the prediction accuracy of TWIMLESN reaches an MSE of 3.326640306113185e-04. This achieves satisfactory prediction accuracy while significantly reducing the amount of training data.
[0121] Figure 5 The figure shows the SO2 learning error curve of the offline learning algorithm for the reservoir. Under offline learning, the training dataset contains 500 data points. As can be seen from the figure, the prediction accuracy of TWIMLESN can reach MSE of 1.534317840519294e-26.
[0122] Figure 6 The SO2 error curve for the online learning algorithm is shown. Under online learning, the test dataset contains 9580 samples. As can be seen from the figure, the prediction accuracy of TWIMLESN reaches an MSE of 3.981019300797816e-04. This achieves satisfactory prediction accuracy while significantly reducing the amount of training data.
[0123] Figure 7 This is a workflow diagram. The workflow is as follows:
[0124] 1. Data Collection and Preparation
[0125] First, auxiliary and dominant variables are collected, with a sampling period of 1 minute. When a total of 500 sets of data are collected, a training dataset is generated.
[0126] 2. Data Preprocessing
[0127] A time-curvature invariant method based on dynamic gain is used to calculate the L2 norm of each input data set in the training data at the current time step and the previous time step, and to extract features.
[0128] 3. Model Building and Training
[0129] A DEEPESN (Deep Echo State Network) model with a dual-column, multi-layer structure was constructed and its parameters were set. The processed input and output data were input into the network, the state variables were calculated, and the output weights of the network were solved by the pseudo-inverse method to complete the model training.
[0130] 4. Online prediction and error assessment
[0131] Collect new input data, repeat feature extraction and state variable calculation, use the model to predict the output variable; calculate the MSE error value of the prediction result to determine whether it meets the engineering accuracy requirements.
[0132] 5. Iterative optimization
[0133] If the error does not meet the requirements, return to the model building step, adjust the parameters, and retrain the model.
[0134] If the error meets the requirements, the model enters the normal prediction phase and continues to predict the output variables at the next time step.
[0135] Example 2
[0136] [1] Li Jun, Yue Wenqi. Soft measurement dynamic modeling method and application based on leakage integral echo state network [J]. Journal of Chemical Industry and Engineering (China), 2014, 65(10):4004-4014.
[0137] This embodiment is basically the same as Embodiment 1, except that it uses a single-layer leakage integral echo state network with 8000 training samples (approximately 79% of the total samples). The test samples are 2080 (approximately 21% of the total samples) for online prediction. The results show that the H2S test MSE is 2.58 × 10⁻⁶. -4 The SO2 test MSE was 4.15 × 10⁻⁶. -4 It can still meet the general industrial monitoring requirements (MSE < 2×10). -3 2×10 -3 This demonstrates that the present invention still exhibits good generalization ability under extremely small sample conditions.
[0138] Example 3
[0139] [1] Yue Wenqi. Improved DeepESN soft measurement modeling method and its application [J]. Measurement & Control Technology, 2021, 40(10):63-68. DOI:10.19708 / j.ckjs.2021.08.255.
[0140] This embodiment is basically the same as Embodiment 1, except that it uses a deep leakage integral echo state network, with 3000 training samples (approximately 30% of the total samples). The test samples are 7080 (approximately 70% of the total samples) for online prediction. The results show that the H2S test MSE is 1.97 × 10⁻⁶. -6 The SO2 test MSE was 2.31 × 10⁻⁶. -6 It can still meet the general industrial monitoring requirements (MSE < 2×10). -3 2×10 -3 However, the prediction accuracy drops significantly with smaller training datasets, indicating that the present invention still has good generalization ability under extremely small sample conditions.
[0141] Example 4
[0142] This embodiment is basically the same as Embodiment 1, except that it introduces an adaptive soft measurement method for sulfur recovery process based on instant learning and twin support vector regression machine (reference: XU Shuying, et al. Adaptive soft measurement method for sulfur recovery process based on instant learning and twin support vector regression machine [J]. Information and Control, 2024).
[0143] A Just-in-Time (JITL) learning strategy was adopted. At each prediction stage, samples similar to the current query sample were retrieved from the historical database to construct a local model, which was then modeled using Twin Support Vector Regression (TSVR). The local model was updated as the query sample changed, thus adapting to the time-varying characteristics of the sulfur recovery process. The training sample size was 9000 (approximately 90% of the total sample). The test sample size was 100 (approximately 1% of the total sample). Test results showed that the MSE for H2S was 3.33 × 10⁻⁶. −4 The SO2 test MSE was 5.62 × 10⁻⁶. −4 Although this method achieved H2S prediction accuracy similar to that of the present invention on the test set, its SO2 prediction accuracy was lower than that of the present invention (5.62 × 10⁻⁶). −4 > 3.98×10 −4 Furthermore, it requires 9,000 training samples (90% of the total), far exceeding the 500 training samples (5% of the total) required by this invention. This demonstrates that the present invention significantly reduces the training sample requirement, making it more practical and economical.
[0144] Example 5
[0145] This embodiment is basically the same as embodiment 1, except that a soft measurement method based on a stacked self-encoder is used (reference: Zhang Qiang, et al. Soft measurement of H2S and SO2 concentrations in a sulfur recovery device based on a stacked self-encoder [J]. Journal of Chemical Industry and Engineering, 2023, 74(5): 2156-2165).
[0146] Stacked autoencoders are deep neural network structures that perform unsupervised pre-training layer by layer by stacking multiple autoencoders, followed by supervised learning for fine-tuning to extract deep feature representations of the input data. This method is applied in a sulfur recovery unit to estimate H2S and SO2 concentrations using auxiliary variables through multi-layer nonlinear mapping. The training sample size was 1000 (approximately 50% of the total sample). The test sample size was also 1000 (approximately 50% of the total sample). Test results showed that the prediction accuracy for both H2S and SO2 was 100%.
[0147] Test results show that the prediction accuracy for H2S and SO2 is 100%. This method learns and is tested on a small dataset. Although the results are good, the effectiveness of learning on a small dataset and testing on a large dataset is not explained by the data.
[0148] It is important to note that the "accuracy" in this literature refers to the proportion of the relative error between the predicted and actual values in the test sample that is within a certain threshold range, rather than the mean squared error (MSE) metric for regression prediction. The MSE metric used in this invention is for evaluating the accuracy of continuous value regression; the two have different evaluation criteria.
[0149] The above comparison shows that the present invention achieves industrially acceptable prediction accuracy (MSE ≤ 4×10⁻⁶) with a very small number of training samples (500, accounting for 5% of the total samples). -4 It achieves a good balance between sample efficiency and prediction accuracy, and is particularly suitable for industrial soft measurement scenarios with small sample sizes and strong nonlinearity, such as sulfur recovery units.
Claims
1. A method for estimating sulfur dioxide and hydrogen sulfide concentrations in a TWIMLESN-based sulfur recovery device, characterized in that, Includes the following steps: (1) Data acquisition: Collect key variable data of the sulfur recovery unit in the chemical process, including auxiliary variables u1, u2, u3, u4, u5 and dominant variables y1, y2; Where u1 is the flow rate of MEA gas rich in H2S, u2 is the air flow rate entering the main combustion chamber, u3 is the air flow rate entering the second combustion chamber, u4 is the flow rate of SWS gas rich in H2S and NH3, u5 is the air flow rate mixed with SWS gas for combustion, y1 is the H2S concentration in the exhaust gas, and y2 is the SO2 concentration in the exhaust gas. (2) Offline learning: The first 1 / 50 samples collected are used as the training dataset to start offline learning. The output value of the neural network under the training set is obtained by the reservoir learning algorithm based on the dynamic gain time warp invariant TWIMLESN. (3) Online estimation: The network output weights obtained from the offline learning algorithm in the reservoir are used as the output weights for estimating the dominant variables in the subsequent test set. Online estimation is then performed to obtain the concentration estimates at subsequent time points, i.e., the estimated concentrations of H2S and SO2. The mean square error (MSE) is used as the evaluation index for the network estimation accuracy. If the MSE does not meet the engineering requirements, the relevant parameters of TWIMLESN and the number of training sets are manually adjusted for a second offline learning and online estimation.
2. The method according to claim 1, characterized in that, The TWIMLESN is a bi-column, multi-layer echo-state network without activation functions.
3. The method according to claim 1, characterized in that, The TWIMLESN calculates the norm of the input variable at adjacent time points using a dynamic gain time-curvature invariant method. And use it as a dynamic parameter of the leakage integral term; the norm is the L2 norm, that is, the L2 norm of the input variable at the current time n and the input variable at the previous time n-1; the time variable with invariant time curvature. , in, This represents the average norm on the training dataset. This represents the dynamic gain when running the neural network.
4. The method according to claim 1, characterized in that, In step (2), the pseudo-inverse method is used to calculate the output weights of the neural network. : ,in It includes the current input data and state matrix, as well as the previous output data, where... for The generalized inverse matrix, where T is the dominant variable in the sampled dataset, is given by the formula. Transpose to get .
5. The method according to claim 1, characterized in that, In step (2), the number of samples in the training dataset does not exceed 1 / 50 of the total number of samples.
6. The method according to claim 1, characterized in that, Under training on a small sample dataset, the mean square error of the H2S concentration learning is as high as 9 × 10⁻⁶. -19 The mean square error of the SO2 concentration learning is as high as 1×10⁻⁶. -26 For large sample datasets, the mean square error of the predicted H2S concentration is no greater than 4 × 10⁻⁶. -4 The mean square error of the SO2 concentration prediction is no greater than 4 × 10⁻⁶. -4 .
7. The method according to claim 1, characterized in that, The TWIMLESN has 10 layers (l=10) and R neurons per layer. N =50; the sampling period for the auxiliary and dominant variables is 1 minute.
8. The method according to claim 1, characterized in that, The state update function of TWIMLESN is: ; in, Let n be the state variable of the l-th layer at time n. Let n be the input of the l-th layer at time n. Leakage rate, For time-invariant bending parameters, Let n be the input variable of the neural network at time n. Let n be the output variable of the neural network at time n-1. Let be the input connection weight matrix of the l-th layer neural network. Let be the internal connection weight matrix of the reservoir of the l-th layer neural network. This is the feedback connection weight matrix for outputting feedback to the reserve pool.