Gearbox fault diagnosis method and system based on frequency band attention metric learning

By introducing a combination of band attention module and measurement learning in the gearbox fault diagnosis model, the problems of loss of feature information and difficulty in separating samples are solved, which significantly improves the accuracy of fault diagnosis.

CN114813126BActive Publication Date: 2025-04-15CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210364394.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-08
Publication Date
2025-04-15
Estimated Expiration
2042-04-08

AI Technical Summary

Technical Problem

The prior art has problems such as loss of feature information and difficulty in separating samples in gearbox fault diagnosis, resulting in poor diagnostic results.

Method used

The band attention-based metric learning method is adopted, and band attention learning is performed in the fault diagnosis model through the band attention module. Combined with the idea of ​​metric learning, similar samples are adaptively weighted to effectively extract the characteristic differences between different categories.

Benefits of technology

It effectively avoids the loss of information when extracting channel features, improves the feature extraction capability of the model, and can more effectively identify difficult samples, improving the accuracy of gearbox fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114813126B_ABST
    Figure CN114813126B_ABST
Patent Text Reader

Abstract

The present invention relates to the fields of mechanical fault diagnosis, pattern recognition technology, and specifically to a rolling bearing fault diagnosis method and system based on frequency band attention and metric learning. The method comprises obtaining a fault vibration signal of a gearbox and performing wavelet packet analysis to generate wavelet packet two-dimensional time-frequency data; using the time-frequency data to train a deep learning model VGG to construct a fault diagnosis model; embedding an improved frequency band attention module into the deep learning model; embedding an improved metric learning module into the deep learning model; and verifying the overall effectiveness of the model through gearbox data. The present invention adopts the deep learning model VGG as a fault diagnosis model. The improved channel attention module is embedded to make full use of the information of different frequency bands of all channels; the improved metric learning module is embedded to effectively shorten the distance within a class and increase the distance between classes; the combination of the two can effectively improve the accuracy of fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of mechanical fault diagnosis, pattern recognition technology, and in particular to a gearbox fault diagnosis method and system based on frequency band attention metric learning. Background Art

[0002] Rotating machinery plays an important role in many industries, such as aerospace, transportation, and petrochemicals. Among the many parts of rotating machinery, gearboxes are important parts. Due to the complexity of the operating conditions of rotating equipment, gearboxes often operate in relatively harsh environments. Once an accident occurs, it may cause serious property losses and even threaten the safety of personnel. Therefore, higher requirements are placed on the safety and reliability of gearbox operation, so more effective fault diagnosis of gearboxes is of great significance.

[0003] In recent years, benefiting from the continuous development of computer technology, especially the rapid rise of machine learning, many intelligent fault diagnosis methods have emerged and have received widespread attention from fault diagnosis scholars. It is of great significance to explore and establish an effective deep learning fault diagnosis model, extract important fault information from the gearbox operating status data, and use it for gearbox fault diagnosis in actual operation.

[0004] On the one hand, the attention mechanism has received extensive attention in deep learning. It allows the network to pay more attention to some important information. According to the different dimensions of action, attention can be divided into spatial attention, channel attention and self-attention. Among them, due to its simplicity and efficiency, channel attention directly weights different channels and has become a mainstream attention paradigm. However, the input of the channel attention Squeeze-and-Excitation Networks (SENet) is a scalar obtained from Global Average Pooling (GAP). This scalar is obtained by taking the average of all elements in a channel by GAP. However, this average is not enough to express all the information of different channels, which leads to the lack of diversity in the features obtained by GAP.

[0005] On the other hand, in order to further extract the differences in features between different categories, metric learning can be used to narrow the distance between samples of the same category and learn the similarities between samples of the same category; by widening the distance between samples of different categories, the differences between samples of different categories can be increased. However, the current mainstream metric learning usually focuses on the loss function, that is, selecting appropriate intra-class distance and inter-class distance for measurement, while ignoring the existence of difficult-to-distinguish samples. Summary of the invention

