Tiny fault detection method based on prediction error sum of squares and JS divergence
Through the combination of PCA dimensionality reduction and JS divergence, sliding windows and kernel density estimation are used to solve the problem that traditional methods are difficult to detect small faults, achieving more efficient and accurate fault detection.
Patent Information
- Application Number
- CN202510506860.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-08-08
AI Technical Summary
Traditional multivariate statistical process monitoring methods such as principal component analysis are difficult to detect micro-failures, and PCA-KLD-based methods have an explosive growth in data gradients when detecting micro-failures, affecting detection accuracy.
A small fault detection method based on the square sum of prediction errors and JS divergence is adopted. The probability density function of the reference model is constructed after PCA dimensionality reduction, and the JS divergence is calculated using sliding window and kernel density estimation, and online monitoring is performed in combination with SPE statistics.
It improves the accuracy and stability of micro-fault detection, avoids the explosive growth of gradients of divergence values at noise points, and enhances the ability to extract micro-fault characteristics.
Smart Images

Figure CN120449031A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of engineering detection technology, and in particular to a method for detecting minor faults based on the sum of squared prediction errors and JS divergence. Background Art
[0002] With the increasing demands for reliability and safety in modern industrial production, especially in complex industries like the chemical industry, where equipment safety and product quality are increasingly demanded, industrial fault detection has been widely studied and has become an indispensable component of industrial process monitoring. Traditional multivariate statistical process monitoring (MSPM) techniques, such as principal component analysis (PCA), rely heavily on changes in the mean and variance of fault data for process monitoring. However, minor faults have low amplitudes and very weak variance changes, making PCA-based fault detection methods difficult to detect. Consequently, numerous extended PCA-based algorithms have emerged and been applied to real-world industrial processes. Divergence, such as the Kullback-Leibler divergence (KL divergence, KLD) and the Jensen-Shannon divergence (JS divergence, JSD), can quantify the probability density function between normal and faulty industrial processes. Divergence is particularly sensitive to minor faults and exhibits significantly improved detection performance compared to PCA. However, the PCA-KLD fault detection method may suffer from the explosive growth trend of data gradients, which will lead to local detection confusion and affect the accuracy of KL divergence detection.
[0003] In order to solve the above problems, this application proposes a small fault detection method based on the sum of squared prediction errors and JS divergence. Summary of the Invention
[0004] The purpose of the present invention is to solve the above problems and provide a small fault detection method based on the sum of squared prediction errors and JS divergence.
[0005] In order to achieve the above object, the technical solution of the present invention is as follows:
[0006] The present invention provides a method for detecting minor faults based on the sum of squared prediction errors and JS divergence, comprising the following steps:
[0007] Step S1, data selection and preprocessing: Collect historical production data at each moment of normal industrial operation process, the production data includes training data set X train ∈R n×m , and perform standardization to obtain the standardized training set data matrix Xtrain_std ∈R n×m ;
[0008] Step S2, PCA dimensionality reduction: perform eigenvalue decomposition on the covariance matrix of the standardized training set data, and select the number of principal components r, and perform eigenvalue decomposition on the standardized training set data matrix X train_std Perform eigenvalue decomposition and sort in descending order according to the size of the eigenvalue to obtain the principal element subspace, residual subspace and load matrix P∈R m×r , the data matrix after PCA dimensionality reduction is X train_pca ∈R n×r ;
[0009] Step S3, calculate the SPE statistic: The SPE statistic measures the projection change of the sample vector in the residual space, and calculates the SPE statistic SPE of all data in the training set after PCA dimensionality reduction. tr , and get the SPE statistics of the training set data in the window
[0010] Step S4, construct the reference model probability density function: according to the SPE statistic SPE of the training set industrial data after PCA dimensionality reduction tr , establish the reference model probability density function and use it as the benchmark distribution;
[0011] Step S5, build JS divergence training model: set the sliding window width w, adopt the sliding window strategy, and use Gaussian kernel density estimation to determine the SPE statistics of the training data in the sliding window The probability density function of the training data SPE statistic in different windows is calculated, and the JS divergence between the probability density function and the benchmark probability density function is calculated. Right now
[0012] Step S6: Determine the control limit using the kernel density estimation method. control limits;
[0013] Step S7, online monitoring: online collection of industrial real-time data X test ∈R n×m , after standardization, we get X test_std ∈R n×m After PCA dimensionality reduction, the data X within the sliding window width w is obtained test_pca ∈R n×r , use the trained model to monitor the real-time process data of the industrial system and calculate the SPE statistics of the real-time process data within the specified sliding window Estimating statistics using kernel density estimation The probability density function of the reference model is used to calculate the JS divergence between it and the reference model probability density function. Right now Detect abnormalities in industrial process data in real time by comparing control limits.
[0014] The present invention is further configured as follows: in step S1
[0015] X train =[x train_1 ,x train_2 ,…,x train_m ]∈R n×m , where n is the n moments of historical production data of normal industrial operation process, and m is the number of observed variables at each moment; for X train Standardize, X train (t) = [x train_1 (t),x train_2 (t),…,x train_m (t)], where t is the tth row of the data matrix, μ i and σ i They represent data x respectively. train_i The mean and variance of (t),
[0016]
[0017] The covariance matrix of the standardized training set data is expressed as X train_std .
[0018] The present invention is further configured as follows: in step S2, eigenvalue decomposition is performed on S to obtain a load matrix P:
[0019]
[0020] Where S represents the covariance matrix; Λ is a diagonal matrix, which is also the eigenvalue matrix of S, and its diagonal elements satisfy λ1≥λ2≥…λ m ; V is the eigenvector matrix of S, with dimension m×m, P is the first r columns of V, with dimension m×r, containing information of all the main elements, It is the remaining mr columns of V, with dimension m×(mr), containing non-pivot information. P is called the loading matrix and is composed of the first r eigenvectors of S;
[0021] X train_std Decompose to obtain the principal subspace and residual subspace;
[0022]
[0023] in, is the principal element subspace; is the residual subspace, and the training set after PCA dimensionality reduction is X train_pca ;
[0024] The score matrix T of the training set data train ∈R n×r for:
[0025] T train =X train_std P=[t train_1 ,t train_2 ,…,t train_r ]#(4)
[0026] The score matrix T of the test set data test ∈R n×r for:
[0027] T test =X test_std P=[t test_1 ,t test_2 ,…,t test_r ]#(5).
[0028] The present invention is further configured as follows: the SPE statistic SPE in step S3 tr Defined as:
[0029] SPE tr =X train_std T (I-PP T )(I-PP T ) train_std #(6)
[0030] Where I is the m×m identity matrix.
[0031] The present invention is further configured as follows: in step S5, the JS divergence between the distribution and the reference probability density function is calculated Slide the sliding window backward with a step size of 1
[0032]
[0033] in, Refers to statistics The probability density function f(x) and the statistic SPE tr The KL divergence between the probability density function h(x) m(x) refers to the statistic and statistic SPE tr The probability density function of the mixture is, Refers to statistics The probability density function f(x) and the statistic SPE tr The JS divergence between the probability density function h(x)
[0034] If and only if f(x)=h(x), In addition, KL divergence is non-negative, that is And KL divergence is asymmetric, so So if the data has the same probability distribution but is calculated using the opposite distribution formula, KL divergence will produce two different asymmetric quantities, but JS divergence is symmetric, that is
[0035] A fixed sliding window width of w = 100 is selected. During online monitoring, when time i < 100, the online data in the sliding window does not reach the window width w. At this time, the divergence value cannot be calculated, and there is a certain detection delay. In order to ensure that the number of data collected within the sliding window width at each moment is always w, and considering the real-time nature of time series data, it is selected that at the i-th moment, the last wi data of the training set and the first i data of the online test are combined into a sliding window until i ≥ 100.
[0036] The present invention is further configured as follows: in step S6, the confidence level α is set to 0.99, according to Obtained Determine statistics using kernel density estimation The control limit η limit (α), as shown below:
[0037]
[0038] Where p(z) is the probability density function of the random variable z.
[0039] The present invention is further configured as follows: in step S7, the k-th moment is compared and control limit η limit (α) and the following logic is used for fault detection:
[0040]
[0041] If the statistic at the kth moment Below the control limit η limit (α), it indicates that the current industrial operation process is a normal industrial operation process;
[0042] If the statistic at the kth moment Above the control limit η limit (α), it indicates that the current industrial operation process is a faulty industrial operation process.
[0043] Compared with the existing technology, this solution has the following beneficial effects:
[0044] 1. The present invention applies the SPE statistic to the JS divergence, integrates the data reconstruction error on the basis of a statistical indicator, converts the multidimensional original data into one-dimensional data to fit the probability density function, avoids the noise generated by multidimensional data fitting, enhances the fitting effect, and improves the ability to extract minor fault features.
[0045] 2. The JS divergence based on the SPE statistic is structurally stable, which avoids the problem of explosive growth of the gradient of the divergence value at the noise point. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is an overall flow chart of an embodiment of the present invention;
[0047] Figure 2 Comparison of monitoring effects of four process monitoring methods in Example 1 of the present invention; (a): PCA-T 2 , PCA-SPE monitoring effect diagram; (b): PCA-KLD monitoring effect diagram; (c): PCA-JSD monitoring effect diagram; (d): PCA-SPE-JSD monitoring effect diagram;
[0048] Figure 3 A comparison chart of monitoring effects of four process monitoring methods in Example 2 of the present invention; (a): PCA-T 2 , PCA-SPE monitoring effect diagram; (b): PCA-KLD monitoring effect diagram; (c): PCA-JSD monitoring effect diagram; (d): PCA-SPE-JSD monitoring effect diagram;
[0049] Figure 4 A comparison chart of monitoring effects of four process monitoring methods in Example 3 of the present invention; (a): PCA-T 2 , PCA-SPE monitoring effect diagram; (b): PCA-KLD monitoring effect diagram; (c): PCA-JSD monitoring effect diagram; (d): PCA-SPE-JSD monitoring effect diagram;
[0050] Figure 5 This is a visualization diagram of data of different dimensions in Example 1 of the present invention; (a): 10-dimensional data; (b): 1-dimensional data;
[0051] Figure 6 This is a visualization diagram of data of different dimensions in Example 2 of the present invention; (a): 10-dimensional data; (b): 1-dimensional data;
[0052] Figure 7 This is a visualization diagram of data of different dimensions in Example 3 of the present invention; (a): 10-dimensional data; (b): 1-dimensional data. DETAILED DESCRIPTION
[0053] In order to enable those skilled in the art to better understand the present invention, the technical solution of the present invention will be further described in detail below in conjunction with the embodiments of the present invention and the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0054] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The present invention will be described in detail below with reference to the embodiments.
[0055] Example:
[0056] A small fault detection method based on the sum of squared prediction errors and JS divergence, such as Figure 1-7 Shown, including:
[0057] 1) Data selection and preprocessing: The historical production data of the normal industrial operation process is collected, including n moments, each moment has m observation variables, forming an n×m dimension production data matrix X train =[x train_1 ,x train_2 ,…,x train_m ]∈R n×m In order to eliminate the influence of significant variables in the dimensionality reduction process, X train Standardized, X train (t) = [x train_1 (t),x train_2 (t),…,x train_m (t)] represents the tth row of the data matrix, μ i and σ i They represent data x respectively. train_i The mean and variance of (t).
[0058]
[0059] The standardized production data matrix is represented as X train_std .
[0060] 2) PCA Dimensionality Reduction: In the field of chemical reactions, multivariate data observation is required, which increases the workload of data collection. More importantly, there may be correlations between multiple variables, which increases the complexity of problem analysis. Therefore, it is necessary to reduce the analysis indicators while minimizing the loss of information contained in the original indicators. PCA is used to project the standardized industrial data to achieve data dimensionality reduction. Eigenvalue decomposition is performed on S to obtain the load matrix P:
[0061]
[0062] Where S represents the covariance matrix; Λ is a diagonal matrix, which is also the eigenvalue matrix of S, and its diagonal elements satisfy λ1≥λ2≥…λ m ; V is the eigenvector matrix of S, with dimension m×m, P is the first r columns of V, with dimension m×r, containing information of all the main elements, It is the remaining mr columns of V, with dimension m×(mr), containing non-pivot information. P is called the loading matrix and is composed of the first r eigenvectors of S.
[0063] X train_std Decompose it to obtain the principal subspace and the residual subspace.
[0064]
[0065] in, is the principal element subspace; is the residual subspace, and the training data after dimensionality reduction is X train_pca ;
[0066] The score matrix T of the training set data train ∈R n×r for:
[0067] T train =X train_std P=[t train_1 ,t train_2 ,…,t train_r ]#(4)
[0068] The score matrix T of the test set data test ∈R n×r for:
[0069] T test =X test_std P=[t test_1 ,t test_2 ,…,t test_r ]#(5)
[0070] The cumulative variance contribution rate is determined based on the eigenvalues of the sample matrix in principal component analysis theory. The ratio of the eigenvalue corresponding to each pivot to the total eigenvalue is called the contribution rate of that pivot to the total variance of the sample. In this invention, to ensure the adequacy of the pivot space selection and the convenience of industrial operation, the number of pivots, r, is selected to be 10.
[0071] 3) Calculate the sum of squared prediction errors: The SPE indicator measures the projection change of the sample vector in the residual space. The SPE statistic SPE of the entire training set data is tr Defined as:
[0072] SPE tr =X train_std T (I-PP T )(I-PP T ) train_std #(6)
[0073] Where I is the m×m identity matrix.
[0074] 4) Constructing a baseline probability density function: The present invention uses the kernel density estimation method to estimate the training set statistic SPE tr The probability density function of , and based on this as the benchmark distribution.
[0075] 5) Constructing JS divergence training model: This paper introduces a fault detection method based on JS divergence and defines a metric to measure the difference between two probability density functions. This paper adopts sliding window technology with a given width w, and uses kernel density estimation to determine the SPE statistic of the training set data within the sliding window. The probability density function of the distribution is calculated and the JS divergence between the distribution and the benchmark probability density function is calculated. Slide the sliding window backward with a step size of 1.
[0076]
[0077] in, Refers to statistics The probability density function f(x) and the statistic SPE tr The KL divergence between the probability density function h(x) m(x) refers to the statistic and statistic SPE tr The probability density function of the mixture. Refers to statistics The probability density function f(x) and the statistic SPE tr The JS divergence between the probability density function h(x)
[0078] If and only if f(x)=h(x), In addition, KL divergence is non-negative, that is And KL divergence is asymmetric, so So if the data has the same probability distribution but is calculated using the opposite distribution formula, KL divergence will produce two different asymmetric quantities, but JS divergence is symmetric, that is
[0079] According to the sliding window width selection theorem, a large sliding window width ensures detection of more minor faults, ensuring the method's detectability. However, an excessively large sliding window width can result in significant time delays. A too small sliding window width can prevent the method from detecting minor faults or even misjudge the method itself, thus failing to effectively detect minor faults. Taking all of these factors into consideration, the present invention selects a fixed sliding window width of w = 100. During online monitoring, when time i < 100, the online data within the sliding window does not reach the window width w, making it impossible to calculate the divergence value, resulting in a certain degree of detection delay. To ensure that the number of data collected within the sliding window width at each moment is always w, and considering the real-time nature of time series data, at time i, the last wi data points of the training set are combined with the first i data points of the online test set to form a sliding window, and this process continues until i ≥ 100.
[0080] 6) Determination of control limits: Set confidence level α = 0.99, according to Obtained Determine statistics using kernel density estimation The control limit η limit (α), as shown below:
[0081]
[0082] Where p(z) is the probability density function of the random variable z.
[0083] 7) Online monitoring: The present invention uses the trained model to detect the real-time process data of the industrial system and calculate the statistics within the sliding window width w Fitting statistics using kernel density estimation The probability density function of , calculate the JS divergence between it and the benchmark probability density function Slide the sliding window backward with a step size of 1. In practical applications, compare the k-th moment and control limit η limit (α) and the following logic is used for fault detection:
[0084]
[0085] If the statistic at the kth moment Below the control limit η limit (α), it indicates that the current industrial operation process is a normal industrial operation process;
[0086] If the statistic at the kth moment Above the control limit η limit (α), it indicates that the current industrial operation process is a faulty industrial operation process;
[0087] In order to fully describe the minor fault detection method based on the prediction error sum of squares and JS divergence in the embodiment of the present invention, the invention is applied to the Tennessee Eastman (TE) process for specific description.
[0088] The Tennessee Eastman simulation platform is an open chemical model simulation platform based on actual chemical reaction processes. It is used to study process control and is widely used in process control, fault detection and diagnosis, and machine learning. This dataset simulates a complex industrial process, containing 41 process variables (such as temperature, pressure, flow, etc.) and 12 control variables (such as valve opening, pump speed, etc.), and provides 21 preset fault modes for testing the robustness of the control system and the performance of the fault detection algorithm. The Tennessee Eastman simulation platform has four gaseous reactants A, C, D and E, as well as an inert component B. The reactants and inert components are fed into the reactor to generate products G and H. The Tennessee Eastman process system satisfies the following formula:
[0089] A(g)+C(g)+D(g)→G(liq);
[0090] A(g)+C(g)+E(g)→H(liq);
[0091] A(g)·+E(g)→F(liq);
[0092] 3D(g)→2F(liq);
[0093] The present invention will be applied to three fault conditions in the Tennessee Eastman process that are poorly detected by conventional methods, namely fault five, fault ten, and fault sixteen, which correspond to embodiments 1, 2, and 3 of the present invention, respectively. By analyzing the detection effects of different embodiments, the effectiveness of the proposed method is verified.
[0094] Example 1
[0095] The chemical process failure in Example 1 was caused by a change in the condenser cooling water inlet temperature, resulting in a step change. However, the system automatically adjusted the industrial data back to near-normal values under the action of the factory's closed-loop circuit, but the failure persisted. 960 data points collected during several hours of normal operation of the simulated chemical process were used as training data. Test data was collected starting some time before the failure occurred, for a total of 960 data points, with the failure starting at the 161st data point. The present invention selected 52 variables from the TE dataset.
[0096] According to the above steps, the 960 statistics SPE of the training set are obtained using the data matrix after dimensionality reduction. tr, and slide the window backward in sequence, with a step size of 1, and calculate the statistics of 861 sliding windows of the training set respectively Statistics of 960 sliding windows of the test set Finally, the final statistics of the JS divergence strategy based on the SPE statistic are calculated and The fault detection performance of a fault detection method based on principal component analysis (PCA), a KL divergence fault detection method based on the PCA framework, a JS divergence fault detection method based on the PCA framework, and the fault detection method of the present invention was compared. Experimental results show that the fault detection method of the present invention is more sensitive to minor faults in complex industrial systems, has more accurate detection, and has a higher fault detection rate.
[0097] The present invention uses the fault detection rate (FDR) and the fault false alarm rate (FAR) to quantitatively evaluate the performance of all fault detection methods. The specific formula is as follows:
[0098]
[0099] Among them, N p Indicates the number of normal samples that are misdiagnosed as faults, N t Represents the total number of normal samples, N v Indicates the number of detected fault samples, N n Indicates the total number of fault samples.
[0100] from Figure 2 (a) to Figure 2 (d) It can be clearly seen that the minor fault detection method based on SPE statistics and JS divergence proposed in the present invention has a significant improvement in fault detection rate (FDR) compared with the other three fault detection methods. From Table 1, it can be seen that the T 2 Statistics (PCA-T 2 ) and Q statistics (PCA-SPE) are 22.4% and 27.1% respectively. By introducing divergence into the PCA framework, the fault detection rates of the KL divergence fault detection method (PCA-KLD) based on the PCA framework and the JS divergence fault detection method (PCA-JSD) based on the PCA framework are not significantly improved. The fault detection rates in the principal component subspace are only 25.8% and 25.8%. The minor fault detection method based on SPE statistics and JS divergence proposed in the present invention focuses on more key information of minor faults, and the fault detection rate of the fault detection method reaches 82%, which is significantly improved.
[0101] The chemical process failure in Example 2 is the sticking of the product extraction valve, which affects the product output flow rate and indirectly affects the material balance and other operating conditions in the reactor. The specific failure type is unknown.
[0102] According to the above steps, the 960 statistics SPE of the training set are obtained using the data matrix after dimensionality reduction. tr , and slide the window backward in sequence, with a step size of 1, and calculate the statistics of 861 sliding windows of the training set respectively Statistics of 960 sliding windows of the test set Finally, the final statistics of the JS divergence strategy based on the SPE statistic are calculated and from Figure 3 (a) to Figure 3 (d) Compare the fault detection method based on principal component analysis (PCA), the KL divergence fault detection method based on the PCA framework, the JS divergence fault detection method based on the PCA framework, and the minor fault detection method proposed in this invention. Demonstrate the effectiveness of the minor fault detection method proposed in this invention.
[0103] Table 1 Comparative results of different detection methods on TE dataset
[0104]
[0105]
[0106] From Table 1 and Figure 3 (a) It can be seen that the T based on the principal component analysis (PCA) fault detection method 2 Statistics (PCA-T 2 ) and Q statistics (PCA-SPE) have a fault detection rate of only 26.9% and 24.5%, respectively. Figure 3 (c) The fault detection rate of the JS divergence fault detection method based on the PCA framework (PCA-JSD) is 42.6%. Figure 3 (b) The KL divergence fault detection method based on the PCA framework (PCA-KLD) has a false alarm rate of up to 25% due to the explosive growth of the divergence value at the noise point. Figure 3 (d) The fault detection rate of the minor fault detection method based on the SPE statistic and the JS divergence of the present invention reaches 82.8%, which is a great improvement in the fault detection rate, and the false alarm rate is 0%.
[0107] Example 3
[0108] The chemical process failure in Example 3 is a gradual decrease in the cooling water flow rate of the condenser, which will lead to a decrease in condenser efficiency and may have an adverse impact on the entire production process. The reduction in the cooling water flow rate of the condenser may be caused by a pipe blockage, pump failure, or other factors.
[0109] According to the above steps, the 960 statistics SPE of the training set are obtained using the data matrix after dimensionality reduction. tr , and slide the window backward in sequence, with a step size of 1, and calculate the statistics of 861 sliding windows of the training set respectively Statistics of 960 sliding windows of the test set Finally, the final statistics of the JS divergence strategy based on the SPE statistic are calculated and Compare the fault detection effects of the fault detection method based on principal component analysis (PCA), the KL divergence fault detection method based on the PCA framework, the JS divergence fault detection method based on the PCA framework, and the fault detection method of the present invention. Demonstrate the effectiveness of the minor fault detection method based on SPE statistics and JS divergence in the present invention. Compare Table 1 and Figure 2 (a) to Figure 2 (d), we can find that the T 2 Statistics (PCA-T 2 ) and Q statistics (PCA-SPE), KL divergence fault detection method based on PCA framework (PCA-KLD), and JS divergence fault detection method based on PCA framework (PCA-JSD) have fault detection rates of 10.4%, 21.3%, 0% and 9.3% respectively, and the detection effect is very poor. The fault detection rate of the JS divergence minor fault detection method based on SPE statistics of the present invention is 89.4%, the fault detection effect is greatly improved, and the false alarm rate is 0%.
[0110] Experimental results analysis:
[0111] Figure 2 、 Figure 3 、 Figure 4 The comparative effects of the four proposed methods on the three data sets of Examples 1, 2, and 3 are respectively shown. Figure 2 、 3 , 4 (a) T of minor fault detection method based on principal component analysis (PCA) 2 Statistics (PCA-T 2 ) and Q statistics (PCA-SPE), Figure 2 、 3 4(b) KL divergence fault detection method based on PCA framework (PCA-KLD) Figure 2 、 3, 4 (c) JS divergence fault detection method based on PCA framework (PCA-JSD) and Figure 2 、 3 4 (d) The SPE statistic and JS divergence fault detection method based on the PCA framework (PCA-SPE-JSD) can clearly be compared to find the effectiveness and advantages of the method of the present invention. The SPE statistic calculates the reconstruction error in the principal component space corresponding to the standardized industrial data and the components with the largest variance contributions in the top 10 selected components. By calculating the JS divergence of the SPE statistic representing the data reconstruction error, the fault detection rate (FDR) can be significantly improved, and minor faults can be detected. In addition, compared with the traditional KL divergence fault detection method based on the PCA framework, the SPE statistic and JS divergence fault detection method based on the PCA framework converts multidimensional raw data into one-dimensional data, namely the SPE statistic, which improves the efficiency of calculating the JS divergence and also improves the fitting effect of the kernel density estimation.
[0112] Calculate the SPE statistic for real-time industrial data after PCA dimensionality reduction like Figure 5 、 Figure 6 、 Figure 7 As shown, it can be found Figure 5 、 6 , 7 (a) After PCA dimension reduction, the 10 principal components have large differences in data distribution. If the divergence between the two distributions is directly calculated on the 10 high-dimensional data after PCA dimension reduction, it will not only increase the computational complexity, but also may cause data redundancy and reduce the performance of KDE. Therefore, the present invention chooses to convert the two sets of original data (normal industrial data and test industrial data) into one-dimensional SPE statistics, such as Figure 5 、 6 ,7(b) In the process of using kernel density to estimate the probability density function, the reconstruction error of the data is integrated into a statistical indicator, and the probability density function is fitted based on the indicator, which avoids the noise generated by multidimensional data fitting and improves the fitting effect.
[0113] In order to further verify the effectiveness of the present invention, the method used in the present invention is compared with PCA-T 2, PCA-SPE, PCA-KLD, and PCA-JSD methods are used to detect 18 groups of faults in the TE dataset (except faults 3, 9, and 15). As shown in Table 1, the advantages of the present invention can be intuitively seen by comparing the detection effects of the present invention and the other four methods on the 18 groups of faults in the TE dataset. For industrial datasets such as fault 5, fault 10, fault 16, and fault 21, which have poor detection effects with conventional methods, the present invention shows a good improvement in both the fault detection rate (FDR) and the false alarm rate (FAR), greatly improving the fault detection rate and reducing the false alarm rate. From the overall effect, the present invention is significantly superior to the above three methods.
[0114] Through the above embodiments, this technical solution can be widely applied to fault detection in different industries and fields, providing strong technical support for the safety and reliability of industrial operations.
[0115] The above specific embodiments are merely explanations of the present invention and are not limitations of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the embodiments as needed. However, as long as they are within the scope of the claims of the present invention, they are protected by patent law.
Claims
1. A method for detecting minor faults based on the sum of squared prediction errors and JS divergence, characterized in that: The following steps are involved: Step S1, data selection and preprocessing: Collect historical production data at each moment of normal industrial operation process, the production data includes training data set X train ∈R n×m , and perform standardization to obtain the standardized training set data matrix X train_std ∈R n×m ; Step S2, PCA dimensionality reduction: perform eigenvalue decomposition on the covariance matrix of the standardized training set data, and select the number of principal components r, and perform eigenvalue decomposition on the standardized training set data matrix X train_std Perform eigenvalue decomposition and sort in descending order according to the size of the eigenvalue to obtain the principal element subspace, residual subspace and load matrix P∈R m×r , the data matrix after PCA dimensionality reduction is X train_pca ∈R n×r ; Step S3, calculate the SPE statistic: The SPE statistic measures the projection change of the sample vector in the residual space, and calculates the SPE statistic SPE of all data in the training set after PCA dimensionality reduction. tr , and get the SPE statistics of the training set data in the window Step S4, construct the reference model probability density function: according to the SPE statistic SPE of the training set industrial data after PCA dimensionality reduction tr , establish the reference model probability density function and use it as the benchmark distribution; Step S5, build JS divergence training model: set the sliding window width w, adopt the sliding window strategy, and use Gaussian kernel density estimation to determine the SPE statistics of the training data in the sliding window The probability density function of the training data SPE statistic in different windows is calculated, and the JS divergence between the probability density function and the benchmark probability density function is calculated. Right now Step S6: Determine the control limit using the kernel density estimation method. control limits; Step S7, online monitoring: online collection of industrial real-time data X test ∈R n×m , after standardization, we get X test_std ∈R n ×m After PCA dimensionality reduction, the data X within the sliding window width w is obtained test_pca ∈R n×r , use the trained model to monitor the real-time process data of the industrial system and calculate the SPE statistics of the real-time process data within the specified sliding window Estimating statistics using kernel density estimation The probability density function of the reference model is used to calculate the JS divergence between it and the reference model probability density function. Right now Detect abnormalities in industrial process data in real time by comparing control limits.
2. The method for detecting minor faults based on the sum of squared prediction errors and JS divergence according to claim 1, wherein: In step S1 X train =[x train_1 ,x train_2 ,…,x train_m ]∈R n×m , where n is the n moments of historical production data of normal industrial operation process, and m is the number of observed variables at each moment; for x train To standardize, x train (t) = [x train_1 (t),x train_2 (t),…,x train_m (t)], where t is the tth row of the data matrix, μ i and σ i They represent data x respectively. train_i The mean and variance of (t), The standardized training set data matrix is represented as X train_std .
3. The method for detecting minor faults based on the sum of squared prediction errors and JS divergence according to claim 1, wherein: In step S2, eigenvalue decomposition is performed on S to obtain a load matrix P: Where S represents the covariance matrix; Λ is a diagonal matrix, which is also the eigenvalue matrix of S, and its diagonal elements satisfy λ1≥λ2≥…λ m ; V is the eigenvector matrix of S, with dimension m×m, P is the first r columns of V, with dimension m×r, containing information of all the main elements, It is the remaining mr columns of V, with dimension m×(mr), containing non-pivot information. P is called the loading matrix and is composed of the first r eigenvectors of S; X train_std Decompose to obtain the principal subspace and residual subspace; in, is the principal element subspace; is the residual subspace, and the training set after PCA dimensionality reduction is X train_pca ; The score matrix T of the training set data train ∈R n×r for: T train =X train_std P=[t train_1 ,t train_2 ,…,t train_r ]#(4) The score matrix T of the test set data test ∈R n×r for: T test =X test_std P=[t test_1 ,t test_2 ,…,t test_r ]#(5)。 4. The method for detecting minor faults based on the sum of squared prediction errors and JS divergence according to claim 1, wherein: The SPE statistic SPE in step S3 tr Defined as: SPE tr =X train_std T (I-PP T )(I-PP T )X train_std #(6) Where I is the m×m identity matrix.
5. The method for detecting minor faults based on the sum of squared prediction errors and JS divergence according to claim 1, wherein: In step S5, the JS divergence between the distribution and the reference probability density function is calculated. Slide the sliding window backward with a step size of 1 in, Refers to statistics The probability density function f(x) and the statistic SPE tr The KL divergence between the probability density function h(x) m(x) refers to the statistic and statistic SPE tr The probability density function of the mixture is, Refers to statistics The probability density function f(x) and the statistic SPE tr The JS divergence between the probability density function h(x) If and only if f(x)=h(x), In addition, KL divergence is non-negative, that is And KL divergence is asymmetric, so So if the data has the same probability distribution but is calculated using the opposite distribution formula, KL divergence will produce two different asymmetric quantities, but JS divergence is symmetric, that is A fixed sliding window width of w = 100 is selected. During online monitoring, when time i < 100, the online data in the sliding window does not reach the window width w. At this time, the divergence value cannot be calculated, and there is a certain detection delay. In order to ensure that the number of data collected within the sliding window width at each moment is always w, and considering the real-time nature of time series data, it is selected that at the i-th moment, the last wi data of the training set and the first i data of the online test are combined into a sliding window until i ≥ 100.
6. The method for detecting minor faults based on the sum of squared prediction errors and JS divergence according to claim 1, wherein: In step S6, the confidence level α is set to 0.
99. Obtained Determine statistics using kernel density estimation The control limit η limit (α), as shown below: Where p(z) is the probability density function of the random variable z.
7. The method for detecting minor faults based on the sum of squared prediction errors and JS divergence according to claim 1, wherein: In step S7, the k-th moment is compared and control limit η limit (α) and the following logic is used for fault detection: If the statistic at the kth moment Below the control limit η limit (α), it indicates that the current industrial operation process is a normal industrial operation process; If the statistic at the kth moment Above the control limit η limit (α), it indicates that the current industrial operation process is a faulty industrial operation process.
Citation Information
Cited By
Process tiny fault detection method based on local probability sliding window
CN121659810A
A method for detecting minor process faults based on local probability sliding window
CN121659810B