Bearing fault intelligent diagnosis method based on improved generative adversarial network

By improving generative adversarial networks to generate synthetic data that closely resembles real-world fault data, and combining residual connections and attention mechanisms, the problem of decreased diagnostic accuracy caused by data scarcity in bearing fault diagnosis is solved, achieving accurate classification in scenarios with few samples.

CN122196555BActive Publication Date: 2026-07-31TAIYUAN NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TAIYUAN NORMAL UNIV
Filing Date
2026-05-12
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing bearing fault diagnosis methods suffer a significant drop in diagnostic accuracy when faced with fault modes with few or no samples. Traditional data augmentation methods cannot generate synthetic samples that match the characteristics of real physical distribution, thus limiting the diagnostic accuracy of the model in data-scarce scenarios.

Method used

An improved generative adversarial network is adopted, which combines residual connections, gated recurrent units and attention mechanisms to generate synthetic data that closely approximates the distribution of real fault data. The discriminator is pre-trained by inverse logic to improve the discrimination accuracy, and a classifier is built for bearing fault diagnosis.

Benefits of technology

Providing sufficient high-quality training data in scenarios with few samples enables accurate classification of bearing faults, alleviating the problem of data scarcity and improving diagnostic accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122196555B_ABST
    Figure CN122196555B_ABST
Patent Text Reader

Abstract

This invention relates to the field of bearing fault diagnosis technology, specifically to an intelligent bearing fault diagnosis method based on an improved generative adversarial network (GAN). This invention combines residual connections, gated recurrent units, and attention mechanisms to enable the generator to produce synthetic samples that more closely approximate the distribution of real fault data. This provides sufficient high-quality training data for bearing fault diagnosis in scenarios with few samples, alleviating the data scarcity problem and achieving accurate classification of bearing faults. Furthermore, the GAN employs inverse logic: the discriminator is pre-trained based on real data, and only after pre-training is complete is the generator activated. This significantly improves the discriminator's accuracy in distinguishing between "real samples" and "fake / synthetic samples" before formal GAN ​​training, making it better at differentiating between genuine and fake samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bearing fault diagnosis technology, and more specifically to an intelligent bearing fault diagnosis method based on an improved generative adversarial network. Background Technology

[0002] In industrial rotating machinery systems, bearings, as core transmission components, have a direct and crucial impact on the safety and reliability of the equipment. Statistics show that approximately 30% of rotating machinery failures are caused by bearing damage. However, in the early stages of a failure, subtle fault characteristics are easily masked by background noise, posing a significant challenge to traditional fault diagnosis methods.

[0003] Currently, intelligent bearing diagnostic technology mainly relies on deep learning models to analyze vibration signals, but the diagnostic accuracy of this technology is limited. Specifically, collecting fault data throughout the entire bearing lifecycle is extremely costly. In practical applications, the number of normal samples and fault samples is highly unbalanced, especially data on composite fault modes, which are extremely scarce. Traditional data augmentation methods, such as noise addition and temporal scaling, can only expand the data in a limited dimension and cannot generate synthetic samples that accurately reflect the characteristics of the actual physical distribution. This leads to a significant and drastic drop in diagnostic accuracy when the model encounters fault modes with few or no samples. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides an intelligent bearing fault diagnosis method based on an improved generative adversarial network (GAN). By combining residual connections, gated recurrent units, and attention mechanisms, the generator in the GAN model can generate synthetic data that more closely approximates the distribution of real fault data. This provides sufficient high-quality training data for bearing fault diagnosis in scenarios with few samples, alleviating the data scarcity problem and achieving accurate classification of bearing faults. Furthermore, the invention employs inverse logic within the GAN: the discriminator is pre-trained based on real data, and the generator is activated only after the discriminator has completed pre-training. This significantly improves the discriminator's accuracy in distinguishing between "real samples" and "fake / synthetic samples" before formal GAN ​​training, making it better at differentiating between genuine and fake samples.

[0005] This invention provides an intelligent bearing fault diagnosis method based on an improved generative adversarial network, specifically:

[0006] S1. Obtain the bearing status dataset, including normal status data and fault status data;

[0007] S2. Preprocess the bearing condition dataset, wherein the preprocessing is to convert the bearing condition dataset from one-dimensional signal data into a two-dimensional grayscale time-frequency image.

[0008] S3. The preprocessed fault state data is used as a positive sample, and various degradation processes are applied to the positive sample to generate a negative sample. The degradation process refers to artificially introducing blur and noise interference into the image to simulate the distortion that may occur in the real scene.

[0009] S4. Construct an improved generative adversarial network (GAN) model, which includes a generator and a discriminator, wherein:

[0010] The generator includes a fully connected layer, a deconvolution layer, a GNA module, and two deconvolution layers, wherein the GNA module includes a first residual connection unit and a second residual connection unit.

[0011] The discriminator includes a pre-discriminator and a forward discriminator, both of which include three convolutional layers and fully connected layers. Each convolutional layer contains a batch normalization layer and an activation function.

[0012] S5. Assign supervisory labels to positive and negative samples, and input the labeled positive and negative samples into the pre-discriminator for pre-training. The pre-discriminator outputs a probability value for each sample and its class label. Using this probability value and the corresponding supervisory label, calculate the binary cross-entropy loss of the pre-discriminator, obtain the gradient through backpropagation, and update its parameters until the preset conditions are met. Then stop the pre-training and save all trainable parameters as a pre-training parameter file. The probability value is the confidence that the sample is a real sample under the given label conditions. The supervisory label for a positive sample is 1, indicating a real sample; the supervisory label for a negative sample is 0, indicating a fake sample.

[0013] S6. The positive discriminator loads the pre-trained parameter file saved by the pre-discriminator and uses its parameters to initialize its own network structure.

[0014] S7. Random noise that conforms to a normal distribution is concatenated with the fault category label and then input into the generator to generate synthetic samples. The synthetic samples and positive samples are then input into the updated positive discriminator. The parameters are updated using the backpropagation algorithm based on the output of the positive discriminator. The generator and the positive discriminator then repeat the above process to carry out adversarial training and alternately update the parameters until the preset termination condition is met, at which point the adversarial training stops, and finally synthetic data that closely resembles the characteristics of real fault data is generated.

[0015] S8. Construct a classifier and input the preprocessed data from step S2 and the synthetic data generated in step S7 into the classifier for training. Use the trained classifier as a bearing fault diagnosis model. The classifier includes three convolutional layers, a global average pooling layer, and a fully connected layer.

[0016] S9. Obtain real-time bearing operating data and input it into the bearing fault diagnosis model to obtain bearing fault diagnosis results.

[0017] Preferably, the normal status data includes the bearing's operating data and corresponding status labels when the bearing is in a normal state; the fault status data includes the bearing's operating data and corresponding fault category labels when the bearing is in a fault state.