[0006] In view of the above problems, the present invention proposes a gearbox fault diagnosis method and system based on metric learning of frequency band attention. Since the information represented by the features in different frequency bands is different and their importance varies, the present invention embeds the proposed frequency band attention module into the frequency band attention learning neural network of the fault diagnosis model, which can effectively avoid the information loss of channel attention when extracting channel features; for each sample in the same category, an importance weighting method is proposed, combined with metric learning, which can effectively select and pay attention to the difficult samples. In order to further extract the differences in features between different categories, the present invention adopts the idea of ​​metric learning. Metric learning learns the similarities between samples of the same category by shortening the distance between samples of the same category; it increases the differences between samples of different categories by increasing the distance between samples of different categories. However, the current mainstream metric learning usually focuses on the loss function, that is, selecting appropriate intra-class distance and inter-class distance for measurement, ignoring the existence of difficult samples.

[0007] In a first aspect of the present invention, the present invention provides a gearbox fault diagnosis method based on frequency band attention metric learning, the method comprising the following steps:

[0008] Obtain various fault vibration signals of the gearbox and generate two-dimensional time-frequency data after wavelet packet analysis;

[0009] Inputting the two-dimensional time-frequency data into a frequency band attention metric learning neural network, passing through a first transmission layer and a second transmission layer, obtaining all frequency band features;

[0010] The channel-band attention mechanism module is used to adaptively weight the frequency band features of multiple channels to obtain the channel-band attention weighted features.

[0011] Inputting the channel frequency band attention weighted features into a metric weighting module to perform adaptive weighting processing on similar samples in different categories;

[0012] The channel frequency band attention weighted features are input into the third transmission layer, and the fault diagnosis classification result of the gearbox is obtained through prediction by the fully connected layer;

[0013] Among them, by weighting samples of the same type in different categories, the inter-class distance and the intra-class distance are calculated; the weighted loss function of the current fault diagnosis classification result is obtained according to the intra-class distance and the inter-class distance, and the weighted loss function is used to train the frequency band attention learning neural network.

[0014] In a second aspect of the present invention, the present invention also provides a gearbox fault diagnosis system based on frequency band attention metric learning, the system comprising:

[0015] Data acquisition module, used to obtain various fault vibration signals of the gearbox;

[0016] The wavelet analysis module is used to generate two-dimensional time-frequency data after performing wavelet packet analysis on the acquired fault vibration signal;

[0017] A frequency band attention metric learning module is used to construct a frequency band attention metric learning neural network, train the frequency band attention metric learning neural network using two-dimensional time-frequency data, calculate the inter-class distance and intra-class distance by weighting samples of the same category in different categories; obtain a weighted loss function for the current fault diagnosis classification result according to the intra-class distance and the inter-class distance, and train the frequency band attention learning neural network using the weighted loss function; and output the fault diagnosis classification result of the gearbox;

[0018] The neural network includes a first transmission layer, a second transmission layer, a third transmission layer, a channel frequency band attention mechanism module, a metric weighting module and a fully connected layer;

[0019] A frequency band feature extraction module, used to call the first transmission layer and the second transmission layer, pass the two-dimensional time-frequency data through the first transmission layer and the second transmission layer, and obtain all frequency band features;

[0020] A channel feature extraction module is used to call the channel frequency band attention mechanism module to perform adaptive weighted processing on the frequency band features of multiple channels, thereby obtaining channel frequency band attention weighted features;

[0021] A sample category processing module, used for calling a metric weighting module to perform adaptive weighting processing on samples of the same category in different categories in the channel frequency band attention weighted features;

[0022] The fault diagnosis and classification module is used to call the third transmission layer and the fully connected layer, input the channel frequency band attention weighted features into the third transmission layer, and obtain the fault diagnosis and classification results of the gearbox through prediction by the fully connected layer.

[0023] Beneficial effects of the present invention:

[0024] 1. The present invention adopts an improved channel frequency band attention mechanism module to replace the original channel attention. The channel mean is used as the feature output in the channel attention, which will lead to insufficient feature information of the channel. The present invention introduces frequency band information and performs weighted summation on different frequency bands of the channel, which can effectively avoid information loss when the channel attention extracts channel features and improve the feature extraction ability of the model.

