A semi-supervised FCM and SAE method for fault monitoring in multi-stage fermentation process based on information entropy
By using semi-supervised fuzzy C-mean clustering and sparse autoencoder of information entropy during the fermentation process, the multi-stage characteristic and nonlinear dynamic monitoring problems are solved, and more accurate phase division and faults are achieved. Monitoring improves monitoring accuracy and robustness.
Patent Information
- Application Number
- CN202111541540.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-12-16
AI Technical Summary
The existing data-driven fermentation process fault monitoring methods are difficult to effectively deal with multi-stage characteristics and nonlinear dynamics, and the clustering algorithm has problems such as stage division error and insufficient generalization capabilities of model.
Using semi-supervised fuzzy C-mean clustering (ESFCM) and sparse automatic encoder (SAE) based on information entropy combined with Swish activation function, the fermentation process is divided and fault monitoring is carried out, and the number of clusters is determined through information entropy is determined to improve the Model generalization capabilities and establish local monitoring models to improve monitoring accuracy.
More accurate phase division and fault monitoring are achieved, false alarms and missed alarm rates are reduced, and the robustness and accuracy of the monitoring model are improved.
Smart Images

Figure CN114280935B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data-driven fault monitoring technology, and in particular to a fault monitoring technology for a fermentation process. The data-driven method of the present invention is a specific application in the fermentation process fault monitoring. Background Art
[0002] With the rapid development of industrial automation technology, the integration and complexity of modern industrial systems are getting higher and higher. In order to enable the system to detect the occurrence of faults in time, it is particularly important to improve the reliability of system fault monitoring performance. The fermentation process is an industrial process based on batch processing, which means that raw materials are made into small batches and high value-added products in a limited time. Since people have extremely high daily needs for these products, in order to ensure the safe and orderly production of fermentation industrial processes, fault monitoring has always received high attention in the industry. At present, common fault monitoring methods at home and abroad are mainly divided into two categories, namely, mechanism model-based methods and data-driven methods. The mechanism model-based method requires accurate mathematical expression of the system's mechanism knowledge, its limited understanding of the potential complex physical and chemical phenomena, the ever-changing process operating conditions, and the difficulties associated with the development of basic models limit the specific use of the mechanism model method. The data-driven method can make full use of soft measurement and sensor technology to obtain a large amount of real-time data, and processing and modeling these historical data has become one of the commonly used methods.
[0003] Data-driven methods such as multi-way principal component analysis (MPCA) and multi-way partial least squares (MPLS) have been widely used. However, these methods model the production data of the fermentation process as a whole, ignoring the multi-stage characteristics, nonlinearity and dynamics of the fermentation process. Therefore, in establishing a monitoring model for the fermentation process, two key issues are how to achieve effective stage division and how to establish an accurate local model. In order to solve the multi-stage characteristics of the fermentation process, many stage division methods have adopted clustering algorithms. Clustering is the process of dividing all samples of a data set into different clusters according to certain rules. The sample points within the cluster are similar, while the sample points between clusters are different. The common K-means clustering, as a hardening algorithm, can only have a membership value of 0 or 1. A sample can only belong to one cluster. This clustering algorithm strictly defines the division category, resulting in large division errors. Fuzzy C-means clustering, as a soft clustering, although it makes up for the defects of K-means clustering, still has the problem that the number of clusters needs to be manually determined. In order to effectively solve the nonlinear and dynamic characteristics of the fermentation process, the traditional multivariate kernel principal component analysis (MKPCA) and dynamic kernel partial least squares analysis (DKPCA) methods can solve the above problems, but the introduction of kernel functions leads to a significant increase in the amount of computation of the entire algorithm, and different numbers of kernels will also have a great impact on the monitoring of the fermentation process. Autoencoder (AE) is one of the representatives of neural networks. It is a model that reduces dimensions and extracts nonlinear features from data by minimizing the reconstruction error of input and output. However, when the number of hidden nodes in AE is more than the number of input nodes, the ability of AE to extract sample features will be greatly weakened, and the generalization ability of the model will also deteriorate. Summary of the invention
[0004] In order to overcome the shortcomings of the above methods, this paper proposes a fermentation process fault monitoring method based on information entropy semi-supervised fuzzy C-means clustering (ESFCM) and sparse autoencoder (SAE). Information entropy can measure the chaos of data. Therefore, information entropy can be introduced into the FCM algorithm. When the stage division is more reasonable, the information entropy value is smaller. At this time, the number of clusters corresponding to the minimum information entropy is the optimal number of clusters. In order to explain and verify the effectiveness of the stage division results, the Euclidean distance and time slice label of each stage are brought into the Silhouette coefficient formula to measure the performance of the stage division and divide the transition stage of the fermentation process. Then, in order to improve the model generalization ability of SAE and make up for the easy saturation defect of the traditional sigmoid function, the Swish activation function is introduced into the traditional SAE to construct a SAE network with strong generalization ability. Finally, SAE models are established for each sub-stage for fault monitoring.
[0005] The present invention adopts the following technical solutions and implementation steps:
[0006] A. Stage Division
[0007] 1) The semi-supervised FCM algorithm (ESFCM) based on information entropy is used to cluster the two-dimensional data of the fermentation process. The specific method is to give a three-dimensional data sample under normal working conditions of a fermentation process, first expand the three-dimensional data X(I×J×K) along the batch into two-dimensional data X(I×KJ), where I is the batch number of the fermentation process, J is the fermentation process variable, and K is the sampling period. Then the two-dimensional matrix is standardized by column. The standardization formula is in, x k,j is the j-th column element in the time slice matrix at the k-th sampling moment, is its standardized value, and j are the mean and standard deviation in the jth column respectively.
[0008] 2) When clustering the two-dimensional data using the semi-supervised FCM of information entropy, the maximum number of clusters m is first set for the two-dimensional sample matrix max and the minimum number of clusters m min , because the minimum number of clusters in the clustering algorithm is 2, so m min =2. The microbial growth cycle during the fermentation process is divided into the growth adaptation period, logarithmic growth period, growth stability period and decay period, so m max=4. Then randomly initialize the membership matrix U of FCM, set t=0, and update m. The membership matrix U is a function that indicates whether a sample X belongs to a certain set. After initialization, the membership matrix U and t are updated. Information entropy describes the degree of disorder of sample points. When the division is reasonable, the information entropy of the cluster will be smaller. Calculate information entropy It represents the information entropy corresponding to the kth sample point in the cluster, and N is the total number of samples. p represents the cluster label number, u px Indicates the membership value of the sample point x to the cluster label p. After the information entropy calculation is completed, when |U t+1 -U t |>e, update the cutoff and determine the current number of clusters m. When m≥m max , it can be determined that the current number of clusters m is the final number of clusters.
[0009] 3) Introduce the m obtained in step 2 into the FCM algorithm, and after obtaining the Euclidean distance, bring the Euclidean distance into the target function in FCM. d is the Euclidean distance, is the membership value of the sample point x at the kth sampling moment belonging to a certain cluster p, m is the number of clusters in step 2, and N is the number of sample time slices. ||.|| represents the distance measurement from each time slice to the cluster center. The maximum number of iterations is M, the number of iterations is o∈(0,M) and o is a positive integer. Calculate the objective function value of the algorithm at the oth iteration and the o-1th iteration. When the absolute value of the difference between the objective function values of the two iterations is less than the iteration error v, that is, |R o -R o-1 When |<v, the clustering algorithm ends and the stage division is completed.
[0010] B. Offline Modeling:
[0011] 4) Input the samples of each stage divided in step 3 into the sparse autoencoder model. The method of the present invention replaces the traditional sigmoid activation function with the Swish activation function. The Swish function expression is: x is the input variable of SAE for the next layer of neurons. This input variable is determined by the input variable of the first layer of SAE. The input variable of the first layer is the fermentation process sample matrix, and its dimension is consistent with the dimension of each batch of sample matrices, both of which are J×K. β is a random parameter, and β varies from 0 to infinity. The corresponding activation function value is 0 to 1. Different smoothing functions between the linear function and the ReLU function can be obtained. In order for the smoothing function to have a certain regularization effect, the part x<0 must have a certain lower limit error, that is, the activation curve must be below the x-axis, because β=0.1 is similar to a linear function, and β=10 is already similar to a ReLU function, and the regularization effect will deteriorate. According to this criterion, the random value of β greater than 0.1 and less than 10 in the method of the present invention will not have a significant distinguishing effect on the experimental effect. In the encoding network, the output information of the encoder f(X)=W KJ h′ t +b J , X is the sample matrix composed of each sample x, W KJ is the weight matrix of the encoder, K represents the weight matrix W KJ The number of rows, J represents the weight matrix W KJ The number of columns also represents the dimension of the output neurons of the encoding network in the corresponding hidden layer. t is the matrix of input variables corresponding to the hidden neurons of the encoder at time t'. J is the bias matrix of the encoder, and J is the output dimension of the encoder. In order to prevent the symmetric weight phenomenon of SAE during training, random initialization can be used to configure the network weights. When the l-th layer neuron uses the Swish activation function, the parameter The variance can be obtained M l-1 is the number of neurons in the previous layer. This initialization method only needs to keep the gradient variance of the activation function unchanged to complete the configuration of the weight parameters. After the encoding operation is completed, the decoding network g(f(X))=g(W′ KJ h′ t +b′ J ), W′ KJ is the weight matrix of the decoder, h' represents the weight matrix W' KJ The number of rows also represents the number of hidden layers of the decoder, and J represents the weight matrix W′ KJ The number of columns also represents the dimension of the output neurons of the corresponding hidden layer of the decoding network. t is the matrix of input variables corresponding to the hidden neurons of the decoder at time t. J is the bias matrix of the decoder. g(f(X)) is the reconstructed information after the decoder completes its work, decoding the output information f(X) of the original coding network.
[0012] 5) The reconstruction error E is then used to obtain the reconstruction difference between the original sample and the reconstructed sample. Among them, e k represents the sum of squares error between the original sample and the reconstructed sample at the kth moment, || ||2 represents the binary norm, and K represents the sampling time of the fermentation process.
[0013] 6) Input the normal working condition data X(IK×J) of the fermentation process used for modeling into the trained sparse autoencoder model, and calculate the SPE statistic of each normal sample according to the model reconstruction error; SPE is calculated by e in step 5 k The calculation formula is as follows:
[0014] Among them, x k is the sample matrix input at the kth moment, a k is the sample matrix reconstructed at the corresponding k-th moment, and N is the number of samples.
[0015] 7) Kernel density estimation (KDE) is used to calculate the kernel density estimation value corresponding to the SPE of the historical normal sample, so as to obtain the control limit of the normal sample SPE statistic. The control limit can be used as the baseline for fault monitoring. When the control limit of the fault sample exceeds the control limit of the normal sample, a fault occurs. The kernel density estimation formula is:
[0016] Among them, spe k is the SPE value of the kth normal sample, δ is the width, is the random parameter, G is the kernel function, N is the total number of samples, and f(spe) is the probability density corresponding to the SPE of each normal sample.
[0017] C.Online monitoring:
[0018] 8) Online sampling obtains the sample data x of the kth moment of the new fermentation batch new,k (1×J), I is the number of batches in the fermentation process, and J is the number of variables in the fermentation process. The stage to which the sample belongs is determined according to the sampling time, and the mean and standard deviation of the corresponding k-th moment in the offline modeling stage are used to standardize it. is the data at the kth sampling moment after standardization, The first variable data at the kth moment after standardization, is the jth variable data at the kth moment after standardization. The standardization is as follows: represents the mean of the original sample corresponding to the jth variable at the kth moment in the batch direction, s k,j represents the standard deviation of the original sample corresponding to the jth variable at the kth moment in the batch direction. Then Input the established sparse autoencoder model to obtain the reconstructed vector a new,k , W′ is the decoder weight matrix, W is the encoder weight matrix, b is the encoder bias vector, b′ is the decoder bias vector, is the output vector of the encoder.
[0019] 9) Calculation Monitoring statistics SPE k , SPE k is the squared prediction error at the kth moment, and the formula is as follows: a new,k It is the reconstructed variable at the kth moment obtained using the sparse autoencoder model.
[0020] 10) The current SPE obtained in the previous step k Compared with the control limits obtained by calculating historical batch samples using KDE in offline modeling, Among them, spe k is the SPE value of the kth test sample, δ is the width, G is the kernel function, and N is the total number of samples. At this time, f(spe) is the control limit corresponding to the SPE of the current test sample. The sample control limit of the test batch is compared with the control limit of the normal sample. If it is higher than the control limit of the normal sample, the current sampling point is determined to be a fault point, and the fault point of the entire sampling period is obtained, so as to calculate the false alarm rate and the missed alarm rate.
[0021] Beneficial Effects
[0022] 1) The method of the present invention introduces information entropy into FCM to construct a semi-supervised learning algorithm to determine the number of clusters. After the algorithm is used to complete the clustering division in the stable stage, the dynamic stage is then sparsely divided using Silhouette and the accuracy of the stage division is measured. Compared with the traditional method, the method of the present invention solves the problem that the number of clusters needs to be determined manually, and the obtained clustering results are more accurate, while also improving the monitoring performance of the subsequent SAE.
[0023] 2) The present invention replaces the traditional Sigmid activation function with the Swish activation function and introduces it into SAE, thereby improving the generalization performance of the model and solving the gradient vanishing problem of the traditional sigmoid function. The SAE monitoring model is established for each stage of the stage division, and the original features are reconstructed. Compared with the global modeling, the fault monitoring strategy of multi-stage modeling is more sensitive to faults, which enhances the robustness of the monitoring model, improves the accuracy of fault monitoring, and can reduce the occurrence of false positives and false negatives in process monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a flow chart of the method of the present invention;
[0025] Figure 2 It is the flow chart of ESFCM algorithm;
[0026] Figure 3 Schematic diagram of sparse encoder;
[0027] Figure 4 Flowchart for offline modeling;
[0028] Figure 5 This is the flow chart of online monitoring;
[0029] Figure 6 This is the result diagram of the ESFCM preliminary stage division of the method of the present invention;
[0030] Figure 7 It is the ESFCM transition phase identification diagram of the method of the present invention;
[0031] Figure 8 It is the global stage division diagram of ESFCM method of the present invention;
[0032] Fig. 9 It is the division diagram of the preliminary stage of FCM;
[0033] Fig.10 Identification diagram for FCM transition phase;
[0034] Fig.11 It is the FCM global stage division diagram;
[0035] Fig.12 This is the result diagram of the preliminary stage division of KFCM;
[0036] Fig.13 It is the KFCM transition phase identification diagram;
[0037] Fig.14 It is the global stage division diagram of KFCM;
[0038] Fig.15 This is a fault monitoring effect diagram of the ventilation rate fault (step fault) performed by the method ESFCM-SAE of the present invention;
[0039] Fig.16 This is a fault monitoring effect diagram of the ESFCM-SAE method of the present invention for the bottom flow acceleration rate fault (ramp fault);
[0040] Fig.17 This is a diagram showing the effect of the ESFCM-SAE method of the present invention on monitoring the stirring power fault (ramp fault);
[0041] Fig.18 This is the fault monitoring effect diagram of ventilation rate fault (step fault) by comparison method AE;
[0042] Fig.19 This is the fault monitoring effect diagram of the bottom flow acceleration rate fault (ramp fault) for comparison method AE;
[0043] Fig. 20 This is the fault monitoring effect diagram of stirring power fault (ramp fault) for comparison method AE; DETAILED DESCRIPTION
[0044] Penicillin is an antibiotic with a wide range of clinical value. This paper uses the international platform Pensim2.0 simulation platform to conduct fault monitoring research on the penicillin fermentation process.
[0045] In this platform, for the convenience of the experiment, the working conditions are set to 400h of continuous fermentation per batch and 1h of sampling interval. The initial conditions of each batch are slightly changed within the allowable range. 40 batches of normal data are used for simulation, and 10 process variables are selected to obtain 40×400×10 data for offline modeling. The process variables are shown in Table 1. In order to better simulate the actual production conditions, a certain amount of Gaussian noise interference is added to the training samples. In order to verify the performance of the proposed method in fault monitoring, this paper selects three groups of fault batch samples for testing, as shown in Table 2.
[0046] Table 1 Process variables of penicillin simulation platform
[0047]
[0048] Table 2 Main variables of penicillin fermentation process
[0049]
[0050] The application of the method of the present invention to the above-mentioned penicillin fermentation process simulation object includes two major steps: stage division and fault monitoring, which are specifically stated as follows:
[0051] A. Stage Division
[0052] Step 1: Data Preprocessing
[0053] The three-dimensional data of penicillin fermentation is transformed into two-dimensional data along the batch direction. Batch direction expansion is to convert the three-dimensional data X according to time. 40×10×400 Slice and expand the two-dimensional time slice matrix X 400×(40×10) , and then the two-dimensional time slice matrix is normalized by column. The normalization formula is: k=1,...,400,j=1,...,400. Among them, x k,j is the j-th column element in the time slice matrix at the k-th sampling moment, is its standardized value, and j are the mean and standard deviation in the jth column respectively.
[0054] Step 2: Use semi-supervised FCM based on information entropy to divide the two-dimensional data into stages. First, set the maximum number of clusters to 4 and the minimum number of clusters to m for the two-dimensional time slice matrix. min =2, then randomly initialize the FCM membership matrix, set t = 0, and then update the membership matrix U and t. t+1 -U t When ||>e, information entropy describes the disorder of sample points. When the division is reasonable, the information entropy of the cluster will be smaller. Calculate information entropy It represents the information entropy corresponding to the k-th sample point in the cluster, where p represents the cluster label number, u px Indicates the membership value of the sample point x to the cluster label p. After the information entropy calculation is completed, when |U t+1 -U t |>e, update cutoff. e within 0.001 will not have a significant impact on the algorithm results. To ensure clustering accuracy, set e=0.0001 and update the current number of clusters m. When m≥m max , it can be determined that the current number of clusters m is the final number of clusters, and the penicillin stage division result m=4 is obtained according to the algorithm.
[0055] Step 3: Substitute the number of clusters m = 4 into the FCM algorithm to obtain the Euclidean distance, and then substitute the Euclidean distance into the objective function of FCM is the membership value of the sample point x at the kth sampling moment belonging to a certain cluster p, m is the number of clusters in step 2, and N is the number of sample time slices. ||.|| represents the measure of the distance from each time slice to the cluster center. The maximum number of iterations is M, the number of iterations is o∈(0,M) and o is a positive integer. Calculate the objective function value of the algorithm at the oth iteration and the o-1th iteration. The iteration error v will not affect the algorithm result within 0.001. Let v=0.001. When the absolute value of the difference between the objective function values of the two iterations is less than the iteration error v, that is, |R o -R o-1 When |<0.001, the clustering algorithm ends and the stage division is completed.
[0056] B. Offline Modeling
[0057] After the two-dimensional time slice matrix is divided into stages using the semi-supervised FCM algorithm based on information entropy, the autoencoder model is used to perform offline modeling training for each sub-stage.
[0058] Step 1: First, reconstruct the three-dimensional data from the previously standardized data, and let the new three-dimensional data be X′ 40×(400×10) , each batch of reconstructed new samples consists of 400 rows and 10 columns, 400 rows represent 400 sampling moments, and 10 columns represent 10 variables of each sample. Then each batch of 400×10 two-dimensional time slice samples is input into a sparse autoencoder with a swish activation function. The method of the present invention uses Intel(R)Core(TM)i5-9500 CPU, pycharm3.8 software, and tensorflow2.0 platform for experiments, and uses manual parameter adjustment, Bayesian optimal parameter adjustment, and random initialization methods to process the SAE network. Among them, the manual parameter adjustment parameters are: the hidden layer is a 3-layer network, each layer is set with 52 network units, β=0.5, adam optimizer is used, the learning rate is configured to 0.05, the number of iterations epoch=900, the batch size is set to 1, and the dimension of the network input vector is set to 10. Bayesian optimization is used to optimize the sliding window width and hidden layer dimension, and the sliding window width is 8 and the hidden layer dimension is 32. The remaining parameters are manually adjusted according to the fermentation process data. In addition, in the encoding network, the encoder output information f(X) = W KJ h′ t +b J =W 400×10 h′ t +b 10 , X is the sample matrix composed of each sample x, W KJ is the weight matrix of the encoder, K represents the weight matrix W KJ The number of rows, J represents the weight matrix W KJ The number of columns also represents the dimension of the output neurons of the encoding network in the corresponding hidden layer. t is the matrix of input variables corresponding to the hidden neurons of the encoder at time t'. J is the bias matrix of the encoder, and J is the output dimension of the encoder. In order to prevent the symmetric weight phenomenon of SAE during training, random initialization can be used to configure the network weights. When the l-th layer neuron uses the Swish activation function, the parameter The variance can be obtained M l-1 is the number of neurons in the previous layer. This initialization method only needs to keep the gradient variance of the activation function unchanged to complete the configuration of the weight parameters. f(X) is the output information of the encoder. After the encoding operation is completed, it enters the decoding network g(f(X))=g(W′ KJ h′ t +b′ J ) = g(W′ 400×10 h′ t +b′10 ), W′ KJ is the weight matrix of the decoder, h' represents the weight matrix W' KJ The number of rows also represents the number of hidden layers of the decoder, and J represents the weight matrix W′ KJ The number of columns also represents the dimension of the output neurons of the corresponding hidden layer of the decoding network. t is the matrix of input variables corresponding to the hidden neurons of the decoder at time t. J is the bias matrix of the decoder. g(f(X)) is the reconstructed information after the decoder completes its work, decoding the output information f(X) of the original coding network. The reconstruction error E is then used to obtain the reconstruction difference between the original sample and the reconstructed sample. Among them, e k represents the square sum error between the original sample and the reconstructed sample at the kth moment, || ||2 represents the second norm, K represents the sampling time of the fermentation process, and the sampling period is mainly based on the simulated sampling data or the actual sampling data. In the Pensium simulation platform, the penicillin fermentation process can be sampled once every hour, and the number of samples is equal to the sampling period of 400. E is the true reconstruction error determined. When the reconstruction error is minimized, the model training requirements are met.
[0059] Step 2: Input the normal working condition data X(IK×J) of the fermentation process used for modeling into the trained sparse autoencoder model, and calculate the SPE statistic of each normal sample according to the model reconstruction error; SPE is calculated by e k The calculation formula is as follows: Among them, x k is the sample matrix input at the kth moment, a k is the sample matrix reconstructed at the corresponding kth moment, N is the number of samples. 400 means that both the original samples and the reconstructed samples are 400.
[0060] Step 3: Use kernel density estimation (KDE) to calculate the kernel density estimation value corresponding to the SPE of the historical normal sample, so as to obtain the control limit of the normal sample SPE statistic. This control limit can be used as the baseline for fault monitoring. When the control limit of the fault sample exceeds the control limit of the normal sample, a fault occurs. The kernel density estimation formula is as follows:
[0061] C.Online monitoring
[0062] After the offline modeling is completed, the online monitoring strategy is implemented. First, the stage to which the fault sample belongs is determined. Then, the test sample containing the fault sample is input into the corresponding autoencoder model to determine the SPE and control limit size of the test sample. spe kis the SPE value of the kth test sample, δ is the width, G is the kernel function, N is the total number of test samples, the penicillin fermentation test batch is 400 sampling samples, f k (x) is the probability density corresponding to the SPE of each normal sample, which is used as the control limit of the test sample. If the SPE of a point in the test sample is greater than the corresponding control limit, then the sample point is a fault sample point.
[0063] The above steps are the specific application of the method of the present invention in the field of fault monitoring of penicillin simulation platform. In order to verify the effectiveness of the method, experiments were carried out in the online monitoring stage for fault 1 (step fault set for ventilation rate), fault 2 (ramp fault set for bottom flow acceleration rate) and fault 3 (ramp fault set for stirring power). Figure 6 This is a diagram showing the preliminary stage division result of the ESFCM method of the present invention. At this time, the preliminary division is only the division of the stable stage of penicillin fermentation. It can be seen that the four stable stages of the fermentation process are 1-76, 77-171, 172-276, and 277-400. Figure 7 The result diagram of the transition stage division using the Silhouette coefficient of the method of the present invention shows that the transition stages of the fermentation process are 47-112, 164-212, and 261-287. Figure 8 The diagram is a division diagram of the entire stage of the fermentation process of the method of the present invention, and the overall stages are stable stage 1-46, transition stage 47-112, stable stage 113-163, transition stage 164-212, stable stage 213-260, transition stage 261-287, and stable stage 288-400. Fig. 9 The preliminary partitioning result diagram of the comparison method FCM shows that the stable stages are 1-200, 201-381, 382-397, and 398-400. Fig.10 This is the transition stage division result diagram of the comparison method FCM. It can be seen from the figure that there is a serious misdivision phenomenon in the transition stage between the first stable stage and the second stable stage. Fig.12 This is the result of the preliminary stage division of KFCM. It can be seen from the figure that the stable stages are 1-75, 76-187, 188-336, and 337-400. Fig.13 is the transition phase identification diagram, Fig.14It is a global stage division diagram. It can be seen that the stable stage is 0-41, the transition stage is 42-75, the stable stage is 76-141, the transition stage is 142-187, the stable stage is 188-245, the transition stage is 246-275, and the stable stage is 276-400. Due to the addition of the kernel function, the KFCM iterations are more and the calculation time is longer. Comprehensive comparison shows that the ESFCM model of the method of the present invention is more stable and the accuracy of stage division is also higher. The Silhouette coefficient is used to evaluate the accuracy of stage division, as shown in Table 3. It can be seen that FCM has serious misdivision when dividing the transition stage in the first stage, so the transition stage division fails. The final stage division accuracy is very low. Although the accuracy of KFCM is higher than that of FCM, due to KFCM
[0064] Table 3 Comparison of the accuracy of each algorithm stage division
[0065]
[0066] In order to verify the performance of ESFCM in fault monitoring, SAE and AE were used to monitor the faults 1, 2 and 3 of the penicillin fermentation process respectively. The experimental effect diagram of the ESFCM-SAE method of the present invention and the experimental effect diagram of the comparative method AE are shown in the following figure: Figure 15-20 As shown. The red dotted line is the threshold of the normal batch sample, and the black line is the statistical indicator SPE when the faulty batch is introduced into the online monitoring. When the black line exceeds the red dotted line, an alarm occurs. It can be seen that for fault 1, Fig.15 Only the 18th and 113th sample points had false alarms. Fig.18 In the first transition phase, a large number of false alarms occur. For fault 2, Fig.16 It can be seen that the system only has false alarms at 24, 33, and 178, but Fig.19 As can be seen from the above, there are a lot of false alarms, and the phenomenon of missed alarms is serious in the interval of 200-250 sample points. Fig.17 It can be seen that false alarms occur only at the 23rd, 24th, and 25th sample points, and missed alarms occur between 200 and 215 sample points. Fig. 20 It can be seen that although there is no false alarm, the phenomenon of missed alarm is very serious in the range of 200-320. This research method compares the method of the present invention with the traditional AE method in terms of two evaluation indicators, false alarm rate and missed alarm rate, as shown in Figure 4.
[0067] Table 4: Comparison of algorithms in terms of false alarm rate
[0068]
[0069] Table 5: Comparison of algorithms on false negative rate indicators
[0070]
[0071] In summary, according to the analysis of the monitoring effect diagrams (15-20) and the data in Table (3-5), it can be seen that the ESFCM method proposed in the present invention has a much higher accuracy in stage division than the FCM method and the KFCM method due to the more flexible configuration of the number of clusters. The 90% division accuracy can meet the requirements of subsequent fault monitoring. And when the SAE model containing the Swish activation function is used for fault monitoring, compared with the traditional method, the accuracy of ESFCM-SAE for fault state monitoring reaches 99%, which proves the effectiveness and accuracy of the method of the present invention.
Claims
1. A multi-stage fermentation process fault monitoring method based on information entropy semi-supervised FCM and sparse autoencoder, which includes three stages: "stage division", "offline modeling" and "online monitoring", characterized in that: The specific steps are as follows: A. Stage Division 1) The semi-supervised FCM algorithm ESFCM based on information entropy is used to cluster the two-dimensional matrix data of the fermentation process. The specific method is to give a three-dimensional matrix data sample under normal working conditions of a fermentation process, first expand the three-dimensional matrix data X(I×J×K) along the batch into a two-dimensional matrix data X(I×KJ), where I is the number of batches in the fermentation process, J is the fermentation process variable, and K is the sampling period; then the two-dimensional matrix data is standardized by column; the standardization formula is: in, x k,j is the j-th column element in the time slice matrix at the k-th sampling moment, is its standardized value, and j are the mean and standard deviation in the jth column respectively; 2) When clustering the two-dimensional matrix data using the semi-supervised FCM of information entropy, the maximum number of clusters m is first set for the two-dimensional matrix data. max and the minimum number of clusters m min , because the minimum number of clusters in the clustering algorithm is 2, so m min =2; The microbial growth cycle during the fermentation process is divided into the growth adaptation period, logarithmic growth period, growth stability period and decay period, so m max =4; then randomly initialize the FCM membership matrix U, set t = 0, update m, the membership matrix U is a function that indicates that a sample X belongs to a certain set; after initialization, update the membership matrix U and t; calculate the information entropy It represents the information entropy corresponding to the kth sample point in the cluster, N is the total number of samples, where p represents the cluster label number, u px Indicates the membership value of the sample point x to the cluster label p; after the information entropy calculation is completed, when |U t+1 -U t |>e, update cutoff, determine the current number of clusters m; when m≥m max When , the current number of clusters m is determined to be the final number of clusters; e is within 0.001; 3) Introduce the m obtained in step 2 into the FCM algorithm. After obtaining the Euclidean distance, substitute the Euclidean distance into the objective function in FCM d is the Euclidean distance, and x k represents the sample matrix input at the k-th moment, is the distance between the k-th sample point and the p-th cluster center, and c p is the p-th cluster center point, is the membership value of the sample point x at the k-th sampling moment belonging to a certain cluster p. m is the number of clusters in step 2, N is the number of sample time slices; ||.|| represents the measure of the distance from each time slice to the cluster center; the maximum number of iterations is M, the iteration number o ∈ (0, M) and o is a positive integer; calculate the objective function values of the o-th iteration and the (o - 1)-th iteration of the algorithm. When the absolute value of the difference between the objective function values of the two iteration numbers is less than the iteration error v, that is, |R o -R o-1 |<v, then the clustering algorithm ends and the stage division is completed; v is within 0.001; B. Offline Modeling: 4) Input the samples of each stage divided in step 3 into the sparse autoencoder model, and replace the traditional sigmoid activation function with the Swish activation function. The Swish function expression is: x is the input variable of SAE for the next layer of neurons, which is determined by the input variable of the first layer of SAE. The input variable of the first layer is the fermentation process sample matrix, whose dimension is consistent with the dimension of each batch of sample matrix, both of which are J×K. β is a random parameter, which takes a random value greater than 0.1 and less than 10; In the encoding network, the encoder’s output information f(X) = W KJ h t +b J , X is the sample matrix composed of each sample x, W KJ is the weight matrix of the encoder, K represents the weight matrix W KJ The number of rows, J represents the weight matrix W KJ The number of columns also represents the dimension of the output neurons of the encoding network in the corresponding hidden layer; h t is the matrix of input variables corresponding to the hidden neurons of the encoder at time t; b J is the bias matrix of the encoder, J is the output dimension of the encoder; the network weights are configured using random initialization. When the l-th layer neuron uses the Swish activation function, the parameter Variance M l-1 is the number of neurons in the previous layer; this initialization method only needs to keep the gradient variance of the activation function unchanged to complete the configuration of the weight parameters; after the encoding operation is completed, the decoding network g(f(X))=g(W' KJ h' t +b' J ), W' KJ is the weight matrix of the decoder, h' represents the weight matrix W' KJ The number of rows also represents the number of hidden layers of the decoder, and J represents the weight matrix W' KJ The number of columns also indicates the dimension of the output neurons of the corresponding hidden layer of the decoding network; h' t is the matrix of input variables corresponding to the hidden neurons of the decoder at time t; b' J is the bias matrix of the decoder; g(f(X)) is the reconstructed information after the decoder is completed, and the output information f(X) of the original coding network is decoded; 5) Then use the reconstruction error E to obtain the reconstruction difference between the original sample and the reconstructed sample; Among them, e k represents the square sum error between the original sample and the reconstructed sample at the kth moment, ||||2 represents the second norm, and K represents the sampling time of the fermentation process; 6) Input the normal working condition data X(IK×J) of the fermentation process used for modeling into the trained sparse autoencoder model, and calculate the SPE statistic of each normal sample according to the model reconstruction error; SPE is calculated by e in step 5 k The calculation formula is as follows: Among them, x k is the sample matrix input at the kth moment, a k is the sample matrix reconstructed at the corresponding k-th moment, and N is the number of samples; 7) Kernel density estimation is used to calculate the kernel density estimation value corresponding to the SPE of the historical normal sample, so as to obtain the control limit of the normal sample SPE statistic. The control limit is used as the baseline for fault monitoring. When the control limit of the fault sample exceeds the control limit of the normal sample, a fault occurs; the kernel density estimation formula is: Among them, spe k is the SPE value of the kth normal sample, δ is the width, which is a random parameter, G is the kernel function, N is the total number of samples, and f(spe) is the probability density corresponding to the SPE of each normal sample; C.Online monitoring: 8) Online sampling obtains the sample data x of the kth moment of the new fermentation batch new,k (I×J), I is the number of batches in the fermentation process, and J is the number of variables in the fermentation process; the stage to which the sample belongs is determined according to the sampling time, and the mean and standard deviation of the corresponding k-th moment in the offline modeling stage are used to standardize it. is the data at the kth sampling moment after standardization, The first variable data at the kth moment after standardization, is the jth variable data at the kth moment after standardization; The standardization is as follows: represents the mean of the original sample corresponding to the jth variable at the kth moment in the batch direction, s k,j represents the standard deviation of the original sample corresponding to the jth variable at the kth moment in the batch direction; then Input the established sparse autoencoder model to obtain the reconstructed vector a new,k , W' is the decoder weight matrix, W is the encoder weight matrix, b is the encoder bias vector, b' is the decoder bias vector, is the output vector of the encoder; 9) Calculation Monitoring statistics SPE k , SPE k is the squared prediction error at the kth moment, and the formula is as follows: a new,k is the reconstructed variable at the kth moment obtained using the sparse autoencoder model; 10) The current SPE obtained in the previous step k Compared with the control limits obtained by calculating historical batch samples using KDE in offline modeling, Among them, spe k is the SPE value of the kth normal sample, δ is the width, G is the kernel function, and N is the total number of samples. At this time, f(spe) is the probability density corresponding to each normal sample SPE. This probability density is used as the control limit corresponding to the current test sample SPE. The sample control limit of the test batch is compared with the normal sample control limit. If it is higher than the control limit of the normal sample, the current sampling point is determined to be a fault point, and the fault point of the entire sampling period is obtained, thereby calculating the false alarm rate and the missed alarm rate.
