A penicillin production anomaly detection method based on sliding window timing discriminant feature analysis

By using sliding window temporal discriminant feature analysis and optimizing the transformation vector, the penicillin production process can be monitored in real time. This solves the problem of extracting temporal discriminant features in traditional methods, enabling real-time anomaly detection in the penicillin production process and improving the accuracy and timeliness of detection.

CN116070818BActive Publication Date: 2025-11-11COLLEGE OF SCI & TECH NINGBO UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210650637.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-30
Publication Date
2025-11-11
Estimated Expiration
2042-04-30

AI Technical Summary

Technical Problem

Existing technologies struggle to extract time-series discriminative features from the penicillin production process in real time for anomaly detection, and traditional methods fail to effectively utilize new batch sampling data for anomaly monitoring.

Method used

The sliding window temporal discriminant feature analysis method is adopted. By acquiring sample data of penicillin production batches, feature maximization analysis is performed using optimized left and right transformation vectors. The feature changes of new batches and normal batches are compared in real time, and upper and lower limits are set for anomaly detection.

Benefits of technology

It enables real-time anomaly detection in the penicillin production process, improving the accuracy and timeliness of detection and effectively identifying production abnormalities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116070818B_ABST
    Figure CN116070818B_ABST
Patent Text Reader

Abstract

This invention discloses a method for detecting penicillin production anomalies based on sliding window temporal discriminant feature analysis. From the perspective of facilitating anomaly detection, it specifically extracts temporal discriminant features from penicillin production sample data, which can be directly used for real-time monitoring of penicillin production anomalies. Specifically, this method acquires multiple sample data points from newly produced penicillin batches in real time using a sliding window, and performs corresponding temporal discriminant feature analysis on these data vectors to obtain corresponding online discriminant features. Simultaneously, a set of left-right transformation vectors obtained in real time is used to perform the same transformation on a reference window matrix under normal production batches, and the maximum and minimum values ​​of the reference discriminant feature changes are used as the upper and lower limits of the online discriminant features, thereby enabling the detection of penicillin production anomalies. Compared with traditional methods, the discriminant features extracted in real time by this invention are more conducive to the detection of penicillin production anomalies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for detecting anomalies in industrial processes, and more particularly to a method for detecting anomalies in penicillin production based on sliding window time-series discriminant feature analysis. Background Technology

[0002] In the manufacturing of bioproducts, penicillin fermentation is an intermittent process completed according to production batches, and its operation is mainly divided into two stages. The first stage is the intermittent operation stage, in which a large number of penicillin-producing bacteria are cultivated in an incubator; this is the preparation stage for penicillin fermentation. As the bacteria multiply, the glucose substrate is gradually consumed. The second stage is the semi-intermittent operation stage, in which glucose is continuously added to the incubator to produce high-quality penicillin, promoting a rapid increase in the growth rate of the bacteria. For the entire penicillin production process, many factors, such as incubator pressure, tank temperature, pH value, stirring power, and aeration rate, have a significant impact on the processing and product quality.

[0003] Intermittent batch production processes, exemplified by penicillin production, are an important form of production in modern industry, accounting for an increasingly large proportion. The demands for safety and efficiency in these processes are constantly rising, and accurately and promptly identifying malfunctions and anomalies during production has become a crucial research area in industry. For such a complex process as penicillin production, it is difficult to establish precise mechanistic models and a comprehensive expert knowledge system. For the past decade or so, anomaly detection based on multivariate statistical feature analysis has been the mainstream method for anomaly detection in penicillin production. However, with the widespread application of Distributed Control Systems (DCS) in penicillin production, real-time transmission and processing of sampled data have become increasingly easier. Traditional statistical feature analysis, which only targets normal penicillin production batches, is no longer sufficient to directly and effectively extract the implicit characteristics that can effectively reflect production anomalies from the sampled data.

