Soft measurement method and system for continuous flow chemical reaction yield

By constructing a soft-measurement model based on deep learning, using multi-scale feature extraction and frequency domain analysis combined with LSTM architecture, the efficiency and cost problems of yield detection in continuous flow chemical reactions are solved, and low-cost, fast and accurate yield monitoring is achieved.

CN120564872APending Publication Date: 2025-08-29WEIHAI XINYUAN DIGITAL INTELLIGENCE TECH CO LTD

Patent Information

Application Number
CN202510724826.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

In the prior art In continuous flow chemical reactions, the detection of target product yields has the problem of long detection cycle, high cost, insufficient sensitivity and anti-interference ability, making it difficult to achieve fast and accurate yield monitoring.

Method used

A deep learning-based method is used to construct a soft-measurement model of yield using easy-to-acquire process monitoring parameters. Through multi-scale feature extraction and frequency domain analysis, a long and short-term memory network (LSTM) architecture is combined with a long and short-term memory network (LSTM) architecture, real-time prediction of yield is achieved.

Benefits of technology

It realizes low-cost and fast yield monitoring, reduces equipment costs, improves monitoring efficiency and accuracy, and is suitable for small trials, pilots and complex industrial environments of continuous flow chemical reactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120564872A_ABST
    Figure CN120564872A_ABST
Patent Text Reader

Abstract

The invention relates to a continuous flow chemical reaction yield soft measurement method and a continuous flow chemical reaction yield soft measurement system. According to the method, real-time online prediction of the continuous flow chemical reaction product yield is realized through a deep learning technology. Firstly, soft measurement modeling parameters are selected, and after data acquisition, a soft measurement modeling sample set is created through data alignment processing and dynamic time window feature construction. The soft measurement model is based on a multi-head attention mechanism enhanced LSTM, a multi-scale feature extraction and frequency domain analysis mechanism is fused, and local dynamic features under different time resolutions are extracted through a multi-scale convolution kernel; key time steps in a long sequence and a global dependency relationship of the key time steps are effectively captured through a multi-head attention mechanism enhanced LSTM module; and the periodic fluctuation characteristics in the time series data are extracted and identified through the frequency domain characteristics. The invention provides an economical, efficient, real-time and reliable intelligent solution for yield monitoring in the continuous flow chemical reaction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data science and chemical reaction process monitoring, and in particular to a continuous flow chemical reaction yield soft measurement method and system. Background Art

[0002] In continuous flow synthesis reactions, rapid and accurate measurement of the yield of the target product is crucial for process optimization. Since continuous flow reactions require evaluation after the reaction system reaches a steady state, the yield needs to be frequently monitored to determine when the system has reached steady state. Currently, industrial monitoring methods primarily include offline sampling, online analysis, and in-situ detection. Offline sampling suffers from long detection cycles and delayed results. While online analysis and in-situ detection offer real-time performance, the acquisition and maintenance costs of sampling and detection equipment are high, and their sensitivity, interference immunity, and reliability in complex mixtures are often limited. To reduce costs and improve response speed, soft sensing technology has emerged as an important alternative. The principle of soft sensing technology is to establish a relationship model between process parameters (such as temperature, pressure, and flow rate) and target parameters based on readily available process parameters, such as temperature, pressure, and flow rate. This model then allows for real-time estimation of target parameters, such as product yield.

[0003] Soft measurement models can be roughly divided into two categories: mechanism-driven and data-driven. Mechanism-driven models are mainly established based on the intrinsic physical and chemical mechanisms of the process. This type of model uses first-principle equations such as conservation of mass, conservation of energy, and conservation of momentum, combined with professional knowledge in fields such as reaction kinetics and thermodynamics, to construct mathematical equations that describe the relationship between process variables. The advantage of the mechanism model is that it has a clear physical meaning and can maintain good prediction accuracy when the operating conditions change. For example: CN1563983A discloses a soft measurement method for catalytic cracking reaction yield, which uses a mechanism-driven model to establish a mathematical model of the riser reactor and regenerator, and uses this model to calculate the yield of each reaction product in real time. However, mechanism-driven models usually rely on detailed reaction kinetics and transfer process modeling, which are complex to develop and have limited scope of application.

[0004] Data-driven soft-sensing models are based on historical process data and employ statistical learning or machine learning algorithms to extract mapping relationships between input and output variables. These methods, which do not require prior knowledge of the underlying mechanisms, are suitable for industrial processes with unclear mechanisms or high complexity. They offer advantages such as low implementation cost and strong transferability. However, the predictive performance of data-driven models depends on data quality and model design.

[0005] In addition, Wei Bin et al. published an article titled "A Soft-Sensor Model for Key Parameters of FCC Units Integrating Deep Learning and Process Mechanisms," in Acta Petrolei Sinica (Petroleum Processing), Vol. 40, No. 6, pp. 1624-1634, November 2024. The model, driven by a deep learning algorithm, integrates process mechanism knowledge into the data-driven model, enabling alternative descriptions of feedstock and catalyst properties as additional inputs to the soft-sensor model. However, this hybrid model still requires process mechanism knowledge and is therefore unsuitable for industrial processes with unclear mechanisms or high complexity. Summary of the Invention