[0025] 2. The present invention adopts an improved metric weighting module, which performs adaptive importance weighting on samples of the same type on the basis of metric learning, and can effectively select and focus on difficult-to-distinguish samples. On this basis, it can more effectively narrow the distance within a class and widen the distance between classes. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a flow chart of a gearbox fault diagnosis method based on frequency band attention metric learning in an embodiment of the present invention;

[0027] Figure 2 8 are schematic diagrams of vibration signals of a gearbox in an embodiment of the present invention;

[0028] Figure 3 1 is a structural diagram of a gearbox fault diagnosis model, i.e., a frequency band attention metric learning neural network in an embodiment of the present invention;

[0029] Figure 4 This is the traditional attention mechanism structure diagram;

[0030] Figure 5 is a structural diagram of a channel frequency band attention mechanism module according to an embodiment of the present invention;

[0031] Figure 6 is a structural diagram of a metric weighting module according to an embodiment of the present invention;

[0032] Figure 7 This is an architecture diagram of a gearbox fault diagnosis system based on frequency band attention metric learning according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0034] Figure 1 is a flow chart of a gearbox fault diagnosis method based on frequency band attention metric learning in an embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0035] 101. Obtain various fault vibration signals of the gearbox and generate two-dimensional time-frequency data after wavelet packet analysis;

[0036] In an embodiment of the present invention, eight types of fault vibration signals in a certain gearbox fault data are analyzed, including: bearing outer ring fault, bearing inner ring fault, bearing rolling element fault, tooth root missing tooth fault, tooth root fracture fault, gear eccentricity fault and normal state signal.

[0037] The process of generating two-dimensional time-frequency data by wavelet packet analysis of the fault vibration signal of the gearbox may include the following:

[0038] First, the one-dimensional original vibration signal data of the gearbox is received. Each vibration signal tested contains 1024 sampling points. The eight vibration signals of the gearbox are respectively as follows: Figure 2 As shown in the figure; the intuitive one-dimensional original vibration signal data cannot reveal the fault problem, so it is necessary to perform wavelet packet analysis on the vibration signal of the gearbox to obtain a two-dimensional matrix A; the so-called wavelet packet analysis refers to decomposing the vibration signal of the gearbox into two sets of wavelet coefficients, namely the approximate coefficients of the low-frequency band and the detailed coefficients of the relatively high-frequency band. Mathematically speaking, wavelet packet analysis can be implemented using a series of convolutions with a pair of low-pass and high-pass filters. Specifically, the high-pass filter h(·) and g(k)=(-1) k The low-pass filter g(·) of h(1-k) can be defined as follows:

[0039]

[0040]

[0041] in, is a scaling function, ψ(·) is the corresponding wavelet function, 〈·,·〉 is an inner product, and t and k are variables.

[0042] 102. Input the two-dimensional time-frequency data into a frequency band attention metric learning neural network, and obtain all frequency band features through a first transmission layer and a second transmission layer;

[0043] In an embodiment of the present invention, the obtained wavelet packet two-dimensional feature matrix data can be input into the deep learning model VGG to train the fault diagnosis model, and the fault diagnosis model is composed of a frequency band attention metric learning neural network, such as Figure 3 As shown, the frequency band attention metric learning neural network includes a first transmission layer, a second transmission layer, a third transmission layer, a channel frequency band attention mechanism module, a metric weighting module and a fully connected layer; wherein each transmission layer includes a convolution layer, a pooling layer, a batch normalization layer (BN layer) and an activation layer. The present invention optimizes the fault diagnosis model by forward propagation and backward propagation, forward propagating the input signal until an error is generated, and back propagating the error to update the weight matrix. Forward propagation refers to the process in which data starts from the input layer, i.e., the first transmission layer, passes through the hidden layer in sequence and finally reaches the output layer, i.e., the fully connected layer, wherein each time the data passes through a layer of propagation, the higher the level of information represented by the value output by its node, the higher the order and the more generalized, and the value output in the node is the result of the weighted summation of the output values ​​of all nodes in the previous layer connected to it. Backward propagation refers to the chain derivation rule of the composite function, forward propagation obtains the result, generates an error, and the error feedback directly received by the output layer can be updated by gradient descent.

[0044] Different from the traditional fault diagnosis model, the present invention improves the channel frequency band attention mechanism module and the metric weighting module, and embeds these two improved modules into the fault diagnosis model.