[0004] From the perspective of the intermittent characteristics of penicillin production batches, the production process strictly follows a time sequence for operational changes. Therefore, there is definitely a temporal relationship between the sample data from different sampling times of each penicillin production batch. If this temporal relationship is disrupted, then an anomaly or malfunction has certainly occurred in penicillin production. However, considering that the negative impact of production anomalies on sample data and the duration of that impact are unknown, if the temporal relationship characteristics affected by the anomaly can be specifically mined, the task of penicillin production anomaly detection can be completed in real time and effectively. In existing technical documents, penicillin anomaly detection is achieved by analyzing and extracting specific features from normal batch sample data, rather than adaptively analyzing and extracting temporal discriminative features directly used for anomaly detection. Therefore, data-driven penicillin anomaly detection technology still needs further improvement and refinement. Summary of the Invention

[0005] The main technical problem this invention aims to solve is how to extract time-series discriminative features from penicillin production sample data from a perspective beneficial for anomaly detection, and directly use these features for real-time monitoring of penicillin production anomalies. Specifically, the method of this invention acquires multiple sample data points from newly produced penicillin batches in real time through a sliding window, and optimizes a set of left-right transformation vectors to maximize the extracted features. These maximized features are compared with the features obtained from sample data in the same sliding window of a normal batch after transformation using the same set of left-right transformation vectors. If the features exceed the upper or lower limits, it indicates that penicillin production has entered an abnormal state.

[0006] The technical solution adopted by the present invention to solve the above problems is as follows: a method for detecting penicillin production anomalies based on sliding window temporal discriminant feature analysis, comprising the following steps:

[0007] Step (1): Obtain J sample datasets of normal penicillin production batches from the historical database of penicillin production batches, and form corresponding batch matrices X1, X2, ..., X according to the sampling time sequence. J Then, set the length of the sliding window to be equal to L; where L is a positive integer greater than or equal to 3, and X is the batch matrix corresponding to the j-th normal production batch of penicillin. j ∈R N×13 Specifically, it consists of N 1×13 dimensional data vectors, j∈{1,2,…,J}, R N×13 Let X represent an N×13 dimensional real matrix, R represent the set of real numbers, and the length L of the sliding window is a positive integer. j The first row vector in the vector is the data vector at the first sampling time of the j-th normal production batch of penicillin, X. j The Nth row vector in the vector is the data vector of the Nth sampling time of the jth normal production batch of penicillin.

[0008] It should be noted that the order of the 13 data points in the data vector at each sampling time is as follows: ventilation rate, stirring power, glucose feed temperature, glucose flow acceleration rate, coolant flow acceleration rate, acid-base flow acceleration rate, reactor temperature, pH value, glucose concentration, cell concentration, dissolved oxygen concentration, carbon dioxide concentration, and penicillin concentration.

[0009] Step (2): Obtain sample data from each sampling time of the latest batch of penicillin production, and assemble the 13 sample data from each sampling time into a 1×13 dimensional data vector. When L data vectors x1, x2, ..., x3 from sampling times are obtained... L Then set k=1 and execute step (3).

[0010] Step (3): Sequentially batch the matrix X1, X2, ..., X J The row vectors from row k to row (k+L-1) form the training window matrix. Then, calculate the J training window matrices. The mean matrix U∈R L×13 and standard deviation matrix Φ∈R L×13 ; where the element in row a, column b of U is equal to The average of the elements in the a-th row and b-th column of Φ, where a∈{1,2,…,L}, b∈{1,2,…,13}, is equal to the average of the elements in the a-th row and b-th column of Φ. The standard deviation of the element in the a-th row and b-th column of the matrix, and the j-th training window matrix. Specifically, it is the j-th batch matrix X j It consists of row vectors from row k to row k+L-1.

[0011] Step (4): Set the sliding window matrix X t ∈R L×13 The row vectors from row 1 to row L are equal to x1, x2, ..., x. L Then, use the formula For X t Standardization is implemented to obtain the online window matrix. Use formula For the training window matrix The reference window matrix is ​​obtained by performing standardization. Where, j∈{1,2,…,J}, Let the j-th training window matrix be represented. Represents the j-th reference window matrix, symbol This indicates that the elements at the same position in the two matrices to the left and right of the symbol are divided.

[0012] Step (5): For the online window matrix Perform time-series discriminant feature analysis to obtain the corresponding left transformation vector β. t ∈R L×1 and right transformation vector w t ∈R 13×1 Then, calculate the online discriminant features. The specific implementation process is shown in steps (5.1) to (5.4).

[0013] Step (5.1): Initialize the right transformation vector w t Let be any 13×1 dimensional real vector.