[0006] In view of the above-mentioned state of the art, the present invention provides a method and system for soft-sensing the yield of continuous flow chemical reactions based on deep learning. Using readily available monitoring parameters, the yield of products in continuous flow synthesis reactions can be predicted online.

[0007] The technical solution of the present invention can be summarized as follows:

[0008] A continuous flow chemical reaction yield soft measurement method comprises the following steps:

[0009] Step 1. Select modeling input parameters

[0010] Combined with the characteristics of continuous flow chemical reaction processes, process monitoring parameters that can affect yield fluctuations and are easy to collect in real time are screened as modeling input parameters;

[0011] Step 2. Data Collection

[0012] During the continuous flow chemical reaction process, the following data were collected and preprocessed;

[0013] (1) Process monitoring data: collect the parameter data selected in step 1 at the set frequency;

[0014] (2) Yield test data: Obtain product yield test results regularly through offline or online analysis methods;

[0015] Step 3. Data alignment

[0016] Align the yield detection data collected in step 2 with the process monitoring data in chronological order to generate a structured data set based on the time axis, where each time node contains the corresponding process parameter data and yield data;

[0017] Step 4. Dynamic window feature construction

[0018] A time-lag window for monitoring sampling points is set, and an ordered set of sampling points in the window and its predecessor is determined. Key monitoring parameters are selected within the time-lag window, and their sequence features within the window interval are extracted. These sequence features are combined to construct a time-lag feature matrix corresponding to the sampling time node. All time-lag feature matrices are arranged in chronological order to form a feature set covering the entire reaction cycle. Combined with the structured data set that has been aligned in step 3, a data set for yield soft-sensing modeling is constructed.

[0019] Step 5. Construction of yield soft-sensing model

[0020] Based on the dataset constructed in step 4, a multi-scale feature extraction and frequency domain analysis mechanism is integrated into the long short-term memory (LSTM) network architecture to construct a yield soft-sensing model. The yield soft-sensing model consists of four modules: a hybrid dilated convolution module for extracting local dynamic features at different time scales; a multi-head attention-enhanced LSTM module for capturing global dependencies at key time steps; a frequency domain feature extraction module for identifying periodic fluctuation patterns in time series data; and an output layer for completing the final yield prediction.

[0021] Step 6. Soft sensor model application

[0022] During the continuous flow chemical reaction, the process monitoring parameter data collected in real time in step 1 is input into the yield soft measurement model constructed in step 5, and the yield prediction value at the corresponding moment is output to realize dynamic monitoring of the product yield.

[0023] According to the present invention, preferably, in step 1, the selection of process monitoring parameters is based on their correlation with the yield, while taking into account the convenience of on-site collection and the reliability of long-term operation, to construct a modeling input parameter set that is both informative and meets industrial implementation conditions. , is the dimension of the parameter.

[0024] According to the present invention, preferably, in step 2, the sampling time series of the monitoring parameters is set to , Represents the number of monitoring times. The sample sequence of monitoring parameters collected is preprocessed and recorded as , each monitoring sample is represented as , m., the yield detection sampling time series is , is the number of detection sampling times, and the corresponding yield detection result is recorded as .

[0025] According to the present invention, preferably, in step 3, the existing yield sequence Process, generate and monitor time series Yield series .

[0026] According to the present invention, preferably, in step 4, for monitoring sampling points , defining its time lag window for and its preface An ordered set of sampling points, namely , is the window size; the first time lag window is For the corresponding window , the last window is Corresponding ; In the time delay window In , several monitoring parameters are selected to construct the sequence characteristics within the window;

[0027] For the selected The detection parameters, Parameters in the window The timing changes within are expressed as , , put this Monitoring parameters in the window The temporal features in the The corresponding time-delay characteristic matrix , the time-delay feature matrices of all sampling moments are arranged in chronological order to form the feature set within the entire reaction cycle ; Combined with the yield sequence after alignment , constructing a yield soft sensor modeling dataset , where each sample is represented as , is the input feature, is the label feature, m.

[0028] According to the present invention, preferably, in step 5, the hybrid hole convolution module adopts a three-layer hole convolution network to realize the extraction of multi-scale dynamic features, which is used to capture the dynamic change characteristics of the reaction process at different time scales; the first layer is a standard convolution operation, which is used to extract short-term local features; the second layer of convolution expands the receptive field and is used to extract information with a longer time span; the third layer of convolution is used to further enhance the model's ability to model long-term dependencies; the three-layer convolution output and the skip path output are fused by element-by-element addition to form the output features of the HDC module ;

[0029] Preferably, the LSTM module with multi-head attention enhancement, The transposed matrix of is taken as input, and a two-layer LSTM architecture is adopted. To enhance feature representation, the model introduces a multi-head attention mechanism, which calculates the attention weight by scaling the dot product attention. The outputs of all attention heads are concatenated and transformed by the linear transformation matrix. Map back to the original dimension; combine the attention output with the original hidden state Add together to form the fused feature matrix , the model is in the time step dimension Perform global average pooling on the fused features Further compressed into a low-dimensional global time series feature vector , used for downstream tasks;