[0018] In addition, in step S2, continuous wavelet transform is used to convert the bearing state dataset from one-dimensional signal data into a two-dimensional grayscale time-frequency image.

[0019] Preferably, in step S3, the ratio of positive to negative samples is 1:1; simultaneously, in step S3, three degradation processes are applied to the positive samples proportionally, specifically including:

[0020] (1) Randomly select a portion of the frequency band for energy attenuation to simulate channel fading or frequency response imbalance;

[0021] (2) Shift a portion of the image in the frequency dimension and fill with zeros to simulate carrier offset or calibration error;

[0022] (3) Randomly occlude part of the pixel area, simulating signal loss or instantaneous interference.

[0023] Preferably, the first residual connection unit includes a two-layer gated loop unit. After the first-layer gated loop unit, a batch normalization layer and a LeakyReLU activation function are set. After the second-layer gated loop unit, a batch normalization layer is set. At the same time, the two-layer gated loop unit is treated as a whole in the first residual connection unit. The output of the two-layer gated loop unit is fused with the original input using residual connection, and then activated using the LeakyReLU function.

[0024] The second residual connection unit includes a channel attention submodule and a spatial attention submodule. The second residual connection unit uses residual connection to fuse the outputs of the first residual connection unit, the channel attention submodule, and the spatial attention submodule. At the same time, the second residual connection unit is activated using the LeakyReLU function.

[0025] Preferably, the first residual connection unit is formed by fusing a double-layer gated loop unit with residual connections. The double-layer gated loop unit captures the temporal evolution pattern of fault features, while the residual connections preserve the underlying basic features, avoiding feature loss caused by deep processing. The specific steps are as follows:

[0026] (11) The spatial dimension of the input feature map is transformed into a temporal sequence. The sequence data is processed through the gating mechanism of the gated loop unit—update gate and reset gate. The update gate controls the retention of effective features of the previous sequence, and the reset gate filters redundant information, thereby mining the fault development temporal pattern hidden in the features.

[0027] (12) The features output by the first-level gated loop unit are batch normalized by channel. By calculating the mean and variance of each channel feature, the feature values ​​are adjusted to a stable distribution range to avoid feature distribution shift caused by the gated loop unit processing.

[0028] (13) By introducing nonlinearity through the LeakyReLU function, a small amount of scaled output is retained for negative features, while the fault-related positive features are enhanced and some background noise interference is suppressed;

[0029] (14) Using the features filtered in step (13) as the input of the second-level gated loop unit, repeat the timing processing logic of the first-level gated loop unit, but focus more on the mining of deep timing patterns, further filter redundant timing information, and strengthen the stable correlation of fault features over time.

[0030] (15) The features output by the second-layer gated loop unit are normalized again at the channel level to eliminate the feature distribution deviation caused by the superposition of the two-layer gated loop units, and provide a stable feature basis for subsequent activation and residual connection.

[0031] (16) The initial input of the GNA module is added and fused with the overall output of the "double-layer gated loop unit + batch normalization layer + LeakyReLU function";

[0032] (17) After residual connection, nonlinearity is introduced through the LeakyReLU function and a small number of negative features are allowed to pass through, so as to obtain high-quality time series features;

[0033] The second residual connection unit is formed by fusing a dual attention mechanism with multi-branch residual connections. This layer focuses on the fault-related "key feature channels" and "key spatial regions" through channel attention and spatial attention, respectively. Then, it fuses multiple types of features through multi-branch residual connections to achieve precise enhancement of fault features. The specific steps are as follows:

[0034] (21) The final output of the first residual connection unit is directly passed as the "basic branch" without any additional processing;

[0035] (22) The channel attention submodule is used to perform global average pooling and global max pooling on the final output of the first residual connection unit by channel, condensing the global features of each channel into a single value. Then, these values ​​are fed into a fully connected bottleneck structure containing dimensionality reduction, ReLU activation, and dimensionality increase. The channel weights in the [0,1] interval are generated by activating the Sigmoid function to learn the importance of different channels to the task. Finally, the generated channel weights are multiplied with the original feature map channel by channel to enhance the feature response of key channels and suppress secondary channels. The final output is a weighted feature map of the same shape, i.e., the channel enhancement branch.

[0036] (23) The spatial attention submodule is used to perform channel global average pooling and global max pooling on the final output of the first residual connection unit according to the spatial location, so as to condense the multi-channel features of each spatial location into a single value, reflecting the overall importance of the location; then, the weights of each spatial location are learned through a 3×3 convolutional layer, where the weights of the fault impact area are high and the weights of the noise area are low; finally, the weights are normalized to the [0, 1] interval using the Sigmoid function to obtain the spatial weight map, i.e., the spatial reinforcement branch;

[0037] (24) Perform element-level addition and fusion of the “basic branch, channel enhancement branch, and spatial enhancement branch” in steps (21)-(23) to ensure that the basic features, key channel features, and key spatial features are integrated without omission;

[0038] (25) The integrated branch is introduced into nonlinearity through the LeakyReLU function. A small amount of scaled output is retained for the negative features that may be generated after fusion, while the positive effective fault features are enhanced.

[0039] Preferably, the pre-discriminator is used to learn in advance the characteristic differences between the complete signal of the real fault bearing and the typical defects; the positive discriminator is used to determine whether the synthetic sample generated by the generator is synthetic data that is close to the characteristics of the real fault data, thereby forcing the generator to learn the distribution of the real data and finally generate synthetic data that is close to the characteristics of the real fault data.

[0040] Preferably, the generator loss function is as follows:

[0041]

[0042] In the formula, For generator loss, For expectation operator, Random noise sampled from the noise distribution. For faulty tags sampled from the tag distribution, Synthetic samples generated by the generator; The probability that a synthetic sample is considered a real sample after the discriminator has judged it and its fault label.

[0043] The loss function for the positive discriminator is shown below:

[0044]

[0045] In the formula, For positive discriminator loss; This represents a sample taken from the real data distribution. These are real fault characteristics. For the corresponding fault label; It is the discriminator's output of the probability that a real sample and a fault label are "true and matching". Used to incentivize the positive discriminator to correctly identify real samples. Used to incentivize the positive discriminator to correctly identify synthetic samples;

[0046] The loss function of the pre-discriminator is shown in the following equation:

[0047]

[0048] In the formula, To predict discriminator loss; This represents a sample drawn from a positive sample distribution. These are the fault characteristics of samples in the positive samples. The fault label is the corresponding sample in the positive sample; This represents a sample drawn from a negative sample distribution. This represents the sample fault characteristics in negative samples. The fault label is the corresponding sample in the negative sample; It is the output of the pre-discriminator's "true and matching" probability of samples and fault labels in positive samples. This is used to enable the pre-discriminator to classify samples in the positive sample as true. It is the output of the pre-discriminator's "true and matching" probability of samples and fault labels in negative samples. This is used to allow the pre-discriminator to classify samples in negative samples as false;

