A batch process modeling and final product quality prediction method based on big data
By adopting a recurrent neural network and attention mechanism with encoder-decoder structure in the fields of fine chemicals and pharmaceuticals, a batch process final product quality prediction model that can effectively consider historical moment status is established, and the inaccurate parameters in the existing technology is solved. and the problem of low control accuracy improves the accuracy of product quality prediction and control.
Patent Information
- Application Number
- CN202111302383.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-04
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2041-11-04
AI Technical Summary
The batch process modeling and final product quality prediction methods in the field of fine chemicals and pharmaceuticals have problems such as inaccurate parameters, low control accuracy, large fluctuations in product quality and failure to effectively consider the impact of historical time status on final product quality. .
A recurrent neural network using an encoder-decoder structure maps process measurement variables and control input variables nonlinearly to higher-dimensional state variables, combines the attention mechanism to establish a batch process final product quality prediction model, and uses historical operation big data to learn Nonlinear mapping parameters and dynamic models explicitly consider the impact of historical moment states on final product quality.
The accuracy of batch process modeling and the accuracy of final product quality prediction are improved, and the problem of the prediction performance of recurrent neural networks decreases with the increase in input length is achieved, thereby achieving more accurate product quality control.
Smart Images

Figure CN114036832B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of fine chemical and pharmaceutical batch process modeling and final product quality prediction, and more specifically, to a batch process modeling and final product quality prediction method based on big data. Background Art
[0002] The existing process modeling, control and final product quality prediction methods based on batch operation data for the fine chemical and pharmaceutical fields can be roughly divided into the following three categories:
[0003] The first type is to establish a batch process model based on first principles and use batch operation data to identify model parameters. The model established by this method has strong explanatory power, but some parameters and equations of the established model are estimated based on the results of small-batch laboratory experiments. The actual large-scale batch process has many time-varying and nonlinear factors, and the identified model is not accurate enough. In addition, some batch processes use open-loop control, so the control accuracy is not high, the final product quality prediction accuracy is low, and the quality results are often obtained after the batch process is completed.
[0004] The second type is based on statistical batch control, which uses principal component analysis, partial least squares and canonical correlation analysis to obtain latent variables for batch operation data, or uses subspace identification to directly learn linear state space models. This type of method learns the linear correlation between batch operation data and final product quality, and uses past batch data to predict final product quality. The advantage of this method is that it establishes a dynamic linear model of the system, which is convenient for designing controllers. The use of iterative learning control algorithms can reduce the control algorithm's dependence on model accuracy; it can also be combined with model predictive control to integrate product quality control into dynamic optimization problems. However, the model established by this method is a time-invariant linear dynamic model, which is a linear approximation of a nonlinear system. Due to the uncertainty of raw material composition, the variety of products and the complexity of processes in fine chemical and pharmaceutical processes, product quality fluctuates greatly. Therefore, the control accuracy of statistical batch control methods still needs to be improved.
[0005] The third category is to establish nonlinear models between process variable data and product quality based on nonlinear modeling methods such as feedforward neural networks, recurrent neural networks and support vector machines. These methods have good prediction capabilities and can provide empirical models for long-term predictions. These methods use the predicted state at the last time point to establish a nonlinear mapping model with the final product quality. The prediction results are very dependent on the state prediction quality at the last time point, and do not consider the dynamic impact of the process operation at the same batch historical moment on the final product quality. At the same time, this method still does not solve the problem of batch process product quality control, that is, it is difficult to set a given operation trajectory to obtain the ideal final product quality. Even if these nonlinear models are used to design a control algorithm so that the reactor can track the given temperature operation trajectory, it may not be able to achieve the ideal product quality.
[0006] It can be seen that the above three methods all have certain defects in predicting the quality of the final product. Summary of the invention
[0007] In order to overcome the deficiencies in existing fine chemical and pharmaceutical batch process modeling and final product quality prediction based on big data, the present invention provides a batch process modeling and final product quality prediction method based on big data.
[0008] To achieve the above object, the technical solution adopted by the present invention is: to provide a batch process modeling and final product quality prediction method based on big data, which specifically includes the following steps:
[0009] S1: Use encoders to nonlinearly map process measurement variables and control input variables into higher-dimensional state variables, and use recurrent neural networks to build a dynamic model of state variables;
[0010] S2: Map the state variables back to the measurement variables through the decoder to form nonlinear mapping parameters;
[0011] S3: Using batch process history to run big data to learn nonlinear mapping parameters and dynamic models;
[0012] S4: Using the state variables obtained through learning inference and combining them with the attention mechanism, a final product quality prediction model for the batch process is established.
[0013] In one possible implementation, in steps S1 and S2, an encoder is used and , the process measurement variable at time t and control input variables Nonlinear mapping to higher-dimensional state variables using recurrent neural networks Constructing a dynamic model of state variables:
[0014] ;
[0015] State variables at time t Then through the decoder Nonlinear mapping back to measured variables , forming nonlinear mapping parameters:
[0016] ;
[0017] In step S4, combined with the attention mechanism Establishing final product quality indicator variables for batch processes Prediction model, using historical batch quality analysis results to fit the quality prediction model:
[0018] .
[0019] In one possible implementation, in step S1, measurement vectors of multiple sampling batches and multiple sampling moments are selected to constitute process measurement variables, control vectors of multiple sampling batches and multiple sampling moments are selected to constitute control input variables, and a training database is established using multiple measurement vectors and multiple measurement vectors using historical operation data of PI control or open-loop control.
[0020] In a possible implementation, the measurement vector includes temperature, pressure, density and viscosity value converted from the torque of the stirring motor of the reactor; and the control vector includes steam jacket pressure and exhaust rate.
[0021] In a possible implementation, in step S3, multiple batches of sequence data are gradually slid each batch, and sequence data with a specific window length are taken to form a sequence training set; multiple sequence data sets are divided into a training set and a validation set, and the optimized mapping parameters can be obtained by optimizing the minimum objective function, and the validation set is used to select the optimal dynamic model and optimize the mapping parameters.
[0022] The beneficial effects of the batch process modeling and final product quality prediction method based on big data provided by the present invention are as follows: compared with the prior art, the present method uses an encoder to nonlinearly map process measurement variables and control input variables to higher-dimensional state variables, and uses a recurrent neural network to construct a state variable dynamic model; maps the state variables back to the measurement variables through a decoder to form nonlinear mapping parameters; uses batch process historical operation big data to learn nonlinear mapping parameters and dynamic models; uses the state variables inferred by learning, combined with an attention mechanism, to establish a batch process final product quality prediction model. The present invention is that batch process modeling combines nonlinear mapping with dynamic processes in a learning and training framework, avoiding staged modeling and learning; the final product quality prediction model explicitly considers the impact of historical state variables on final product quality, overcoming the problem that the recurrent neural network predicts the final product quality performance as the input length increases. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 A method flow chart of a batch process modeling and final product quality prediction method based on big data provided by an embodiment of the present invention; DETAILED DESCRIPTION
[0025] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0026] See also Figure 1 The batch process modeling and final product quality prediction method based on big data provided by the present invention is now described. The batch process modeling and final product quality prediction method based on big data specifically includes the following steps:
[0027] S1: Use encoders to nonlinearly map process measurement variables and control input variables into higher-dimensional state variables, and use recurrent neural networks to build a dynamic model of state variables;
[0028] S2: Map the state variables back to the measurement variables through the decoder to form nonlinear mapping parameters;
[0029] S3: Using batch process history to run big data to learn nonlinear mapping parameters and dynamic models;
[0030] S4: Using the state variables obtained through learning inference and combining them with the attention mechanism, a final product quality prediction model for the batch process is established.
[0031] The present invention provides a batch process modeling and final product quality prediction method based on big data. Compared with the prior art, the batch process modeling of the present invention combines nonlinear mapping with dynamic process in a learning and training framework, thus avoiding stage-by-stage modeling and learning. The final product quality prediction model explicitly considers the influence of state variables at historical moments on the final product quality, thus overcoming the problem that the performance of the recurrent neural network in predicting the final product quality decreases as the input length increases.
[0032] In a specific embodiment of the present invention, the following steps are included:
[0033] (1) Training a batch process nonlinear dynamic model based on an encoder-decoder recurrent neural network
[0034] , the process is as follows:
[0035] set up is the process measurement vector of the kth sampling moment of the bth batch, let is the control vector of the kth sampling moment of the bth batch, let For the b The final quality index vector of the batch product, such as number average molecular weight, weight average molecular weight and polydispersity index, is obtained by laboratory analysis after the batch process is completed. Suppose the number of sampling moments for each batch is , collect a total of B The training database is established based on the historical operation data of each batch using PI control or open-loop control.
[0036] (1.a) Establish the following nonlinear discrete dynamic model of the batch process based on the encoder-decoder recurrent neural network:
[0037] ;
[0038] ;
[0039] ;
[0040] Among them, the middle vector It is the sum of the state vector nonlinear mapping and the control vector nonlinear mapping;
[0041] ;
[0042] in, , To calculate the weight vector The weight matrix of is its bias vector;
[0043] ;
[0044] ;
[0045] Among them, the state vector Depend on and the middle vector through Weighted, is the sum of the elements in two vectors. Represents a vector whose elements are all 1; Set up a suitable neural network hierarchy so that , and The dimension of is consistent with that of the chemical and pharmaceutical processes. Since the number of observable variables in the chemical and pharmaceutical processes is small, the state variables in this model Dimension Should be larger than the observation vector The dimension of .
[0046] Encoder Depend on L The neural network consists of several layers, and its expression is:
[0047]
[0048] in, is the nonlinear activation function tanh, is the neural network weight matrix, is the bias vector;
[0049] Decoder also by L The neural network consists of several layers, and its expression is:
[0050]
[0051] in, For the matrix The transpose of is the bias vector.
[0052] (1.b) Use the batch process to run historical data to learn and train this dynamic model. Slide the sequence data of each batch b step by step Step, take the window length as The sequence data is used to construct the sequence training set. Assume that the total number of sequences is , set j The sequence data is ,Will The sequence dataset is divided into a training set and a validation set.
[0053] Assume the number of training sequence sets is , the set of parameters to be optimized for the model is , the first vector of the jth sequence Set to the model , optimize and minimize the objective function:
[0054]
[0055] The optimization parameters can be obtained . Use the validation set to select the optimal model structure and optimize parameters.
[0056] (2) The final product quality prediction model is constructed based on the state vector using the attention mechanism. The process is as follows:
[0057] (2.a) Establish a final product quality prediction model based on the attention mechanism:
[0058] set up is the state variable at the last moment of batch b, is the state variable at the kth moment of the bth batch. First calculate For each previous state The weight of:
[0059]
[0060] The score function here uses the following calculation method:
[0061]
[0062] Then use the weights Calculate all states Weighted Sum :
[0063]
[0064] Next will and Concatenate into a vector and multiply by a fully connected matrix of appropriate dimension , get the state of adding attention mechanism :
[0065]
[0066] Last Use Predict final product quality:
[0067]
[0068] The matrix , With the bias vector (Set to parameter set ) will be obtained through learning and training.
[0069] (2.b) Use the states of all batches learned in step (1) Compared with the product quality indicators obtained from actual tests To learn the final product quality prediction model, its optimization objective function is:
[0070] .
[0071] In addition, the quality prediction model is applied to the implementation of batch control. Since many batch processes in the chemical and pharmaceutical fields are generally heated in the early stage, cooled in the middle stage, and adjusted in the late stage, a simple open-loop control or temperature closed-loop control strategy can be adopted in the first half of the process control, and this model can be used in the second half to implement multi-step prediction, and combined with the rolling optimization method in the model predictive control to implement control.
[0072] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A batch process modeling and final product quality prediction method based on big data, characterized in that: The specific steps include: S1: Use encoders to nonlinearly map process measurement variables and control input variables into higher-dimensional state variables, and use recurrent neural networks to build a dynamic model of state variables; S2: Map the state variables back to the measurement variables through the decoder to form nonlinear mapping parameters; S3: Using batch process history to run big data to learn nonlinear mapping parameters and dynamic models; S4: Using the state variables inferred by learning and combining with the attention mechanism, a final product quality prediction model for the batch process is established; In steps S1 and S2, the encoder is used and , the process measurement variable at time t and control input variables Nonlinear mapping to higher-dimensional state variables using recurrent neural networks Constructing a dynamic model of state variables: ; State variables at time t Then through the decoder Nonlinear mapping back to measured variables , forming nonlinear mapping parameters: ; In step S4, combined with the attention mechanism Establishing final product quality indicator variables for batch processes Prediction model, using historical batch quality analysis results to fit the quality prediction model: ; In step S3, multiple batches of sequence data are gradually slid each batch, and sequence data with a specific window length are taken to form a sequence training set; multiple sequence data sets are divided into a training set and a validation set, and the optimized mapping parameters can be obtained by optimizing the minimum objective function, and the validation set is used to select the optimal dynamic model and optimize the mapping parameters.
2. The batch process modeling and final product quality prediction method based on big data as claimed in claim 1, characterized in that: In step S1, measurement vectors of multiple sampling batches and multiple sampling moments are selected to constitute process measurement variables, control vectors of multiple sampling batches and multiple sampling moments are selected to constitute control input variables, and a training database is established using multiple measurement vectors and multiple measurement vectors using the historical operation data of PI control or open-loop control.
3. The batch process modeling and final product quality prediction method based on big data as claimed in claim 2, characterized in that: The measurement vectors include temperature, pressure, density and viscosity value converted from the stirring motor torque of the reactor; the control vectors include steam jacket pressure and exhaust rate.