[0030] Preferably, the frequency domain feature extraction module is As input, along the time dimension For the input matrix Perform real fast Fourier transform to obtain the frequency domain complex spectrum matrix , calculate the spectrum amplitude matrix ; In order to extract global frequency domain features, the model is in the frequency dimension Perform global average pooling on it and calculate the frequency domain feature vector , The final frequency domain features are obtained by performing nonlinear mapping through a two-layer fully connected network ;

[0031] Preferably, the output layer converts the time domain features and frequency domain characteristics Merge to form time-frequency fusion feature , then mapped through the fully connected layer and output the predicted result of yield.

[0032] According to the present invention, there is also provided a continuous flow chemical reaction yield soft measurement system, comprising:

[0033] A modeling input parameter selection unit is used to select process monitoring parameters that can affect yield fluctuations and are easy to collect in real time as modeling input parameters;

[0034] Data acquisition unit, used to collect process monitoring data and yield detection data and perform preprocessing;

[0035] The data alignment unit is used to align the collected yield detection data and process monitoring data in chronological order to generate a structured data set based on the time axis, in which each time node contains the corresponding process parameter data and its yield data;

[0036] The dynamic window feature construction unit is used to set the time lag window of the monitoring sampling point and determine the ordered set of the window and its preceding sampling points. The key monitoring parameters are selected in the time lag window, and their sequence features within the window interval are extracted. These sequence features are combined to construct a time lag feature matrix corresponding to the sampling time node. All time lag feature matrices are arranged in chronological order to form a feature set covering the entire reaction cycle. The aligned structured data set is combined to construct a data set for yield soft measurement modeling.

[0037] The yield soft-sensing model construction unit is used to integrate multi-scale feature extraction and frequency domain analysis mechanisms into the long short-term memory (LSTM) architecture based on the modeling dataset to build a yield soft-sensing model. The yield soft-sensing model consists of four modules: a hybrid dilated convolution module for extracting local dynamic features at different time scales; a multi-head attention-enhanced LSTM module for capturing global dependencies at key time steps; a frequency domain feature extraction module for identifying periodic fluctuation patterns in time series data; and an output layer for completing the final yield prediction.

[0038] The soft measurement model application unit is used to input the process monitoring parameter data collected in real time into the constructed yield soft measurement model during the continuous flow chemical reaction process, output the yield prediction value at the corresponding moment, and realize dynamic monitoring of the reaction yield.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] 1. The present invention provides a yield soft-sensing method for continuous flow chemical reactions, capable of real-time prediction of product yield based on readily available process monitoring data. Compared with currently commonly used manual sampling and online monitoring methods, the present method significantly improves the efficiency of yield monitoring during continuous flow reactions, avoids frequent yield detection sampling, and timely captures the equilibrium state of the reaction system in a low-cost manner, identifying yield trends. Compared with in situ detection, the present method significantly reduces reliance on offline detection, thereby significantly reducing equipment and detection costs.

[0041] 2. The yield soft measurement model of the present invention selects a hybrid void convolution module, a multi-head attention enhanced LSTM module, and a frequency domain feature extraction module. The modeling factors are more comprehensive, the soft measurement model is highly accurate, and it is particularly suitable for continuous flow chemical reaction processes.

[0042] 3. The present invention avoids the problem of mechanism-driven models relying on reaction kinetics and transfer process modeling, does not require complex process mechanism knowledge, and does not need to incorporate process mechanisms into model construction.

[0043] 4. The method described in the present invention is also highly versatile and applicable not only to small-scale and pilot-scale continuous flow chemical reaction experiments but also to complex continuous flow industrial reaction environments. It can achieve soft measurement of key performance indicators other than yield. This invention provides a low-cost, high-efficiency target data monitoring method for optimizing continuous flow reaction processes. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 Schematic diagram of the main steps of model construction for the continuous flow chemical reaction yield soft measurement method of the present invention.

[0045] Figure 2 Schematic diagram of the yield soft measurement model structure constructed in step 5 of the continuous flow chemical reaction yield soft measurement method of the present invention.

[0046] Figure 3 This is a schematic diagram of the main structure of the continuous flow chemical reaction yield soft measurement system of the present invention. DETAILED DESCRIPTION

[0047] The present invention provides a deep learning-based soft-sensing method and system for continuous flow chemical reaction yield. Using readily available monitoring parameters, the yield of products in continuous flow synthesis reactions can be predicted online.

[0048] like Figure 1 As shown, the method includes the following six steps: determining modeling parameters, data acquisition, data alignment, dynamic window feature construction, yield soft measurement model construction, and soft measurement model application.

[0049] Step 1. Determine modeling input parameters

[0050] Combined with the characteristics of continuous flow chemical reaction processes, process monitoring parameters that can affect yield fluctuations and are easy to collect in real time are screened as modeling input parameters;