[0014] Step (5.2): According to the formula Calculate matrix G w Then, solve the eigenvalue problem G. w =λ w g w The largest eigenvalue λ w The corresponding eigenvector g w Then, according to formula β t =g w / ‖g w ||Calculate the left transformation vector β t ;in, Indicates the calculation of g w The length.

[0015] Step (5.3): According to the formula Calculate matrix G β Then, solve the eigenvalue problem G. β =λ β g β The largest eigenvalue λ β The corresponding eigenvector g β Then, according to formula w t =g β / ‖g β ||Calculate the right transformation vector w t .

[0016] Step (5.4): Determine w t Whether it converges, and the criterion for convergence is w. t If the elements in the middle do not change, then return to step (5.2); if so, then the final left-transformation vector β is obtained. t ∈R L×1 and right transformation vector w t ∈R 13×1 Then, according to the formula Calculate online discriminant features

[0017] Step (6): Set j to equal 1, 2, ..., J respectively, and according to the formula Calculate the reference discriminant features Then, The maximum and minimum values ​​in the data are recorded as C. 上 and C 下 .

[0018] Step (7): Determine whether the conditions are met. If yes, the latest batch of penicillin is operating normally, and step (8) is then executed; if no, the latest batch of penicillin is operating abnormally, and production of that batch of penicillin is stopped.

[0019] Step (8): Determine whether the production of this batch of penicillin has ended; if not, obtain 13 sample data at the next sampling time and assemble them into a 1×13 dimensional data vector x. new Then, proceed to step (9); if so, the production of this batch of penicillin is running normally, and the data vectors of the N sampling times of this batch are used to form the batch matrix X. J+1 ∈R N×13 After cleaning the penicillin production equipment, proceed to step (10).

[0020] Step (9): After setting k = k + 1, then convert the L data vectors x2, x3, ..., x L ,x new Update and replace the original L data vectors x1, x2, ..., x L Then, return to step (3); specifically, the update and replacement operation sets x sequentially. L =x new x L-1 =x t x L-2 =x t-1 , ..., x1 = x2.

[0021] Step (10): After setting J = J + 1, start the production of the next batch of penicillin and return to step (2).

[0022] It should be noted that the purpose of performing time-series discriminant feature analysis in step (5) is to search for the left transformation vector β. t and right transformation vector w t This enables the corresponding online discriminant features. Maximize, that is:

[0023]

[0024] The maximization problem in equation ① above can be solved using the classic Lagrange multiplier method, i.e., by constructing the Lagrange function L as shown below:

[0025]

[0026] Set J relative to w respectively t and β t Once the partial derivatives are equal to 0, the eigenvalue problem as shown below can be obtained:

[0027]

[0028] Equation ③ above defines two eigenvalue problems, corresponding to the eigenvalue problems in steps (5.2) and (5.3) above, respectively. Furthermore, since... and The rank of both is equal to 1. Therefore, the two eigenvalue problems in equation ③ above each have only one non-zero eigenvalue, which is the largest eigenvalue.

[0029] The advantages of the method of the present invention, based on the above implementation steps, are as follows.

[0030] The main advantage of this invention is that it performs targeted temporal discriminant feature analysis on data vectors from multiple latest sampling times within the online window matrix to obtain corresponding online discriminant features. Simultaneously, a set of real-time left-right transformation vectors is used to perform the same transformation on the reference window matrix for normal production batches, and the maximum and minimum values ​​of the reference discriminant feature changes are used as the upper and lower limits of the online discriminant features, thereby enabling anomaly detection in penicillin production. Traditional methods, on the other hand, perform feature analysis and extraction on normal batch data from historical databases using offline training methods, without utilizing sample data from new batches and new sampling times. In comparison, the discriminant features extracted through targeted real-time analysis in this invention are more conducive to anomaly detection. Attached Figure Description

[0031] Figure 1 This is a schematic diagram illustrating the implementation process of the method of the present invention.

[0032] Figure 2 This is a flowchart of the penicillin production process. Detailed Implementation

[0033] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0034] This invention discloses a method for detecting penicillin production anomalies based on sliding window temporal discriminant feature analysis. The following is a detailed explanation of such a method. Figure 1 The implementation flowchart shown below illustrates the specific implementation method of the present invention.