[0049] The classifier loss function is shown below:

[0050]

[0051] In the formula, Here, M is the classifier loss, i is the sample index, N is the number of state categories, and c is the state category index. If the true label of the i-th sample belongs to state category c, then... =1, otherwise =0; Let be the predicted probability of the classifier that the i-th sample belongs to state category c.

[0052] Preferably, in step S5, positive and negative samples are divided into training and validation sets according to a certain ratio. The training set is input into the pre-discriminator for pre-training. After training, the validation set is input into the pre-discriminator for verification. The pre-discriminator stops pre-training when the recognition accuracy of both positive and negative samples on the validation set is stable in the range of 75% to 85%. When the recognition accuracy of both positive and negative samples on the validation set is not stable in the range of 75% to 85%, the pre-discriminator is retrained by adjusting the hyperparameters. The ratio of training to validation set is 7:3; the ratio of positive to negative samples in the training / validation set is 1:1; and the ratio of the three types of negative samples in the negative samples is 3:3:4. The hyperparameters include learning rate, batch size, and training rounds.

[0053] Preferably, after the generator inputs the synthetic sample into the updated positive discriminator, the positive discriminator outputs the probability that the synthetic sample belongs to the "real sample". Based on this probability, the generator calculates the "error of the synthetic sample being judged as a 'real sample'" through a loss function, and then uses the backpropagation algorithm to propagate the error back to the generator and adjust its parameters, so that the subsequently generated samples are more likely to be judged as "real samples" by the positive discriminator. In this way, the generation capability is gradually optimized in the adversarial iteration with the positive discriminator, and finally synthetic data that is close to the distribution of real fault data is generated.

[0054] In addition, during the adversarial training between the generator and the positive discriminator, the parameters of the positive discriminator are frozen in the first 3 rounds, that is, only the parameters of the generator are updated and not the parameters of the discriminator, so as to avoid the parameters of the positive discriminator being disturbed in the initial stage and ensure that it retains the real distribution recognition ability of the pre-trained model. After 3 rounds, the parameters of the positive discriminator are unfrozen and updated synchronously with the parameters of the generator.

[0055] Preferably, the termination condition in step S7 is reaching Nash equilibrium, and the ratio of preprocessed data to synthetic data in step S8 is 6:4.

[0056] In addition, the fully connected layer of the classifier sets the Softmax function to output the predicted probability of each state category of the sample. Then, based on the predicted probability of each state category in the sample, the state category with the highest predicted probability is selected as the fault diagnosis result of the sample, and the sum of the predicted probabilities of each state category in any sample is 1.

[0057] Compared with the prior art, the present invention has the following beneficial effects:

[0058] 1. This invention employs reverse logic in generative adversarial networks, whereby the discriminator is first pre-trained based on real data. After the discriminator completes its pre-training, the generator is then started. This significantly improves the discriminator's accuracy in distinguishing between "real samples" and "fake / synthetic samples" before formal generative adversarial training, making it better at differentiating between genuine and fake samples.

[0059] 2. This invention combines residual connections, gated recurrent units, and attention mechanisms to enable the generator in the generative adversarial network model to generate synthetic data that more closely approximates the distribution of real fault data. This provides sufficient high-quality training data for bearing fault diagnosis in scenarios with few samples, thereby alleviating the problem of data scarcity and achieving accurate classification of bearing faults. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 Flowchart for constructing the generative adversarial network and intelligent bearing diagnostic model provided by this invention;

[0062] Figure 2 A generator framework diagram provided for this invention. Detailed Implementation

[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0064] like Figure 1-2 As shown, this invention provides an intelligent bearing fault diagnosis method based on an improved generative adversarial network, specifically as follows:

[0065] S1. Obtain the bearing status dataset, including normal status data and fault status data.

[0066] Preferably, the bearing condition dataset can be obtained by measuring with sensors installed on the bearing housing, or it can be obtained from publicly available data on the internet.

[0067] In this application, the bearing condition dataset was obtained from publicly available data on the internet.

[0068] In this embodiment, normal state data includes the bearing's operating data and corresponding status labels when the bearing is in a normal state; fault state data includes the bearing's operating data and corresponding fault category labels when the bearing is in a fault state.

[0069] For example, the status label of a bearing is "normal" when it is in normal condition; "inner ring fault" when the inner ring has a fault; and "outer ring fault" when the outer ring has a fault.

[0070] It should be noted that the types of working data used to detect bearing condition are basically the same, but the specific data parameter range, collection focus and analysis logic will be significantly different due to environmental differences. Therefore, this application does not impose specific restrictions on the working data of bearings in each condition. In actual application, you can set it yourself according to your needs.

[0071] S2. Preprocess the bearing condition dataset, wherein the preprocessing is to convert the bearing condition dataset from one-dimensional signal data into a two-dimensional grayscale time-frequency image.

[0072] In this application, continuous wavelet transform is used to convert the bearing state dataset from one-dimensional signal data into a two-dimensional grayscale time-frequency image.

[0073] In this embodiment of the application, the two-dimensional grayscale time-frequency image has 32×32 pixels.

[0074] S3. The preprocessed fault state data is used as a positive sample, and various degradation processes are applied to the positive sample to generate a negative sample. The degradation process refers to artificially introducing blur and noise interference into the image to simulate the distortion that may occur in the real scene.

[0075] In this application, the ratio of positive samples to negative samples is 1:1.

[0076] In this application, positive samples are subjected to three degradation treatments proportionally, specifically including:

[0077] (1) Randomly select a portion of the frequency band for energy attenuation to simulate channel fading or frequency response imbalance;

[0078] (2) Shift a portion of the image in the frequency dimension and fill with zeros to simulate carrier offset or calibration error;

[0079] (3) Randomly occlude part of the pixel area, simulating signal loss or instantaneous interference.

[0080] In this embodiment of the application, the positive samples are subjected to three degradation processes in a ratio of 3:3:4, specifically as follows:

[0081] (1) Randomly select 15-25% of the frequency band and perform 30-50% energy attenuation to simulate channel fading or frequency response imbalance;

[0082] (2) Shift the entire image by 2 to 4 pixels in the frequency dimension and fill it with zeros to simulate carrier offset or calibration error;

[0083] (3) Randomly occlude a 5×5 pixel area to simulate signal loss or instantaneous interference.

[0084] S4. Construct an improved generative adversarial network (GAN) model, which includes a generator and a discriminator, wherein:

[0085] The generator includes a fully connected layer, a deconvolution layer, a GNA module, and two deconvolution layers, wherein the GNA module includes a first residual connection unit and a second residual connection unit.