[0051] In one or more preferred embodiments, first, based on the reaction mechanism and process characteristics, process monitoring parameters that can affect yield fluctuations are screened; the selection of each parameter can be based on its correlation with the yield, while taking into account the convenience of on-site collection and the reliability of long-term operation, so as to construct a modeling input parameter set that is both informative and meets industrial implementation conditions. , is the dimension of the parameter.

[0052] Step 2. Data Collection

[0053] During the continuous flow chemical reaction process, the following data were collected and preprocessed;

[0054] (1) Process monitoring data: collect the parameter data selected in step 1 at the set frequency;

[0055] (2) Yield test data: Obtain reaction yield test results regularly through offline or online analysis methods.

[0056] In one or more preferred embodiments, the sampling time series of the monitoring parameters is set to ,in Represents the number of monitoring times. The sample sequence of monitoring parameters collected is preprocessed and recorded as , where each monitoring sample is represented as .in, m. The detection sampling time series of yield is , is the number of detection samplings, and the corresponding detection result, i.e., label, is recorded as .

[0057] Step 3. Data alignment

[0058] Align the yield detection data collected in step 2 with the process monitoring data in chronological order to generate a structured data set based on the time axis, where each time node contains the corresponding process parameter data and its yield data;

[0059] Since yield detection sampling and process monitoring sampling usually come from different sampling systems, it is difficult to achieve strict alignment of the sampling time series of the two, which may result in some monitoring samples missing the corresponding yield labels. In one or more preferred embodiments, in order to improve the integrity of the modeling dataset, the existing yield series is Perform supplementary interpolation or sliding window processing to generate and monitor time series Yield series .

[0060] Step 4. Dynamic window feature construction

[0061] Set a time-lag window for the monitoring sampling points and determine an ordered set of this window and its preceding sampling points. Select key monitoring parameters within the time-lag window and extract their sequence features within the window interval. Combine these sequence features to construct a time-lag feature matrix corresponding to the sampling time node. Arrange all time-lag feature matrices in chronological order to form a feature set covering the entire reaction cycle. Combine the structured dataset that has been aligned in step 3 to construct a dataset for yield soft-sensing modeling.

[0062] In one or more preferred embodiments, the continuous flow reaction process is used to monitor the sampling points. , defining its time lag window for and its preface An ordered set of sampling points, namely ,in is the window size. The first time lag window is For the corresponding window , the last window is Corresponding In the time-delay window In the example, several monitoring parameters are selected to construct the sequence characteristics within the window.

[0063] For the selected The detection parameters, Parameters in the window The timing changes within are expressed as , in . Monitoring parameters in the window The temporal features in the The corresponding time-delay characteristic matrix Arrange the time-delay feature matrices of all sampling moments in chronological order to form a feature set within the entire reaction cycle . Yield sequence after combining alignment processing , constructing a yield soft sensor modeling dataset , where each sample is represented as , is the input feature, is the label feature, m.

[0064] Step 5. Construction of yield soft-sensing model

[0065] Based on the modeling dataset constructed in step 4, the multi-scale feature extraction and frequency domain analysis mechanism are integrated into the long short-term memory (LSTM) network architecture to construct a yield soft-sensing model. The yield soft-sensing model consists of four modules: a hybrid dilated convolution module for extracting local dynamic features at different time scales; a multi-head attention-enhanced LSTM module for capturing global dependencies at key time steps; a frequency domain feature extraction module for identifying periodic fluctuation patterns in time series data; and an output layer for completing the final yield prediction.

[0066] Based on the modeling dataset , integrate multi-scale feature extraction and frequency domain analysis mechanism into long short-term memory network to build a yield soft measurement model .like Figure 2As shown in the figure, the model consists of four key modules: a hybrid void convolution module for extracting local dynamic features at different time scales; a multi-head attention enhanced LSTM module for capturing global dependencies at key time steps; a frequency domain feature extraction module for identifying periodic fluctuation patterns in time series data; and an output layer for completing the final yield prediction.

[0067] In one or more preferred embodiments, the hybrid hole convolution module uses a three-layer hole convolution network to extract multi-scale dynamic features, which is used to capture the dynamic change characteristics of the reaction process at different time scales; the first layer is a standard convolution operation for extracting short-term local features; the second layer of convolution expands the receptive field for extracting information with a longer time span; the third layer of convolution is used to further enhance the model's ability to model long-term dependencies; the three-layer convolution output and the skip path output are fused by element-by-element addition to form the output features of the HDC module ;

[0068] In one or more preferred embodiments, the multi-head attention enhanced LSTM module, The transposed matrix of is taken as input, and a two-layer LSTM architecture is adopted. To enhance feature representation, the model introduces a multi-head attention mechanism, which calculates the attention weight by scaling the dot product attention. The outputs of all attention heads are concatenated and transformed by the linear transformation matrix. Mapping back to the original dimension; To retain the temporal features extracted by LSTM, the model uses residual connections to connect the attention output with the original hidden state Add together to form the fused feature matrix , the model is in the time step dimension Perform global average pooling on the fused features Further compressed into a low-dimensional global time series feature vector , used for downstream tasks;

