Soft measurement modeling method based on simulated moving bed separation process
Through the STA-LSTM network and domain adversarial neural network, the spatiotemporal characteristics of the simulated mobile bed separation process were extracted, and the problems of data acquisition difficulties and feature distribution differences were solved. A fast and accurate soft measurement model was established, which improved the simulated mobile bed separation process. purity detection efficiency and accuracy.
Patent Information
- Application Number
- CN202411112494.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-11-22
AI Technical Summary
Data acquisition is difficult and time-consuming during simulation of mobile bed separation. The traditional transfer learning method has poor results due to the difference in data characteristics distribution, and the conventional purity detection time is long, making it difficult to establish a soft measurement model.
The STA-LSTM network is used to combine transfer learning and domain adversarial neural networks to extract spatiotemporal features through time and space attention mechanisms, reduce the data distribution differences between the source domain and the target domain, and establish a fast and accurate soft measurement model.
The model generalization capability is improved under new operating conditions, shortens the purity detection time, improves the accuracy and response speed of detection, can quickly and accurately predict the purity of fructose and glucose, assist in the control and optimization of simulated mobile beds .
Smart Images

Figure CN119004985A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a soft measurement modeling method, in particular to a soft measurement modeling method based on simulating a moving bed separation process. Background Art
[0002] Simulated moving bed chromatography separation technology is widely used in the fields of food, chemical industry, and medicine. It is particularly important in the separation of chiral drugs. Ibuprofen, which was hard to find some time ago, is a chiral drug. Its undesirable isomers have poor anti-inflammatory effects, but the side effects are not obvious. The "Thalidomide" incident in the 1960s was caused by undesirable isomers that caused many newborn fetuses to be deformed. For this reason, the research on the simulated moving bed separation process has received much attention.
[0003] The simulated moving bed separation process is a periodic hybrid system. Multiple modeling methods such as piecewise affine system identification, deep reinforcement learning, machine learning, NARX, and NOE combined cannot effectively solve the problems of periodicity and complexity. The complexity of the internal structure of deep learning can effectively analogize the simulated moving bed separation process, and the recurrent neural network can also effectively solve the long-term dependency problem caused by periodicity.
[0004] In order to solve the problem that data collection in the simulated moving bed separation process is difficult, time-consuming and labor-intensive, we chose to use transfer learning technology. Transfer learning can directly apply the soft measurement model established using a large amount of existing data to equipment that obtains a smaller amount of data.
[0005] However, applying traditional transfer learning technology and directly transferring models will lead to unsatisfactory transfer learning effects due to certain differences in the distribution of data features under different working conditions. Therefore, domain adversarial neural networks can be used to reduce the data differences between the source domain and the target domain.
[0006] For the traditional LSTM network, it cannot extract the spatial features and some temporal features in the data. This problem can be solved by superimposing algorithms, but related methods only consider accuracy and ignore their time consumption. The attention mechanism can greatly compensate for this problem.
[0007] Conventional purity detection for simulating moving bed separation processes takes too long and soft sensing models are difficult to establish. Summary of the invention
[0008] The purpose of the present invention is to propose a soft measurement modeling method based on a simulated moving bed separation process. The method uses a large amount of data from a traditional four-zone eight-column simulated moving bed separation process as the source domain for training, and migrates the model to a four-zone four-column simulated moving bed separation process through transfer learning, and uses a small amount of data to establish a soft measurement model. The method uses STA-LSTM to capture spatiotemporal features, and uses DANN to reduce the data distribution difference between the source domain and the target domain, thereby improving the generalization ability of the model under new working conditions. The simulation experimental results show that the transfer learning effect is best when the spatial attention mechanism layer of the STA-LSTM network is fixed. The network can provide accurate predictions in the fructose and glucose separation process and exhibits good adaptability.
[0009] The present invention adopts the following technical solutions:
[0010] A soft sensor modeling method based on simulating a moving bed separation process includes the following processes:
[0011] S1: Select appropriate process variables;
[0012] S2: perform data preprocessing on source domain data;
[0013] S3: The basic network model uses LSTM, which uses temporal attention and spatial attention mechanisms to extract spatiotemporal features from the data, inputs them into LSTM as features, and saves the structure and parameters of the model;
[0014] S4: Use the saved model structure and parameters as the model of the target domain, use DANN to reduce the feature differences between the source domain and the target domain, and fix the spatial attention mechanism layer to train the target domain model;
[0015] S5: Use the validation set to verify the effect of the model;
[0016] S6: Use other experimental data simulating moving bed separation processes to verify the network model.
[0017] 2. According to the process variable selection part described in S1, a comprehensive analysis was performed using Pearson, Spearman, and Kendall correlation coefficients to ensure that the selected variables had a significant correlation with the target variable.
[0018] 3. Perform preprocessing operations on the input and output data according to the data preprocessing part described in S2;
[0019] The input dimension of the model data is 5, namely Qr, Qf, Qra, Qd and Qe; the output dimension is 2, namely fructose and glucose purity; for any extract purity lower than 20% (severely distorted data), the relevant data is directly deleted, and for the relevant data with too large outliers in the data, 80% of the data is randomly deleted, and the maximum and minimum normalization method is used to make them in the same order of magnitude;
[0020]
[0021] where x i , X imin , X imax and X inorm They are the current value, minimum value, maximum value and normalized actual value of index i, and each original value in all data is changed to a value between 0 and 1; the data set after preprocessing is divided, and 2000 sets of data are used as the source domain for the four-zone eight-column SMB separation process, and 200 sets of data are collected as the target domain for the four-zone four-column SMB separation process to verify the performance of the transfer learning soft sensor model, with the training set and validation set accounting for 75% and 25% respectively;
[0022] 4. Based on the preprocessing of the model input and output, the spatial and temporal attention mechanisms are used to extract the spatiotemporal features in the source domain data and input them into LSTM for regression prediction. The trial and error method is used to optimize the hyperparameters. The root mean square error and R are used as evaluation indicators. 2 ;
[0023]
[0024] Where: y i is the true value; is the model prediction value; is the average true value; n is the number of predicted data.
[0025] 5. According to S4, the model trained with source domain data is fixed with spatial attention mechanism layer, and DANN is used to reduce the feature difference between source domain and target domain, and the target domain data is trained and tuned.
[0026] The loss function of the domain discriminator measures the effect of domain adaptation. Its loss function
[0027] L d =d i logG d (G f (x i ))+(1-d i )log(1-G d (G f (xi ))) (4)
[0028] 6. According to S5, five methods were adopted to verify the model effect, and the method of using adversarial neural network as the transfer learning framework and fixing the spatial attention mechanism layer was used to calculate the RMSE and R 2 Comparison of indicators
[0029] 7. Based on S6, the network model is obtained, and the experimental data is obtained again using the simulation model of the moving bed separation process. The RMSE and R of the predicted values of the two target products and the true values are obtained through the network model. 2 They are 0.0041, 0.959 and 0.0035, 0.961 respectively.
[0030] The present invention has the following beneficial effects:
[0031] The present invention adopts a soft measurement method based on transfer learning and attention mechanism, and uses the easily measurable parameter value set circulation flow rate (Qr), eluent flow rate (Qd), extract flow rate (Qe), feed flow rate (Qf), and raffinate flow rate (Qra) as auxiliary variables to obtain the purity of fructose and glucose that are difficult to measure directly. The purity detection of the simulated moving bed separation process is usually completed by a concentration analyzer. The concentration analyzer is reliable, but the detection time is too long, which is not conducive to the use of the simulated moving bed separation process. The soft measurement model has a fast response speed, good accuracy and robustness, and can be well utilized in the separation process of the simulated moving bed, helping engineers to control and optimize the simulated moving bed, and can also effectively reduce material consumption and ensure that the purity of the extract reaches the calibration value. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A technical roadmap for predictive application of simulated moving bed chromatography separation process based on transfer learning and STA-LSTM in the present invention;
[0033] Figure 2 It is the process variable correlation analysis diagram;
[0034] Figure 3 This is the structure diagram of the STA-LSTM model;
[0035] Figure 4 It is the structure diagram of DANN model;
[0036] Figure 5 This is a comparison chart of the model prediction results. DETAILED DESCRIPTION
[0037] In order to more clearly illustrate the objectives, details and advantages of the present invention, the implementation methods of the present invention will be described in detail below by combining schematic diagrams and formulas.
[0038] The present invention is an application of simulated moving bed chromatography separation process prediction based on transfer learning and STA-LSTM, characterized by using the four-zone eight-column SMB data of the source domain for training and adapting the four-zone four-column SMB process of the target domain through transfer learning. STA-LSTM is used to capture spatiotemporal features, and DANN is used to reduce the data distribution difference between the source domain and the target domain, thereby improving the generalization ability of the model under new working conditions. The technical roadmap of the invention is as follows: Figure 1 shown.
[0039] S1: Select appropriate process variables;
[0040] S2: perform data preprocessing on source domain data;
[0041] S3: The basic network model uses LSTM, which uses temporal attention and spatial attention mechanisms to extract spatiotemporal features from the data, inputs them into LSTM as features, and saves the structure and parameters of the model;
[0042] S4: Use the saved model structure and parameters as the model of the target domain, use DANN to reduce the feature differences between the source domain and the target domain, and fix the spatial attention mechanism layer to train the target domain model;
[0043] S5: Use the validation set to verify the effect of the model;
[0044] S6: Use other experimental data simulating moving bed separation processes to verify the network model.
[0045] 2. The specific implementation steps of S1 are:
[0046] A comprehensive analysis was performed using Pearson, Spearman, and Kendall correlation coefficients to ensure that the selected variables had a significant correlation with the target variable. The results are as follows: Figure 2 shown.
[0047] According to the correlation analysis, the collection circulation flow rate (Qr), eluent flow rate (Qd), extract flow rate (Qe), feed flow rate (Qf), and raffinate flow rate (Qra) are selected as auxiliary variables, which helps to simplify the structure of the model while ensuring that the model can capture the key factors affecting the separation process, thereby improving the accuracy and reliability of the prediction.
[0048] 3. The specific implementation steps of S2 are:
[0049] The experimental data were obtained using a reliable simulation model for the moving bed separation process;
[0050] For any extract whose purity is less than 20% (severely distorted data), the relevant data will be directly deleted, and for the relevant data with too large outliers, 80% of them will be randomly deleted, and the maximum and minimum normalization method will be used to make them in the same order of magnitude;
[0051]
[0052] where x i , X imin , X imax and X inorm They are the current value, minimum value, maximum value and normalized actual value of the indicator i, and each original value in all data is changed to a value between 0 and 1; the data set after preprocessing is divided, and 2000 sets of data are used as the source domain for the four-area eight-column SMB separation process, and 200 sets of data are collected as the target domain for the four-area four-column SMB separation process to verify the performance of the transfer learning model, with the training set and validation set accounting for 75% and 25% respectively;
[0053] 4. The specific implementation steps of S3 are:
[0054] Spatial attention mechanism and temporal attention mechanism are used to extract spatiotemporal features in the data.
[0055] The spatial attention mechanism focuses on analyzing and weighting the importance of input features. It calculates the weight of each feature to determine which features are most critical to the model's prediction.
[0056] The expression is shown in formula (2)
[0057] α t =Softmax(tanh(x t W′ a +h t-1 U′ a +b′ a )) (2)
[0058] Among them, α t represents the spatial attention weight at time t, x t represents the input features at time t, h t-1 represents the hidden state at time t-1, W′ a Represents the weight matrix of spatial attention, U′ a Represents the association weight matrix of spatial attention, b′ a Bias term representing spatial attention.
[0059] The temporal attention mechanism focuses on the time dimension in the sequence and determines which time points in the sequence are most important for the current prediction task.
[0060] The expression is shown in formula (3)
[0061] β t =Softmax(tanh(h t W a +s t U a +b a )) (3)
[0062] Among them, β t represents the spatial attention weight at time t, h t represents the hidden state at time t, s t represents the previous time step or other related state, W a The weight matrix representing the temporal attention, U a Represents the association weight matrix of temporal attention, b a Bias term representing temporal attention.
[0063] 5. The specific implementation steps of S4 are:
[0064] The model structure and parameters trained with source domain data are saved, and domain adversarial neural networks are used to reduce the different data distributions between the source domain and the target domain. During the domain adversarial process, the feature extractor and the domain discriminator compete with each other. The feature extractor tries to extract features that can confuse the domain discriminator, while the domain discriminator tries to accurately distinguish which domain the features come from. The ultimate goal is to achieve alignment of feature distribution between the source domain and the target domain through this adversarial process.
[0065] The loss function of the domain discriminator measures the effect of domain adaptation.
[0066] Its loss function is as follows:
[0067] L d =d i logG d (G f (x i ))+(1-d i )log(1-G d (G f (x i ))) (4)
[0068] 6. The specific implementation steps of S5 are:
[0069] In order to obtain the best model, five methods were adopted, and the method of using adversarial neural network as the transfer learning framework and fixing the spatial attention mechanism layer was used to calculate the RMSE and R 2 For comparison of indicators, the indicator formula is as follows
[0070]
[0071] Where: y i is the true value; is the model prediction value; is the average true value; n is the number of predicted data.
[0072] The comparison models are: using only LSTM, STA-LSTM, STA-LSTM model migration, using adversarial neural network but not fixing any layer, and using adversarial neural network as transfer learning framework and fixing the temporal attention mechanism layer. The conclusion is that the method of using adversarial neural network as transfer learning framework and fixing the spatial attention mechanism layer is the best. Figure 5 shown.
[0073] 7. The specific implementation steps of S6 are:
[0074] The experimental data of two simulated moving bed separation processes were retrieved using the simulation model of the moving bed separation process.
[0075] The RMSE and R values of the predicted values obtained by the network model and the true values 2 to express the purity of fructose and glucose under the current input state.
[0076] The RMSE of the predicted value obtained by the network model and the true value is 0.0035, and the response speed is fast, indicating that the prediction model for simulating the moving bed separation process based on transfer learning and STA-LSTM is effective and can quickly and accurately output the extract purity and the residue purity.
Claims
1. A soft sensor modeling method based on simulating a moving bed separation process, characterized in that: The method The process includes: S1: Select appropriate process variables; S2: perform data preprocessing on source domain data; S3: The basic network model uses LSTM, which uses temporal attention and spatial attention mechanisms to extract spatiotemporal features from the data, inputs them into LSTM as features, and saves the structure and parameters of the model; S4: Use the saved model structure and parameters as the model of the target domain, use DANN to reduce the feature differences between the source domain and the target domain, and fix the spatial attention mechanism layer to train the target domain model; S5: Use the validation set to verify the effect of the model; S6: Use other experimental data simulating moving bed separation processes to verify the network model.
2. A soft sensor modeling method based on simulating a moving bed separation process according to claim 1, characterized in that: In the process variable selection part described in S1, a comprehensive analysis was performed using Pearson, Spearman, and Kendall correlation coefficients to ensure that the selected variables had a significant correlation with the target variables.
3. The soft sensor modeling method based on simulating a moving bed separation process according to claim 1 is characterized in that: S2: the data preprocessing part performs preprocessing operations on the input and output data; The input dimension of the model data is 5, namely Qr, Qf, Qra, Qd and Qe; the output dimension is 2, namely fructose and glucose purity; for any extract purity lower than 20% (severely distorted data), the relevant data is directly deleted, and for the relevant data with too large outliers in the data, 80% of the data is randomly deleted, and the maximum and minimum normalization method is used to make them in the same order of magnitude; where x i , X imin , X imax and X inorm They are the current value, minimum value, maximum value and normalized actual value of indicator i, and each original value in all data is changed to a value between 0 and 1; The data set after preprocessing is divided. For the four-zone eight-column SMB separation process, 2000 sets of data are used as the source domain, and for the four-zone four-column SMB separation process, 200 sets of data are collected as the target domain to verify the performance of the transfer learning soft sensor model. The training set and validation set account for 75% and 25% respectively.
4. The soft sensor modeling method based on simulating a moving bed separation process according to claim 3 is characterized in that: The model input and output are preprocessed, and the spatial and temporal attention mechanisms are used to extract the spatiotemporal features in the source domain data and input them into the LSTM for regression prediction. The trial and error method is used to optimize the hyperparameters. The root mean square error and R are used as evaluation indicators. 2 ; Where: y i is the true value; is the model prediction value; is the average true value; n is the number of predicted data.
5. The soft sensor modeling method based on simulating a moving bed separation process according to claim 1, characterized in that: The S4 uses the model trained with source domain data to fix the spatial attention mechanism layer, and uses DANN to reduce the feature difference between the source domain and the target domain to train and tune the target domain data; The loss function of the domain discriminator measures the effect of domain adaptation. Its loss function L d =d i logG d (G f (x i ))+(1-d i )log(1-G d (G f (x i ))) (4)。 6. The soft sensor modeling method based on simulating a moving bed separation process according to claim 1, characterized in that: S5 adopts 5 methods to verify the model effect and uses the adversarial neural network as the transfer learning framework and fixes the spatial attention mechanism layer to measure RMSE and R 2 To compare the indicators.
7. The soft sensor modeling method based on simulating a moving bed separation process according to claim 1, characterized in that: S6 obtains the network model, uses the simulation model simulating the moving bed separation process to obtain the experimental data again, and obtains the RMSE and R of the predicted values of the two target products compared with the true values through the network model. 2 They are 0.0041, 0.959 and 0.0035, 0.961 respectively.
8. The soft sensor modeling method based on simulating a moving bed separation process according to claim 1, characterized in that: The combined model of transfer learning, STA-LSTM and domain adversarial neural network in S3 and S4 is applied to the field of separation process prediction of simulated moving bed, wherein STA-LSTM is used for feature extraction and regression prediction, and domain adversarial neural network is used to reduce the data distribution difference between source domain and target domain; and improve the generalization and computational efficiency of the model.