[0086] The discriminator includes a pre-discriminator and a forward discriminator, both of which consist of three convolutional layers and fully connected layers. Each convolutional layer contains a batch normalization layer and an activation function.

[0087] It should be emphasized that the network structures of the pre-discriminator and the positive discriminator are consistent in this application.

[0088] In this application, the first residual connection unit includes a two-layer gated loop unit. After the first-layer gated loop unit, a batch normalization layer and a LeakyReLU activation function are set. After the second-layer gated loop unit, a batch normalization layer is set. At the same time, the first residual connection unit treats the two-layer gated loop unit as a whole, uses residual connection to fuse the output of the two-layer gated loop unit with the original input, and then uses the LeakyReLU function for activation.

[0089] In this application, the second residual connection unit includes a channel attention submodule and a spatial attention submodule. The second residual connection unit uses residual connection to fuse the output of the first residual connection unit, the output of the channel attention submodule and the output of the spatial attention submodule. At the same time, the second residual connection unit is activated using the LeakyReLU function.

[0090] In this embodiment, the first residual connection unit is formed by fusing a double-layer gated loop unit with residual connections. The double-layer gated loop unit captures the temporal evolution pattern of fault features, while the residual connections preserve the underlying basic features, avoiding feature loss caused by deep processing. The specific steps are as follows:

[0091] (11) The spatial dimension of the input feature map is transformed into a temporal sequence. The sequence data is processed through the gating mechanism of the gated loop unit—update gate and reset gate. The update gate controls the retention of effective features of the previous sequence, such as weak features in the early stage of the fault. The reset gate filters redundant information, such as the interference time sequence of background noise, thereby mining the fault development time sequence law hidden in the features, such as the time frequency change trend of bearing fault from the bud to the obvious.

[0092] (12) The features output by the first-level gated loop unit are batch normalized by channel. By calculating the mean and variance of each channel feature, the feature values ​​are adjusted to a stable distribution range to avoid feature distribution shift caused by the gated loop unit processing.

[0093] (13) By introducing nonlinearity through the LeakyReLU function, a small amount of scaled output is retained for negative features, such as the interference signal of normal equipment vibration, while the positive features related to faults are enhanced, such as the high amplitude feature of fault impact, and some background noise interference is suppressed.

[0094] (14) Using the features filtered in step (13) as the input of the second-level gated loop unit, repeat the timing processing logic of the first-level gated loop unit, but focus more on the mining of deep timing patterns, further filter redundant timing information, and strengthen the stable correlation of fault features over time, such as the periodic change of fault frequency.

[0095] (15) The features output by the second-layer gated loop unit are normalized again at the channel level to eliminate the feature distribution deviation caused by the superposition of the two-layer gated loop units, and provide a stable feature basis for subsequent activation and residual connection.

[0096] (16) The initial input of the GNA module (i.e. the original features that have not been processed by the double-gated recurrent unit to preserve the underlying basic texture) is added and fused with the overall output (temporal enhancement features) of "double-gated recurrent unit + batch normalization layer + LeakyReLU function".

[0097] (17) After the residual connection, nonlinearity is introduced through the LeakyReLU function and a small number of negative features are allowed to pass through, so as to obtain high-quality time series features.

[0098] In this embodiment of the application, in step (17), the residual connection retains the input features and alleviates gradient vanishing through the skip connection. Then, nonlinearity is introduced through LeakyReLU and a small number of negative features are allowed to pass through to maintain gradient flow. The combination of the two can enhance the feature expression ability and training stability of the network, and ensure that the features involved in the fusion during the subsequent residual connection are all high-quality temporal features.

[0099] In this embodiment, the second residual connection unit is formed by fusing a dual attention mechanism with multi-branch residual connections. This layer focuses on the fault-related "key feature channels" and "key spatial regions" through channel attention and spatial attention, respectively, and then fuses multiple types of features through multi-branch residual connections to achieve precise enhancement of fault features. The specific steps are as follows:

[0100] (21) The final output of the first residual connection unit is directly passed as the "basic branch" without any additional processing.

[0101] (22) The channel attention submodule is used to perform global average pooling and global max pooling on the final output of the first residual connection unit by channel, condensing the global features of each channel into a single value to reflect the overall importance of the channel. Then, these values ​​are fed into a fully connected bottleneck structure containing dimensionality reduction, ReLU activation and dimensionality increase, and then activated by the Sigmoid function to generate channel weights in the [0,1] interval. The importance of different channels to the task is learned. Finally, the generated channel weights are multiplied with the original feature map channel by channel to enhance the feature response of key channels and suppress secondary channels. Finally, the weighted feature map of the same shape is output, that is, the channel enhancement branch.

[0102] (23) The spatial attention submodule is used to perform channel global average pooling and global max pooling on the final output of the first residual connection unit according to the spatial location, so as to condense the multi-channel features of each spatial location into a single value, reflecting the overall importance of the location; then, the weights of each spatial location are learned through a 3×3 convolutional layer, where the fault impact area has a high weight and the noise area has a low weight; finally, the weights are normalized to the [0,1] interval using the Sigmoid function to obtain the spatial weight map, i.e., the spatial reinforcement branch.

[0103] (24) Perform element-level addition fusion of the “basic branch, channel enhancement branch, and spatial enhancement branch” in steps (21)-(23) to ensure that the three types of features (basic features, key channel features, and key spatial features) are integrated without omission.

[0104] (25) The integrated branch is introduced into nonlinearity through the LeakyReLU function. A small amount of scaled output is retained for the negative features that may be generated after fusion, while the positive effective fault features are strengthened, providing a more stable feature expression for subsequent processing.

[0105] The Gated Recurrent Unit (GRU) is an improved model of Recurrent Neural Networks (RNNs). It solves the vanishing / exploding gradient problem of traditional RNNs by introducing a gating mechanism, and its structure is simpler than that of LSTM. The GRU contains two key gating gates: the update gate and the reset gate. The update gate determines how much old state to retain and how much new information to introduce, while the reset gate controls the influence of the previous state on the current candidate state.

[0106] It should be noted that convolutional neural networks are built on convolutional operations, which extract information features by fusing spatial and channel information within a local receptive field. This approach typically assigns equal importance to each channel feature, but in reality, some channels are more important than others. Therefore, this application introduces a Channel Attention Mechanism (CAM) to focus on important channels in the feature map and assign higher weights to them.

[0107] Furthermore, traditional convolutional neural networks often process images uniformly, failing to distinguish the importance of different regions. This uniform processing ignores the fact that some regions in an image may contain more crucial information, thus limiting the model's performance when processing complex images. Therefore, this application introduces a Spatial Attention Mechanism (SAM), which focuses on important spatial information in each channel and suppresses unimportant spatial information.