[0069] In one or more preferred embodiments, the frequency domain feature extraction module is As input, along the time dimension For the input matrix Perform real fast Fourier transform to obtain the frequency domain complex spectrum matrix , calculate the spectrum amplitude matrix ; In order to extract global frequency domain features, the model is in the frequency dimension Perform global average pooling on it and calculate the frequency domain feature vector , The final frequency domain features are obtained by performing nonlinear mapping through a two-layer fully connected network ;

[0070] In one or more preferred embodiments, the output layer converts the time domain features and frequency domain characteristics Merge to form time-frequency fusion feature , then mapped through the fully connected layer and output the predicted result of yield.

[0071] Step 6. Soft sensor model application

[0072] During the continuous flow chemical reaction, the process monitoring parameter data collected in real time in step 1 is input into the yield soft measurement model constructed in step 5, and the yield prediction value at the corresponding moment is output to realize dynamic monitoring of the reaction yield.

[0073] like Figure 3 As shown, the present invention also provides a continuous flow chemical reaction yield soft measurement system, comprising:

[0074] A modeling input parameter selection unit 31 is used to select process monitoring parameters that can affect yield fluctuations and are easy to collect in real time as modeling input parameters;

[0075] A data acquisition unit 32 is used to collect process monitoring data and yield detection data and perform pre-processing;

[0076] The data alignment unit 33 is used to align the collected yield detection data and process monitoring data in chronological order to generate a structured data set based on the time axis, in which each time node contains the corresponding process parameter data and its yield data;

[0077] The dynamic window feature construction unit 34 is used to set the time lag window of the monitoring sampling points, determine the ordered set of the window and its preceding sampling points, select key monitoring parameters in the time lag window, extract the sequence features within the window interval, and combine these sequence features to construct a time lag feature matrix corresponding to the sampling time node. All time lag feature matrices are arranged in chronological order to form a feature set covering the entire reaction cycle; and, combined with the aligned structured data set, construct a data set for yield soft measurement modeling.

[0078] The yield soft-sensing model construction unit 35 is used to integrate multi-scale feature extraction and frequency domain analysis mechanisms into the long short-term memory network (LSTM) architecture based on the modeling data set to construct a yield soft-sensing model. The yield soft-sensing model includes four modules: a hybrid dilated convolution module 351 for extracting local dynamic features at different time scales; a multi-head attention-enhanced LSTM module 352 for capturing global dependencies at key time steps; a frequency domain feature extraction module 353 for identifying periodic fluctuation patterns in time series data; and an output layer 354 for completing the final yield prediction. The operation process of each module is carried out according to the content of step 5 above and will not be repeated here.

[0079] The soft measurement model application unit 36 ​​is used to input the real-time collected process monitoring parameter data into the constructed yield soft measurement model during the continuous flow chemical reaction process, output the yield prediction value at the corresponding moment, and realize dynamic monitoring of the reaction yield.

[0080] The present invention will be further described below with reference to specific examples, but is not limited thereto.

[0081] Example 1

[0082] Taking the continuous flow synthesis of tetrachloropropane as an example, tetrachloropropane is primarily produced through a free radical addition reaction between ethylene and carbon tetrachloride in the presence of a catalyst. To monitor the reaction status and optimize reaction conditions during this continuous flow reaction, the yield of tetrachloropropane in the product must be monitored in real time. A deep learning-based soft sensing method for continuous flow chemical reactions is implemented in the following five steps.

[0083] Step 1. Determine modeling input parameters

[0084] In the continuous flow synthesis of tetrachloropropane (TCP), key parameters influencing TCP yield include temperature, pressure, feed rate, and catalyst ratio, depending on the reaction principle and process characteristics. Specifically, the free radical addition reaction of ethylene and carbon tetrachloride in the presence of a catalyst is influenced by multiple process parameters. Temperature is a key factor in determining reaction rate, and increasing temperature generally significantly increases the reaction rate. However, excessively high temperatures can cause thermal decomposition of reactants or products, leading to undesirable side reactions and reducing the selectivity and yield of the target product. Therefore, proper temperature control is crucial for improving TCP yield. Increasing pressure increases the collision frequency of reactant molecules, further accelerating the reaction rate. However, excessive pressure not only increases the probability of side reactions but also places higher pressure requirements on the reactor equipment, increasing energy consumption and equipment costs. The feed rate influences the residence time of the reactants in the reactor and the mixing efficiency. Excessively rapid feed rates can lead to incomplete reaction, while excessively slow feed rates can reduce production efficiency and affect the overall reaction rate. The proportion of catalyst is also an important factor affecting the reaction rate. Increasing the proportion of catalyst can effectively increase the reaction rate, but excessive catalyst will cause aggregation or failure, reduce catalytic efficiency and increase reaction cost.

[0085] Based on the above analysis, this example selected temperature, pressure, feed rate, and catalyst ratio as monitoring parameters for the continuous flow synthesis of tetrachloropropane. Temperature includes the upper, middle, and lower tube temperatures of the tubular reactor, for a total of six modeling parameters.