[0045] In an embodiment of the present invention, the first transmission layer and the second transmission layer both include a convolution layer, a pooling layer, a batch normalization layer, and an activation layer; the design of these network layers can successfully extract the frequency band features of two-dimensional time-frequency data.

[0046] 103. Using the channel-band attention mechanism module, adaptively weighting the frequency band features of multiple channels is performed to obtain channel-band attention weighted features;

[0047] In the traditional attention mechanism, such as Figure 4 As shown in the figure, the scalar of channel attention is obtained by taking the average of all elements in a channel C by GAP, which is equal to the first channel of DCT described below. The weight is then assigned to channel C through the fully connected layer and sigmoid function. However, this average is not enough to express all the information of different channels, which leads to the lack of diversity in the features obtained by GAP.

[0048] Based on the above analysis, in the embodiment of the present invention, it is known that GAP is a special form of discrete cosine transform (DCT), and the GAP channel attention mechanism is generalized in the frequency domain, using multiple frequency components instead of the GAP with only the lowest frequency. The basis function of DCT is as follows:

[0049]

[0050] Where i and j are the positions of the i-th row and j-th column of the current feature point, H refers to the height of the feature map, W is the width of the feature map, and h and w are the order of the selected frequency bands.

[0051] Considering that each frequency band has a certain contribution to the feature map channel, the frequency band should not be selected directly; if only the specified frequency band is selected, different channels will only use specific frequency band information, which will lead to the loss of some information. At the same time, it is unreasonable to conduct experiments on all frequency bands before selecting the best frequency band, which will lead to a large waste of computing resources.

[0052] Therefore, the present invention weights all frequency bands to all channels, but according to the differences in the contributions of different frequency bands to channels, an adaptive channel-band attention mechanism module is added, such as Figure 5As shown in the figure, different basis functions are selected by DCT to process channel C, and the frequency band weights of different channels are initialized. Subsequently, adaptive weights are extracted and assigned to different channels through the fully connected layer and sigmoid function, so that different channels can be multiplied with the frequency band by an adaptive weight, thereby obtaining the information of each frequency band.

[0053] Through two-dimensional DCT, the required DCT coefficients can be obtained, and the formula of the channel attention weighting method adopted by the present invention is as follows:

[0054]

[0055] WDCT=fc(cat([Freq 0 ,Freq 1 ,…,Freq n-1 ]))

[0056] att = sigmoid(fc(WDCT))

[0057] Where, Freq i is the i-th frequency band of DCT, cat is channel-wise concatenation, WDCT is the weighted DCT coefficient, and f c is a fully connected layer, sigmoid is the activation function, and att is the desired frequency band channel weighting function. The specified frequency components can be obtained through the DCT coefficients, connected through the fully connected layer, giving channel attention to different channels, and adaptively weighting different channels through the back propagation mechanism.

[0058] Specifically, a discrete cosine transform is performed on the two-dimensional time-frequency data to obtain the required discrete cosine transform coefficients and determine the frequency band of the discrete cosine transform; all frequency bands are spliced ​​according to channels, and the spliced ​​frequency band features are input into the fully connected layer for processing to obtain weighted discrete cosine transform coefficients, and the activation function is used to obtain the adaptive weight of each channel, and the frequency band information is processed according to the adaptive weight to obtain the channel-band attention weighted features.

[0059] The present invention uses information of all frequency bands for channel weighting, weights different frequency bands by initializing random parameters, and performs weight update by back propagation.

[0060] 104. Input the channel frequency band attention weighted features into a metric weighting module to perform adaptive weighting processing on similar samples in different categories;

[0061] In traditional metric learning, the similarity between samples of the same category is learned by shortening the distance between samples of the same category, and the difference between samples of different categories is increased by increasing the distance between samples of different categories. However, the current mainstream metric learning usually focuses on the loss function, that is, choosing appropriate intra-class distance and inter-class distance for measurement, ignoring the existence of difficult-to-distinguish samples.

[0062] Based on the above analysis, the present invention discovers the shortcomings of traditional metric learning, so an adaptive importance weighted metric module is proposed, which aims to adaptively weight the importance of samples of the same type, effectively screen out important samples and pay attention to them, and at the same time effectively narrow the distance within the class and widen the distance between classes.