[0108] It should be noted that in the first residual connection unit, the node state is updated through a gated recurrent unit, the feature distribution is normalized and nonlinearity is enhanced through a batch normalization layer and the LeakyReLU activation function, and the original input and the features after multi-layer processing are fused through residual connections to retain the low-level information. In the second residual connection unit, the output of the first residual connection unit, the output of the channel attention submodule, and the output of the spatial attention submodule are residually connected. This not only preserves the original features of the first residual connection unit, but also captures the global dependencies of channels (attribute importance) and space (node ​​relationship importance), thus making up for the shortcomings of the traditional first residual connection unit which only relies on local neighborhood aggregation. Finally, after activation by the LeakyReLU function, the output is more focused on the features of important channels and spatial locations.

[0109] In this embodiment, the input value of the fully connected layer in the generator is a random noise vector, and the output value is a 4×4×512 feature map; the input value of the first deconvolutional layer is the output value of the fully connected layer, and the output value is an 8×8×256 feature map; the input value of the GNA module is the output value of the first deconvolutional layer, and the output value is an 8×8×256 feature map; the input value of the second deconvolutional layer is the output value of the GNA module, and the output value is a 16×16×128 feature map; the input value of the third deconvolutional layer is the output value of the second deconvolutional layer, and the output value is a 32×32×1 feature map.

[0110] In this application, after processing by the GNA module, the fault modes of the feature map output by the first deconvolution layer can be made clearer and the physical meaning more in line with reality. When the second and third deconvolution layers are upsampled, a realistic time-frequency map with both temporal dynamics and spatially accurate fault features can be generated.

[0111] In this application, by combining residual connections, gated recurrent units, channel attention mechanisms, and spatial attention mechanisms, the generator is able to generate synthetic data that more closely approximates the distribution of real fault data, providing sufficient high-quality training data for bearing fault diagnosis in scenarios with few samples.

[0112] In this application, the pre-discriminator is used to learn in advance the characteristic differences between the complete signal of a real faulty bearing and typical defects; the positive discriminator is used to determine whether the synthetic sample generated by the generator is synthetic data that is close to the characteristics of real fault data, thereby forcing the generator to learn the distribution of real data and finally generate synthetic data that is close to the characteristics of real fault data.

[0113] In this embodiment, the pre / positive discriminator adopts a three-layer stacked structure of "convolutional layer + batch normalization layer + activation function" to capture the "local energy gradient" and "frequency distribution continuity" of the time-frequency map. After the first convolution, the output dimension is 16×16×512, followed by batch normalization and activation, with the output dimension remaining unchanged. After the second convolution, the output dimension is 8×8×256, followed by batch normalization and activation, with the output dimension remaining unchanged. After the third convolution, the output dimension is 4×4×128, followed by batch normalization and activation. The output after the third convolution is flattened into a one-dimensional vector.

[0114] It should be noted that the energy differences in the time-frequency graphs under different operating conditions are significant. Therefore, this application includes a batch normalization layer in the pre / positive discriminator to stabilize the energy distribution fluctuations in the time-frequency graph and help the pre / positive discriminator learn a "relative distribution" rather than an "absolute energy value". In addition, this application also sets a LeakyReLU activation function (slope 0.2) after the batch normalization layer of the pre / positive discriminator to avoid the gradient vanishing problem in the low-frequency energy region, i.e., the output value is close to 0.

[0115] In this embodiment, the pre / positive discriminator has a fully connected layer after three convolutional layers, and is equipped with a Sigmoid activation function. Finally, it outputs the discrimination result, that is, the confidence level of the input sample (bearing state time-frequency diagram) as a positive sample / true sample.

[0116] In this application, the loss functions for the generator and the positive discriminator are as follows:

[0117]

[0118]

[0119] In the formula, For generator loss, For expectation operator, Random noise sampled from the noise distribution. For faulty tags sampled from the tag distribution, Synthetic samples generated by the generator; The probability that a synthetic sample is considered a real sample after the discriminator has judged it and its fault label. For positive discriminator loss; This represents a sample taken from the real data distribution. These are real fault characteristics. For the corresponding fault label; It is the discriminator's output of the probability that a real sample and a fault label are "true and matching". Used to incentivize the positive discriminator to correctly identify real samples. Used to incentivize the positive discriminator to correctly identify synthetic samples.

[0120] In this application, the generator loss function aims to minimize That is, the synthetic samples that prompt the generator to produce. It can "deceive" the positive discriminator, causing it to classify it as matching a given fault label with a high probability. The real samples. The overall goal of the positive discriminator loss function is to minimize This maximizes its ability to distinguish between real and synthetic data and to verify label matching.

[0121] S5. Set supervision labels for positive / negative samples, and input the positive and negative samples with the supervision labels into the pre-discriminator for pre-training. The pre-discriminator outputs a probability value for each sample and its class label. Using this probability value and the corresponding supervision label, calculate the binary cross-entropy loss of the pre-discriminator, obtain the gradient through backpropagation and update its parameters until the preset conditions are met, then stop the pre-training and save all trainable parameters as a pre-training parameter file. The probability value is the confidence that the sample is a real sample under the given label conditions; the supervision label for a positive sample is 1, indicating a real sample; the supervision label for a negative sample is 0, indicating a fake sample.

[0122] In this application, step S5 divides positive and negative samples into training and validation sets according to a certain ratio. The training set is input into the pre-discriminator for pre-training. After training, the validation set is input into the pre-discriminator for verification. The pre-discriminator stops pre-training when the recognition accuracy of positive samples and negative samples on the validation set are both stable in the range of 75% to 85%. The ratio of training set to validation set is 7:3; the ratio of positive samples to negative samples in the training set / validation set is 1:1; and the ratio of the three types of negative samples in the negative samples is 3:3:4.

[0123] In this application, the pre-discriminator captures the "local energy gradient" and "frequency distribution continuity" of the time-frequency map through a three-layer stacked structure of "convolutional layer + batch normalization layer + activation function", and forces itself to autonomously master the underlying distribution pattern of real samples through multiple trainings.

[0124] It should be noted that in the embodiments of this application, positive samples are real data and negative samples are fake data.

[0125] In this application, the loss function of the pre-discriminator is shown in the following equation:

[0126]

[0127] In the formula, To predict discriminator loss; This represents a sample drawn from a positive sample distribution. These are the fault characteristics of samples in the positive samples. The fault label is the corresponding sample in the positive sample; This represents a sample drawn from a negative sample distribution. This represents the sample fault characteristics in negative samples. The fault label is the corresponding sample in the negative sample; It is the output of the pre-discriminator's "true and matching" probability of samples and fault labels in positive samples. This is used to enable the pre-discriminator to classify samples in the positive sample as true. It is the output of the pre-discriminator's "true and matching" probability of samples and fault labels in negative samples. This is used to enable the pre-discriminator to classify samples in the negative sample as false.