[0086] Step 2. Data Collection

[0087] Assume that the monitoring sampling time series of process parameters is . in Represents the number of monitoring sampling times during the entire reaction process. Accordingly, the sample sequence of monitoring parameters collected is preprocessed and recorded as , each monitoring sample can be expressed as . express Monitoring parameter samples collected at all times, , Indicates the upper tube temperature, Indicates the middle tube temperature, Indicates the lower tube temperature, Reaction pressure, represents the feed rate, represents the proportion of catalyst. The sampling sequence for product yield detection is recorded as , is the number of sampling times, and the corresponding tetrachloropropane yield data is recorded as .

[0088] Step 3. Data alignment

[0089] Since yield detection sampling and process monitoring sampling usually belong to different sampling systems, it is difficult to strictly align the two sampling time series. This time difference may cause some input parameter samples to lack corresponding yield labels. In order to improve the integrity of the data set, the two types of samples need to be aligned. In this example, the linear interpolation algorithm is used to interpolate the yield series to generate the same time series as the monitoring time series. Specifically, for any missing TCP yield label monitoring time point , first locate the two adjacent yield detection time points and , and then use the linear interpolation formula to calculate the yield value of the missing point , the calculation formula is shown in formula (1):

[0090] (1)

[0091] By this method, the interpolation yield sequence corresponding to each monitoring time point can be obtained .

[0092] Step 4. Dynamic window feature construction

[0093] Given a continuous flow reaction cycle and its monitoring time series , for the sampling points , its time lag window means and its preface An ordered set of sampling points, namely: , is the window size. The first time lag window is For the corresponding window , the last window is Corresponding Given a sampling point , in its time lag window The following sequence characteristics are constructed: the upper tube temperature lag vector ,Right now The upper tube temperature value sequence obtained at each sampling point; the middle tube temperature lag vector ,Right now The middle tube temperature value sequence obtained at each sampling point; the lower tube temperature lag vector ,Right now The temperature value sequence of the lower tube obtained at each sampling point; the reaction pressure lag vector ,Right now The pressure value sequence obtained at each sampling point; the feed rate lag vector ,Right now The feed rate value sequence obtained at each sampling point; the catalyst feed ratio lag vector ,in, The sampling time The data of the proportion of catalyst A feed in the reaction conditions corresponding to the reaction process is as follows: .

[0094] Based on the above structural features, the sampling points are constructed The time-delay characteristic matrix is: time lag window The characteristic vectors of each sequence in Dimensional Matrix The present invention will react period It is defined as an ordered set of time-delay matrices, denoted as , then the tetrachloropropane yield soft sensor modeling data set is constructed as the reaction cycle The set of delay matrices and their labels in is denoted as , where each sample is represented as , m. for The label, that is, the sampling point The corresponding tetrachloropropane yield values.

[0095] Step 5. Model building and prediction

[0096] Based on the two-layer long short-term memory network (LSTM) model, a soft-sensing model of tetrachloropropane yield is constructed. Figure 2 The overall structure of the model consists of four key modules: a hybrid dilated convolution (HDC) module for extracting local dynamic features at different time scales; a multi-head attention-enhanced LSTM (AttnLSTM) module for capturing global dependencies at key time steps; a frequency domain feature extraction module (FFT) for identifying periodic fluctuation patterns in time series data; and an output layer for final yield prediction.

[0097] In the HDC module, a three-layer dilated convolutional network is used to extract multi-scale dynamic features, which is used to capture the dynamic change characteristics of the reaction process at different time scales. The first layer is a standard convolution operation, which is used to extract short-term local features. The second layer of convolution expands the receptive field and is used to extract information with a longer time span. The third layer of convolution is used to further enhance the model's ability to model long-term dependencies. Finally, the output of the three layers of convolution is fused with the output of the skip path through element-by-element addition to form the output features of the HDC module. .

[0098] AttnLSTM module The transposed matrix of is taken as input, and a two-layer LSTM architecture is adopted. To enhance feature representation, the model introduces a multi-head attention mechanism. Subsequently, the attention weight is calculated by scaling the dot product attention. The outputs of all attention heads are concatenated and learned through a learnable dimensional linear transformation matrix Mapped back to the original dimension. To retain the temporal features extracted by LSTM, the model uses residual connections to connect the attention output with the original hidden state. Add together to form the fused feature matrix , then, the model is in the time step dimension Perform global average pooling on the fused features Further compressed into a 64-dimensional global time series feature vector , used for downstream tasks.

[0099] The FFT module is As input, along the time dimension For the input matrix Perform real fast Fourier transform to obtain the frequency domain complex spectrum matrix . Then, the spectrum amplitude matrix is ​​calculated ; In order to extract global frequency domain features, the model is in the frequency dimension Perform global average pooling on it and calculate the 64-dimensional frequency domain feature vector , then, The final frequency domain features are obtained by performing nonlinear mapping through a two-layer fully connected network .

