A batch process temperature prediction method based on multi-stage fusion recurrent neural network
Through the multi-stage fusion recurrent neural network method, DBSCAN and RNN networks are combined with the self-attention mechanism to solve the problem of difficult prediction of temperature in intermittent processes, achieve accurate temperature prediction and control, and improve the stability of product quality.
Patent Information
- Application Number
- CN202410825749.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-25
AI Technical Summary
The temperature of the intermittent process is difficult to predict and control in real time, and is greatly affected by equipment conditions and human operations. It is also difficult to establish a temperature model, resulting in unstable product quality.
The multi-stage fusion recurrent neural network method is adopted, the intermittent process stages are divided by the DBSCAN clustering algorithm, the RNN network is used to extract features and combined with the self-attention mechanism for temperature prediction, and a multi-stage fusion recurrent neural network is constructed for temperature prediction.
It achieves accurate temperature prediction for intermittent processes, reduces the impact of human operations and equipment conditions on temperature, and improves the stability of product quality.
Smart Images

Figure CN118395880B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of temperature prediction, and in particular to a batch process temperature prediction method using a multi-stage fusion recurrent neural network. Background Art
[0002] Intermittent processes are widely used in the process industry production of small batches and high value-added products such as precision chemicals and pharmaceuticals due to their flexibility and high added value. With the rapid development of the market demand for multiple varieties, small batches and on-time delivery, the functional requirements for the dynamic balance of logistics, resources and time for various industrial products in intermittent processes have increased dramatically. Compared with continuous processes, intermittent processes have the characteristics of multi-stage and periodicity, which makes product quality susceptible to uncertain factors such as equipment conditions and human operation.
[0003] The intermittent process switches between multiple time periods during the entire reaction process, and its operating state is coupled in three dimensions: time, batch, and product. At the same time, different process characteristics are presented in different process operations, batch cycles, and product production states, making it difficult to extract features from real-time operating conditions and accurately characterize non-stationary characteristics. At the same time, intermittent processes are usually accompanied by strong exothermic reactions, and their temperature models are difficult to establish. In addition, the temperature variables of intermittent processes are usually difficult to measure directly online, and there is a time lag in offline analysis, which makes it difficult to implement feedback and control of product temperature. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] In view of the shortcomings of the prior art, the present invention provides a batch process temperature prediction method based on a multi-stage fusion recurrent neural network, which has the advantages of accurate prediction and solves the above-mentioned technical problems.
[0006] (II) Technical solution
[0007] To achieve the above object, the present invention provides the following technical solution: a batch process temperature prediction method of a multi-stage fusion recurrent neural network, comprising the following steps:
[0008] S1, collect the data of the intermittent process, pre-process the collected data, and divide the intermittent process stages by DBSCAN clustering algorithm;
[0009] S2, extracting multi-stage features through the RNN network, which is used to extract features from each stage divided in step S1, and completing the establishment of a multi-stage fusion recurrent neural network;
[0010] S3. Collect multiple batches of intermittent process data, divide the collected data into stages, and send them to the multi-stage fusion recurrent neural network established in step S2 to obtain prediction values.
[0011] As a preferred technical solution of the present invention, step S1 comprises the following steps:
[0012] S1.1. Collection Batch process data ,in Indicates intermittent process control variable data, Represents temperature data, for intermittent process data Add the window width to The sliding window is used to obtain the extended intermittent process data;
[0013] S1.2, preprocessing the expanded intermittent process data, including calculation of the mean, standard deviation and normalization of the data;
[0014] S1.3. Divide the intermittent process stages using the DBSCAN clustering algorithm.
[0015] As a preferred technical solution of the present invention, the intermittent process data expression after expansion in step S1.1 is as follows:
[0016]
[0017]
[0018]
[0019]
[0020]
[0021] in, Indicates the expanded Batch intermittent process data, Indicates the expanded intermittent process control variable data, Represents the expanded temperature data, , , , They represent the k-d+1th sample point of the first variable, the k-d+2th sample point of the first variable, and the kth sample point of the first variable respectively; , , , Respectively represent the J x The k-d+1th sample point of the variable, the Jth x The k-d+2th sample point of the variable, the Jth x The kth sample point of a variable; subscript Respectively represent the number of sampling points and the number of variables; Indicates the sliding window step size; Indicates that the i-th batch control variable consists of k-d+1 sample points and dJ x Dimensional composition; Indicates the kd target temperature value of the i-th batch, with a dimension of 1; superscript Indicates transpose.
[0022] As a preferred technical solution of the present invention, the specific process in step S1.3 is as follows:
[0023] S1.3.1. Select a distance threshold and a minimum point threshold ;
[0024] S1.3.2. Batch intermittent process data All data points in Marked as Uncategorized;
[0025] S1.3.3. For each data point , if the data point The neighborhood of contains at least data points, P is marked as the core point and a new cluster is created Then, all points in the neighborhood of P are added to the cluster by density reachability In, if If it is not a core point but is in the neighborhood of a core point, P is marked as a boundary point and added to the cluster where the core point is located;
[0026] S1.3.4, repeat step S1.3.3 until all data points are visited. In this process, several clusters are formed, each cluster contains one or more core points and their boundary points;
[0027] S1.3.5. After finding the core and boundary points of all clusters through S1.3.3 and S1.3.4, the I batches of process data belonging to the same stage are stacked together (the core points and boundary points of the same cluster can be classified into the same stage), that is, the core points and boundary points of the same cluster are stacked together. All the data in the local phase are stacked together and arranged in chronological order to form a local phase data set. ,in represents the cth element of the lth latent variable feature of the local stage data, represents the number of latent features, Represents the first elements.
[0028] As a preferred technical solution of the present invention, the specific steps of step S2 are as follows:
[0029] S2.1. Using RNN network to analyze local stage dataset Perform feature extraction to obtain the local stage feature matrix , and the local stage feature matrix Input into the self-attention network to get the query vector , key vector Sum vector matrix ,in, , and Respectively represent the corresponding query vector , key vector Sum vector matrix Hyperparameters of
[0030] S2.2. Using the Attention Matrix Calculate and obtain fusion features , attention matrix The specific calculation expression is as follows:
[0031]
[0032] in, represents the attention function, Indicates the sum of internal data. represents a function that converts a real vector into a probability distribution; Represents the calculation of query vector and the i-th key vector The similarity between them, subscript i represents the i-th key vector, represents the transpose of the i-th value vector;
[0033] Fusion Features By passing the query vector , key vector Sum vector matrix Bring it into the attention matrix The weighted calculation is obtained;
[0034] S2.3. By fusion features Input the fully connected regression layer of the RNN network to predict the temperature output. The specific expression is as follows:
[0035]
[0036] in, represents the predicted temperature value, represents the activation function, represents the fusion feature, Represents the weight for temperature prediction at time y, Indicates the temperature prediction bias at time y;
[0037] S2.4. The error is calculated by minimizing the unconstrained optimization expression to complete the establishment of the multi-stage fusion recurrent neural network. The specific calculation expression is as follows:
[0038]
[0039] in, represents the minimization objective function, represents the total number of samples, represents the predicted value of the i-th sample temperature, Indicates the current temperature value of the i-th sample, Indicates calculation of 2-norm.
[0040] As a preferred technical solution of the present invention, the specific steps of step S3 are as follows:
[0041] S3.1. Collecting multiple batches of intermittent process data According to step S1, the collected data is preprocessed and stage-divided to obtain multiple local stage feature matrices
[0042] S3.2. Intermittent process data and the local stage feature matrix Input multi-stage fusion recurrent neural network to get temperature prediction value ;
[0043] S3.3, the temperature prediction value will be obtained After the denormalization, the predicted value with consistent dimension of the original temperature data of the intermittent process has been obtained.
[0044] Compared with the prior art, the present invention provides a batch process temperature prediction method using a multi-stage fusion recurrent neural network, which has the following beneficial effects:
[0045] 1. The present invention characterizes the temporal correlation of process data by introducing a timing matrix constructed by sliding window technology. Through the DBSCAN clustering algorithm, the intermittent process is automatically divided into multiple stages. Then, an input RNN model is established in each stage to fully extract the nonlinear quality-related features of each stage. The self-attention mechanism is introduced to integrate the local quality-related features of each stage, and the global quality-related features including the features of each stage and the potential correlation between the stages are obtained. The global quality-related features are input into a fully connected regression network to realize temperature prediction of multi-stage intermittent processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] See also Figure 1 , a batch process temperature prediction method based on a multi-stage fusion recurrent neural network, comprising the following steps:
[0049] S1, collect the data of the intermittent process, pre-process the collected data, and divide the intermittent process stages by DBSCAN clustering algorithm;
[0050] S2, extracting multi-stage features through the RNN network, which is used to extract features from each stage divided in step S1, and completing the establishment of a multi-stage fusion recurrent neural network (MSFRNN);
[0051] S3. Collect multiple batches of intermittent process data, divide the collected data into stages, and send them to the multi-stage fusion recurrent neural network established in step S2 to obtain prediction values.
[0052] Further, step S1 includes the following steps:
[0053] S1.1. Collection Batch process data ,in Indicates intermittent process control variable data, Represents temperature data, for intermittent process data Add the window width to The sliding window is used to obtain the extended intermittent process data;
[0054] S1.2, preprocessing the expanded intermittent process data, including calculation of the mean, standard deviation and normalization of the data;
[0055] S1.3. Divide the intermittent process stages using the DBSCAN clustering algorithm.
[0056] Furthermore, the extended intermittent process data expression in step S1.1 is as follows:
[0057]
[0058]
[0059]
[0060]
[0061]
[0062] in, Indicates the expanded Batch intermittent process data, Indicates the expanded intermittent process control variable data, Represents the expanded temperature data, , , , They represent the k-d+1th sample point of the first variable, the k-d+2th sample point of the first variable, and the kth sample point of the first variable respectively; , , , Respectively represent the J x The k-d+1th sample point of the variable, the Jth x The k-d+2th sample point of the variable, the Jth x The kth sample point of a variable; subscript Respectively represent the number of sampling points and the number of variables; Indicates the sliding window step size; Indicates that the i-th batch control variable consists of k-d+1 sample points and dJ x Dimensional composition; Indicates the kd target temperature value of the i-th batch, with a dimension of 1; superscript Indicates transpose.
[0063] Furthermore, the specific process in step S1.3 is as follows:
[0064] S1.3.1. Select a distance threshold and a minimum point threshold ;
[0065] S1.3.2. Batch intermittent process data All data points in Marked as Uncategorized;
[0066] S1.3.3. For each data point , if the data point The neighborhood of contains at least data points, P is marked as the core point and a new cluster is created Then, all points in the neighborhood of P are added to the cluster by density reachability In, if If it is not a core point but is in the neighborhood of a core point, then P is marked as a boundary point and added to the cluster where the core point is located;
[0067] S1.3.4, repeat step S1.3.3 until all data points are visited. In this process, several clusters are formed, each cluster contains one or more core points and their boundary points;
[0068] S1.3.5. After finding the core and boundary points of all clusters through S1.3.3 and S1.3.4, the I batches of process data belonging to the same stage are stacked together (the core points and boundary points of the same cluster can be classified into the same stage), and arranged in chronological order to form a local stage data set. ,in represents the cth element of the lth latent variable feature of the local stage data, represents the number of latent features, Represents the first elements.
[0069] Furthermore, the specific steps of step S2 are as follows:
[0070] S2.1. Using RNN network to analyze local stage dataset Perform feature extraction to obtain the local stage feature matrix , and the local stage feature matrix Input into the self-attention network to get the query vector , key vector Sum vector matrix ,in, , and Respectively represent the corresponding query vector , key vector Sum vector matrix Hyperparameters of
[0071] S2.2. Using the Attention Matrix Establish global features and obtain fusion features , attention matrix The specific calculation expression is as follows:
[0072]
[0073] in, represents the attention function, Indicates the sum of internal data. represents a function that converts a real vector into a probability distribution; Represents the calculation of query vector and the i-th key vector The similarity between them, subscript i represents the i-th key vector, represents the transpose of the i-th value vector;
[0074] Fusion Features By passing the query vector , key vector Sum vector matrix Bring it into the attention matrix The weighted calculation is obtained;
[0075] S2.3. By fusion features Input the fully connected regression layer of the RNN network to predict the temperature output. The specific expression is as follows:
[0076]
[0077] in, represents the predicted temperature value, represents the activation function, represents the fusion feature, represents the weight at the yth moment, represents the bias at the yth moment;
[0078] S2.4. The error is calculated by minimizing the unconstrained optimization expression to complete the establishment of the multi-stage fusion recurrent neural network. The specific calculation expression is as follows:
[0079]
[0080] in, represents the minimization objective function, represents the total number of samples, represents the predicted value of the i-th sample temperature, Indicates the current temperature value of the i-th sample, Indicates calculation of 2-norm.
[0081] Furthermore, the specific steps of step S3 are as follows:
[0082] S3.1. Collecting multiple batches of intermittent process data According to step S1, the collected data is preprocessed and stage-divided to obtain multiple local stage feature matrices
[0083] S3.2. Intermittent process data and the local stage feature matrix Input multi-stage fusion recurrent neural network to get temperature prediction value ;
[0084] S3.3, the temperature prediction value will be obtained After the denormalization, the predicted value with consistent dimension of the original temperature data of the intermittent process has been obtained.
[0085] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A batch process temperature prediction method based on multi-stage fusion recurrent neural network, Features: The following steps are involved: S1, collect the data of the intermittent process, pre-process the collected data, and divide the intermittent process stages by DBSCAN clustering algorithm; The step S1 comprises the following steps: S1.
1. Collect m batches of intermittent process data Z m =[X m Y m ], where X m Indicates intermittent process control variable data, Y m Represents temperature data, for intermittent process data Z m Add a sliding window with a window width of d to obtain the expanded intermittent process data; The extended intermittent process data expression in step S1.1 is as follows: Z i =[X i Y i ] AND i ∈R K-d Among them, Z i represents the expanded batch i intermittent process data, X i Indicates the expanded intermittent process control variable data, Y i Represents the expanded temperature data, They represent the k-d+1th sample point of the first variable, the k-d+2th sample point of the first variable, and the kth sample point of the first variable respectively; Respectively represent the J x The k-d+1th sample point of the variable, the Jth x The k-d+2th sample point of the variable, the Jth x The kth sample point of a variable; subscript K, J x Represent the number of sampling points and the number of variables respectively; the subscript d represents the sliding window step size; Indicates that the i-th batch control variable consists of k-d+1 sample points and dJ x Dimensional composition; R K-d Represents the kd target temperature value of the i-th batch, with a dimension of 1; the superscript T indicates transposition; S1.2, preprocessing the expanded intermittent process data, including calculation of the mean, standard deviation and normalization of the data; S1.3, dividing the intermittent process stages by DBSCAN clustering algorithm; The specific process in step S1.3 is as follows: S1.3.
1. Select a distance threshold ε and a minimum point count threshold D min ; S1.3.
2. Batch intermittent process data Z i All data points P in are marked as unclassified; S1.3.
3. For each data point P, if the neighborhood of data point P contains at least D min If there are data points, P is marked as a core point and a new cluster C is created. Then, all points in the neighborhood of P are added to cluster C through density reachability. If P is not a core point but is in the neighborhood of a core point, P is marked as a boundary point and added to the cluster where the core point is located. S1.3.4, repeat step S1.3.3 until all data points are visited; S1.3.
5. Stack the process data of batch I belonging to the same stage together, that is, stack all the data in the same cluster C together and arrange them in chronological order to form a local stage data set h local =[h 1l ,h 2l , ..., h cl ], where h cl represents the cth element of the th latent variable feature of the local stage data, l represents the number of latent features, and c represents the cth element in the local stage data set; S2, extracting multi-stage features through the RNN network, which is used to extract features from each stage divided in step S1, and completing the establishment of a multi-stage fusion recurrent neural network; The specific steps of step S2 are as follows: S2.
1. Use RNN network to analyze the local stage dataset h local Perform feature extraction to obtain the local stage feature matrix H local , and the local stage feature matrix H local Input into the self-attention network to obtain the query vector Q = W q H local , key vector K = W k H local Sum vector matrix V = W v H local , where W q , W k and W v They represent the hyperparameters corresponding to the query vector Q, key vector K, and value vector matrix V respectively; S2.
2. Use the attention matrix Att(Q, K, V) to establish global features and obtain the fusion feature h global , the specific calculation expression of the attention matrix Att(Q, K, V) is as follows: Among them, Att(Q, K, V) represents the attention function, represents the summation of internal data, Softmax[*] represents the function of converting real vector into probability distribution; similarity(Q, K i ) represents the calculation of the query vector Q and the i-th key vector K i The similarity between them, subscript i represents the i-th key vector, V i T represents the transpose of the i-th value vector; Fusion feature h global By setting the query vector Q = W q H local , key vector K = W k H local Sum vector matrix V = W v H local Bring it into the attention matrix Att(Q, K, V) and calculate it by weight; S2.3, by fusing feature h global Input the fully connected regression layer of the RNN network to predict the temperature output. The specific expression is as follows: in, represents the predicted temperature value, σ y represents the activation function, h global represents the fusion feature, W y represents the weight for temperature prediction at time y, b y Indicates the temperature prediction bias at time y; S2.
4. The error is calculated by minimizing the unconstrained optimization expression to complete the establishment of the multi-stage fusion recurrent neural network. The specific calculation expression is as follows: Among them, L(θ) represents the minimization objective function, n represents the total number of samples, represents the predicted temperature value of the i-th sample, y(i) represents the current temperature value of the i-th sample, ||*|| 2 Indicates calculation of 2 norm; S3. Collect multiple batches of intermittent process data, divide the collected data into stages, and send them to the multi-stage fusion recurrent neural network established in step S2 to obtain prediction values.
2. The method for predicting temperature of an intermittent process using a multi-stage fusion recurrent neural network according to claim 1, Features: The specific steps of step S3 are as follows: S3.
1. Collecting multiple batches of intermittent process data Z test =[X test Y test ], pre-process the collected data according to step S1, and divide the stages to obtain multiple local stage feature matrices h′ local S3.2, the intermittent process data Z test =[X test Y test ] and the local stage feature matrix h′ local Input multi-stage fusion recurrent neural network to get temperature prediction value S3.3, the temperature prediction value will be obtained After the anti-normalization processing, the predicted value with consistent dimension of the original temperature data of the intermittent process has been obtained.
Citation Information
Patent Citations
Multi-stage batch process soft measurement method based on fuzzy gauss hybrid model
CN104462850A
Method for non-linear multistage intermittent process soft measurement based on multi-directional support vector cluster
CN104504288A
Intermittent process quality prediction method based on combination of automatic clustering and partial least squares
CN113031553A
Method and system for predicting single task time in batch processing task and storage medium
CN113448808A
Urban sewage treatment process state monitoring method based on multi-stage dynamic fuzzy width learning
CN115905821A