[0128] Preferably, when the accuracy of both positive and negative sample recognition on the validation set is not stable in the range of 75% to 85%, the pre-discriminator is retrained by adjusting the hyperparameters, which include the learning rate, batch size, and number of training rounds.

[0129] It should be noted that the energy distribution in the time-frequency diagram of a normal bearing is relatively uniform, mainly concentrated at the fundamental frequency and its lower harmonics, without significant impact energy accumulation. The time-frequency diagram of a faulty bearing exhibits periodic impacts related to the fault characteristic frequency, appearing as equally spaced energy bands on the time-frequency diagram, and the energy distribution shows a time-frequency correlation. Therefore, this application combines the fault characteristics of the bearing vibration signal (such as periodic impacts and specific frequency components) with the physical meaning of the time-frequency diagram (the correlation between energy distribution and fault type) to design a strategy for pre-training the discriminator. This involves first allowing the discriminator to fully learn the characteristic differences between a complete signal and typical defects, enabling the discriminator to possess signal quality discrimination capabilities in the early stages of adversarial training. During generative adversarial training, this prompts the generator to output a more realistic and structurally complete time-frequency diagram, thus laying the foundation for the generative adversarial network to generate high-quality bearing time-frequency diagrams.

[0130] S6. The positive discriminator loads the pre-trained parameter file saved by the pre-discriminator and uses its parameters to initialize its own network structure.

[0131] In this application, after the pre-training phase, the pre-discriminator serializes and saves all its trainable parameters (e.g., convolutional layer weights / biases, fully connected layer weights / biases, etc.) from memory as a .pth file. This file fully records the "knowledge state" learned by the pre-discriminator. Before the formal generative adversarial training begins, the forward discriminator has no prior knowledge, but by having the forward discriminator read the pre-trained parameter file saved by the pre-discriminator and directly overwrite the corresponding parameters in the forward discriminator with the parameter values ​​from the file, the forward discriminator, after loading, already possesses all the capabilities of the pre-discriminator before the first round of formal generative adversarial training begins. Its accuracy in distinguishing between "real samples" and "fake / synthetic samples" is improved, meaning it is better at differentiating between genuine and fake samples.

[0132] It should be noted that the training logic of traditional generative adversarial networks (GANs) is "synchronous startup and alternating update of the generator and discriminator." That is, both start with randomly initialized parameters; the generator gradually learns to generate synthetic samples, while the discriminator simultaneously learns to distinguish between real and fake samples. The entire process is a dynamic game of "generating and discriminating simultaneously." However, the GAN used in this application adopts a reverse logic: the pre-discriminator is first pre-trained based on real data. After the pre-discriminator completes its pre-training and establishes a stable understanding of the distribution of "real faulty samples," the main discriminator loads all the parameters of the pre-discriminator after training and then starts the generator. This significantly improves the discriminator's accuracy in distinguishing between "real samples" and "fake / synthetic samples" before formal GAN ​​training, making it better at differentiating between real and fake samples.

[0133] S7. Random noise conforming to a normal distribution is concatenated with the fault category label and then input into the generator to generate synthetic samples. The synthetic samples and positive samples are then input into the updated positive discriminator, and the parameters are updated using the backpropagation algorithm based on the output of the positive discriminator. The generator and the positive discriminator then repeat the above process to carry out adversarial training and alternately update the parameters until the preset termination condition is met, at which point the adversarial training stops, and finally synthetic data that closely resembles the characteristics of real fault data is generated.

[0134] In this application, during the adversarial training between the generator and the positive discriminator, the parameters of the positive discriminator are frozen in the first 3 rounds, that is, only the generator parameters are updated and not the discriminator parameters are updated, so as to avoid the positive discriminator parameters being disturbed in the initial stage and ensure that it retains the real distribution recognition ability of the pre-trained model. After 3 rounds, the parameters of the positive discriminator are unfrozen and updated synchronously with the generator parameters.

[0135] In this application, after the generator inputs the synthetic sample into the updated positive discriminator, the positive discriminator outputs the probability that the synthetic sample belongs to the "real sample". Based on this probability, the generator calculates the "error of the synthetic sample being judged as a 'real sample'" through a loss function, and then uses the backpropagation algorithm to propagate the error back to the generator and adjust its parameters, so that the subsequently generated samples are more likely to be judged as "real samples" by the positive discriminator. In this way, the generator and the positive discriminator alternately update their parameters and drive each other in adversarial iteration: the generator tries its best to generate more realistic samples to "deceive" the positive discriminator, while the positive discriminator continuously optimizes to "expose" the generator's "disguise". Finally, in the process of dynamic equilibrium, the generator gradually optimizes its generation capability and finally generates synthetic data that is close to the distribution of real fault data.

[0136] In this application, the termination condition in step S7 is reaching Nash equilibrium.

[0137] It should be noted that, in addition to random noise, the generator input in this application includes fault category labels. These labels serve as conditional information, guiding the generator to generate fault data specific to that category. When training the pre-discriminator, this application provides two types of data: real images (positive samples) along with their corresponding real fault category labels; and fake images (negative samples) obtained by degrading real images, along with the fault category labels used to generate these fake images. Furthermore, during adversarial training between the positive discriminator and the generator, the input also consists of two types of data: synthetic samples generated by the generator, along with the fault category labels used to generate these samples; and positive samples, along with their corresponding real fault category labels.

[0138] S8. Construct a classifier and input the preprocessed data from step S2 and the synthetic data generated in step S7 into the classifier for training. Use the trained classifier as a bearing fault diagnosis model. The classifier includes three convolutional layers, a global average pooling layer, and a fully connected layer.

[0139] In this embodiment of the application, the input value of the first convolutional layer in the classifier is a 32×32×1 feature map, and the output value is a 16×16×128 feature map; the input value of the second convolutional layer is the output value of the first convolutional layer, and the output value is an 8×8×256 feature map; the input value of the third convolutional layer is the output value of the second convolutional layer, and the output value is a 4×4×512 feature map; the input value of the global average pooling layer is the output value of the third convolutional layer, and the output value is a 512-dimensional vector; the input value of the fully connected layer is the output value of the global average pooling layer, and the output value is the state category.

[0140] In this application, the fully connected layer of the classifier sets a Softmax function to output the predicted probability of each state category of the sample. Then, based on the predicted probability of each state category in the sample, the state category with the highest predicted probability is selected as the fault diagnosis result of the sample, and the sum of the predicted probabilities of each state category in any sample is 1.