[0100] In the output layer, the time domain features and frequency domain characteristics Merge to form a 128-dimensional time-frequency fusion feature .Then it is mapped through the fully connected layer and the predicted result of tetrachloropropane yield is output.

[0101] Furthermore, it also includes step 6. Soft measurement model application

[0102] During the continuous flow chemical reaction, the process monitoring parameter data collected in real time in step 1 is input into the yield soft measurement model constructed in step 5, and the yield prediction value at the corresponding moment is output to realize dynamic monitoring of the reaction yield.

[0103] Example 2

[0104] Continuous flow chemical reaction yield soft measurement system, including:

[0105] A modeling input parameter selection unit 31 is used to select process monitoring parameters that can affect yield fluctuations and are easy to collect in real time as modeling input parameters;

[0106] A data acquisition unit 32 is used to collect process monitoring data and yield detection data and perform pre-processing;

[0107] The data alignment unit 33 is used to align the collected yield detection data and process monitoring data in chronological order to generate a structured data set based on the time axis, in which each time node contains the corresponding process parameter data and its yield data;

[0108] The dynamic window feature construction unit 34 is used to set the time lag window of the monitoring sampling points, determine the ordered set of the window and its preceding sampling points, select key monitoring parameters in the time lag window, extract the sequence features within the window interval, and combine these sequence features to construct a time lag feature matrix corresponding to the sampling time node. All time lag feature matrices are arranged in chronological order to form a feature set covering the entire reaction cycle; and, combined with the aligned structured data set, construct a data set for yield soft measurement modeling.

[0109] The yield soft-sensing model construction unit 35 is used to integrate multi-scale feature extraction and frequency domain analysis mechanisms into the long short-term memory network architecture based on the modeling data set to construct a yield soft-sensing model. The yield soft-sensing model includes four modules: a hybrid void convolution module 351 for extracting local dynamic features at different time scales; a multi-head attention enhanced LSTM module 352 for capturing global dependencies at key time steps; a frequency domain feature extraction module 353 for identifying periodic fluctuation patterns in time series data; and an output layer 354 for completing the final yield prediction. The operation process of each module is carried out according to the content of step 5 above and will not be repeated here.

[0110] The soft measurement model application unit 36 ​​is used to input the real-time collected process monitoring parameter data into the constructed yield soft measurement model during the continuous flow chemical reaction process, output the yield prediction value at the corresponding moment, and realize dynamic monitoring of the reaction yield.

Claims

1. A method for soft measurement of the yield of a continuous flow chemical reaction, comprising the following steps: Step 1. Select modeling input parameters Combined with the characteristics of continuous flow chemical reaction processes, process monitoring parameters that can affect yield fluctuations and are easy to collect in real time are screened as modeling input parameters; Step 2. Data Collection During the continuous flow chemical reaction process, the following data were collected and preprocessed; (1) Process monitoring data: collect the parameter data selected in step 1 at the set frequency; (2) Yield test data: Regularly obtain reaction yield test results through offline or online analysis methods; Step 3. Data alignment Align the yield detection data collected in step 2 with the process monitoring data in chronological order to generate a structured data set based on the time axis, where each time node contains the corresponding process parameter data and its yield data; Step 4. Dynamic window feature construction Set the time lag window of the monitoring sampling point and determine the ordered set of the window and its preceding sampling points. Select key monitoring parameters in the time lag window, extract their sequence features within the window interval, and combine these sequence features to construct a time lag feature matrix corresponding to the sampling time node. Arrange all the time lag feature matrices in chronological order to form a feature set covering the entire reaction cycle. Combined with the structured data set that has been aligned in step 3, a data set for yield soft-sensing modeling is constructed; Step 5. Construction of yield soft-sensing model Based on the dataset constructed in step 4, the multi-scale feature extraction and frequency domain analysis mechanism are integrated into the long short-term memory network (LSTM) architecture to construct a yield soft-sensing model. The yield soft-sensing model includes four modules: a hybrid atrous convolution module for extracting local dynamic features at different time scales; Multi-head attention-enhanced LSTM modules to capture global dependencies at key time steps; The frequency domain feature extraction module is used to identify periodic fluctuation patterns in time series data; and the output layer is used to complete the final yield prediction; Step 6. Soft sensor model application During the continuous flow chemical reaction, the process monitoring parameter data collected in real time in step 1 is input into the yield soft measurement model constructed in step 5, and the yield prediction value at the corresponding moment is output to realize dynamic monitoring of the reaction yield.

2. The continuous flow chemical reaction yield soft measurement method according to claim 1, characterized in that: In step 1, the selection of process monitoring parameters is based on their correlation with yield, while taking into account the convenience of on-site collection and the reliability of long-term operation, to construct a modeling input parameter set that is both informative and meets industrial implementation conditions. , is the dimension of the parameter.

3. The continuous flow chemical reaction yield soft measurement method according to claim 1, characterized in that: In step 2, let the sampling time series of monitoring parameters be , Represents the number of monitoring times, and the corresponding monitoring parameter sample sequence is expressed as , each monitoring sample is represented as , m., the yield detection sampling time series is , is the number of detection sampling times, and the corresponding yield detection result is recorded as .