[0035] Step (1): Obtain J sample datasets of normal penicillin production batches from the historical database of penicillin production batches, and form corresponding batch matrices X1, X2, ..., X according to the sampling time sequence. J Then, set the length of the sliding window to L.

[0036] like Figure 2 The penicillin production process flow diagram shown is actually equipped with a corresponding distributed control system (DCS) in actual operation. The DCS can acquire and store 13 sample data points collected at each sampling moment in real time. For consistency, these 13 sample data points can be arranged in the following order to form a 1×13-dimensional data vector: aeration rate, stirring power, glucose feed temperature, glucose flow acceleration rate, coolant flow acceleration rate, acid-base flow acceleration rate, reactor temperature, pH value, glucose concentration, cell concentration, dissolved oxygen concentration, carbon dioxide concentration, and penicillin concentration.

[0037] Step (2): Obtain sample data from each sampling time of the latest batch of penicillin production, and assemble the 13 sample data from each sampling time into a 1×13 dimensional data vector. When L data vectors x1, x2, ..., x3 from sampling times are obtained... L Then set k=1 and execute step (3).

[0038] Step (3): Separate the batch matrices X1, X2, ..., X J The row vectors from row k to row (k+L-1) form the training window matrix. Then, calculate the J training window matrices. The mean matrix U∈R L×13 and standard deviation matrix Φ∈R L×13 ;

[0039] Step (4): Set the sliding window matrix X t ∈R L×13 The row vectors from row 1 to row L are equal to x1, x2, ..., x. L Then, use the formula For X t Standardization is implemented to obtain the online window matrix. Use formula For the training window matrix The reference window matrix is ​​obtained by performing standardization. Where, j∈{1,2,…,J}, Let the j-th training window matrix be represented. Represents the j-th reference window matrix, symbol This means dividing the elements at the same position in the matrix.

[0040] Step (5): For the online window matrix Perform time-series discriminant feature analysis to obtain the corresponding left transformation vector β. t ∈R L×1 and right transformation vector w t ∈R 13×1 Then, calculate the online discriminant features. The specific implementation process is as shown in steps (5.1) to (5.4) above.

[0041] Step (6): Set j to equal 1, 2, ..., J respectively, and according to the formula Calculate the reference discriminant features Then, The maximum and minimum values ​​in the data are recorded as C. 上 and C 下 .

[0042] Step (7): Determine whether the conditions are met. If yes, the latest batch of penicillin is operating normally, and step (8) is then executed; if no, the latest batch of penicillin is operating abnormally, and production of that batch of penicillin is stopped.

[0043] Step (8): Determine whether the production of this batch of penicillin has ended; if not, obtain 13 sample data at the next sampling time and assemble them into a 1×13 dimensional data vector x. new Then, proceed to step (9); if so, the production of this batch of penicillin is running normally, and the data vectors of the N sampling times of this batch are used to form the batch matrix X. J+1 ∈R N×13 After cleaning the penicillin production equipment, proceed to step (10).

[0044] Step (9): After setting k = k + 1, then set x1, x2, ..., x in sequence. L-1 ,x L They are respectively equal to x2, x3, ..., x L ,x new Then, return to step (3).

[0045] Step (10): After setting J = J + 1, start the production of the next batch of penicillin and return to step (2).

Claims

