A method and system for diagnosing rolling bearing faults in small samples under varying operating conditions.
By using a convolutional neural network with meta-learning and DGAA attention module, the problems of insufficient sample size and data imbalance in fault diagnosis of rotating machinery under varying operating conditions are solved, achieving higher fault identification accuracy and generalization ability.
Patent Information
- Application Number
- CN202511108853.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-08
AI Technical Summary
Under varying operating conditions, fault diagnosis of rotating machinery faces challenges such as insufficient sample size, data imbalance, and complex fault modes, making it difficult for models to accurately identify faults.
We employ a meta-learning strategy and a convolutional neural network based on the DGAA attention module. By using sliding window sampling to segment sample data signals, we construct a convolutional feature extraction network, calculate category prototypes, and optimize model parameters to improve feature extraction capabilities.
It improves fault identification accuracy under small sample and variable operating conditions, has better generalization performance, and significantly improves the accuracy and robustness of fault diagnosis.
Smart Images

Figure CN120597101B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault diagnosis, and in particular to a method and system for diagnosing rolling bearing faults in a small sample under varying operating conditions. Background Technology
[0002] In the field of industrial production, especially in environments involving large equipment such as rotating machinery, there has always been a challenge—the difficulty in obtaining a sufficient number of fault samples. This is because these devices are repaired or replaced as soon as they begin to fail, or in the early stages of failure. Considering that these devices usually have a long operating life and a relatively low failure rate, the collection of bearing fault data requires long-term observation and recording. Therefore, the number of fault samples that can actually be used for learning and analysis is very limited. In addition, the changes in the operating environment and equipment requirements mean that rotating machinery often operates under variable working conditions, which further complicates the fault diagnosis situation. For rotating machinery under changing working conditions and with only a small sample of data, the following challenges are faced: (1) Insufficient sample size: The number of samples used for fault analysis and diagnosis is extremely scarce, which sets a high threshold for accurate fault diagnosis of rotating machinery. (2) Data imbalance caused by changes in working conditions: In actual use scenarios, due to the continuous changes in working conditions, the same type of fault may present different data distributions, which causes serious imbalance in the dataset. In this case, the model may be overly adapted to more common data samples and misjudge data under other operating conditions. (3) Complexity of failure modes: In environments with small samples and multiple operating conditions, different failure modes may interfere with each other, making it more difficult for the model to make judgments. In addition, there may be similarities between different failure modes, which further increases the risk of model misjudgment.
[0003] To address this challenge, this invention proposes a method and system for small-sample fault diagnosis under varying operating conditions. By employing a meta-learning strategy and constructing a convolutional neural network extractor based on the DGAA attention module, it helps generate more complete class prototypes in the prototype network. Experimental verification and analysis demonstrate that the proposed method has certain advantages in the field of small-sample fault diagnosis under varying operating conditions. Summary of the Invention
[0004] This solution addresses the problems and needs raised above by proposing a method and system for diagnosing rolling bearing faults in small samples under varying operating conditions. The above-mentioned technical objectives are achieved by adopting the following technical features, and several other technical benefits are also brought about.
[0005] One objective of this invention is to provide a method for diagnosing rolling bearing faults in a small sample under varying operating conditions, comprising the following steps:
[0006] S10: Acquire sample data signals through a vibration sensor;
[0007] S20: Divide the sample data signal by sliding window sampling, and divide the source domain and target domain according to the meta-learning strategy. The source domain includes the source domain support set and the source domain query set, and the target domain includes the target domain support set and the target domain query set.
[0008] S30: Construct multiple concatenated basic convolutional blocks, and add a DGAA module between two adjacent basic convolutional modules to form a DGAA-based convolutional feature extraction network; wherein, the DGAA module improves the model's feature extraction capability by combining global context dependency and dynamic channel weight adjustment;
[0009] S40: Input the samples from the source domain support set and the query set into the convolutional feature extraction network of DGAA, map them to a unified feature space, and obtain the feature vectors of each sample in the source domain support set and the source domain query set.
[0010] S50: Calculate the class prototype, i.e. the average value of the feature vectors of the samples of each class, through the feature vectors of the source domain support set;
[0011] S60: Calculate the probability that each sample belongs to each class by using the Euclidean distance between the feature vectors of the source domain query set samples and all class prototypes;
[0012] S70: Calculate the loss function and feed it back into the feature extraction network for training to complete the iterative optimization of the model parameters; input the support set and query set of the target domain into the trained convolutional feature extraction network to complete the classification of the query set samples in the target domain.
[0013] In one embodiment of the present invention, in step S30, the DGAA module, by combining global context dependency and dynamic channel weight adjustment, includes the following steps:
[0014] S31: Global Context Adaptation: Extract global dependency information from the input feature map, establish interaction relationships between different channels, and guide the optimization of local features through global information;
[0015] S32: Dynamic Feature Recalibration: By dynamically generating channel weights, the feature map is weighted and adjusted along the channel dimension to highlight the importance of key feature channels.
[0016] In one embodiment of the present invention, step S31, global context adaptation specifically includes the following steps:
[0017] S311: Divide the feature map into multiple groups according to the channel dimension. Each group contains multiple channels. Perform global average pooling on the features of each group to extract the global context vector.
[0018] S312: Perform convolution operation on the features after average pooling to achieve channel transformation, limit the range of feature values through activation function, apply global information of features to sequence features through broadcasting mechanism, and perform group normalization on the normalized features.
[0019] S313: Perform global pooling and normalization on the group-normalized features, and multiply the processed features with the reshaped grouped features after local convolution to obtain the first attention weight.
[0020] S314: The features that have undergone local convolution operations on the grouped features are then subjected to global pooling and normalization in sequence. The processed features are multiplied by the reshaped and group-normalized features to obtain the second attention weight.
[0021] S315: Combine the first attention weight and the second attention weight to fuse global information and local contextual information;
[0022] S316: Apply the fused attention weights to the original features and restore the original shape.
[0023] In one embodiment of the present invention, the specific steps of dynamic feature recalibration in step S32 are as follows:
[0024] S321: Extract global features along the time dimension through global average pooling operation, and convert the pooling result into vector form by removing the last dimension;
[0025] S322: The number of channels is increased through a fully connected layer. D Mapping to lower dimensions D / r ,in r This is the channel compression ratio; the Dropout function is applied to the dimensionality reduction results to further enhance the module's generalization ability;
[0026] S323: Transfer features from... via another fully connected layer D / r Map back to the original number of channels D To obtain feature weights ;
[0027] S324: Weights adjusted using the Sigmoid function Normalize to the range [0,1] to obtain the final dynamic weights, and restore the dynamic weights to a shape that matches the original features;
[0028] S325: Multiply the input features with the generated dynamic weights point by point to complete the channel-level dynamic adjustment.
[0029] In one embodiment of the present invention, in step S50, the average value of the feature vector of the category sample is... P c The expression is:
[0030] ;
[0031] In the formula, K The number of samples for each fault category; g(x) The prototype network is obtained through a feature extraction network.
[0032] In one embodiment of the present invention, in step S60, using softmax The function maps the distance between the query set and the prototype to obtain the probability of each category. The expression is as follows:
[0033] ;
[0034] In the formula, The average of the feature vectors of the query set samples and the c-th class samples. P c The Euclidean distance between them; C is the number of sample classes; The average value of the feature vectors of the c-th category samples; Let be the average value of the feature vector of the c'th category sample.
[0035] In one embodiment of the present invention, in step S70, the loss function The expression is:
[0036] ;
[0037] In the formula, The probability for each category; Indicates the first x j Under each sample y = y j conditions; Category labels; For the sample.
[0038] Another objective of this invention is to provide a fault diagnosis system for a small-sample rolling bearing fault diagnosis method under varying operating conditions, comprising:
[0039] The data acquisition module is configured to acquire sample data signals through a vibration sensor.
[0040] The data partitioning module is configured to partition sample data signals by sliding window sampling, and to partition the source domain and target domain according to the meta-learning strategy. The source domain includes the source domain support set and the source domain query set, and the target domain includes the target domain support set and the target domain query set.
[0041] The model building module is configured to construct multiple concatenated basic convolutional blocks, and add a DGAA module between two adjacent basic convolutional blocks to form a DGAA-based convolutional feature extraction network; the DGAA module improves the model's feature extraction capability by combining global context dependency and dynamic channel weight adjustment.
[0042] The feature vector module is configured to input samples from the source domain support set and the query set into the convolutional feature extraction network of DGAA, map them to a unified feature space, and obtain the feature vectors of each sample in the source domain support set and the source domain query set.
[0043] The type prototype module is configured to calculate the category prototype, i.e., the average value of the feature vectors of the samples of each category, from the feature vectors of the source domain support set.
[0044] The category probability module is configured to calculate the probability that each sample belongs to each category by using the Euclidean distance between the feature vectors of the source domain query set samples and all class prototypes.
[0045] The sample classification module is configured to calculate the loss function and feed it back to the feature extraction network for training, thereby completing the iterative optimization of the model parameters. The support set and query set of the target domain are input into the trained convolutional feature extraction network to complete the classification of the query set samples in the target domain.
[0046] In one embodiment of the present invention, the DGAA module includes:
[0047] Global Context Adaptive Module: Configured to extract global dependency information from the input feature map, establish interaction relationships between different channels, and guide the optimization of local features through global information;
[0048] The dynamic feature recalibration module is configured to adjust the feature map along the channel dimension by dynamically generated channel weights, highlighting the importance of key feature channels.
[0049] In one embodiment of the present invention, the global context adaptation module includes:
[0050] The average pooling unit is configured to divide the feature map into multiple groups according to the channel dimension, with each group containing multiple channels, and perform a global average pooling operation on the features of each group to extract the global context vector.
[0051] The normalization unit is configured to perform convolution operations on the features after average pooling to achieve channel transformation, limit the range of feature values through activation functions, apply global information of features to sequence features through a broadcast mechanism, and perform group normalization on the normalized features.
[0052] The first weight unit is configured to perform global pooling and normalization on the group-normalized features, and multiply the processed features with the reshaped grouped features after local convolution to obtain the first attention weight.
[0053] The second weight unit is configured to perform global pooling and normalization on the features that have undergone local convolution operations on the grouped features in sequence. The processed features are multiplied by the group-normalized features to obtain the second attention weight.
[0054] The fusion weight unit is configured to combine the first attention weight and the second attention weight to fuse global information and local context information.
[0055] The original unit is restored and configured to apply the fused attention weights to the original features, and the original shape is restored.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] 1. The proposed method can more accurately learn the feature distribution among different fault categories in small sample scenarios, thereby improving the accuracy of fault identification.
[0058] 2. Compared with other traditional diagnostic methods, the proposed method can achieve higher recognition accuracy under small sample and variable working conditions, and has better generalization performance.
[0059] The preferred embodiments of the invention will be described in more detail below with reference to the accompanying drawings, so as to facilitate an understanding of the features and advantages of the invention. Attached Figure Description
[0060] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments of the present invention will be briefly described below. The drawings are merely illustrative of some embodiments of the present invention and are not intended to limit the scope of the present invention to all embodiments.
[0061] Figure 1 A flowchart of a method for diagnosing rolling bearing faults under varying operating conditions with a small sample size, according to an embodiment of the present invention;
[0062] Figure 2 This is a schematic diagram of the structure of a DGAA-based convolutional feature extraction network according to an embodiment of the present invention;
[0063] Figure 3This is a schematic diagram of the experimental apparatus for HUST bearing fault diagnosis according to an embodiment of the present invention;
[0064] Figure 4 This is a confusion matrix diagram of the method described in this paper under 5 shots in Experiment 1 according to an embodiment of the present invention;
[0065] Figure 5 This is a comparison chart of different algorithms in Experiment 1 according to an embodiment of the present invention;
[0066] Figure 6 The figure shows a comparison of different algorithms in Experiment 2 according to an embodiment of the present invention.
[0067] Figure 7 This is a comparison chart of different algorithms in Experiment 3 according to an embodiment of the present invention.
[0068] List of attached images:
[0069] Speed controller 1;
[0070] Motor 2;
[0071] Axis 3;
[0072] Accelerometer 4;
[0073] Bearing 5;
[0074] Data acquisition board 6. Detailed Implementation
[0075] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. The same reference numerals in the drawings represent the same components. It should be noted that the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0076] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms “first,” “second,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, “an” or “a” and similar terms do not necessarily indicate a quantity limitation. Terms such as “comprising” or “including” mean that the element or object preceding the word encompasses the element or object listed following the word and its equivalents, without excluding other elements or objects. Terms such as “connected” or “linked” are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as “upper,” “lower,” “left,” and “right” are used only to indicate relative positional relationships; these relative positional relationships may change accordingly when the absolute position of the described object changes.
[0077] According to a first aspect of the present invention, a method for diagnosing rolling bearing faults in a small sample under varying operating conditions is provided, such as... Figure 1 As shown, it includes the following steps:
[0078] S10: Acquire sample data signals through a vibration sensor;
[0079] S20: Divide the sample data signal by sliding window sampling, and divide the source domain and target domain according to the meta-learning strategy. The source domain includes the source domain support set and the source domain query set, and the target domain includes the target domain support set and the target domain query set.
[0080] S30: Construct multiple concatenated basic convolutional blocks, and add a DGAA module between two adjacent basic convolutional modules to form a DGAA-based convolutional feature extraction network; wherein, the DGAA module improves the model's feature extraction capability by combining global context dependency and dynamic channel weight adjustment;
[0081] S40: Input the samples from the source domain support set and the query set into the convolutional feature extraction network of DGAA, map them to a unified feature space, and obtain the feature vectors of each sample in the source domain support set and the source domain query set.
[0082] S50: Calculate the class prototype, i.e. the average value of the feature vectors of the samples of each class, through the feature vectors of the source domain support set;
[0083] S60: Calculate the probability that each sample belongs to each class by using the Euclidean distance between the feature vectors of the source domain query set samples and all class prototypes;
[0084] S70: Calculate the loss function and feed it back into the feature extraction network for training to complete the iterative optimization of the model parameters; input the support set and query set of the target domain into the trained convolutional feature extraction network to complete the classification of the query set samples in the target domain.
[0085] This diagnostic method can learn the feature distribution between different fault categories more accurately in small sample scenarios, thereby improving the accuracy of fault identification. Compared with other traditional diagnostic methods, this method can achieve higher identification accuracy under small sample and variable operating conditions and has better generalization performance.
[0086] In one embodiment of the present invention, such as Figure 2 As shown, in step S30, the DGAA module combines global context dependency and dynamic channel weight adjustment, including the following steps:
[0087] S31: Global Context Adaptation: Extract global dependency information from the input feature map, establish interaction relationships between different channels, and guide the optimization of local features through global information;
[0088] S32: Dynamic Feature Recalibration: By dynamically generating channel weights, the feature map is weighted and adjusted along the channel dimension to highlight the importance of key feature channels.
[0089] In one embodiment of the present invention, such as Figure 2 As shown, step S31, global context adaptation specifically includes the following steps:
[0090] S311: Divide the feature map into multiple groups according to the channel dimension. Each group contains multiple channels. Perform global average pooling on the features of each group to extract the global context vector.
[0091] Specifically, the shape of the input data: the format of the input data. Where B is the batch size, D is the number of channels, and L is the sequence length;
[0092] Grouping operation: Divide the input tensor into channels according to the grouping factor `groups`.
[0093] ;
[0094] G =groups, the number of channels in each group is This allows each group to be processed independently, reducing computational complexity.
[0095] Global average pooling: Perform global average pooling on the sequence dimension L of each group:
[0096] ;
[0097] Global pooling extracts global information for each set of features in the sequence dimension.
[0098] S312: Perform convolution operation on the features after average pooling to achieve channel transformation, limit the range of feature values through activation function, apply global information of features to sequence features through broadcasting mechanism, and perform group normalization on the normalized features.
[0099] Convolution operation: for pooled features Perform channel transformation:
[0100] ;
[0101] The purpose of 1x1 convolution is to adjust the channel dimension of features while preserving global information;
[0102] Normalization and Activation: Global Information Applied to the grouping feature group_x:
[0103] ;
[0104] right Apply Sigmoid activation to restrict the feature values to the range [0,1].
[0105] The broadcast mechanism will Global information is applied to sequence features.
[0106] Normalized features are group-normalized to improve training stability.
[0107] S313: Perform global pooling and normalization on the group-normalized features, and multiply the processed features with the reshaped grouped features after local convolution to obtain the first attention weight.
[0108] The formula for global pooling is as follows: The formula for reshaping and transposing is: ; Softmax Normalization process generates attention weights x11 ;
[0109] For local convolution operations, such as 3x3 convolution operations: for grouped features group_x Perform local convolution operations:
[0110] ;
[0111] 3x3 convolution extracts local contextual information, enhancing feature representation capabilities.
[0112] The formula for reshaping features from local convolution operations is as follows: Obtain weights x12 .
[0113] S314: The features that have undergone local convolution operations on the grouped features are then subjected to global pooling and normalization in sequence. The processed features are multiplied by the reshaped and group-normalized features to obtain the second attention weight.
[0114] The calculation process is similar to step S313, and will not be repeated here.
[0115] S315: Combine the first attention weight and the second attention weight to fuse global information and local contextual information;
[0116] Add the two sets of attention weights together: ;
[0117] Attention weights combine global information and local contextual information.
[0118] S316: Apply the fused attention weights to the original features and restore the original shape.
[0119] Apply attention weights to the original feature group_x and restore the original shape:
[0120] .
[0121] In other words, the global context adaptation function specifically includes: global information extraction: extracting global features of the sequence through global average pooling; group processing: grouping by channel to reduce computational complexity while enhancing local features; dynamic attention mechanism: fusing global and local features and adjusting each group of features through attention weights; multi-scale fusion: using 1x1 and 3x3 convolutions to combine global and local information to achieve adaptive adjustment of features. This module realizes the dynamic fusion of global context and local features, and is suitable for adaptive enhancement tasks of time series or one-dimensional features.
[0122] In one embodiment of the present invention, such as Figure 2 As shown, the specific steps of dynamic feature recalibration in step S32 are as follows:
[0123] S321: Extract global features along the time dimension through global average pooling operation, and convert the pooling result into vector form by removing the last dimension;
[0124] Global information extraction: Global features are extracted along the time dimension using global average pooling.
[0125] ;
[0126] Global feature vectorization: The pooling result is converted into vector form by removing the last dimension, which facilitates the subsequent calculation of dynamically adjusted weights.
[0127] ;
[0128] Here, global features in vector form are easier for fully connected layers to process.
[0129] S322: The number of channels is increased through a fully connected layer. D Mapping to lower dimensions D / r ,in r This is the channel compression ratio; the Dropout function is applied to the dimensionality reduction results to further enhance the module's generalization ability;
[0130] Dimensionality reduction mapping: The number of channels is reduced using a fully connected layer. D Mapping to lower dimensions D / r ,in r It is the channel compression ratio, which controls the computational complexity; its expression is:
[0131] ;
[0132] Random regularization: for dimensionality reduction results Apply Dropout to further enhance the module's generalization ability:
[0133] ;
[0134] S323: Transfer features from... via another fully connected layer D / r Map back to the original number of channels D To obtain feature weights ;
[0135] Dimensional Upgrading Mapping: Transferring features from D to D through another fully connected layer / r Map back to the original number of channels D :
[0136] ;
[0137] S324: Weights adjusted using the Sigmoid function Normalize to the range [0,1] to obtain the final dynamic weights, and restore the dynamic weights to a shape that matches the original features;
[0138] Activation operation: Weights are adjusted using the Sigmoid function. Normalizing to the range [0,1] yields the final dynamic weights:
[0139] ;
[0140] Reshape weights: Restore dynamic weights to a shape that matches the original features.
[0141] ;
[0142] S325: The input features are multiplied point by point with the generated dynamic weights to complete the channel-level dynamic adjustment, so that the adjusted output features retain the original structure of the input features, while the dynamic weights enhance the capture of global context information.
[0143] Dynamic feature adjustment: The input features are multiplied point by point with the generated dynamic weights to complete the channel-level dynamic adjustment, as shown in the following expression:
[0144] ;
[0145] in, Indicates element-wise multiplication; adjusted output characteristics It preserves the original structure of the input features while enhancing the capture of global contextual information through dynamic weights.
[0146] In one embodiment of the present invention, in step S50, the average value of the feature vector of the category sample is... P c The expression is:
[0147] ;
[0148] In the formula, K The number of samples for each fault category; g(x) The prototype network is obtained through a feature extraction network.
[0149] In one embodiment of the present invention, in step S60, using softmax The function maps the distance between the query set and the prototype to obtain the probability of each category. The expression is as follows:
[0150] ;
[0151] In the formula, The average of the feature vectors of the query set samples and the c-th class samples. P c The Euclidean distance between them; C is the number of sample classes; The average value of the feature vectors of the c-th category samples; Let be the average value of the feature vector of the c'th category sample.
[0152] In one embodiment of the present invention, the average value of the feature vectors of the query set samples and the c-th category samples is... Pc The expression for the Euclidean distance between them is:
[0153] ;
[0154] In the formula, g(x) The prototype network is obtained through a feature extraction network.
[0155] In one embodiment of the present invention, in step S70, the loss function The expression is:
[0156] ;
[0157] In the formula, The probability for each category; Indicates the first x j Under each sample y = y j conditions; Category labels; For the sample.
[0158] A fault diagnosis system for a small-sample rolling bearing fault diagnosis method under varying operating conditions according to a second aspect of the present invention includes:
[0159] The data acquisition module is configured to acquire sample data signals through a vibration sensor.
[0160] The data partitioning module is configured to partition sample data signals by sliding window sampling, and to partition the source domain and target domain according to the meta-learning strategy. The source domain includes the source domain support set and the source domain query set, and the target domain includes the target domain support set and the target domain query set.
[0161] The model building module is configured to construct multiple concatenated basic convolutional blocks, and add a DGAA module between two adjacent basic convolutional blocks to form a DGAA-based convolutional feature extraction network; the DGAA module improves the model's feature extraction capability by combining global context dependency and dynamic channel weight adjustment.
[0162] The feature vector module is configured to input samples from the source domain support set and the query set into the convolutional feature extraction network of DGAA, map them to a unified feature space, and obtain the feature vectors of each sample in the source domain support set and the source domain query set.
[0163] The type prototype module is configured to calculate the category prototype, i.e., the average value of the feature vectors of the samples of each category, from the feature vectors of the source domain support set.
[0164] The category probability module is configured to calculate the probability that each sample belongs to each category by using the Euclidean distance between the feature vectors of the source domain query set samples and all class prototypes.
[0165] The sample classification module is configured to calculate the loss function and feed it back to the feature extraction network for training, thereby completing the iterative optimization of the model parameters. The support set and query set of the target domain are input into the trained convolutional feature extraction network to complete the classification of the query set samples in the target domain.
[0166] This diagnostic system can learn the feature distribution between different fault categories more accurately in small sample scenarios, thereby improving the accuracy of fault identification. The system can achieve higher identification accuracy and better generalization performance under small sample and variable operating conditions.
[0167] In one embodiment of the present invention, the DGAA module includes:
[0168] Global Context Adaptive Module: Configured to extract global dependency information from the input feature map, establish interaction relationships between different channels, and guide the optimization of local features through global information;
[0169] The dynamic feature recalibration module is configured to adjust the feature map along the channel dimension by dynamically generated channel weights, highlighting the importance of key feature channels.
[0170] In one embodiment of the present invention, and in one example of the present invention, the global context adaptation module includes:
[0171] The average pooling unit is configured to divide the feature map into multiple groups according to the channel dimension, with each group containing multiple channels. It then performs a global average pooling operation on the features of each group to extract the global context vector. In other words, the average pooling unit includes a grouping layer and an average pooling layer. The grouping layer is used to divide the feature map into multiple groups according to the channel dimension, with each group containing multiple channels. The average pooling layer is used to perform a global average pooling operation on the features of each group to extract the global context vector.
[0172] The normalization unit is configured to perform convolution operations on the features after average pooling to achieve channel transformation, limit the range of feature values through an activation function, and apply the global information of the features to the sequence features through a broadcast mechanism, and perform group normalization on the normalized features. In other words, the normalization unit includes: a convolutional layer (Conv(1×1), a sigmoid function layer, a re-weighting layer, and a group normalization layer. The convolutional layer performs convolution operations on the features after average pooling to achieve channel transformation; the sigmoid function limits the range of feature values; the re-weighting layer applies the global information of the features processed by the sigmoid function and the grouping layer to the sequence features through a broadcast mechanism; and the normalization layer performs group normalization on the features.
[0173] The first weighting unit is configured to perform global pooling and normalization on the group-normalized features, and multiply the processed features with the reshaped group features after local convolution to obtain the first attention weight. The first weighting unit includes: an average pooling layer (Avg Pool), a normalization exponential function (Softmax), and a matrix multiplication layer (Matmul). The average pooling layer and the normalization exponential function perform global pooling and normalization on the features, respectively. The matrix multiplication layer (Matmul) multiplies the processed features with the reshaped group features after local convolution (Conv(3×3)) to obtain the first attention weight.
[0174] The second weighting unit is configured to perform global pooling and normalization on the features that have undergone local convolution operations on the grouped features. The processed features are then multiplied by the group-normalized features to obtain the second attention weight. The second weighting unit includes: a convolutional layer (Conv(3×3), an average pooling layer (Avg Pool), a normalization exponential function (Softmax), and a matrix multiplication layer (Matmul). The convolutional layer (Conv(3×3)) performs convolution operations on the grouped features. The average pooling layer and the normalization exponential function perform global pooling and normalization on the features, respectively. The matrix multiplication layer (Matmul) multiplies the processed features with the group-normalized features to obtain the second attention weight.
[0175] The fusion weight unit is configured to combine the first attention weight and the second attention weight to fuse global information and local context information.
[0176] The original recovery unit is configured to apply the fused attention weights to the original features and restore their original shape. The original recovery unit includes a sigmoid function, a re-weighting layer, and an average pooling layer (AvgPool). The sigmoid function processes the features of the fused weight unit, the re-weighting layer applies the fused attention weights to the original features, and the average pooling layer performs global pooling to restore the original shape of the features.
[0177] In one example of the present invention, the dynamic feature recalibration module includes:
[0178] The global pooling unit is configured to extract global features along the time dimension through a global average pooling operation, and convert the pooling result into a vector form by removing the last dimension. The global pooling unit includes a mean processing layer (Mean), which extracts global features along the time dimension through a global average pooling operation.
[0179] Dimensionality reduction generalization unit, configured to generalize the number of channels through a fully connected layer D Mapping to lower dimensions D / r ,in r This refers to the channel compression ratio; the Dropout function is applied to the dimensionality reduction result to further enhance the module's generalization ability; the dimensionality reduction generalization unit includes: a fully connected layer (FC), a rectified linear unit (ReLU), and a Dropout function. The fully connected layer (FC) compresses the number of channels... D Mapping to lower dimensions D / r The rectified linear unit processes the lower-dimensional features, and the Dropout function further enhances the generalization ability of the dimensionality reduction module by processing the dimensionality reduction results.
[0180] Feature weighting units, configured to transfer features from another fully connected layer D / r Map back to the original number of channels D To obtain feature weights The feature weighting unit includes a fully connected layer (FC), which transfers features from... D / r Map back to the original number of channels D To obtain feature weights .
[0181] Dynamic weight unit, configured to apply weights via the Sigmoid function. Normalized to the range [0,1], the final dynamic weights are obtained, and the dynamic weights are restored to a shape that matches the original features; the dynamic weight unit includes a Sigmoid function for adjusting the weights. Normalize to the range [0,1] to obtain the final dynamic weights.
[0182] The dynamic adjustment unit is configured to multiply the input features with the generated dynamic weights point by point to complete the channel-level dynamic adjustment, so that the adjusted output features retain the original structure of the input features, while the dynamic weights enhance the capture of global context information.
[0183] It should be noted that the rolling bearing fault diagnosis system under variable operating conditions with a small sample of samples of rolling bearing faults under variable operating conditions of the present invention can also perform any of the processing described in the previously described method for diagnosing rolling bearing faults under variable operating conditions with a small sample of samples, and the specific details are not repeated here.
[0184] Specific Cases
[0185] The HUST bearing dataset was collected from the Spectra Quest mechanical failure simulator, and its structure diagram is as follows: Figure 3 As shown. The simulator includes a speed control unit 1, a motor 2, a shaft 3, an acceleration sensor 4, a bearing 5, and a data acquisition board 6. The bearing model tested is ER-16K. The sampling frequency of the original signal is 25.6kHz, and different speeds (65Hz, 70Hz, 75Hz, and 80Hz) are implemented. In this experiment, eight bearing health conditions monitored by the test bench were selected: (1) normal, (2) moderate inner ring failure, (3) severe inner ring failure and seat ring failure, (4) moderate outer ring failure, (5) severe outer ring failure, (6) moderate rolling element failure, (7) severe rolling element failure, and (8) severe combined failure. In this experiment, sliding window sampling was used, with a sample length of 1024 and a window length of 200. 20 samples were selected for training in each category, and 200 samples were selected for testing. The specific description of the dataset for this experiment is shown in Table 1. Table 2 is a description of the data conditions. Similar to Case 1, Table 3 is a description of three different experimental conditions.
[0186]
[0187]
[0188]
[0189] (1) Experiment 1: Small sample fault diagnosis of bearings under single working conditions
[0190] Similarly, to verify the diagnostic performance of the proposed method in a small sample under a single working condition, the proposed method was compared with four other methods in a small sample, with the same experimental configuration. Figure 4 Table 4 shows the confusion matrix of the proposed method under 5 shots, and the comparison results of different methods in Experiment 1. Figure 5The bar chart shows the comparison of different methods under a single working condition in Experiment 1. Analysis of the chart and table reveals that the optimized prototype network (the proposed method) demonstrates significant performance advantages in the small-sample fault diagnosis task under the same working condition on the HUST bearing dataset, especially exhibiting excellent robustness and generalization ability under extremely low sample conditions (1-shot).
[0191] Specifically, in 8-way-5-shot, 8-way-3-shot, and 8-way-1-shot configurations, the classification accuracy of our proposed method reaches 94.8%, 93.4%, and 90.1%, respectively, significantly outperforming the unoptimized prototype network (ProtoNet) in all settings. Compared to ProtoNet, our method improves accuracy by 8.1%, 8.8%, and 18.1% in these three configurations, indicating significant improvements in feature extraction and class discrimination. The improvement is even more significant compared to RelationNet. In 5-shot, 3-shot, and 1-shot configurations, our method outperforms RelationNet by 43.3%, 48.4%, and 47.1%, respectively, demonstrating that the optimized prototype network significantly surpasses RelationNet in knowledge transfer and parameter tuning capabilities across learning tasks. Our proposed method also performs excellently for CNN-based methods (CNN-MMD and CNN-FT). For example, compared with CNN-MMD, our proposed method achieves performance improvements of 11.8%, 23.4%, and 22.1% in 5-shot, 3-shot, and 1-shot configurations, respectively; and compared with CNN-FT, the improvements are 14.8%, 18.4%, and 27.6%. These results demonstrate that our proposed method is not only suitable for small-sample fault diagnosis tasks, but also improves diagnostic performance by optimizing feature representations, significantly outperforming traditional CNN-based methods.
[0192]
[0193] (2) Experiment 2: Small sample fault diagnosis of bearings under variable working conditions
[0194] Table 5 shows the comparison results of different methods in Experiment 2. Figure 6 The bar chart shows the comparison of different methods in Experiment 2. Based on this analysis, the optimized prototype network proposed in this paper demonstrates superior generalization ability and adaptability to changing operating conditions in the small-sample fault diagnosis task of the HUST bearing dataset under varying operating conditions.
[0195] Specifically, our proposed method achieves classification accuracies of 94%, 92.2%, and 85% in 8-way-5-shot, 8-way-3-shot, and 8-way-1-shot configurations, respectively, significantly higher than all comparable methods. For example, compared to the unoptimized ProtoNet, our method improves accuracy by 15.5%, 24.2%, and 25% in the three configurations, demonstrating its strong adaptability to cross-task scenarios in feature extractor optimization. Compared to RelationNet, our method's advantages are even more pronounced. In 5-shot, 3-shot, and 1-shot configurations, our method outperforms RelationNet by 47.7%, 54.2%, and 50%, respectively, indicating that the optimized ProtoNet significantly surpasses RelationNet in feature representation and class discrimination across different scenarios. For CNN-based methods, our proposed method also exhibits strong cross-task adaptability. For example, compared to CNN-MMD, our proposed method achieves accuracy improvements of 29%, 29.9%, and 35% in 5-shot, 3-shot, and 1-shot configurations, respectively; compared to CNN-FT, the improvements are 22%, 29.7%, and 23%. This demonstrates that our proposed method significantly outperforms traditional CNN-based methods when handling tasks with varying operating conditions by optimizing feature representation capabilities. This also shows that our proposed method can effectively address the challenge of inconsistent operating conditions between the source and target domains, validating its robustness, adaptability, and efficiency in cross-condition few-shot learning tasks.
[0196]
[0197] (3) Experiment 3: Fault diagnosis of bearings with small sample under unknown faults
[0198] As shown in Table 6, the optimized prototype network proposed in this paper demonstrates superior generalization ability and robustness in the unknown fault small sample diagnosis task of the HUST bearing dataset, even when the fault category of the target domain has never appeared in the source domain training. Figure 7 This is a bar chart comparing different methods in Experiment 3.
[0199] Specifically, the proposed method achieves classification accuracies of 96.3%, 96.1%, and 92.9% in 8-way-5-shot, 8-way-3-shot, and 8-way-1-shot configurations, respectively, demonstrating the best performance among all compared methods. Compared to the unoptimized prototype network (ProtoNet), the proposed method improves accuracy by 3.5% and 9.4% in 3-shot and 1-shot configurations, respectively, demonstrating the strong adaptability of the optimized feature extractor in handling unknown fault categories. Compared to RelationNet, the proposed method achieves higher accuracies of 3.3%, 7.1%, and 5.6% in 5-shot, 3-shot, and 1-shot configurations, respectively, showcasing the stronger feature representation and class discrimination capabilities of the optimized prototype network when handling unknown fault categories. Furthermore, the proposed method exhibits an overwhelming advantage over traditional CNN-based methods (such as CNN-MMD and CNN-FT). The accuracy of CNN-MMD is 33% across all configurations, while the accuracy improvement of our proposed method is as high as 63.3%, 63.1%, and 59.9%. For CNN-FT, the accuracy of our proposed method is improved by 32.3%, 43.1%, and 47.1% in 5-shot, 3-shot, and 1-shot configurations, respectively, further illustrating the limitations of traditional CNN methods in handling unknown fault categories, while our proposed method can efficiently address this challenge.
[0200] In summary, the three experimental results fully verify the superior performance of the proposed method in small-sample fault diagnosis tasks, demonstrating its strong robustness and wide applicability in complex fault scenarios, and providing an efficient, accurate and reliable solution for solving the problem of small-sample fault diagnosis.
[0201]
[0202] The foregoing description, with reference to preferred embodiments, details an exemplary implementation of the rolling bearing fault diagnosis method and system under varying operating conditions with a small sample size proposed in this invention. However, those skilled in the art will understand that various modifications and alterations can be made to the above specific embodiments without departing from the concept of this invention, and various combinations can be made to the various technical features and structures proposed in this invention without exceeding the protection scope of this invention, which is determined by the appended claims.
Claims
1. A method for diagnosing rolling bearing faults in a small sample under varying operating conditions, characterized in that, Includes the following steps: S10: Acquire sample data signals through a vibration sensor; S20: Divide the sample data signal by sliding window sampling, and divide the source domain and target domain according to the meta-learning strategy. The source domain includes the source domain support set and the source domain query set, and the target domain includes the target domain support set and the target domain query set. S30: Construct multiple concatenated basic convolutional blocks, and add a DGAA module between two adjacent basic convolutional modules to form a DGAA-based convolutional feature extraction network; the DGAA module improves the model's feature extraction capability by combining global context dependency and dynamic channel weight adjustment; the DGAA module's combination of global context dependency and dynamic channel weight adjustment includes the following steps: S31: Global context adaptation: Extract global dependency information from the input feature map, establish the interaction relationship between different channels, and guide the optimization of local features through global information; S32: Dynamic feature recalibration: Adjust the feature map in terms of channel dimension through dynamically generated channel weights to highlight the importance of key feature channels; in step S31, global context adaptation specifically includes the following steps: S311: Divide the feature map into multiple groups according to the channel dimension, each group contains multiple channels, and perform feature recalibration on each group. S312: Perform global average pooling to extract the global context vector; S313: Perform convolution on the pooled features to transform channels, limit the range of feature values through an activation function, and apply global information of the features to the sequence features through a broadcast mechanism, and perform group normalization on the normalized features; S314: Perform global pooling and normalization on the group normalized features, and multiply the processed features with the reshaped grouped features after local convolution to obtain the first attention weight; S315: Perform global pooling and normalization on the grouped features after local convolution, and multiply the processed features with the reshaped group normalized features to obtain the second attention weight; S316: Add the first attention weight and the second attention weight to fuse global information and local context information; S317: Apply the fused attention weight to the original features and restore the original shape. S40: Input the samples from the source domain support set and the query set into the convolutional feature extraction network of DGAA, map them to a unified feature space, and obtain the feature vectors of each sample in the source domain support set and the source domain query set. S50: Calculate the class prototype, i.e. the average value of the feature vectors of the samples of each class, through the feature vectors of the source domain support set; S60: Calculate the probability that each sample belongs to each class by using the Euclidean distance between the feature vectors of the source domain query set samples and all class prototypes; S70: Calculate the loss function and feed it back into the feature extraction network for training to complete the iterative optimization of the model parameters; input the support set and query set of the target domain into the trained convolutional feature extraction network to complete the classification of the query set samples in the target domain.
2. The method for diagnosing rolling bearing faults under varying operating conditions with a small sample size, as described in claim 1, is characterized in that... In step S32, the specific steps of dynamic feature recalibration are as follows: S321: Extract global features along the time dimension through global average pooling operation, and convert the pooling result into vector form by removing the last dimension; S322: The number of channels is increased through a fully connected layer. D Mapping to lower dimensions D / r ,in r This is the channel compression ratio; the Dropout function is applied to the dimensionality reduction result to further enhance the module's generalization ability; S323: Transfer features from... via another fully connected layer D / r Map back to the original number of channels D To obtain feature weights ; S324: Weights adjusted using the Sigmoid function Normalize to the range [0,1] to obtain the final dynamic weights, and restore the dynamic weights to a shape that matches the original features; S325: Multiply the input features with the generated dynamic weights point by point to complete the channel-level dynamic adjustment.
3. The method for diagnosing rolling bearing faults under varying operating conditions with a small sample size, as described in claim 1, is characterized in that... In step S50, the average value of the feature vector of the sample in that category Pc The expression is: ; In the formula, K The number of samples for each fault category; g(x) The prototype network is obtained through a feature extraction network.
4. The method for diagnosing rolling bearing faults under varying operating conditions with a small sample size, as described in claim 1, is characterized in that... In step S60, using softmax The function maps the distance between the query set and the prototype to obtain the probability of each category. The expression is as follows: ; In the formula, The average of the feature vectors of the query set samples and the c-th class samples. Pc The Euclidean distance between them; C represents the number of sample categories; The average value of the feature vectors of the c-th category samples; Let be the average value of the feature vector of the c'th category sample.
5. The method for diagnosing rolling bearing faults under varying operating conditions with a small sample size, as described in claim 1, is characterized in that... In step S70, the loss function The expression is: ; In the formula, The probability for each category; Indicates the first xj Under each sample y = yj conditions; Category labels; For the sample.
6. A fault diagnosis system for a rolling bearing fault diagnosis method with a small sample under varying operating conditions as described in any one of claims 1 to 5, characterized in that, include: The data acquisition module is configured to acquire sample data signals through a vibration sensor. The data partitioning module is configured to partition sample data signals by sliding window sampling, and to partition the source domain and target domain according to the meta-learning strategy. The source domain includes the source domain support set and the source domain query set, and the target domain includes the target domain support set and the target domain query set. The model building module is configured to construct multiple concatenated basic convolutional blocks, and add a DGAA module between adjacent basic convolutional blocks to form a DGAA-based convolutional feature extraction network. The DGAA module enhances the model's feature extraction capability by combining global context dependencies and dynamic channel weight adjustment. The DGAA module includes: a global context adaptation module configured to extract global dependency information from the input feature map, establish interaction relationships between different channels, and guide local feature optimization through global information; a dynamic feature recalibration module configured to perform weighted adjustments on the feature map along the channel dimension using dynamically generated channel weights, highlighting the importance of key feature channels; and a global context adaptation module including: a averaging pooling unit configured to divide the feature map into multiple groups along the channel dimension, each group containing multiple channels, perform global average pooling on the features of each group, and extract a global context vector; and a normalization unit configured to... The system is configured to: 1) perform convolution operations on the features after average pooling to achieve channel transformation, limit the range of feature values through an activation function, apply global information of the features to the sequence features through a broadcast mechanism, and perform group normalization on the normalized features; 2) perform global pooling and normalization on the group-normalized features, and multiply the processed features with the reshaped grouped features after local convolution operations to obtain the first attention weight; 3) perform global pooling and normalization on the grouped features after local convolution operations, and multiply the processed features with the group-normalized features to obtain the second attention weight; 4) perform a fusion weight unit to fuse the first and second attention weights, combining global and local contextual information; and 5) restore the original shape by applying the fused attention weights to the original features. The feature vector module is configured to input samples from the source domain support set and the query set into the convolutional feature extraction network of DGAA, map them to a unified feature space, and obtain the feature vectors of each sample in the source domain support set and the source domain query set. The type prototype module is configured to calculate the category prototype, i.e., the average value of the feature vectors of the samples of each category, from the feature vectors of the source domain support set. The category probability module is configured to calculate the probability that each sample belongs to each category by using the Euclidean distance between the feature vectors of the source domain query set samples and all class prototypes. The sample classification module is configured to calculate the loss function and feed it back to the feature extraction network for training, thereby completing the iterative optimization of the model parameters. The support set and query set of the target domain are input into the trained convolutional feature extraction network to complete the classification of the query set samples in the target domain.
Citation Information
Patent Citations
Bearing fault diagnosis method and device based on small sample learning and medium
CN118606815A