[0063] In an embodiment of the present invention, an adaptive intra-class distance weighting coefficient is calculated based on the sample with the smallest classification loss and the sample with the largest classification loss in the current iteration process; the cluster center of each classification is obtained by the K-means clustering method, and it is used as the anchor sample point, and the distance between each anchor sample point is calculated to obtain the inter-class distance of the sample set; the distances between all samples in each classification and the corresponding anchor sample points are summed and averaged, and the product of the intra-class distance weighting coefficient and the mean is used as the intra-class distance.

[0064] The specific implementation process is as follows:

[0065] By weighting similar samples in different categories, we can effectively filter out difficult samples and pay attention to them. inW is the intra-class distance weighting coefficient, and inW is as follows:

[0066]

[0067] The present invention calculates the classification loss of all samples for the current iteration (epoch) and saves it. min is the sample with the smallest classification loss in the current epoch, l max is the sample with the largest classification loss in the current epoch, l i is the classification loss of the current sample, which ensures that samples with large classification loss, that is, difficult samples, can get more attention and better measurement effect. At the same time, by converting it into an exponential function, the weight can be fixed between 1 and e.

[0068] After obtaining the intra-class distance weighting coefficient, the present invention uses the K-means method to find the cluster center of each class for the current batch of data, uses it as an anchor sample point, and then calculates the distance between each anchor sample point to obtain the inter-class distance of the entire sample set. The intra-class distance of the sample set can be obtained by summing and averaging the distances between all samples in each class and the corresponding anchor sample points. In order to increase the distance between different categories, the inter-class distance is added as the denominator to the loss function. The larger the inter-class distance, the smaller the loss. The above method can achieve a metric effect.

[0069] The formulas for calculating the inter-class distance and intra-class distance are as follows:

[0070] The distance between classes D out :

[0071]

[0072] Where N is the total number of categories, ||·|| is the two-norm; in the inter-class distance, i is the anchor sample point of any category, j is the anchor sample point of the current category; ||D i -D j || 2 Represents the distance between anchor sample point i and current anchor sample point j;

[0073] Intra-class distance D in :

[0074]

[0075] Where M is the total number of samples in the current category, ||·|| is the two-norm; in the intra-class distance, n is any sample in the current category, and m is the anchor sample point of the current category; ||D n -D m || 2 Represents the distance between the sample n of the current category and the corresponding anchor sample point m; inW represents the intra-class distance weighting coefficient.

[0076] After obtaining the intra-class distance and inter-class distance, we can get the weighted loss function for the current sample as follows:

[0077]

[0078] Wherein, C is the number of categories, and P is the number of samples in each category. By weighting samples of the same type in different categories, the inter-class distance and the intra-class distance are calculated; a weighted loss function for the current fault diagnosis classification result is obtained according to the intra-class distance and the inter-class distance, and the frequency band attention learning neural network is trained using the weighted loss function. When the frequency band attention learning neural network training is completed, the fault condition of the fault vibration signal of the gearbox can be directly classified and diagnosed.

[0079] Figure 6 The metric weighting module of the present invention is shown. First, the inter-class distances of different categories and the intra-class distances of the same category are calculated, and all samples are sorted by the saved loss values. Samples with larger losses are considered to be difficult samples, and finally the difficult samples are weighted by the intra-class weighting function. Through the above calculations, the present invention screens out the samples with larger losses in the current batch, that is, the difficult samples, and increases the loss of the difficult samples through the adaptive importance weighting method, so as to achieve the effect of focusing on the difficult samples.

[0080] 105. Input the channel frequency band attention weighted features into the third transmission layer, and obtain the gearbox fault diagnosis classification result through prediction by the fully connected layer;

[0081] In an embodiment of the present invention, the channel frequency band attention weighted feature is input into the third transmission layer, and the classification feature can be further extracted by using the third transmission layer. The classification feature is input into the fully connected layer to obtain the fault diagnosis classification result corresponding to the channel frequency band attention weighted feature.

[0082] Figure 7 A gearbox fault diagnosis system based on frequency band attention metric learning in an embodiment of the present invention comprises:

[0083] 201. A data acquisition module, used to obtain various fault vibration signals of the gearbox;

[0084] 202. A wavelet analysis module, used to generate two-dimensional time-frequency data after performing wavelet packet analysis on the acquired fault vibration signal;

[0085] 203. A frequency band attention metric learning module, used to construct a frequency band attention metric learning neural network, train the frequency band attention metric learning neural network using two-dimensional time-frequency data, calculate the inter-class distance and intra-class distance by weighting samples of the same category in different categories; obtain a weighted loss function for the current fault diagnosis classification result according to the intra-class distance and the inter-class distance, and train the frequency band attention learning neural network using the weighted loss function; and output the fault diagnosis classification result of the gearbox;

[0086] 204. The neural network includes a first transmission layer, a second transmission layer, a third transmission layer, a channel frequency band attention mechanism module, a metric weighting module and a fully connected layer;

[0087] 205. A frequency band feature extraction module, configured to call the first transmission layer and the second transmission layer, pass the two-dimensional time-frequency data through the first transmission layer and the second transmission layer, and obtain all frequency band features;

[0088] 206. A channel feature extraction module, used to call a channel frequency band attention mechanism module to perform adaptive weighted processing on frequency band features of multiple channels, thereby obtaining channel frequency band attention weighted features;

[0089] 207. A sample category processing module, configured to call a metric weighting module to perform adaptive weighting processing on samples of the same category in different categories in the channel frequency band attention weighted features;

[0090] 208. A fault diagnosis classification module is used to call the third transmission layer and the fully connected layer, input the channel frequency band attention weighted features into the third transmission layer, and obtain the fault diagnosis classification result of the gearbox through prediction by the fully connected layer.

[0091] In an embodiment of the present invention, the first transmission layer, the second transmission layer and the third transmission layer all include a convolution layer, a pooling layer, a batch normalization layer and an activation layer.

[0092] The purpose of mechanical equipment fault diagnosis is to classify fault types, which is essentially a pattern recognition problem. In order to verify the application effect of the present invention in mechanical fault diagnosis, the effectiveness of the present method is illustrated by a certain gearbox fault data, and any gearbox test bench can be used. The present invention can be used for mechanical fault diagnosis including but not limited to gearboxes.

[0093] The embodiment of the present invention selects 8 kinds of variable speed gearbox fault vibration signals of the intermediate shaft with a speed of 20hz-40hz, a load of 0HP, and a sampling frequency of 12000Hz for analysis, including: outer bearing outer ring fault, bearing inner ring fault, bearing rolling element, tooth root missing fault, tooth root fracture fault, gear eccentricity, and normal state. A total of 900 training data and 5500 test data were taken. The training data were divided into 3 groups, each with 300 data, and two groups were randomly selected for each training. All test data were taken. Each group of data was repeated twice, and a total of 18 experiments were conducted. The experiment was compared with the VGG network, only the VGG network with frequency band attention (VGG_F) and the VGG network with only metric loss (VGG_M) were used, and the experimental results are shown in Table 1.

[0094] Table 1 Average accuracy of the present invention and VGG, VGG_M, VGG_F, SENet

[0095]

[0096] Table 1 shows the final pattern recognition accuracy of the five fault diagnosis models. As can be seen from the table, the pattern recognition accuracy of this model is the highest, and the classic convolutional neural network VGG has the worst effect. The main reason is that the model feature extraction module is the original neural network, and the real distribution of the data in the high-dimensional space cannot be fully reflected; VGG_M adds a sample importance adaptive weighting module on the basis of VGG, which improves the importance of difficult-to-separate samples, thereby improving the accuracy of VGG; SENet, as the original channel attention network, adds the concept of weighting to different channels, which can also improve the accuracy of the model; VGG_F introduces frequency band information on the basis of SENet, and embeds different frequency bands into the channel through adaptive weighting, which can effectively obtain diverse feature information, and has a certain improvement over the effect of channel attention; the present invention integrates VGG_M and VGG_F, which can effectively combine the advantages of both, and the experimental results prove the rationality of the proposed method. Therefore, the present invention has a good application background in mechanical fault diagnosis.