1. A method for detecting penicillin production anomalies based on sliding window temporal discriminant feature analysis, comprising the following steps: Step (1): Obtain J sample datasets of normal penicillin production batches from the historical database of penicillin production batches, and form corresponding batch matrices X1, X2, ..., X according to the sampling time sequence. J Then, set the length of the sliding window to be equal to L; where, The batch matrix X corresponding to the j-th normal production batch of penicillin j ∈R N×13 Specifically, it consists of N 1×13 dimensional data vectors, j∈{1,2,…,J}, R N×13 Let R represent an N×13 dimensional real matrix, and let R represent the set of real numbers. Step (2): Obtain sample data from each sampling time of the latest batch of penicillin production, and assemble the 13 sample data from each sampling time into a 1×13 dimensional data vector. When L data vectors x1, x2, ..., x3 from sampling times are obtained... L Then, set k=1 and execute step (3); Step (3): Separate the batch matrices X1, X2, ..., X J The row vectors from row k to row (k+L-1) form the training window matrix. Then, calculate the J training window matrices. The mean matrix U∈R L×13 and standard deviation matrix Φ∈R L×13 ; where the j-th training window matrix Specifically, it is the j-th batch matrix X j The row vectors from row k to row k+L-1 in U are used to form the vectors. The element in row a and column b of U is equal to... The average of the elements in the a-th row and b-th column of Φ, where a∈{1,2,…,L}, b∈{1,2,…,13}, is equal to the average of the elements in the a-th row and b-th column of Φ. The standard deviation of the element in row a, column b; Step (4): Set the sliding window matrix X t ∈R L×13 The row vectors from row 1 to row L are equal to x1, x2, ..., x. L Then, use the formula For X t Standardization is implemented to obtain the online window matrix. Use formula For the training window matrix The reference window matrix is ​​obtained by performing standardization. Where, j∈{1,2,…,J}, Represents the j-th reference window matrix, symbol This indicates dividing the elements at the same position in the matrix; Step (5): For the online window matrix Perform time-series discriminant feature analysis to obtain the corresponding left transformation vector β. t ∈R L×1 and right transformation vector w t ∈R 13×1 Then, calculate the online discriminant features. Step (6): Determine if the conditions are met. If yes, then the production of the latest batch of penicillin is running normally, and step (7) is then executed; if no, then the production of the latest batch of penicillin is abnormal, and the production of that batch of penicillin is stopped; where C 上 and C 下 These represent online discriminant features. Maximum value of change C 上 and minimum value C 下 ; Step (7): Determine whether the production of this batch of penicillin has ended; if not, obtain 13 sample data at the next sampling time and assemble them into a 1×13 dimensional data vector x. new Then, proceed to step (8); if so, the production of this batch of penicillin is running normally, and the data vectors of the N sampling times of this batch are used to form the batch matrix X. J+1 ∈R N×13 After cleaning the penicillin production equipment, proceed to step (9); Step (8): After setting k = k + 1, set the data vectors x1, x2, ..., x in sequence. L-1 ,x L They are respectively equal to x2, x3, ..., x L ,x new Then, return to step (3); Step (9): After setting J = J + 1, start the production of the next batch of penicillin and return to step (2); The characteristic is that the process of performing time-series discriminative feature analysis in step 5 is as shown in steps (5.1) to (5.4): Step (5.1): Initialize the right transformation vector w t Let be any 13×1 dimensional real vector; Step (5.2): According to the formula Calculate matrix G w Then, solve the eigenvalue problem G. w =λ w g w The largest eigenvalue λ w The corresponding eigenvector g w Then, according to formula β t =g w / ||g w ||Calculate the left transformation vector β t ;in, Indicates the calculation of g w Length; Step (5.3): According to the formula Calculate matrix G β Then, solve the eigenvalue problem G. β =λ β g β The largest eigenvalue λ β The corresponding eigenvector g β Then, according to formula w t =g β / ||g β ||Calculate the right transformation vector w t ; Step (5.4): Determine w t Check if convergence has occurred; if not, return to step (5.2); if yes, obtain the final left transformation vector β. t ∈R L×1 and right transformation vector w t ∈R 13×1 Then, according to the formula Calculate online discriminant features In step (6), C 上 and C 下 The method for determining j is as follows: Set j to equal 1, 2, ..., J sequentially, and then use the formula... Calculate the reference discriminant features Then, The maximum and minimum values ​​in the data are recorded as C. 上 and C 下 .

2. The method for detecting penicillin production anomalies based on sliding window temporal discriminant feature analysis according to claim 1, characterized in that, The 13 data points in the 1×13 dimensional data vector are arranged in the following order: ventilation rate, stirring power, glucose feed temperature, glucose flow acceleration rate, coolant flow acceleration rate, acid-base flow acceleration rate, reactor temperature, pH value, glucose concentration, cell concentration, dissolved oxygen concentration, carbon dioxide concentration, and penicillin concentration.

Citation Information

Patent Citations

  • kernel learning monitoring method for penicillin production process under unequal-length batch conditions

    CN103901855A

  • Power grid abnormal state detecting method based on maximum feature value of sample covariance matrix

    CN108196165A