A Fault Diagnosis Method Based on Generative Adversarial Network and Autoencoder
Through the combination of one-dimensional convolution generation adversarial network and autoencoder, high-quality fault samples are generated and feature extraction capabilities are improved, which solves the problems of insufficient data and difficulty in feature extraction in mechanical equipment fault diagnosis, and achieves higher diagnostic accuracy and generalization capabilities.
Patent Information
- Application Number
- CN202210928347.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-08-03
AI Technical Summary
In practical applications, there are problems in mechanical equipment fault diagnosis with fewer fault data samples and low quality of generated data, which leads to limited application of deep learning methods, and the complexity of fault signals leads to difficulty in feature extraction, affecting diagnostic accuracy.
A one-dimensional convolution generation adversarial network is used to generate high-quality fault samples, and a failure classification model is built with a one-dimensional convolutional autoencoder, and a related entropy loss function and cross entropy loss function are used for training to improve feature extraction capabilities, and a fault diagnosis method based on a generation adversarial network and autoencoder is constructed.
By generating high-quality fault samples and improving feature extraction capabilities, the accuracy of mechanical equipment fault diagnosis and model generalization capabilities are improved, and the problem of insufficient fault data is solved.
Smart Images

Figure CN115238747B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of mechanical equipment fault diagnosis, and specifically relates to a fault diagnosis method based on a generative adversarial network and an autoencoder. Background Art
[0002] In modern industry, once mechanical equipment fails during operation, it will cause huge economic losses, endanger the safety of workers, and even have a serious impact on the entire project. Therefore, it is particularly important to use fault diagnosis technology to diagnose the health status of mechanical equipment.
[0003] In recent years, with the continuous development of advanced sensing technology, industrial big data technology, and artificial intelligence technology, deep learning has been widely used in mechanical equipment fault diagnosis. Deep learning-based fault diagnosis methods require a large number of fault data samples. However, in practical engineering applications, collecting a large number of fault samples is difficult. Therefore, this also restricts the application of deep learning in the field of fault diagnosis.
[0004] In 2014, Goodfellow et al. proposed the Generative Adversarial Network (GAN) and demonstrated its powerful ability to generate data. This led some researchers to explore its application in fault diagnosis. Despite its powerful data generation capabilities, GANs are prone to training instability and poor sample quality. Enabling GANs to learn the distribution of real data and generate meaningful samples is key to their application in fault diagnosis.
[0005] In addition to addressing the limited number of real samples, we also need to find ways to improve fault diagnosis accuracy. Because fault signals are complex and may contain a significant amount of noise, extracting latent features from these signals is crucial for improving fault diagnosis accuracy. Autoencoders, as unsupervised learning models, possess powerful feature learning capabilities, but traditional autoencoders are often inadequate for complex data such as vibration signals. Summary of the Invention
[0006] The purpose of the present invention is to provide a fault diagnosis method based on a generative adversarial network and an autoencoder, which solves the problems of small number of fault data samples and low quality of generated data in actual scenarios.
[0007] To achieve the above object, the technical solution adopted by the present invention is:
[0008] A fault diagnosis method based on a generative adversarial network and an autoencoder is used for mechanical equipment fault diagnosis. The fault diagnosis method based on a generative adversarial network and an autoencoder comprises:
[0009] Step 1: Collect vibration signals of mechanical equipment in a fault state and perform preprocessing;
[0010] Step 2: Send the preprocessed real samples into the one-dimensional convolutional generative adversarial network for training to obtain the generator;
[0011] Step 3: Use the generator to generate fault samples and build a fault training set based on real samples;
[0012] Step 4: construct a one-dimensional convolutional autoencoder, and use the fault training set to train the one-dimensional convolutional autoencoder to obtain a fault classification model;
[0013] Step 5: Use the fault classification model to classify the vibration signal of the mechanical equipment to be detected, and realize fault diagnosis for the mechanical equipment;
[0014] The one-dimensional convolutional generative adversarial network consists of a generator and a discriminator. The generator consists of four convolutional layers and three upsampling layers, and an upsampling layer is connected after each convolutional layer of the first three convolutional layers. The discriminator consists of four convolutional layers, four pooling layers, and a fully connected layer. Each convolutional layer in the discriminator is connected after a pooling layer, and finally the output is from the fully connected layer.
[0015] Among them, the one-dimensional convolutional autoencoder consists of an encoding layer and a decoding layer. The encoding layer consists of three convolutional layers, three pooling layers and a Flatten layer. A pooling layer is connected after each convolutional layer, and finally the Flatten layer transitions to the decoding layer; the decoding layer consists of three convolutional layers and two upsampling layers. Each of the first two convolutional layers in the decoding layer is connected after an upsampling layer, and the last convolutional layer is a convolutional layer with 1 convolution kernel, a convolution kernel size of 3×1, and a stride of 1.
[0016] Several optional methods are also provided below, but they are not intended to be additional limitations on the above-mentioned overall solution. They are merely further supplements or optimizations. Under the premise that there are no technical or logical contradictions, each optional method can be combined separately for the above-mentioned overall solution, or multiple optional methods can be combined.
[0017] Preferably, the preprocessing is a standard normalization method.
[0018] Preferably, the generating of the fault sample by using a generator includes:
[0019] The obtained generator is used to input 1×150 dimensional random noise that satisfies the normal distribution to generate several fault samples for sample expansion.
[0020] Preferably, the method of using the fault training set to train the one-dimensional convolutional autoencoder to obtain a fault classification model includes: a pre-training stage and a fine-tuning stage;
[0021] The pre-training stage includes: using the fault training set to pre-train the one-dimensional convolutional autoencoder, the loss function of the pre-training stage is the correlation entropy loss function, and entering the fine-tuning stage after the pre-training reaches the end condition;
[0022] The fine-tuning stage includes: taking the one-dimensional convolutional autoencoder after pre-training, removing the decoding layer in the one-dimensional convolutional autoencoder, fixing the parameters of the encoding layer, directly connecting the encoding layer to the classifier, and using the fault training set to fine-tune the parameters of the classifier to obtain a fault classification model. The loss function in the fine-tuning stage is the cross-entropy loss function.
[0023] Preferably, the fault training set needs to be preprocessed before being used for one-dimensional convolutional autoencoder training. The preprocessing of the fault training set is: performing FFt transformation on the samples in the constructed fault training set, transforming the time domain signal into a frequency domain signal, and the transformed samples are transformed from 1×1200-dimensional data to 1×600-dimensional data.
[0024] Preferably, the relevant entropy loss function is expressed as:
[0025]
[0026] Where L is the relevant entropy loss function, y is the predicted value output by the one-dimensional convolutional autoencoder, is the true value, and σ is the width parameter of the function.
[0027] The fault diagnosis method based on a generative adversarial network and an autoencoder, provided by this invention, utilizes a one-dimensional convolutional neural network to construct a generative adversarial network. This network is capable of learning the data distribution of real fault samples and generating high-quality fault samples. To discover potential features from fault samples and improve the accuracy of fault diagnosis, this method uses a one-dimensional convolutional neural network to construct an autoencoder model. The correlated entropy loss function replaces the mean square error (MSE) loss function, reducing the impact of signal noise on model training and improving the feature extraction capability of the autoencoder model. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 This is a block diagram of the fault diagnosis method based on a generative adversarial network and an autoencoder according to the present invention;
[0029] Figure 2 Flowchart of a fault diagnosis method based on a generative adversarial network and an autoencoder according to the present invention;
[0030] Figure 3This is a model structure diagram of the one-dimensional convolutional generative adversarial network of the present invention;
[0031] Figure 4 This is a structural diagram of the one-dimensional convolutional autoencoder model of the present invention;
[0032] Figure 5 This is a structural diagram of the fault classification model ultimately used for fault diagnosis in the present invention;
[0033] Figure 6 Schematic diagram of the gradient of the relevant entropy loss function of the present invention;
[0034] Figure 7 A graph showing the evolution of a signal generated in the experiment of the present invention versus the number of model iterations;
[0035] Figures 8 to 10 This is a comparison chart of the spectrum of various generated data and original data in the experiment of the present invention;
[0036] Figure 11 This is a schematic diagram of the diagnostic accuracy of different methods in the experiment of the present invention;
[0037] Figure 12 Schematic diagram for comparing the generalization capabilities of different methods in the experiment of the present invention;
[0038] Figure 13 Schematic diagram for comparing the feature extraction performance of the one-dimensional convolutional autoencoder in the experimental group of the present invention. DETAILED DESCRIPTION
[0039] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0041] In one embodiment, in order to solve the problem of insufficient fault data samples and low quality of generated data in mechanical equipment fault diagnosis in actual scenarios, Figure 1As shown, a fault diagnosis method based on a generative adversarial network and an autoencoder is provided. This method includes three steps: data acquisition, fault dataset construction, and diagnosis. Fault data is acquired through data acquisition and used as a true fault training set. The fault data is then fed into a generative network to generate samples. These samples, combined with the true fault training set, serve as the final fault training set for diagnosis. This method overcomes the problem of sample shortage and low fault diagnosis accuracy in existing technologies.
[0042] Specifically, such as Figure 2 As shown, the fault diagnosis method based on the generative adversarial network and the autoencoder of this embodiment includes the following steps:
[0043] Step 1: Collect vibration signals of mechanical equipment in a fault state and perform preprocessing.
[0044] The vibration signal is collected by using an acceleration sensor. After collecting the vibration signal of the faulty equipment, the data is preprocessed. The preprocessing method is standard normalization: y = (xx min ) / (x max -x min ), where y and x are samples before and after normalization, respectively, and x max is the maximum value of the data sample, x min is the minimum value of the data sample.
[0045] Step 2: Send the preprocessed real samples into the one-dimensional convolutional generative adversarial network for training to obtain the generator.
[0046] like Figure 3 As shown, the one-dimensional convolutional generative adversarial network in this embodiment consists of a generator and a discriminator. The generator consists of four convolutional layers and three upsampling layers, and an upsampling layer is connected after each convolutional layer of the first three convolutional layers; the discriminator consists of four convolutional layers, four pooling layers and a fully connected layer. Each convolutional layer in the discriminator is connected after a pooling layer, and finally the output is from the fully connected layer.
[0047] That is, the generator of this embodiment is manifested as a network structure consisting of four convolutional layers and three upsampling layers, and the input data is 1×150-dimensional random noise that obeys the normal distribution; in the generator, each convolutional layer is connected to the upsampling layer, and the input data is finally converted into 1×1200-dimensional data; the convolution kernel size of all upsampling layers is 2×1, and the step size is 2; the number of convolution kernels of convolution layer 1 is 32, the convolution kernel size is 3×1, the step size is 1, and the activation function is the Rule activation function; the number of convolution kernels of convolution layer 2 is 32, the convolution kernel size is 3×1, the step size is 1, and the activation function is the Rule activation function; the number of convolution kernels of convolution layer 3 is 16, the convolution kernel size is 3×1, the step size is 1, and the activation function is the Rule activation function; the number of convolution kernels of convolution layer 4 is 1, the convolution kernel size is 3×1, the step size is 1, and the activation function is the Tanh activation function.
[0048] The difference between the generator of this embodiment and the conventional one-dimensional convolutional generative adversarial network is that a combination of convolutional layer and upsampling layer is used to replace the deconvolution layer to improve the quality of signal generation; batch normalization operation is introduced after each convolution operation to enhance the generalization ability of the model; Rule activation function is selected to improve the quality of signal generation while avoiding the gradient vanishing phenomenon during training; the last layer of the generator uses a one-dimensional convolution layer with 1 convolution kernel, a convolution kernel size of 3×1, and a step size of 1, and the activation function is the Tanh activation function to achieve the generation of the final signal sample.
[0049] The discriminator of this embodiment is a network structure composed of four convolutional layers, four pooling layers, and one fully connected layer. The input data is 1×1200 dimensional data. In the discriminator, each convolutional layer is connected to a pooling layer to reduce the dimensionality of the data. The fully connected layer outputs a label value of 0 or 1 to represent whether the input data is a real sample. The convolution kernel size of all pooling layers is 2×1 and the stride is 2. The number of convolution kernels in convolution layer 1 is 64, the convolution kernel size is 3×1, the stride is 1, and the activation function is Le akyRelu activation function; the number of convolution kernels of convolution layer 2 is 32, the convolution kernel size is 3×1, the step size is 1, and the activation function is LeakyRelu activation function; the number of convolution kernels of convolution layer 3 is 16, the convolution kernel size is 3×1, the step size is 1, and the activation function is LeakyRelu activation function; the number of convolution kernels of convolution layer 4 is 8, the convolution kernel size is 3×1, the step size is 1, and the activation function is LeakyRelu activation function; the activation function of the fully connected layer is Sigmoid activation function.
[0050] The discriminator of this embodiment is composed of a one-dimensional convolutional layer, a pooling layer, and a fully connected layer. It uses a small convolution kernel and a small step size to extract delicate features in the sample. The pooling layer is connected after the convolutional layer to change the width of the feature map, reduce network parameters and computational complexity, and retain important features. The fully connected layer is used to output 0 or 1 to represent whether the input data is a real sample.
[0051] The training process of the one-dimensional convolutional generative adversarial network in this embodiment is as follows:
[0052] Randomly select fault vibration signals {x1,x2,x3,…x m}, recorded as x, input x into the discriminator D, and obtain D(x); select n noises {z1,z2,z3,…z m}, recorded as z, input z into the generator G to generate G(z), input G(z) into the discriminator D, and obtain D(G(z)).
[0053] Since the goal of the generative adversarial network is that the generator can generate samples as close to the real samples as possible, and the discriminator can distinguish the real samples from the generated samples as much as possible, the target loss function is specifically defined as E is the expectation, P data is the probability distribution of the true sample x; P z is the prior distribution of the random vector z, such as Gaussian distribution.
[0054] Train m batches according to the above method, and iteratively train the discriminator D and the generator G until a Nash equilibrium is reached between the discriminator D and the generator G. After the generator and the discriminator reach a Nash equilibrium, remove the discriminator and retain the generator.
[0055] Step 3: Use the generator to generate fault samples and build a fault training set based on real samples.
[0056] In one embodiment, constructing a training set for fault classification model training includes: using the obtained generator, inputting n×150-dimensional random noise that satisfies the normal distribution, generating n fault samples for use as expansion samples, and the number of generated samples is determined according to actual conditions; mixing the generated n fault samples with the collected m real fault samples as a fault training set.
[0057] This embodiment uses a generator to expand samples and retains real samples for mixing to obtain the final fault training set, ensuring that the fault training set contains sufficient data and retains the characteristics of real samples.
[0058] Step 4: Construct a one-dimensional convolutional autoencoder and use the fault training set to train the one-dimensional convolutional autoencoder to obtain a fault classification model.
[0059] In one embodiment, in order to fully utilize the useful information in the fault signal, the fault training set needs to be preprocessed before being used for one-dimensional convolutional autoencoder training. The preprocessing of the fault training set is: performing FFt transformation on the samples in the constructed fault training set to transform the time domain signal into a frequency domain signal. The transformed samples are transformed from 1×1200-dimensional data to 1×600-dimensional data.
[0060] like Figure 4 As shown, the one-dimensional convolutional autoencoder of this embodiment consists of an encoding layer and a decoding layer. Through training, the output of the decoding layer is made close to the input of the encoding layer, thereby learning the potential features of the input samples. The encoding layer consists of three convolutional layers, three pooling layers, and a flatten layer. A pooling layer is connected after each convolutional layer, and finally the flatten layer transitions to the decoding layer. The decoding layer consists of three convolutional layers and two upsampling layers. Each of the first two convolutional layers in the decoding layer is connected after an upsampling layer. The last convolutional layer is a convolutional layer with 1 convolution kernel, a convolution kernel size of 3×1, and a stride of 1.
[0061] The encoding layer is responsible for encoding the input and consists of three convolutional pooling layers and a Flatten layer; the input is 1×600 dimensional data; the convolution kernel size of all pooling layers is 2×1, and the step size is 2; the number of convolution kernels in convolution layer 1 is 16, the convolution kernel size is 3×1, the step size is 1, and the activation function is the Relu activation function; the number of convolution kernels in convolution layer 2 is 8, the convolution kernel size is 3×1, the step size is 1, and the activation function is the Relu activation function; the number of convolution kernels in convolution layer 3 is 8, the convolution kernel size is 3×1, the step size is 1, and the activation function is the Relu activation function; the Flatten layer is responsible for flattening the extracted features.
[0062] The encoding layer consists of a one-dimensional convolution layer and a pooling layer. To improve the ability to extract delicate features in the signal, the one-dimensional convolution layer uses a small convolution kernel and a small step size. By inserting a pooling layer after the convolution layer to change the width of the feature map, the network parameters and computational complexity are reduced while retaining important features. Relu is used as the activation function to avoid the gradient vanishing phenomenon during training and obtain a sparse representation of the features. The Flatten layer is used to flatten the extracted features to avoid introducing additional training parameters and reduce the risk of overfitting of the model.
[0063] The decoding layer is responsible for reconstructing the input and consists of two upsampling layers and three convolutional layers; the convolution kernel size of all upsampling layers is 2×1, and the step size is 2; the number of convolution kernels in convolution layer 1 is 8, the convolution kernel size is 3×1, the step size is 1, and the activation function is the Relu activation function; the number of convolution kernels in convolution layer 2 is 8, the convolution kernel size is 3×1, the step size is 1, and the activation function is the Relu activation function; the number of convolution kernels in convolution layer 3 is 1, the convolution kernel size is 3×1, the step size is 1, and the activation function is the Relu activation function, so that the output is 1×600-dimensional data.
[0064] The decoding layer consists of a one-dimensional convolution layer and an upsampling layer. The convolution layer also uses small convolution kernels and small step sizes to extract potential delicate features. The signal is reconstructed by upsampling after convolution, avoiding the shortcomings of low resolution and information loss in the deconvolution layer. Relu is used as the activation function to avoid the gradient vanishing phenomenon during training. The last layer of the decoding layer is a convolution layer with 1 convolution kernel, a convolution kernel size of 3×1, and a step size of 1, which is used to output the final reconstructed signal.
[0065] like Figure 5 As shown in FIG, the convolutional autoencoder is trained using the training set to obtain a fault classification model, including: a pre-training stage and a fine-tuning stage.
[0066] The pre-training stage includes: using the fault training set to pre-train the one-dimensional convolutional autoencoder. The loss function in the pre-training stage is the related entropy loss function. After the pre-training reaches the end condition, it enters the fine-tuning stage.
[0067] In this embodiment, when training a one-dimensional convolutional autoencoder, a loss function is constructed using correlation entropy to replace the commonly used MSE loss function as the reconstruction error loss of the one-dimensional convolutional autoencoder, so as to reduce the impact of non-Gaussian noise in the data on the one-dimensional convolutional autoencoder training; the correlation entropy loss function is expressed as:
[0068]
[0069] Where y is the predicted value, is the true value, and σ is the width parameter of the function. The gradient of the related entropy loss function is as follows Figure 6 As shown in the figure, it can be seen that the gradient of the related entropy loss function is limited to a certain range compared to the commonly used MSE loss function, and the gradient is not too large due to abnormal values.
[0070] The fine-tuning stage includes: taking the one-dimensional convolutional autoencoder after pre-training, removing the decoding layer in the one-dimensional convolutional autoencoder, fixing the parameters of the encoding layer, directly connecting the encoding layer to the classifier, and using the fault training set to fine-tune the parameters of the classifier to obtain a fault classification model. The loss function in the fine-tuning stage is the cross-entropy loss function.
[0071] Step 5: Use the fault classification model to classify the vibration signals of the mechanical equipment to be detected to achieve fault diagnosis for the mechanical equipment.
[0072] The fault diagnosis method based on generative adversarial networks and autoencoders in this embodiment uses a one-dimensional convolutional neural network to build a generative adversarial network, which to a certain extent solves the problems of unstable training and poor data generation quality of traditional generative adversarial networks; uses a one-dimensional convolutional neural network to build an autoencoder, which improves the feature extraction capability of the autoencoder and improves the accuracy of fault diagnosis; combines the one-dimensional convolutional generative adversarial network with the one-dimensional convolutional autoencoder, which to a certain extent solves the problem of lack of fault samples in practical applications of data-driven fault diagnosis methods.
[0073] In order to more clearly understand the technical solution and effects of the present invention, a detailed description is given below in conjunction with a specific embodiment.
[0074] This embodiment provides a fault diagnosis method based on a generative adversarial network and an autoencoder. First, a small number of real fault samples are fed into a one-dimensional convolutional generative adversarial network for training. The resulting generator is used to generate fault samples as augmented samples to construct a fault training set. A one-dimensional convolutional autoencoder is then constructed, and the samples in the fault training set are Fourier transformed (FFt) and fed into a one-dimensional convolutional autoencoder for training. The MSE loss function is replaced by the correlation entropy loss function as the loss function of the one-dimensional convolutional autoencoder. The newly proposed diagnostic model can directly use one-dimensional acceleration vibration signals for sample augmentation and fault classification model training, effectively improving the accuracy of fault diagnosis with small samples.
[0075] In this embodiment, the specific parameters obtained by parameter adjustment in the training of the one-dimensional convolutional generative adversarial network model are shown in Table 1:
[0076] Table 1 Parameters of one-dimensional convolutional generative adversarial network
[0077]
[0078]
[0079] In this embodiment, for the training of a one-dimensional convolutional autoencoder, the model parameters obtained by parameter adjustment are shown in Table 2:
[0080] Table 2 Parameters of one-dimensional convolutional autoencoder
[0081]
[0082] This example uses a faulty bearing dataset from Case Western Reserve University in the United States to validate the proposed method. This dataset collects acceleration signals from bearings with inner race, outer race, and rolling element faults, as well as normal bearings, under different operating conditions. To ensure that the information contained in the vibration signals is not lost, 1,000 data samples were selected for each fault state and operating condition. Details of the dataset are shown in Table 3, with A, B, and C corresponding to the three different operating conditions.
[0083] Table 3 Details of the dataset
[0084] Dataset A (number of samples) B (number of samples) C (number of samples) Inner race fault 1000 1000 1000 Outer ring failure 1000 1000 1000 Rolling element failure 1000 1000 1000
[0085] To verify the data generation capability of the one-dimensional convolutional generative adversarial network, 500 samples in each state in dataset A are input into the one-dimensional convolutional generative adversarial network for training. After the generator and the discriminator reach Nash equilibrium, the generator is retained to generate samples. Figure 7 The generated time domain waveform changes with the number of iterations. It can be seen that the quality of the generated signal gets better and better as the number of iterations increases. Figures 8 to 10 It can be seen that under different fault conditions, although the time domain waveforms of the real samples and the generated samples are different, the frequency domain distributions of the real samples and the generated samples are similar, indicating that the one-dimensional convolutional generative adversarial network can learn the approximate distribution of the data.
[0086] In order to prove the accuracy of the fault diagnosis method of the present invention, single working condition and variable working condition experiments were carried out respectively.
[0087] First, a diagnostic test under a single working condition was conducted. 50% of the samples in dataset A were used to construct a training set containing 5,000 samples using a one-dimensional convolutional generative adversarial network for training the one-dimensional convolutional autoencoder model. The remaining 50% of the samples were used for classification testing. In order to verify the effectiveness of the one-dimensional convolutional autoencoder model, it was compared with the diagnostic methods of MSE+DAE and time-frequency features+LGB. Each method was tested 5 times and the average value was taken. Figure 11 It can be seen that the diagnostic results of this method are ideal and the accuracy is high.
[0088] Then, in order to verify the generalization ability of the proposed model under different working conditions, samples under one working condition are used for training one-dimensional convolutional generative adversarial network and one-dimensional convolutional autoencoder respectively, and samples under other working conditions are used as tests. "AB" means that dataset A is used for training and real data B is used for testing, and so on for other conditions. At the same time, the results are compared with those of the MSE+DAE method and the time domain feature+LGB method. Figure 12 It can be seen intuitively that the MSE+DAE method and the time domain feature+LGB method have poor generalization performance, while the model proposed in this article has good generalization ability, which shows that the convolutional autoencoder can extract more essential features, making the model have better generalization ability.
[0089] In order to intuitively demonstrate the feature extraction capability of the one-dimensional convolutional autoencoder, the t-SNE dimensionality reduction visualization method is used to reduce the dimensionality of the features extracted by the one-dimensional convolutional autoencoder and cluster them, and compare them with the time domain features extracted manually. Figure 13 It can be seen that the features extracted by the one-dimensional convolutional autoencoder have clear boundaries between categories, indicating that the features extracted by the one-dimensional convolutional autoencoder have the ability to distinguish fault categories.
[0090] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0091] The above-described embodiments merely illustrate several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that a person skilled in the art would be able to make numerous modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A fault diagnosis method based on generative adversarial networks and autoencoders for mechanical equipment fault diagnosis, characterized in that: The fault diagnosis method based on a generative adversarial network and an autoencoder comprises: Step 1: Collect vibration signals of mechanical equipment in a fault state and perform preprocessing; Step 2: Send the preprocessed real samples into the one-dimensional convolutional generative adversarial network for training to obtain the generator; Step 3: Use the generator to generate fault samples and build a fault training set based on real samples; Step 4: construct a one-dimensional convolutional autoencoder, and use the fault training set to train the one-dimensional convolutional autoencoder to obtain a fault classification model; Step 5: Use the fault classification model to classify the vibration signal of the mechanical equipment to be detected, and realize fault diagnosis for the mechanical equipment; The one-dimensional convolutional generative adversarial network consists of a generator and a discriminator. The generator consists of four convolutional layers and three upsampling layers, and an upsampling layer is connected after each convolutional layer of the first three convolutional layers. The discriminator consists of four convolutional layers, four pooling layers, and a fully connected layer. Each convolutional layer in the discriminator is connected after a pooling layer, and finally the output is from the fully connected layer. Among them, the one-dimensional convolutional autoencoder consists of an encoding layer and a decoding layer. The encoding layer consists of three convolutional layers, three pooling layers and a Flatten layer. A pooling layer is connected after each convolutional layer, and finally the Flatten layer transitions to the decoding layer; the decoding layer consists of three convolutional layers and two upsampling layers. Each of the first two convolutional layers in the decoding layer is connected after an upsampling layer, and the last convolutional layer is a convolutional layer with 1 convolution kernel, a convolution kernel size of 3×1, and a stride of 1.
2. The fault diagnosis method based on a generative adversarial network and an autoencoder according to claim 1, wherein: The preprocessing is a standard normalization method.
3. The fault diagnosis method based on a generative adversarial network and an autoencoder according to claim 1, wherein: The generating of the fault sample by using a generator includes: The obtained generator is used to input 1×150 dimensional random noise that satisfies the normal distribution to generate several fault samples for sample expansion.
4. The fault diagnosis method based on a generative adversarial network and an autoencoder according to claim 1, wherein: The method of training the one-dimensional convolutional autoencoder using the fault training set to obtain a fault classification model includes: a pre-training stage and a fine-tuning stage; The pre-training stage includes: using the fault training set to pre-train the one-dimensional convolutional autoencoder, the loss function of the pre-training stage is the correlation entropy loss function, and entering the fine-tuning stage after the pre-training reaches the end condition; The fine-tuning stage includes: taking the one-dimensional convolutional autoencoder after pre-training, removing the decoding layer in the one-dimensional convolutional autoencoder, fixing the parameters of the encoding layer, directly connecting the encoding layer to the classifier, and using the fault training set to fine-tune the parameters of the classifier to obtain a fault classification model. The loss function in the fine-tuning stage is the cross-entropy loss function.
5. The fault diagnosis method based on generative adversarial network and autoencoder according to claim 4, characterized in that: The fault training set needs to be preprocessed before being used for one-dimensional convolutional autoencoder training. The preprocessing of the fault training set is: performing FFt transformation on the samples in the constructed fault training set, transforming the time domain signal into a frequency domain signal, and the transformed samples are transformed from 1×1200-dimensional data to 1×600-dimensional data.
6. The fault diagnosis method based on a generative adversarial network and an autoencoder according to claim 4, characterized in that: The relevant entropy loss function is expressed as: Where L is the relevant entropy loss function, y is the predicted value output by the one-dimensional convolutional autoencoder, is the true value, and σ is the width parameter of the function.