[0141] For example, the state categories include inner circle fault, outer circle fault, and normal. When the classifier outputs the predicted probability of a sample belonging to each state category [inner circle fault, outer circle fault, normal] as [0.1, 0.7, 0.2], the sample is considered to be an outer circle fault.

[0142] In this application, the ratio of the preprocessed data in step S2 to the synthesized data in step S8 is 6:4.

[0143] In this application, the classifier loss function is as follows:

[0144]

[0145] In the formula, Here, M is the classifier loss, i is the sample index, N is the number of state categories, and c is the state category index. If the true label of the i-th sample belongs to state category c, then... =1, otherwise =0; Let be the predicted probability of the classifier that the i-th sample belongs to state category c.

[0146] It should be noted that this application also uses independent data to evaluate the accuracy of the bearing fault diagnosis model in order to test the predictive accuracy of the bearing fault diagnosis model. The independent data refers to the real-time operating data of the actual bearings that were not involved in the training.

[0147] S9. Obtain real-time bearing operating data and input it into the bearing fault diagnosis model to obtain bearing fault diagnosis results.

[0148] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A bearing fault intelligent diagnosis method based on an improved generative adversarial network, characterized in that, Specifically: S1. Obtain the bearing status dataset, including normal status data and fault status data; S2. Preprocess the bearing condition dataset, wherein the preprocessing is to convert the bearing condition dataset from one-dimensional signal data into a two-dimensional grayscale time-frequency image. S3. The preprocessed fault state data is used as a positive sample, and various degradation processes are applied to the positive sample to generate a negative sample. The degradation process refers to artificially introducing blur and noise interference into the image to simulate the distortion that may occur in the real scene. S4. Construct an improved generative adversarial network (GAN) model, which includes a generator and a discriminator, wherein: The generator includes a fully connected layer, a deconvolution layer, a GNA module, and two deconvolution layers, wherein the GNA module includes a first residual connection unit and a second residual connection unit. The discriminator includes a pre-discriminator and a forward discriminator, both of which consist of three convolutional layers and fully connected layers. Each convolutional layer contains a batch normalization layer and an activation function. The pre-discriminator is used to pre-learn the feature differences between the complete signal of a real faulty bearing and typical defects. The forward discriminator is used to determine whether the synthetic samples generated by the generator are synthetic data that closely resemble the features of real fault data, thereby forcing the generator to learn the distribution of real data and ultimately generate synthetic data that closely resembles the features of real fault data. S5. Assign supervisory labels to positive and negative samples, and input the labeled positive and negative samples into the pre-discriminator for pre-training. The pre-discriminator outputs a probability value for each sample and its class label. Using this probability value and the corresponding supervisory label, calculate the binary cross-entropy loss of the pre-discriminator, obtain the gradient through backpropagation, and update its parameters until the preset conditions are met. Then stop the pre-training and save all trainable parameters as a pre-training parameter file. The probability value is the confidence that the sample is a real sample under the given label conditions. The supervisory label for a positive sample is 1, indicating a real sample; the supervisory label for a negative sample is 0, indicating a fake sample. S6. The positive discriminator loads the pre-trained parameter file saved by the pre-discriminator and uses its parameters to initialize its own network structure. S7. Random noise that conforms to a normal distribution is concatenated with the fault category label and then input into the generator to generate synthetic samples. The synthetic samples and positive samples are then input into the updated positive discriminator. The parameters are updated using the backpropagation algorithm based on the output of the positive discriminator. The generator and the positive discriminator then repeat the above process to carry out adversarial training and alternately update the parameters until the preset termination condition is met, at which point the adversarial training stops, and finally synthetic data that closely resembles the characteristics of real fault data is generated. S8. Construct a classifier and input the preprocessed data from step S2 and the synthetic data generated in step S7 into the classifier for training. Use the trained classifier as a bearing fault diagnosis model. The classifier includes three convolutional layers, a global average pooling layer, and a fully connected layer. S9. Obtain real-time bearing operating data and input it into the bearing fault diagnosis model to obtain bearing fault diagnosis results.

2. The bearing fault intelligent diagnosis method based on improved generative adversarial network according to claim 1, characterized in that, Normal status data includes the bearing's operating data and corresponding status labels when it is in a normal state; fault status data includes the bearing's operating data and corresponding fault category labels when it is in a fault state. In addition, in step S2, continuous wavelet transform is used to convert the bearing state dataset from one-dimensional signal data into a two-dimensional grayscale time-frequency image.

3. The bearing fault intelligent diagnosis method based on improved generative adversarial network according to claim 1, characterized in that, In step S3, the ratio of positive to negative samples is 1:1; simultaneously, in step S3, three degradation processes are applied to the positive samples proportionally, specifically including: (1) Randomly select a portion of the frequency band for energy attenuation to simulate channel fading or frequency response imbalance; (2) Shift a portion of the image in the frequency dimension and fill with zeros to simulate carrier offset or calibration error; (3) Randomly occlude part of the pixel area, simulating signal loss or instantaneous interference.

4. The bearing fault intelligent diagnosis method based on improved generative adversarial network according to claim 1, characterized in that, The first residual connection unit includes a two-layer gated loop unit. After the first-layer gated loop unit, a batch normalization layer and a LeakyReLU activation function are set. After the second-layer gated loop unit, a batch normalization layer is set. At the same time, the first residual connection unit treats the two-layer gated loop unit as a whole, uses residual connection to fuse the output of the two-layer gated loop unit with the original input, and then uses the LeakyReLU function for activation. The second residual connection unit includes a channel attention submodule and a spatial attention submodule. The second residual connection unit uses residual connection to fuse the outputs of the first residual connection unit, the channel attention submodule, and the spatial attention submodule. At the same time, the second residual connection unit is activated using the LeakyReLU function.