4. The continuous flow chemical reaction yield soft measurement method according to claim 1, characterized in that: In step 3, the existing yield sequence Process, generate and monitor time series Yield series .

5. The continuous flow chemical reaction yield soft measurement method according to claim 1, characterized in that: In step 4, for monitoring sampling points , defining its time lag window for and its preface An ordered set of sampling points, namely , is the window size; the first time lag window is For the corresponding window , the last window is Corresponding ; In the time delay window In , several monitoring parameters are selected to construct the sequence characteristics within the window; For the selected The detection parameters, Parameters in the window The timing changes within are expressed as , , put this Monitoring parameters in the window The temporal features in the The corresponding time-delay characteristic matrix , the time-delay feature matrices of all sampling moments are arranged in chronological order to form the feature set within the entire reaction cycle ; Combined with the yield sequence after alignment , constructing a yield soft sensor modeling dataset , each sample is represented as , is the input feature, is the label feature, m.

6. The continuous flow chemical reaction yield soft measurement method according to claim 1, characterized in that: In step 5, the hybrid atrous convolution module uses a three-layer atrous convolutional network to extract multi-scale dynamic features, which is used to capture the dynamic change characteristics of the reaction process at different time scales; The first layer is a standard convolution operation, which is used to extract short-term local features; The second convolution layer expands the receptive field and is used to extract information with a longer time span. The third convolution layer is used to further improve the model's ability to model long-term dependencies. The outputs of the three convolution layers and the skip path output are fused element-by-element to form the output features of the HDC module. .

7. The continuous flow chemical reaction yield soft measurement method according to claim 6, characterized in that: In step 5, the LSTM module with multi-head attention enhancement, The transposed matrix of is taken as input, and a two-layer LSTM architecture is adopted. To enhance feature representation, the model introduces a multi-head attention mechanism, which calculates the attention weight by scaling the dot product attention. The outputs of all attention heads are concatenated and transformed by the linear transformation matrix. Map back to the original dimension; combine the attention output with the original hidden state Add together to form the fused feature matrix , the model is in the time step dimension Perform global average pooling on the fused features Further compressed into a low-dimensional global time series feature vector , used for downstream tasks.

8. The continuous flow chemical reaction yield soft measurement method according to claim 7, characterized in that: In step 5, the frequency domain feature extraction module is used to As input, along the time dimension For the input matrix Perform real fast Fourier transform to obtain the frequency domain complex spectrum matrix , calculate the spectrum amplitude matrix ; In order to extract global frequency domain features, the model is in the frequency dimension Perform global average pooling on it and calculate the frequency domain feature vector , The final frequency domain features are obtained by performing nonlinear mapping through a two-layer fully connected network .

9. The continuous flow chemical reaction yield soft measurement method according to claim 8, characterized in that: In step 5, the output layer converts the time domain features and frequency domain characteristics Merge to form time-frequency fusion feature , then mapped through the fully connected layer and output the predicted result of yield.

10. A continuous flow chemical reaction yield soft measurement system, characterized in that: The system includes: A modeling input parameter selection unit is used to select process monitoring parameters that can affect yield fluctuations and are easy to collect in real time as modeling input parameters; Data acquisition unit, used to collect process monitoring data and yield detection data and perform preprocessing; The data alignment unit is used to align the collected yield detection data and process monitoring data in chronological order to generate a structured data set based on the time axis, in which each time node contains the corresponding process parameter data and its yield data; The dynamic window feature construction unit is used to set the time lag window of the monitoring sampling point and determine the ordered set of the window and its preceding sampling points. The key monitoring parameters are selected in the time lag window, and their sequence features within the window interval are extracted. These sequence features are combined to construct a time lag feature matrix corresponding to the sampling time node. All time lag feature matrices are arranged in chronological order to form a feature set covering the entire reaction cycle. The aligned structured data set is combined to construct a data set for yield soft measurement modeling. The yield soft-sensing model construction unit is used to integrate multi-scale feature extraction and frequency domain analysis mechanisms into the long short-term memory (LSTM) architecture based on the modeling dataset to build a yield soft-sensing model. The yield soft-sensing model consists of four modules: a hybrid dilated convolution module for extracting local dynamic features at different time scales; a multi-head attention-enhanced LSTM module for capturing global dependencies at key time steps; a frequency domain feature extraction module for identifying periodic fluctuation patterns in time series data; and an output layer for completing the final yield prediction. The soft measurement model application unit is used to input the process monitoring parameter data collected in real time into the constructed yield soft measurement model during the continuous flow chemical reaction process, output the yield prediction value at the corresponding moment, and realize dynamic monitoring of the reaction yield.

Citation Information

Patent Citations

  • Soft measuring method for yield rate of catalytic cracking reaction

    CN1563983A

Cited By

  • Rapid quantitative analysis system and method for continuous flow reaction process

    CN122171826A

  • Chemical reaction design method and system based on artificial intelligence and computer equipment

    CN122290745A