[0097] In the description of the present invention, it is necessary to understand that the terms "coaxial", "bottom", "one end", "top", "middle", "the other end", "upper", "one side", "top", "inside", "outside", "front", "center", "both ends" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0098] In the present invention, unless otherwise clearly stipulated and limited, the terms such as "installation", "setting", "connection", "fixation" and "rotation" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. Unless otherwise clearly defined, ordinary technicians in this field can understand the specific meanings of the above terms in the present invention according to the specific circumstances.

[0099] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A gearbox fault diagnosis method based on frequency band attention metric learning, characterized in that: The method comprises the following steps: Obtain various fault vibration signals of the gearbox and generate two-dimensional time-frequency data after wavelet packet analysis; Inputting the two-dimensional time-frequency data into a frequency band attention metric learning neural network, passing through a first transmission layer and a second transmission layer, obtaining all frequency band features; The channel-band attention mechanism module is used to adaptively weight the frequency band features of multiple channels to obtain the channel-band attention weighted features. The method of using the channel-band attention mechanism module to perform adaptive weighted processing on the frequency band features of multiple channels to obtain the channel-band attention weighted features includes: performing discrete cosine transform on the two-dimensional time-frequency data to obtain the required discrete cosine transform coefficients, and determining the frequency band of the discrete cosine transform; splicing all the frequency bands according to the channels, inputting the spliced ​​frequency band features into the fully connected layer for processing to obtain the weighted discrete cosine transform coefficients, using the activation function to obtain the adaptive weight of each channel, and processing the frequency band information according to the adaptive weights to obtain the channel-band attention weighted features; Inputting the channel frequency band attention weighted features into a metric weighting module to perform adaptive weighting processing on similar samples in different categories; The channel frequency band attention weighted features are input into the third transmission layer, and the fault diagnosis classification result of the gearbox is obtained through prediction by the fully connected layer; Among them, by weighting samples of the same type in different categories, the inter-class distance and the intra-class distance are calculated; a weighted loss function for the current fault diagnosis classification result is obtained according to the intra-class distance and the inter-class distance, and the frequency band attention metric learning neural network is trained using the weighted loss function; The method of calculating the inter-class distance and the intra-class distance by weighting samples of the same category in different categories includes: calculating an adaptive intra-class distance weighting coefficient according to the sample with the smallest classification loss and the sample with the largest classification loss in the current iteration process; obtaining the cluster center of each category by the K-means clustering method, and using it as an anchor sample point, calculating the distance between each anchor sample point, and obtaining the inter-class distance of the sample set; summing and averaging the distances between all samples in each category and the corresponding anchor sample points, and taking the product of the intra-class distance weighting coefficient and the mean as the intra-class distance; The calculation formula of the intra-class distance weighted coefficient is expressed as: Among them, l min is the sample with the smallest classification loss in the current iteration, l max is the sample with the largest classification loss in the current iteration, l i is the classification loss of the current sample; The calculation formula of the weighted loss function is expressed as: Among them, L Dw represents the weighted loss function, C represents the fault vibration signal of the gearbox, i.e., the number of categories of samples; P represents the number of samples in each category; D_out represents the inter-class distance; and D_inW represents the intra-class distance.

2. A gearbox fault diagnosis method based on frequency band attention metric learning according to claim 1, characterized in that: The various fault vibration signals of the gearbox include bearing outer ring fault, bearing inner ring fault, bearing rolling element fault, tooth root missing fault, tooth root fracture fault, gear eccentricity fault and normal state signal.

3. The gearbox fault diagnosis method based on frequency band attention metric learning according to claim 1 is characterized in that: Generating two-dimensional time-frequency data after performing wavelet packet analysis on various fault vibration signals of the gearbox includes receiving a one-dimensional original fault vibration signal of the gearbox; performing wavelet analysis on the one-dimensional original fault vibration signal of the gearbox, decomposing the vibration signal of the gearbox into two groups of wavelet coefficients, namely, approximate coefficients in a low-frequency band and detailed coefficients in a relatively high-frequency band, and obtaining two-dimensional time-frequency data in the form of a two-dimensional feature matrix.