5. The bearing fault intelligent diagnosis method based on improved generative adversarial network according to claim 4, characterized in that, The first residual connection unit is formed by fusing a two-layer gated loop unit with residual connections. The two-layer gated loop unit captures the temporal evolution pattern of fault features, while the residual connections preserve the underlying basic features, avoiding feature loss caused by deep processing. The specific steps are as follows: (11) The spatial dimension of the input feature map is transformed into a temporal sequence. The sequence data is processed through the gating mechanism of the gated loop unit—update gate and reset gate. The update gate controls the retention of effective features of the previous sequence, and the reset gate filters redundant information, thereby mining the fault development temporal pattern hidden in the features. (12) The features output by the first-level gated loop unit are batch normalized by channel. By calculating the mean and variance of each channel feature, the feature values ​​are adjusted to a stable distribution range to avoid feature distribution shift caused by the gated loop unit processing. (13) By introducing nonlinearity through the LeakyReLU function, a small amount of scaled output is retained for negative features, while the fault-related positive features are enhanced and some background noise interference is suppressed; (14) Using the features filtered in step (13) as the input of the second-level gated loop unit, repeat the timing processing logic of the first-level gated loop unit, but focus more on the mining of deep timing patterns, further filter redundant timing information, and strengthen the stable correlation of fault features over time. (15) The features output by the second-layer gated loop unit are normalized again at the channel level to eliminate the feature distribution deviation caused by the superposition of the two-layer gated loop units, and provide a stable feature basis for subsequent activation and residual connection. (16) The initial input of the GNA module is added and fused with the overall output of "double-layer gated loop unit + batch normalization layer + LeakyReLU function"; (17) After residual connection, nonlinearity is introduced through the LeakyReLU function and a small number of negative features are allowed to pass through, so as to obtain high-quality time series features; The second residual connection unit is formed by fusing a dual-attention mechanism with multi-branch residual connections. This layer focuses on the fault-related "key feature channels" and "key spatial regions" through channel attention and spatial attention, respectively. Then, it fuses multiple types of features through multi-branch residual connections to achieve precise enhancement of fault features. The specific steps are as follows: (21) The final output of the first residual connection unit is directly passed as the "basic branch" without any additional processing; (22) The channel attention submodule is used to perform global average pooling and global max pooling on the final output of the first residual connection unit by channel, condensing the global features of each channel into a single value. Then, these values ​​are fed into a fully connected bottleneck structure containing dimensionality reduction, ReLU activation, and dimensionality increase. The channel weights in the [0,1] interval are generated by activating the Sigmoid function to learn the importance of different channels to the task. Finally, the generated channel weights are multiplied with the original feature map channel by channel to enhance the feature response of key channels and suppress secondary channels. The final output is a weighted feature map of the same shape, i.e., the channel enhancement branch. (23) The spatial attention submodule is used to perform channel global average pooling and global max pooling on the final output of the first residual connection unit according to the spatial location, so as to condense the multi-channel features of each spatial location into a single value, reflecting the overall importance of the location; then, the weights of each spatial location are learned through a 3×3 convolutional layer, where the weights of the fault impact area are high and the weights of the noise area are low; finally, the weights are normalized to the [0, 1] interval using the Sigmoid function to obtain the spatial weight map, i.e., the spatial reinforcement branch; (24) Perform element-level addition fusion of the "basic branch, channel enhancement branch, and spatial enhancement branch" in steps (21)-(23) to ensure that the basic features, key channel features, and key spatial features are integrated without omission; (25) The integrated branch is introduced into nonlinearity through the LeakyReLU function. A small amount of scaled output is retained for the negative features that may be generated after fusion, while the positive effective fault features are enhanced.

6. The intelligent bearing fault diagnosis method based on improved generative adversarial networks according to claim 1, characterized in that, The generator loss function is shown below: , In the formula, For generator loss, For expectation operator, Random noise sampled from the noise distribution. For faulty tags sampled from the tag distribution, Synthetic samples generated by the generator; The probability that a synthetic sample is considered a real sample after the discriminator has judged it and its fault label. The loss function for the positive discriminator is shown below: , In the formula, For positive discriminator loss; This represents a sample taken from the real data distribution. These are real fault characteristics. For the corresponding fault label; It is the discriminator's output of the probability that a real sample and a fault label are "true and a match". Used to incentivize the positive discriminator to correctly identify real samples. Used to incentivize the positive discriminator to correctly identify synthetic samples; The loss function of the pre-discriminator is shown in the following equation: , In the formula, For the discriminator loss; This represents a sample drawn from a positive sample distribution. These are the fault characteristics of samples in the positive samples. The fault label is the corresponding sample in the positive sample; This represents a sample drawn from a negative sample distribution. This represents the sample fault characteristics in negative samples. The fault label is the corresponding sample in the negative sample; It is the "true and matching" probability output of the pre-discriminator for samples and fault labels in positive samples. This is used to enable the pre-discriminator to classify samples in the positive sample as true. It is the "true and matching" probability output of the pre-discriminator for samples and fault labels in negative samples. This is used to allow the pre-discriminator to classify samples in negative samples as false; The classifier loss function is shown below: , In the formula, Here, M is the classifier loss, i is the sample index, N is the number of state categories, and c is the state category index. If the true label of the i-th sample belongs to state category c, then... =1, otherwise =0; Let be the predicted probability of the classifier that the i-th sample belongs to state category c.

7. The intelligent bearing fault diagnosis method based on improved generative adversarial networks according to claim 1, characterized in that, Step S5 divides positive and negative samples into training and validation sets according to a certain ratio. The training set is input into the pre-discriminator for pre-training. After training, the validation set is input into the pre-discriminator for testing. The pre-discriminator stops pre-training when the accuracy of both positive and negative sample recognition on the validation set is stable in the range of 75% to 85%. If the accuracy of both positive and negative sample recognition on the validation set is not stable in the range of 75% to 85%, the pre-discriminator is retrained by adjusting the hyperparameters. The ratio of training to validation set is 7:3; the ratio of positive to negative samples in the training / validation set is 1:1; and the ratio of the three types of negative samples in the negative samples is 3:3:

4. The hyperparameters include learning rate, batch size, and training epochs.

8. The intelligent bearing fault diagnosis method based on improved generative adversarial networks according to claim 1, characterized in that, After the generator inputs the synthetic sample into the updated positive discriminator, the positive discriminator outputs the probability that the synthetic sample belongs to the "real sample". Based on this probability, the generator calculates the "error of the synthetic sample being judged as a 'real sample'" through a loss function. Then, using the backpropagation algorithm, the error is propagated back to the generator and its parameters are adjusted so that the subsequently generated samples are more likely to be judged as "real samples" by the positive discriminator. In this way, the generation capability is gradually optimized in the adversarial iteration with the positive discriminator, and finally synthetic data that is close to the distribution of real fault data is generated. In addition, during the adversarial training between the generator and the positive discriminator, the parameters of the positive discriminator are frozen in the first 3 rounds, that is, only the parameters of the generator are updated and not the parameters of the discriminator, so as to avoid the parameters of the positive discriminator being disturbed in the initial stage and ensure that it retains the real distribution recognition ability of the pre-trained model. After 3 rounds, the parameters of the positive discriminator are unfrozen and updated synchronously with the parameters of the generator.

9. The intelligent bearing fault diagnosis method based on improved generative adversarial networks according to claim 1, characterized in that, The termination condition in step S7 is reaching Nash equilibrium, and the ratio of preprocessed data to synthetic data in step S8 is 6:

4. In addition, the fully connected layer of the classifier sets the Softmax function to output the predicted probability of each state category of the sample. Then, based on the predicted probability of each state category in the sample, the state category with the highest predicted probability is selected as the fault diagnosis result of the sample, and the sum of the predicted probabilities of each state category in any sample is 1.