A small sample fault diagnosis method and device and a storage medium
By reconstructing adversarial networks to generate synthetic data and assisting in support vector machine training, the problems of low classification accuracy and scarce samples in imbalanced data in industrial fault diagnosis are solved, achieving higher classification accuracy and fault diagnosis precision.
Patent Information
- Application Number
- CN202211042005.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-29
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-08-29
AI Technical Summary
Existing technologies suffer from low classification accuracy when dealing with imbalanced data in industrial fault diagnosis. Traditional methods cannot differentiate between a few types of faults, and the small number of samples results in insufficient feature information, making it difficult to effectively train models.
We employ a reconstruction adversarial network-based approach, which generates synthetic data through generative adversarial networks to assist in the training of support vector machines, perform data filtering and reconstruction, and improve the performance of the classifier.
It improves classification accuracy and fault diagnosis precision under imbalanced data, enhances the judgment ability of the convolutional discriminator, and ensures that the classifier can be effectively trained and diagnosed under conditions of scarce samples.
Smart Images

Figure CN115358337B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of industrial fault diagnosis, and in particular to a small sample fault diagnosis method and device based on a reconstructed adversarial network and a storage medium. BACKGROUND
[0002] Data-driven intelligent industrial fault diagnosis algorithms have important research significance. In actual industrial production processes, there is often an uneven distribution of the relative number of various types of fault data. Traditional learning methods aim to improve overall accuracy and treat individual samples equally, often failing to promptly detect the presence of minority class faults, leading to serious consequences. In addition, this type of fault often faces the problem of absolute data scarcity, further increasing the difficulty of model training, making it difficult to fully extract fault features.
[0003] In recent years, artificial intelligence algorithms based on deep learning have developed rapidly. Generative Adversarial Network (GAN) is an unsupervised learning model based on game theory, with great research value and optimization potential in terms of data generation performance and framework flexibility.
[0004] Generative Adversarial Network (GAN) is an innovative network architecture based on game theory proposed by Ian Goodfellow et al. at the 2014 NIPS conference. The main idea is to continuously optimize through internal discriminator (D) and generator (G) mutual game, so as to achieve the generation effect of false appearance.
[0005] Support Vector Machine (SVM) is a commonly used supervised learning classifier model, which aims to find the optimal classification hyperplane based on input sample data. It has a wide range of applications in pattern recognition, regression analysis, etc.
[0006] Traditional classifier algorithms including SVM cannot distinguish between industrial imbalanced data, and ultimately result in a model that always returns positive classes. This result completely ignores the existence of fault data, which may lead to serious consequences in practical applications.
[0007] Industrial fault data has characteristics such as high dimension, multiple categories, and small sample size, making it difficult to use existing adversarial generation algorithms to effectively supplement the data. One-dimensional convolutional generative adversarial network is more suitable for industrial data fault diagnosis problems, but it does not consider the problem of insufficient feature information to support network convergence due to the absolute small number of samples. SUMMARY
[0008] The application aims to provide a small sample fault diagnosis method and device based on a reconstructed adversarial network and a storage medium, and solve the problems of low classification accuracy, inapplicable traditional classification methods and evaluation indexes, and neglect of fault data intra-class distance in the unbalanced data classification process.
[0009] The application aims to provide a small sample fault diagnosis method and device based on a reconstructed adversarial network and a storage medium, and solve the problems of low classification accuracy, inapplicable traditional classification methods and evaluation indexes, and neglect of fault data intra-class distance in the unbalanced data classification process.
[0010] A small sample fault diagnosis method based on a reconstructed adversarial network comprises the following steps:
[0011] Obtaining initial industrial data without labels;
[0012] Establishing a generative adversarial network, which comprises a generator composed of a deconvolution network and a discriminator composed of a convolution network, wherein the discriminator is used to assist the generator to generate synthetic data;
[0013] Conducting adversarial training on the generative adversarial network based on real industrial data samples and virtual industrial data samples;
[0014] Inputting the initial industrial data into the trained generative adversarial network to obtain a synthetic data training sample set containing new data;
[0015] Training an SVM classifier based on the initial industrial data;
[0016] Data screening: screening the new data by using the output of the SVM classifier, and updating the synthetic data training sample set based on the screened samples;
[0017] Reconstructing the SVM: reconstructing and training the SVM classifier based on the updated synthetic data training sample set;
[0018] Re-screening the data and reconstructing the SVM, and obtaining the reconstructed SVM classifier after repeating the preconfigured number of times;
[0019] Diagnosing the initial industrial data based on the reconstructed SVM classifier to obtain a fault diagnosis result.
[0020] The loss function of the generative adversarial network is:
[0021]
[0022] In the formula, G represents the generator, D represents the discriminator, z is the input random noise, x is the initial industrial data, min G max D V(D,G) indicates that the optimization goal of the discriminator is to maximize the objective function V, and the optimization goal of the generator is to minimize the objective function V.
[0023] The method for generating the synthetic data is specifically:
[0024]
[0025] In the formula, X1 represents existing fault category data, X1 and After superposition, the synthetic data is obtained.
[0026] The random noise z is input, and then mapped by using a full connection layer, and the dimension is expanded by using a deconvolution network to complete the dimension to be consistent with that of the industrial data.
[0027] The output size of the i-th layer of the deconvolution network is LO i For:
[0028] LI i = LO i-1
[0029] LO i = (LI i - 1) * S i - 2 * P i + K i
[0030] Wherein, LI i is the input parameter size of the i-th layer of the deconvolution network, S i is the step size of the i-th layer, P i is the completion value size of the i-th layer, and K i is the convolution kernel size of the i-th layer.
[0031] The deconvolution network is obtained based on a mirror structure of a convolution network.
[0032] The convolution network is used for completing feature extraction and fusion of the industrial data, analyzing output data of a last layer, obtaining a discrimination result, and assisting the generator to complete generation of the synthetic data, wherein a calculation formula of a convolution layer parameter of an (l+1)-th layer of the convolution network is:
[0033]
[0034] Wherein, f(z) is an activation function, * is a convolution operation, a parameter of the convolution layer of the i-th layer is a feature map set is M, a convolution kernel is k, and a bias parameter is b.
[0035] The activation function is a sigmoid function:
[0036]
[0037] A small sample fault diagnosis device based on a reconstruction adversarial network, comprising a memory, a processor, and a program stored in the memory, wherein the processor implements the method as described above when executing the program.
[0038] A storage medium having a program stored thereon, wherein the program implements the method as described above when executed.
[0039] Compared with the prior art, the present application has the following beneficial effects:
[0040] (1) The present application uses a generative adversarial network to fully mine the feature information of the classification sample with insufficient data, thereby effectively supplementing the sample, so that the SVM classifier can have enough samples when training and can converge faster, thereby improving the classification efficiency and classification effect of SVM under the condition of sample scarcity, overcoming the defect of ignoring the intra-class distance of fault data in the existing method, and still being able to distinguish when facing industrial unbalanced data, thereby completing fault diagnosis.
[0041] (2) The generative adversarial network of the present application assists the support vector machine training, extracts the feature information in the existing training data and the generated sample through the support vector machine, assists the sample screening of the adversarial network, iteratively trains the parameters of the SVM through data screening and reconstruction of the SVM, and the screened data has higher reliability, and the SVM parameters obtained through iterative training based on the screened data can better adapt to the classification under industrial unbalanced data, has higher classification accuracy, and improves the fault diagnosis precision.
[0042] (3) The present application trains the convolutional classification network through real samples and virtual samples, enhances the judgment ability of the convolutional discriminator, at the same time embeds the classification network into the training of the deconvolutional generator, assists the update iteration of the deconvolutional network, and finally synthesizes samples with higher reliability through game confrontation and mutual promotion. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 The method flowchart of the present application;
[0044] Figure 2 The structure diagram of the generative adversarial network;
[0045] Figure 3 The schematic diagram of the fault diagnosis framework. DETAILED DESCRIPTION
[0046] The present application will be described in detail below in combination with the drawings and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present application, and gives a detailed implementation manner and specific operation process, but the protection scope of the present application is not limited to the following embodiments.
[0047] The solution process of the industrial fault diagnosis problem is relatively complex, which can be divided as follows: firstly, the process monitoring work is carried out; then, the relevant operation data are recorded by using automatic instruments; and then, the fault detection and diagnosis work is carried out, which is the key of the problem. The data-based industrial fault diagnosis work needs to use the traditional method to manually mark the data of the fault state and the normal state, and then the marked data are introduced into the mathematical model for training. When the unlabeled test data are introduced, the previously trained mathematical model is called to carry out classification and prediction work. The final step is to compare the prediction result with the true result, and evaluate the quality of the trained model.
[0048] Therefore, the key point of the data-based industrial fault diagnosis problem is the classification problem of data. When facing the unbalanced data, the SVM algorithm will simply learn to classify all contents as the majority to maximize the margin, and the minority class has very small error accumulation due to the extremely small quantity. Therefore, the SVM cannot independently complete the industrial data fault diagnosis.
[0049] The application provides a small sample fault diagnosis method based on a reconstructed adversarial network, and a method flow chart is shown in Figure 1 The method comprises the following steps:
[0050] 1) obtaining initial industrial data without labels;
[0051] 2) establishing a generative adversarial network, and the structure is shown in Figure 2 The generative adversarial network comprises a generator G and a discriminator D, wherein the discriminator is used for assisting the generator to generate synthetic data.
[0052] The loss function of the generative adversarial network is:
[0053]
[0054] In the formula, G represents the generator, D represents the discriminator, z is input random noise, x is initial industrial data, min G max D V(D, G) represents that the optimization goal of the discriminator is to maximize the objective function V, and the optimization goal of the generator is to minimize the objective function V.
[0055] ① the generator
[0056] The generator is composed of a deconvolution network and is constructed based on a convolution network mirror, and is used for expanding the data structure.
[0057] The method for generating synthetic data by the generator is specifically as follows:
[0058]
[0059] In the formula, X1 represents existing fault category data, For the new fault category data generated by the generator using existing data, X1 and After superposition, the synthetic data is obtained.
[0060] The random noise z is input and mapped using a fully connected layer, and the dimension is expanded to be consistent with the dimension of the industrial data through the deconvolution network.
[0061] The output size of the i-th layer of the deconvolution network is LO i :
[0062] LI i = LO i-1
[0063] LO i = (LI i - 1) x S i - 2 x P i + K i
[0064] wherein LI i is the input parameter size of the i-th layer of the deconvolution network, S i is the step size of the i-th layer, P i is the completion value size of the i-th layer, and K i is the convolution kernel size of the i-th layer.
[0065] ② discriminator
[0066] The discriminator is composed of a convolution network, which is used to complete feature extraction and fusion of industrial data, and analyze the output data of the last layer to obtain a discrimination result, thereby assisting the generator to complete the generation of synthetic data. The calculation formula of the convolution layer parameters of the l+1-th layer of the convolution network is:
[0067]
[0068] wherein f(z) is an activation function, * is a convolution operation, the parameters of the l-th layer of the convolution layer are the feature map set is M, the convolution kernel is k, and the bias parameter is b.
[0069] The activation function is generally a sigmoid function:
[0070]
[0071] 3) based on the real industrial data samples and the virtual industrial data samples, the generative adversarial network is trained in an adversarial manner;
[0072] The constructed convolutional network and deconvolutional network are used for adversarial training, and the convolutional classification network is trained using real industrial data samples and virtual industrial data samples respectively to enhance the judgment ability of the convolutional discriminator; at the same time, the classification network is embedded in the training of the deconvolutional generator to assist the update iteration of the deconvolutional network, so as to finally synthesize the sample that is difficult to distinguish from the false through game confrontation and mutual promotion. However, the discriminator D is disturbed too much by the generation result, and can only be used for auxiliary generation, and cannot be directly used for data classification training; using the traditional generative adversarial network, the training of the deconvolutional network is prone to mode collapse and convergence difficulty problems.
[0073] 4) input the initial industrial data into the trained generative adversarial network to obtain a synthetic data training sample set containing new data;
[0074] 5) train the SVM classifier based on the initial industrial data;
[0075] 6) data screening: screening the new data using the output of the SVM classifier, and updating the synthetic data training sample set based on the screened samples;
[0076] 7) reconfigure the SVM: reconfigure and train the SVM classifier based on the updated synthetic data training sample set;
[0077] The reconfiguration logic is as follows:
[0078] CLF i+1 = SVM(CLF i , CLF i (G(z)))
[0079] According to the above formula, the classification model CLF0 based on support vector machine is preliminarily trained using the initial training sample, the output result of the deconvolutional neural network G is preliminarily screened using CLF0, the screened samples are fed back to the training sample set, the parameters of the classification model are iteratively retrained, and the CLF i has better performance and can better screen the output result of G.
[0080] 8) re-screen the data and reconfigure the SVM, and after repeating the preconfigured number of times, obtain the reconfigured SVM classifier;
[0081] 9) diagnose the initial industrial data based on the reconfigured SVM classifier to obtain a fault diagnosis result, decode the final diagnosis result into a corresponding fault category, thereby realizing industrial fault diagnosis under the condition of sample scarcity.
[0082] The fault diagnosis framework based on the above method is as follows: Figure 3As shown, by inputting random noise, the method of the application can generate synthetic data based on noise and a generative adversarial network, supplement samples, and continuously screen the supplemented data to reconstruct an SVM classifier, so that the SVM has more accurate classification performance.
[0083] If the above functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the application or parts of the prior art that contribute essentially or the parts of the technical solutions can be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in various embodiments of the application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0084] The present embodiment proves the feasibility and superiority of the method of the application based on the above method for industrial fault diagnosis of a water pump.
[0085] Vibration is a common phenomenon of water pumps. The present embodiment takes water pump data of a certain factory as an example to complete fault diagnosis.
[0086] First, relevant equipment is needed to record the data. When detecting water pump data, the horizontal, vertical, and axial directions of each measurement point need to be measured. In the measurement process of the present embodiment, one measurement point is taken from the front bearing and the rear bearing in turn, and the vibration frequency is measured. The data used in the present embodiment are collected under four running states of the water pump, and are marked as 0, 1, 2, and 3, respectively. Among them, 0 represents a normal running state, and 1-3 represent different fault running states. The actual number and proportion of each type of data are shown in Table 1.
[0087] Table 1 Water pump data
[0088]
[0089] The total amount of data used this time is only 1550, of which only 50 are class 1 data, and the remaining class data is 500. The absolute and relative numbers of samples do not meet the model training requirements.
[0090] A confusion matrix (as shown in Table 2) is introduced to evaluate the classification performance of the SVM classifier.
[0091] Table 2 Confusion matrix
[0092]
[0093] The calculation formula of recall rate is as follows:
[0094]
[0095] The calculation formula of precision rate is as follows:
[0096]
[0097] In the unbalanced classification process, the minority class is often focused on, and therefore the minority class recall rate Recall1 and the minority class comprehensive index F1-score1 are selected for observation and comparison.
[0098] The experimental comparison results are as follows by using the generative adversarial network and the reconstruction adversarial network respectively and comparing with SVM, SMOTE and ADASYN:
[0099] Table 3: Overall test index
[0100]
[0101] It can be found from Table 3 that the reconstruction adversarial network achieves better effects in terms of accuracy rate and F1-score on the overall data.
[0102] The above describes the preferred embodiments of the present application in detail. It should be understood that those skilled in the art can make many modifications and changes without creative labor based on the concept of the present application. Therefore, any technical solution obtained by logical analysis, reasoning or limited experiments based on the prior art according to the concept of the present application should be within the protection scope defined by the claims.
Claims
1. A small sample fault diagnosis method based on a reconstruction adversarial network, characterized in that, The method comprises the following steps: obtaining initial industrial data without labels; establishing a generative adversarial network comprising a generator composed of a deconvolution network and a discriminator composed of a convolution network, wherein the discriminator is used to assist the generator to generate synthetic data; adversarial training of the generative adversarial network based on real industrial data samples and virtual industrial data samples; inputting the initial industrial data into the trained generative adversarial network to obtain a synthetic data training sample set containing new data; training an SVM classifier based on the initial industrial data; data screening: screening the new data using the output of the SVM classifier, updating the synthetic data training sample set based on the screened samples; reconstructing the SVM: reconstructing and training the SVM classifier based on the updated synthetic data training sample set, and the reconstruction logic is as follows: CLF i+1 = SVM(CLF i , CLF i (G(z))) According to the above formula, the classification model CLF0 based on the support vector machine is initially trained using the initial training samples, the output result of the deconvolution neural network G is initially screened by using the CLF0, the samples screened through are fed back to the training sample set, the parameters of the classification model are iteratively retrained, and the classification model CLF i is obtained after reconstruction i times. re-screening the data and reconstructing the SVM, and obtaining the reconstructed SVM classifier after repeating the preconfigured number of times; diagnosing the initial industrial data based on the reconstructed SVM classifier to obtain a fault diagnosis result.
2. The method of claim 1, wherein the method is based on a reconstruction adversarial network. The loss function of the generative adversarial network is: In the formula, G represents a generator, D represents a discriminator, z is random noise input, x is initial industrial data, It is indicated that the optimization goal of the discriminator is to make the objective function V maximum, and the optimization goal of the generator is to make the objective function V minimum.
3. The method of claim 2, wherein the method is based on a reconstruction adversarial network. The method for the generator to generate synthetic data is specifically: In the formula, X1 represents existing fault category data, For the generator to generate new fault category data using existing data, X1 and After superposition, the synthetic data is obtained.
4. The method of claim 2, wherein the method is based on a reconstruction adversarial network. The random noise z is inputted, mapped by a full connection layer, expanded by a deconvolution network, and the dimension is completed to be consistent with the dimension of the industrial data.
5. The method of claim 3, wherein the method is based on a reconstruction adversarial network. The output size LO of the i-th layer of the deconvolution network is given by: i is given by: LI i = LO i-1 LO i = (LI i - 1) x S i - 2 x P i + K i wherein, L i is the input parameter size of the i-th layer deconvolution network, S i is the step size of the i-th layer, P i is the padding value size of the i-th layer, K i is the convolution kernel size of the i-th layer.
6. The method of claim 1, wherein the method is based on a reconstruction generative adversarial network. The deconvolution network is obtained based on a convolution network mirror structure.
7. The method of claim 1, wherein the method is based on a reconstruction generative adversarial network. The convolution network is used to complete feature extraction and fusion of the industrial data, analyze the output data of the last layer, obtain a discrimination result, and assist the generator to complete generation of the synthetic data, wherein the calculation formula of the (l+1)th convolution layer parameter of the convolution network is: Wherein, f(z) is an activation function, * is a convolution operation, and the parameters of the lth convolution layer are The feature map set is M, the convolution kernel is k, and the bias parameter is b.
8. The method of claim 7, wherein the method is based on a reconstruction adversarial network. The activation function is a sigmoid function: 9.A small sample fault diagnosis device based on a reconstruction adversarial network, comprising a memory, a processor, and a program stored in the memory, and the program is characterized in that, The processor implements the method of any one of claims 1-8 when executing the program.
10. A storage medium having stored thereon a program, characterized by The program is executed to implement the method of any one of claims 1-8.
Citation Information
Patent Citations
Transformer fault type diagnosis method based on semi-supervised SVM
CN110689068A