Fault sample generation method based on generative adversarial network
By generating high-quality simulated fault samples using generative adversarial networks and combining them with a random forest classifier, the problem of low accuracy in motor fault diagnosis under small sample conditions is solved, achieving efficient fault diagnosis under varying operating conditions and improving the model's generalization ability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2026-03-13
AI Technical Summary
Under small sample conditions, traditional deep learning models are difficult to train, resulting in low fault diagnosis accuracy. The lack of sufficient fault data samples leads to low accuracy in motor fault diagnosis.
Generative adversarial network algorithm is used to generate high-quality simulated fault samples. Combined with digital signal processing technology and random forest classifier, a fault diagnosis model is constructed through wavelet packet decomposition and feature extraction to realize fault diagnosis under varying operating conditions.
It improves the accuracy of motor fault diagnosis, expands the engineering application scope of the diagnostic model, enhances the generalization ability of the model, and overcomes the low accuracy of traditional diagnostic models under varying operating conditions.
Smart Images

Figure CN121655856A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of motor fault diagnosis, digital signal processing, and machine learning, specifically to a fault sample generation method based on generative adversarial networks. Background Technology
[0002] In mechanical and electronic systems, rolling bearings operate under complex conditions for extended periods, making them prone to various types of failures. Damage to rolling bearings can lead to significant economic losses and safety issues. Currently, an increasing number of researchers are studying preventative maintenance for motors, applying various algorithms based on historical data to provide early warnings of potential motor failures.
[0003] Therefore, research on rolling bearing fault diagnosis is of great significance in order to avoid such serious accidents. This is of great importance to the motor-related industry and to improving the efficiency of related enterprises. In engineering applications, the "small sample" condition means that fault data is difficult to collect in actual industrial production processes, i.e., there are very few fault samples. However, training a traditional deep learning model with good performance depends on a large number of data samples, making it difficult for the model to acquire sufficient diagnostic knowledge, resulting in low fault diagnosis accuracy.
[0004] In mechanical and electronic systems, rolling bearings operate under complex conditions for extended periods, making them prone to various types of failures. Damage to rolling bearings can lead to significant economic losses and safety issues. Currently, an increasing number of researchers are studying preventative maintenance of motors, applying various algorithms based on historical data to provide early warnings of potential motor faults. Research on rolling bearing fault diagnosis is crucial to preventing such serious accidents. This has significant implications for the motor-related industries and improving the efficiency of related enterprises. In engineering applications, the "small sample" condition—the difficulty in collecting fault data in actual industrial production processes, resulting in very few fault samples—while training a high-performance traditional deep learning model relies on a large number of data samples, makes it difficult for the model to acquire sufficient diagnostic knowledge, leading to low fault diagnosis accuracy.
[0005] Deep learning-based diagnostic methods are data-driven. However, for diagnostic objects where fault samples are difficult to obtain or where fault feature labels are lacking, deep learning models struggle to achieve high-precision diagnoses. One solution is to expand upon the limited fault samples by generating more simulation data. Therefore, how to generate high-quality simulation data and how to evaluate data quality are crucial for improving the accuracy of deep learning fault diagnosis models. Summary of the Invention
[0006] The purpose of this invention is to provide a motor fault diagnosis method based on generative adversarial networks (GANs) to generate fault samples in batches, thus solving the problem of poor model training under small sample conditions. This invention employs a GAN algorithm to efficiently learn the probability density distribution of training data samples through game theory, thereby efficiently generating simulation samples.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] A method for generating fault samples of motor vibration signals based on generative adversarial networks includes the following steps:
[0009] 1. Data Collection
[0010] Collect vibration acceleration data of the motor, including normal conditions and various fault conditions.
[0011] 2. Data Preprocessing
[0012] 2.1 Handling missing and outlier values in the data.
[0013] 2.2 Vibration signal stabilization: The constant load signal is extracted based on the vibration signal envelope, the rotation frequency is estimated based on the vibration signal spectrum, and then the signal is resampled at equal angles based on the rotation frequency.
[0014] 3. Modify spectral characteristics
[0015] The Fourier transform of the initial signal is given by the following formula:
[0016] Decompose x(n) into the sum of two sequences of even and odd numbers, i.e.
[0017] x(n) = x1(n) + x2(n)
[0018] Where x1(n) and x2(n) are both of length N / 2, x1(n) is an even sequence, and x2(n) is an odd sequence, then:
[0019]
[0020]
[0021] Where X1(k) and X2(k) are the N / 2-point DFTs of x1(n) and x2(n) respectively. Since both X1(j) and X2(k) have a period of N / 2, and WNk + N / 2 = -WNk, X(k) can also be expressed as:
[0022] Among them, E i,j Let w be the energy of node j at level i. i,j (n) represents the wavelet packet decomposition coefficients of the i-th level j-th node.
[0023] The ratio of the energy of each node in the last stage of wavelet packet decomposition to the total signal energy is calculated using the following formula:
[0024] R i,j =E i,j / E
[0025] Among them, R i,j Let E be the ratio of the energy of node j at level i to the total signal energy. i,j Let E be the wavelet packet energy of the i-th level j-th node, and E be the total signal energy.
[0026] The energy distribution of each node in the last stage is decomposed using wavelet packet decomposition to construct the feature vector X = [R]. i,0 ,R i,1 ,R i,2 ,...].
[0027] 4. Construct a motor state feature dataset
[0028] A motor state feature dataset is constructed based on the feature vectors and labels of the samples, and then divided into a training set and a test set in an 8:2 ratio and normalized.
[0029] 5. Construct a fault diagnosis model
[0030] Create a random forest classifier, train it using the motor state feature dataset, and optimize the parameters.
[0031] 6. Actual Fault Diagnosis
[0032] The real-time acquired vibration acceleration signals are preprocessed and feature extracted sequentially, and then fed into the constructed fault diagnosis model for fault diagnosis.
[0033] Beneficial effects
[0034] The motor fault diagnosis method of this invention starts from the correlation between vibration signals and motor states and the changes in motor operating conditions. By segmenting and resampling the vibration signals of the motor during variable speed and load operation, the vibration signals are stabilized from the perspectives of time domain and transform domain. This largely removes the influence of motor operating conditions on the signal, making the vibration signals of the motor exhibit similar time-frequency characteristics under different operating conditions in the same state. Then, wavelet packet decomposition is performed on the vibration signals, and the energy distribution of different order bands is calculated to construct the feature vectors of the samples. This ensures that the feature vectors of the motor in different states have significant differences while further ensuring that the feature vectors of the motor in the same state are similar under different operating conditions. Finally, a random forest classifier is used to classify the samples based on the wavelet packet energy features. This achieves the stabilization processing and feature extraction of motor vibration signals under variable operating conditions, thereby realizing the fault diagnosis of the motor under variable operating conditions. This overcomes the shortcomings of traditional diagnostic models with low diagnostic accuracy when the motor is operating under variable conditions, expands the engineering application scope of the diagnostic model, and improves the generalization ability and fault diagnosis accuracy of the diagnostic model.
[0035] Meanwhile, this invention proposes a fault diagnosis model based on digital signal processing technology and random forest algorithm, combining digital signal processing technology and machine learning theory. It accurately extracts fault features through digital signal processing techniques such as envelope analysis, wavelet analysis, and order analysis, and uses a weighted random forest classifier for fault diagnosis. This model can overcome the problem of insufficient fault samples in motor fault diagnosis to a certain extent while maintaining a high diagnostic accuracy. Attached Figure Description
[0036] Figure 1 This is a flowchart of a method for diagnosing motor faults under varying operating conditions based on vibration signals, according to the present invention. Detailed Implementation
[0037] The specific embodiments of the present invention will now be described with reference to the accompanying drawings to enable those skilled in the art to better understand the invention. It should be noted that in the following description, detailed descriptions of known functions and designs that might obscure the main content of the invention will be omitted here.
[0038] like Figure 1 As shown, the present invention provides a method for fault diagnosis of a motor under varying operating conditions based on vibration signals, comprising the following steps:
[0039] S1. Data Acquisition
[0040] Vibration acceleration signals on the casing of the motor are collected under different health conditions, including normal state and six fault states: bearing fault, gear fault, imbalance fault, stator fault, rotor fault, and shaft misalignment fault, which are respectively denoted as state 0 to 6.
[0041] S2. Data Preprocessing
[0042] S2.1 Outlier Handling: Use a cosine curve to interpolate and replace outliers in the data collected in step S1.
[0043] S2.2 Smoothing Processing: The vibration signal processed in step S2.1 is then smoothed out, specifically as follows:
[0044] (1) Obtain Env(n) by taking the envelope of the vibration signal x(n) after processing in step S2.1.
[0045] (2) The envelope is smoothed using a moving average filter to obtain env(n).
[0046] (3) Set a starting threshold based on env(n) when the motor is not started. Only take continuous signal segments with an envelope greater than this threshold as valid signals. Signals with an envelope less than this threshold are noise when the motor is not started.
[0047] (4) Calculate the rate of change of env(n) and take its absolute value to obtain the absolute value. env (n), based on the actual operating parameters of the motor, a rate of change threshold is set, and the absder corresponding to the original signal x(n) is extracted. env (n) Continuous signal segments with a rate of change less than this threshold are constant load signals.
[0048] (5) Perform a short-time Fourier transform on the constant load signal, where the frequency resolution of each frame of the signal is set to 1Hz.
[0049] (6) Calculate the maximum motor speed rf based on the maximum motor speed. max Extract the frequency less than rf from each frame of signal. max The spectrum.
[0050] (7) Using peak detection technology, by setting an appropriate threshold, peak detection is used to detect signals with frequencies less than rf in each frame. max The fundamental frequency corresponding to each frame signal is estimated from the spectrum and used as the motor rotation frequency in each time frame. The fundamental frequencies of all frames are connected together in time order to form the motor rotation frequency.
[0051] (8) Resample the vibration signal at equal angles according to the motor's rotation frequency.
[0052] S3. Feature Extraction
[0053] The specific steps for extracting the wavelet packet energy distribution features of the signal are as follows:
[0054] (1) Set the wavelet basis and wavelet decomposition level L, and perform L-level wavelet packet decomposition on the preprocessed vibration signal. The formula is as follows:
[0055] w i+1,2j (n)=∑ k h(k)w i,j (2n-k)
[0056] w i+1,2j+1 (n)=∑ k g(k)w i,j (2n-k)
[0057] Where i = 0, 1, 2, ..., L-1, j = 0, 1, ..., i, w i,j (n) represents the wavelet packet decomposition coefficients of the i-th level j-th node, w 0,0 x(n) is the original vibration signal, and h(k) and g(k) are the unit impulse responses of the wavelet low-pass filter and the wavelet high-pass filter, respectively.
[0058] (2) Calculate the total signal energy using the following formula:
[0059]
[0060] Where E is the total energy of the signal, x(n) is the vibration signal, and N is the signal length.
[0061] (3) Calculate the energy of each node in the last stage of wavelet packet decomposition, using the following formula:
[0062] E j =∑ n |w L,j (n)| 2
[0063] Where j = 0, 1, ... 2 L -1, E j Let w be the energy of node j at level L. L,j (n) represents the wavelet packet decomposition coefficients of the Lth level j node.
[0064] (4) Calculate the ratio of the energy of the wavelet packet coefficients of each node in the last stage of wavelet packet decomposition to the total signal energy, using the following formula:
[0065] R j =E j / E
[0066] Among them, R j E represents the ratio of the energy of node j at level L to the total signal energy. j Let E be the energy of node j at level L, and E be the total signal energy.
[0067] (5) Use wavelet packet decomposition to construct the feature vector of the sample from the energy distribution of each node in the last stage.
[0068] S4. Construct a motor state feature dataset
[0069] The feature vectors and state numbers of vibration signals under seven fault states—normal motor operation, bearing failure, gear failure, imbalance failure, stator failure, rotor failure, and shaft misalignment—are used to construct a feature matrix and a label matrix, respectively, to build a motor state feature dataset.
[0070] S5. Constructing a motor fault diagnosis model
[0071] A random forest classifier is created as a fault diagnosis model, and trained and optimized using a pre-constructed motor state feature dataset. The parameters to be optimized in this invention can be divided into two main categories: feature extraction parameters and classification model parameters. This invention uses a parameter optimization method based on the final classification accuracy to optimize the relevant parameters. The specific steps are as follows:
[0072] (1) Optimize feature extraction parameters: First, fix the wavelet basis types and set the wavelet packet decomposition levels sequentially. Where n is the sample length. This indicates rounding down. Then, feature extraction is performed. For each wavelet packet decomposition level, the dataset is randomly divided into training and test sets in an 8:2 ratio. A random forest classifier (default parameters) is used for training and testing, and the experiment is repeated 1000 times. The optimal wavelet packet decomposition level is determined based on the classification accuracy on the test set in these 1000 experiments; specifically, the optimal level is the one with the highest average classification accuracy and the smallest variance. If the accuracy of this optimal wavelet packet decomposition level does not meet the requirements, the wavelet basis is changed, and the above operation is repeated until the optimal wavelet basis and optimal wavelet packet decomposition level are found.
[0073] (2) Optimize the hyperparameters of the random forest classifier: fix the feature extraction parameters as the optimal parameters found in step (1), and use the Bayesian search method to find the optimal hyperparameters of the random forest classifier.
[0074] S6. Actual Fault Diagnosis
[0075] In actual production, vibration acceleration sensors are used to collect vibration acceleration signals from the motor cover at regular intervals over a period of time. After preprocessing the collected signals, multiple vibration signals under different loads may be obtained. In this case, signals with too short a duration should be discarded first. Then, feature extraction should be performed on the multiple signals obtained, and fault diagnosis should be performed through a fault diagnosis model. If the diagnosis results are different, the diagnosis result of the longest signal should be taken as the standard. If the diagnosis results are different but the duration is the same, feature extraction should be performed on the vibration signals with the same duration, and the average value of the feature vectors should be calculated. Then, the average feature vector should be put into the fault diagnosis model for fault diagnosis, and the diagnosis result of the average feature vector should be taken as the standard.
Claims
1. A method for generating fault samples based on generative adversarial networks, characterized in that, Includes the following steps: (1) Data acquisition: Collect vibration data of the motor on the casing, including normal state and various fault states; (2) Data preprocessing: The data collected in step (1) is processed for outliers and stabilized. (3) Modify the spectral characteristics: Modify the signal after performing a Fourier transform based on the spectrum of the fault sample to be generated; (4) Generate original training data: Based on the modified spectrogram, perform IFFT to transform it into a new time-domain signal, which will serve as the original training data for the generative adversarial network. The IFFT transformation of the frequency-domain signal is as follows: (5) Generative Adversarial Network Model Training: The obtained batch of time-domain signals are used as the original training data of the generative adversarial network and put into the network for training to obtain generated fault samples.
2. The fault sample generation method based on generative adversarial networks according to claim 1, characterized in that, The data acquisition in step (1) specifically includes: Vibration acceleration signals on the casing of the motor are collected under different health conditions, including normal state and six fault states: bearing fault, gear fault, imbalance fault, stator fault, rotor fault, and shaft misalignment fault, which are respectively denoted as state 0 to 6.
3. The fault sample generation method based on generative adversarial networks according to claim 1, characterized in that, The data preprocessing in step (2) specifically includes: (2.1) Outlier handling: Use cosine curves to interpolate and replace outliers in the data collected in step (1); (2.2) Smoothing: The vibration signal after step (2.1) is smoothed.
4. The method for fault diagnosis of motors under varying operating conditions based on vibration signals according to claim 3, characterized in that, The signal stabilization process in step (2.2) specifically includes: (2.2.1) Obtain Env(n) by taking the envelope of the vibration signal x(n) after processing in step (2.1); (2.2.2) The envelope is smoothed using a moving average filter to obtain env(n); (2.2.3) Set a starting threshold based on env(n) when the motor is not started. Only take continuous signal segments with an envelope greater than this threshold as valid signals. Signals with an envelope less than this threshold are noise when the motor is not started. (2.2.4) Calculate the rate of change of env(n) and take its absolute value to obtain the absolute value. env (n), based on the actual operating parameters of the motor, a rate of change threshold is set, and the absder corresponding to the original signal x(n) is extracted. env (n) Continuous signal segments with a rate of change less than this threshold are constant load signals; (2.2.5) Perform a short-time Fourier transform on the constant load signal, where the frequency resolution of each frame of the signal is set to 1Hz; (2.2.6) Calculate the maximum motor speed rf based on the maximum motor speed. max Extract the frequency less than rf from each frame of signal. max The spectrum; (2.2.7) Using peak detection technology, by setting an appropriate threshold, peak detection is used to detect signals with frequencies less than rf in each frame. max The fundamental frequency corresponding to each frame of signal is estimated from the spectrum and used as the motor rotation frequency in each time frame. The fundamental frequencies of all frames are connected together in time order to form the motor rotation frequency. (2.2.8) The vibration signal is resampled at equal angles according to the motor's rotation frequency.
5. The fault sample generation method based on generative adversarial networks according to claim 1, characterized in that, Step (3) modifies the spectral characteristics, specifically as follows: (3.1) Decompose x(n) into the sum of two sequences of even and odd numbers: x(n) = x1(n) + x2(n) Where x1(n) and x2(n) are both of length N / 2, x1(n) is an even sequence, and x2(n) is an odd sequence, then: because but Where X1(k) and X2(k) are the N / 2-point DFTs of x1(n) and x2(n) respectively. Since both X1(k) and X2(k) have a period of N / 2, and Therefore, X(k) can also be expressed as: After performing FFT on the time-domain signal, the frequency domain diagram of the signal is obtained. Based on the corresponding fault frequency domain location, the amplitude at a specific frequency domain location is modified, specifically by amplifying it by a certain factor.
6. The fault sample generation method based on generative adversarial networks according to claim 1, characterized in that, Step (4) generates the original training data, specifically as follows: Based on the modified spectrogram, perform IFFT to transform it into a new time-domain signal, which will serve as the original training data for the generative adversarial network. The IFFT transformation of the frequency-domain signal is as follows: Similar to FFT, we assume N is even and divide the sequence X(k) into two even sequences X1(k) and odd sequences X2(k) of length N / 2: Calculate the IDFT of each of the two subsequences: Combining the two IDFTs yields the IDFT of the original sequence: Define the rotation factor Therefore, the formula can be simplified to: For n = 0, 2, 4, ..., N-2: For n = 0, 1, 3, ..., N-1:
7. The fault sample generation method based on generative adversarial networks according to claim 1, characterized in that, Step (5) generates the adversarial network model training, specifically as follows: The obtained batch of time-domain signals are used as the original training data for the generative adversarial network (GAN) and fed into the network for training to obtain generated fault samples.