A batch process fault monitoring method based on CDVAE
The CDVAE model addresses the nonlinear and multi-stage characteristics of batch processes, enabling efficient and accurate fault monitoring while reducing false detection rates and computational load. It is suitable for fault monitoring in batch processes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGNAN UNIV
- Filing Date
- 2023-08-14
- Publication Date
- 2026-04-28
AI Technical Summary
Existing batch process fault monitoring methods are inefficient, have a high false detection rate, and require a large amount of computation when dealing with nonlinear and multi-stage characteristics, and cannot effectively extract the dynamic characteristics of the data.
A conditional dynamic variational autoencoder (CDVAE) model is adopted. Through three-dimensional data unfolding and standardization, combined with two-dimensional sliding window and stage information, encoder and decoder structures are designed, the model is trained and statistics are calculated to achieve fault monitoring.
It improves the accuracy and efficiency of batch process fault monitoring, reduces the false detection rate, reduces the amount of computation, and can effectively extract the multi-stage and dynamic characteristics of batch processes.
Smart Images

Figure CN117032114B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a batch process fault monitoring method based on CDVAE, belonging to the field of fault monitoring technology. Background Technology
[0002] Batch production processes constitute a significant portion of modern manufacturing processes and play a crucial role in semiconductors, biopharmaceuticals, and injection molding. Due to their low cost and high added value, safety during production and the final product quality are of paramount importance. Because batch processes are characterized by nonlinearity, multi-stage features, and two-dimensional dynamic characteristics, traditional mechanistic and empirical models have limitations; therefore, establishing effective fault monitoring models is essential.
[0003] Currently, the continuous advancement of IoT and computer technologies has led to lower data acquisition costs, creating favorable conditions for data-driven multivariate statistical methods. Typical methods include Principal Component Analysis (MPCA) and Partial Least Squares (PLS). While these methods can achieve process monitoring, they address linear problems and cannot effectively extract nonlinear information in batch processes. Although other improved methods exist, their processing complexity increases with the data dimensionality.
[0004] Batch processes typically exhibit multi-stage characteristics. For example, in fermentation batch processes, bacterial growth includes a quiescent phase, an exponential growth phase, and a plateau phase. These multi-stage characteristics are also reflected in the data. If these multi-stage characteristics are not considered when building a model, the model's monitoring effectiveness will be reduced. Therefore, taking multi-stage issues into account when building a model can significantly improve its monitoring accuracy.
[0005] The purpose of process monitoring is to extract feature information from batch processes to classify normal and faulty data. A Conditional Variational Autoencoder (CVAE) is a deep learning-based generative model that can generate different content based on conditional information. It mainly consists of two parts: an encoder and a decoder. The encoder compresses the original data into a low-dimensional shallow space, and then the decoder combines the conditional information with shallow features to generate the original data. However, current methods for batch process fault monitoring using CVAE cannot effectively address the dynamic and time-specific characteristics of the extracted data. Furthermore, multiple models are needed to handle multi-time-period characteristics, resulting in a high false detection rate, extremely high computational cost, and low monitoring efficiency. Summary of the Invention
[0006] To improve the accuracy and efficiency of batch process fault monitoring, this invention provides a batch process fault monitoring method based on CDVAE, the technical solution of which is as follows:
[0007] The first objective of this invention is to provide a batch process fault monitoring method, comprising:
[0008] Step 1: Collect historical data of the normal three-dimensional production process, with the three dimensions being batch dimension. Variable dimensions and time dimension ;
[0009] Step 2: Based on the batch process information, determine the stages of the data and standardize the collected data.
[0010] Step 3: Expand the standardized data according to the batch dimension and perform two-dimensional sliding window processing to obtain the input data;
[0011] Step 4: Design the structure of the CDVAE model and train it;
[0012] The CDVAE model is divided into an encoder and a decoder. The first layer dimension of the encoder is determined by the input data and the stage information of the batch. Other dimensions of the encoder network gradually decrease to achieve compression of the original data information. The last layer of the encoder network is the smallest, and the features extracted by this layer are more abstract.
[0013] The decoder and the encoder have an inverse symmetric structure, with the number of layers continuously increasing, and the dimension of the last network layer being the same as the dimension of the input data.
[0014] Step 5: After training, establish shallow space statistics. Residual space statistics And based on historical data, the control limits for these two statistics are calculated using kernel density estimation;
[0015] Step 6: Acquire real-time sampling data ;
[0016] Step 7: Standardize the real-time sampled data using the same method as historical data. Standardize the process;
[0017] Step 8: Calculate the shallow space statistics and residual space statistics using the trained model;
[0018] Step 9: Determine whether the shallow space statistics and residual space statistics exceed the control limits. If they exceed the control limits, trigger an alarm. If the statistics do not exceed the control limits, continue to determine whether the batch has a fault.
[0019] Optionally, step 2 employs Z-score standardization, including: calculating the mean. Find the variance The historical data was then standardized using the following formula:
[0020]
[0021] in, , Representing the i The first batch k The sampling time of the first sampling moment j One variable.
[0022] Optionally, step 3 includes:
[0023] Assume the current time is the [number]th [time]. i Batch, No. k At that time, the historical sampling data is ;
[0024] Because of the two-dimensional dynamic characteristics of the batch process, the current moment data is not only related to the previously sampled data within the current batch. There is a correlation, and it is also related to previous batches of data. Because of the correlation, the two-dimensional sliding window is set to ,in The length of the correlation within the batch. This represents the length of the correlation between batches.
[0025] Optionally, the activation function of the CDVAE model is the Leaky ReLU function, and the loss function is:
[0026]
[0027] in, Representing latent variables, Table time period labels, To reconstruct the coding network, Indicates the distance between K and L. Represents the coding network, Represents a standard normal distribution. This represents the reconstruction error between the model-generated data and the original data. Represents shallow space statistics. This represents the expectation of the encoding network.
[0028] Optionally, the shallow space statistics Residual space statistics They are respectively:
[0029]
[0030]
[0031] in, It is the number of samples. Indicates the reconstructed output. Represents the standard normal distribution. This represents the L2 norm.
[0032] Optionally, the stage information of the batch process is converted using a "One-to-Hot" encoding method.
[0033] Optionally, the number of layers in the encoder neural network of the CDVAE model is set to 330-60-20, and the number of layers in the decoder neural network is set to 20-60-330.
[0034] The second objective of this invention is to provide a method for monitoring faults in the batch fermentation process of penicillin, which uses any of the above-mentioned batch process fault monitoring methods to achieve fault monitoring in the batch fermentation process of penicillin.
[0035] Optionally, the penicillin fermentation process can be divided into three stages, then the converted stage information is as follows: , , .
[0036] Optional, the time dimension correlation length of the penicillin fermentation process. Set to 10, batch dimension relevance length Set it to 3.
[0037] The beneficial effects of this invention are:
[0038] This invention expands the three-dimensional batch process data according to the batch dimension, selects a two-dimensional sliding window to extract the two-dimensional dynamic characteristics of the batch process, divides the batch process into multiple stages based on historical experience, and establishes a CDVAE to extract the multi-stage characteristics of the batch process with one model, avoiding the cumbersome process of establishing multiple models for one batch process. Compared with existing batch process fault monitoring methods, this invention can greatly reduce the amount of calculation and improve the efficiency of batch process fault monitoring.
[0039] The CDVAE network model of this invention has good nonlinear feature extraction capabilities, and comparative experiments have shown that the monitoring method of this invention greatly reduces the false detection rate of batch process fault monitoring and improves the model's fault monitoring accuracy. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 The present invention provides a flowchart of a method and system for batch process fault monitoring.
[0042] Figure 2 This invention provides a schematic diagram of the batch process data expansion method and a two-dimensional sliding window.
[0043] Figure 3 This is a schematic diagram of the structure of CDVAE provided by the present invention.
[0044] Figure 4 The image shows the monitoring effect of the LSTM-Encoder method on fault number 3.
[0045] Figure 5 This is a graph showing the monitoring effect of the CDVAE method on fault number 3. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0047] Example 1:
[0048] This embodiment provides a batch process fault monitoring method using a two-dimensional Conditional Dynamic Variational Auto-encoder (CDVAE). First, the three-dimensional batch process data is expanded and standardized according to the batch dimension. Then, a two-dimensional sliding window is determined for the model to acquire dynamic characteristics in both the batch and time dimensions. The CDVAE model is trained, and statistics for residuals and shallow spaces are designed and dynamic control limits are calculated. Subsequently, standardized data collected online is fed into the model to calculate statistics. If the statistics exceed the control limits, a fault occurs.
[0049] The present invention adopts the following technical solution and experimental steps:
[0050] A. Offline modeling stage:
[0051] 1) Collect historical data from normal production processes. Normal historical data is in three-dimensional format, with the three dimensions being batch size. Variable dimensions Time dimension ,Right now .in Represents the j-th variable at the k-th sampling time in the i-th batch. ;
[0052] 2) Based on the batch process information, determine the data stages and standardize the data.
[0053] The specific standardization method is to standardize according to the variable dimensions, and to use Z-score standardization, which calculates the mean. Find the variance The historical data was then standardized using the following formula:
[0054]
[0055] in, ;
[0056] 3) Expand the above data and perform a two-dimensional sliding window process to obtain the input sequence. Let the current time be the [time series]. i Batch, No. k At that time, the historical sampling data is Due to the two-dimensional dynamic characteristics of the batch process, the data at the current moment is not only related to the previously sampled data within the current batch. There is a correlation, and it is also related to previous batches of data. It is correlated. Therefore, the two-dimensional sliding window is set to... .in The length of the correlation within the batch. This represents the length of the correlation between batches. The stage information of the batch process is converted using a "One-to-Hot" encoding method.
[0057] 4) Design the CDVAE model network structure. The network consists of an encoder and a decoder. The first layer dimension of the encoder is determined by the input data and the stage information of the batch. Other dimensions of the network gradually decrease to achieve compression of the original data information. The last layer of the encoder is the smallest, and the features extracted in this layer are more abstract. The decoder network has an inverse symmetric structure, with the number of layers increasing continuously. The last layer has the same dimension as the input data.
[0058] In this embodiment, the activation function of the CDVAE model is "Leaky ReLU", and the loss function of the model is:
[0059]
[0060] in, Representing latent variables, Table time period labels, To reconstruct the coding network, KL
[0061] distance, Represents the coding network, Represents a standard normal distribution. Indicates reconstruction error, Indicates shallow space loss. This represents the expectation of the encoding network.
[0062] The loss function can be divided into two parts: the first part is the reconstruction error between the model-generated data and the original data, and the second part is the KL divergence between the shallow spatial distribution and the standard normal distribution. By reducing the value of this loss function, the network model learns the distribution of the data.
[0063] 5) After training, establish two statistics: shallow space statistics. Residual space statistics The calculation method is as follows:
[0064]
[0065]
[0066] in, It is the number of samples. Indicates the reconstructed output. Represents the standard normal distribution. This represents the L2 norm.
[0067] 6) Calculate the control limits for these two statistics using kernel density estimation based on historical data;
[0068] 7) Design a diagnostic method. Using the fault data input into the model as optimization parameters, the monitoring indicators in the residual space are propagated layer by layer through the neural network to calculate the gradient in the input data. This enables fault diagnosis.
[0069] B. Online monitoring phase:
[0070] 8) Acquire real-time sampling data ;
[0071] 9) Standardize the real-time sampled data using the same standardization method as historical data;
[0072] 10) Calculate two statistics for the shallow space and the residual space using the model;
[0073] 11) Determine whether the two statistics exceed the control limits. If they do, trigger an alarm. If the statistics do not exceed the control limits, continue to determine whether the batch has a fault.
[0074] Example 2:
[0075] This embodiment uses the penicillin batch fermentation process as an example. The production process exhibits significant nonlinearity, multi-stage characteristics, and two-dimensional dynamic characteristics. PenSim V2.0 is a penicillin fermentation simulation software developed in Illinois based on the real penicillin fermentation process. Numerous related studies have demonstrated the effectiveness and practicality of this simulation platform.
[0076] This embodiment uses penicillin batch fermentation process data generated by PenSim V2.0 simulation as the experimental object. The sampling time was set to 0.5 hours, each batch fermented for 600 hours, and a total of 54 batches were collected. Eleven variables were selected for monitoring, as shown in Table 1. There were 46 batches with normal fermentation, of which 40 batches were used for model training and 6 batches were used for model validation. There were 8 batches with failures, including univariate failures and multivariate failures, as shown in Table 2.
[0077] Table 1 Key Process Variables
[0078]
[0079] Table 2 Fault Settings
[0080]
[0081] The application of this invention in the penicillin fermentation simulation platform is as follows:
[0082] A. Offline modeling stage:
[0083] 1) The collected batch process data is a three-dimensional array. The three dimensions are batch dimension Variable dimensions Time dimension Of these, 40 batches of normal production process data were used to train the model, 6 batches were used for model validation, and 8 batches were used for fault data;
[0084] 2) Training data from 40 batches of normal production processes Standardize the process. First, follow the formula... Calculate the mean of each variable, then follow the formula. Calculate the variance of each variable. Then standardize the training data. ,in, Secondly, based on the biomass concentration during the fermentation process, the data is divided into... The stages, among which Then, the stage information is converted using "One-to-Hot" encoding. Based on the penicillin fermentation process, the process is divided into three stages, resulting in the converted stage information as follows: , , ;
[0085] 3) Next, the data is expanded according to the batch dimension, and the size of the two-dimensional sliding window is set. The dimension of the two-dimensional sliding window is obtained based on the optimal gradient search, and the correlation length of the penicillin fermentation process over time is considered. Set to 10, batch dimension relevance length Set to 3. Perform sliding window processing on the expanded data to obtain the input sequence. ,in, ;
[0086] 4) Set the model hyperparameters: 100 training iterations, 10 for the time dimension correlation length, and 3 for the batch dimension correlation length. Set the CDVAE network encoder neural network to 330-60-20 layers. Set the decoder neural network to 20-60-330 layers. The specific connection form for each neural network layer is as follows: Where W represents the weight parameters of each layer of the neural network, and b is the bias term. This is the activation function for "Leaky-Rule".
[0087] The loss function is set in the following form:
[0088]
[0089] in, For batch process data label information, This is the output of the encoder;
[0090] 5) Calculate the statistics for the normal production process based on historical data, and use kernel density estimation to calculate the control limits, with the confidence limit set at 0.95;
[0091] B. Online monitoring phase:
[0092] 6) The collected penicillin fermentation data for the 11 variables in the kth sample are standardized according to the mean and variance of the historical normal production process in step 2). The specific calculation method is as follows:
[0093]
[0094] in, For the first j The variable in the first... k The sampled values at each time point;
[0095] 7) Calculate the two monitoring indicators for the shallow space and residual space. The calculation formulas are as follows:
[0096]
[0097]
[0098] 8) Compare the two fault monitoring statistics with the control limits calculated from historical normal batch fermentation process data. If either statistic exceeds the control limit, it means a fault has occurred in the current batch production process. If the current statistic does not exceed the control limit, continue sampling data at the next time step. Continue the penicillin fermentation process from step 6).
[0099] The above steps represent the specific application of this invention in batch process fault monitoring using the PenSimV2.0 penicillin fermentation simulation platform. To verify the effectiveness of this method, eight faults were selected for online monitoring experiments. Figure 4 , Figure 5 This is a fault monitoring diagram. Figure 4 , Figure 5 The solid line represents the monitored value of the statistical measure, and the dashed line represents the control limit of the statistical measure. If the statistical measure exceeds the control limit, it means that a fault has occurred in the batch process; otherwise, the batch process proceeds as normal. To measure the effectiveness of the model, the fault accuracy (FDR) and false alarm rate (FAR) were calculated for eight different fault types:
[0100]
[0101]
[0102] Figure 4 , Figure 5 The monitoring chart for fault #3 is presented, which is a step fault resulting in a 5% increase in stirring power. This fault was introduced from the sampling point at time 600 until the end of the batch fermentation. For fault #3, the LSTM-Encoder and the proposed method of this invention have the same fault detection capability in the residual space, with an FDR of 100%. However, the proposed method has an FDR of 100% in the shallow space, while the LSTM-Encoder's is only 83.1%. The proposed method's fault detection capability in the shallow space is significantly better than that of the LSTM-Encoder. The average FAR of the proposed method for fault #3 is only 0.07%, while that of the LSTM-Encoder is 0.25%. This is because the proposed method uses dynamic control limits and considers the multi-stage characteristics of the batch process, thus significantly improving the model's FDR and significantly reducing the FDR. The above demonstrates that the proposed method has good batch process fault detection capability.
[0103] The fault monitoring results for the eight types of faults are shown in Table 3:
[0104] Table 3. Monitoring results for 8 different faults
[0105]
[0106] As can be seen from Table 3, the CDVAE proposed in this invention has high fault monitoring accuracy and low false detection rate for various types of faults.
[0107] Some steps in the embodiments of the present invention can be implemented using software, and the corresponding software program can be stored in a readable storage medium, such as an optical disc or a hard disk.
[0108] 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, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A batch process fault monitoring method, characterized in that, The method includes: Step 1: Collect historical data of the normal three-dimensional production process, with the three dimensions being batch dimension. Variable dimensions and time dimension ; Step 2: Based on the batch process information, determine the stages of the data and standardize the collected data. Step 3: Expand the standardized data according to the batch dimension and perform two-dimensional sliding window processing to obtain the input data; Step 4: Design the structure of the CDVAE model and train it; The CDVAE model is divided into an encoder and a decoder. The first layer dimension of the encoder is determined by the input data and the stage information of the batch. Other dimensions of the encoder network gradually decrease to achieve compression of the original data information. The last layer of the encoder network is the smallest, and the features extracted by this layer are more abstract. The decoder and the encoder have an inverse symmetric structure, with the number of layers continuously increasing, and the dimension of the last network layer being the same as the dimension of the input data. Step 5: After training, establish shallow space statistics. Residual space statistics And based on historical data, the control limits for these two statistics are calculated using kernel density estimation; Step 6: Acquire real-time sampling data ;in, For the first j The variable in the first... k The sampled values at each time point; Step 7: Standardize the real-time sampled data using the same method as historical data. Standardize the process; Step 8: Calculate the shallow space statistics and residual space statistics using the trained model; Step 9: Determine whether the shallow space statistics and residual space statistics exceed the control limits. If they exceed the control limits, trigger an alarm. If the statistics do not exceed the control limits, continue to determine whether the batch has a fault.
2. The batch process fault monitoring method according to claim 1, characterized in that, Step 2 uses Z-score standardization, including: calculating the mean. Find the variance The historical data was then standardized using the following formula: in, , Representing the i The first batch k The sampling time of the first sampling moment j One variable.
3. The batch process fault monitoring method according to claim 2, characterized in that, Step 3 includes: Assume the current time is the [number]th [time]. i Batch, No. k At that time, the historical sampling data is ; Because of the two-dimensional dynamic characteristics of the batch process, the current moment data is not only related to the previously sampled data within the current batch. There is a correlation, and it is also related to previous batches of data. Because of the correlation, the two-dimensional sliding window is set to ,in The length of the correlation within the batch. This represents the length of the correlation between batches.
4. The batch process fault monitoring method according to claim 3, characterized in that, The activation function of the CDVAE model is the Leaky ReLU function, and the loss function is: in, Representing latent variables, Table time period labels, To reconstruct the coding network, Indicates the distance between K and L. Represents the coding network, Represents a standard normal distribution. This represents the reconstruction error between the model-generated data and the original data. Represents shallow space statistics. This represents the expectation of the encoding network.
5. The batch process fault monitoring method according to claim 4, characterized in that, The shallow space statistics Residual space statistics They are respectively: in, It is the number of samples. Indicates the reconstructed output. Represents the standard normal distribution. This represents the L2 norm.
6. The batch process fault monitoring method according to claim 1, characterized in that, The stage information of the batch process is converted using the "One-to-Hot" encoding method.
7. The batch process fault monitoring method according to claim 1, characterized in that, The number of layers in the encoder neural network of the CDVAE model is set to 330-60-20, and the number of layers in the decoder neural network is set to 20-60-330.
8. A method for monitoring faults in a penicillin batch fermentation process, characterized in that, The method employs the batch process fault monitoring method described in any one of claims 1-7 to achieve fault monitoring during the batch fermentation process of penicillin.
9. The method for monitoring faults in the batch fermentation process of penicillin according to claim 8, characterized in that, If the penicillin fermentation process is divided into three stages, then the converted stage information is as follows: , , .
10. The method for monitoring faults in the batch fermentation process of penicillin according to claim 8, characterized in that, Time-dimensional correlation length of penicillin fermentation process Set to 10, batch dimension relevance length Set it to 3.
Citation Information
Patent Citations
Penicillin fermentation process fault monitoring method based on MLLE-OCSVM
CN106709214A
Batch process fault monitoring method based on multi-stage FOM-SAE
CN111160811A