4. The gearbox fault diagnosis method based on frequency band attention metric learning according to claim 1 is characterized in that: The calculation formula of the inter-class distance D_out is expressed as: Where N is the total number of categories, ||·|| is the two-norm; in the inter-class distance, i is the anchor sample point of any category, j is the anchor sample point of the current category; ||D i -D j ||2 represents the distance between anchor sample point i and current anchor sample point j; The calculation formula of intra-class distance is expressed as: Where M is the total number of samples in the current category, ||·|| is the two-norm; in the intra-class distance, n is any sample in the current category, and m is the anchor sample point of the current category; ||D n -D m ||2 represents the distance between the sample n of the current category and the corresponding anchor sample point m; inW represents the intra-class distance weighting coefficient.

5. A gearbox fault diagnosis system based on frequency band attention metric learning, characterized in that: The system comprises: Data acquisition module, used to obtain various fault vibration signals of the gearbox; The wavelet analysis module is used to generate two-dimensional time-frequency data after performing wavelet packet analysis on the acquired fault vibration signal; A frequency band attention metric learning module is used to construct a frequency band attention metric learning neural network, train the frequency band attention metric learning neural network using two-dimensional time-frequency data, calculate the inter-class distance and intra-class distance by weighting samples of the same category in different categories; obtain a weighted loss function for the current fault diagnosis classification result according to the intra-class distance and the inter-class distance, and train the frequency band attention metric learning neural network using the weighted loss function; and output the fault diagnosis classification result of the gearbox; The neural network includes a first transmission layer, a second transmission layer, a third transmission layer, a channel frequency band attention mechanism module, a metric weighting module and a fully connected layer; A frequency band feature extraction module, used to call the first transmission layer and the second transmission layer, pass the two-dimensional time-frequency data through the first transmission layer and the second transmission layer, and obtain all frequency band features; The channel feature extraction module is used to call the channel frequency band attention mechanism module to perform adaptive weighted processing on the frequency band features of multiple channels, so as to obtain the channel frequency band attention weighted features; specifically, it is used to perform discrete cosine transform on the two-dimensional time-frequency data to obtain the required discrete cosine transform coefficients and determine the frequency band of the discrete cosine transform; all frequency bands are spliced ​​according to the channels, and the spliced ​​frequency band features are input into the fully connected layer for processing to obtain the weighted discrete cosine transform coefficients, and the activation function is used to obtain the adaptive weight of each channel, and the frequency band information is processed according to the adaptive weight to obtain the channel frequency band attention weighted features; The sample category processing module is used to call the metric weighting module to perform adaptive weighting processing on similar samples in different categories in the channel frequency band attention weighted features; specifically, it is used to calculate the adaptive intra-class distance weighting coefficient according to the sample with the smallest classification loss and the sample with the largest classification loss in the current iteration process; the cluster center of each category is obtained by the K-means clustering method, and it is used as the anchor sample point to calculate the distance between each anchor sample point to obtain the inter-class distance of the sample set; the distances between all samples in each category and the corresponding anchor sample points are summed and averaged, and the product between the intra-class distance weighting coefficient and the average is used as the intra-class distance; The calculation formula of the intra-class distance weighted coefficient is expressed as: Among them, l min is the sample with the smallest classification loss in the current iteration, l max is the sample with the largest classification loss in the current iteration, l i is the classification loss of the current sample; The calculation formula of the weighted loss function is expressed as: Among them, L Dw represents the weighted loss function, C represents the number of categories of the fault vibration signal of the gearbox, i.e., the sample; P represents the number of samples in each category; D_out represents the inter-class distance; D_inW represents the intra-class distance; The fault diagnosis and classification module is used to call the third transmission layer and the fully connected layer, input the channel frequency band attention weighted features into the third transmission layer, and obtain the fault diagnosis and classification results of the gearbox through prediction by the fully connected layer.

6. A gearbox fault diagnosis system based on frequency band attention metric learning according to claim 5, characterized in that: The first transmission layer, the second transmission layer and the third transmission layer each include a convolution layer, a pooling layer, a batch normalization layer and an activation layer.

Citation Information

Patent Citations

  • Intelligent fault diagnosis method based on importance weighted domain adversarial adaptation

    CN112101085A

  • Cross-category fault diagnosis method and system based on small sample learning, and storage medium

    CN113011256A