Bearing fault diagnosis method, electronic equipment and medium
Through the combination of multi-core function graph construction and edge self-supervised graph attention network, the problem of insufficient fault diagnosis accuracy in the prior art under nonlinear data processing and extremely low marking rate conditions is solved, and high-precision bearing fault diagnosis is achieved.
Patent Information
- Application Number
- CN202411789938.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The existing bearing fault diagnosis methods based on graph convolution are weak in processing nonlinear data and are susceptible to noise and unrelated node connections. Especially under extremely low marking rates, the accuracy of feature mining and fault diagnosis is insufficient.
The multi-kernel function graph construction method and edge self-supervised graph attention network are used to calculate the distance between nodes through the multi-kernel function composed of Gaussian kernel, sigmoid kernel and Laplace kernel function, forming a K-near graph, and using the edge self-supervised graph attention network model for self-supervised learning and feature extraction.
The bearing fault diagnosis accuracy under very few labeled samples is significantly improved, the graph structure is optimized, the model's robustness of the error connection and the recognition of key features is enhanced, the noise impact is reduced, and efficient fault diagnosis is achieved at very low labeling rates.
Smart Images

Figure CN119714893A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of bearing fault diagnosis, and in particular relates to a method, electronic equipment and medium for bearing fault diagnosis. Background Art
[0002] Rotating machinery has become vital due to its wide application in manufacturing, transportation, engineering and other fields. Bearings, as the key part of rotating machinery, are prone to failure under complex and harsh conditions such as high speed, heavy load and long-term operation, which may cause significant economic losses and serious accidents. Therefore, effective health monitoring and fault diagnosis of bearings are of great practical significance.
[0003] With the rapid development of artificial intelligence technology and monitoring data, data-driven intelligent fault diagnosis methods have become a hot topic of research. Deep learning, as an advanced machine learning method, can extract hidden fault information from monitoring signals with its multi-layer structure and powerful nonlinear learning ability, showing great potential in the field of fault diagnosis. However, the effective training of deep learning methods depends largely on a large number of labeled fault samples, which are often difficult to obtain in actual engineering applications due to the preventive maintenance strategy of mechanical equipment. Therefore, it is urgent to study high-precision fault diagnosis technology under the condition of limited labeled samples.
[0004] In recent years, the development of graph theory has provided a new perspective for solving the finite sample problem. A graph is a unique non-Euclidean data structure consisting of a central node and its edge nodes. By constructing the input sample into an association graph, the similarity relationship between finite labeled samples and unlabeled samples can be explored. Graph convolutional neural networks (GCNs) learn the feature representation of each node based on graph features and aggregated information from neighbors. These learned node features can be used to train models for node label prediction, showing effectiveness in bearing fault diagnosis.
[0005] Nevertheless, there are still some limitations in the bearing fault diagnosis method based on graph convolution. First, the conventional graph construction method based on Euclidean distance is weak in processing nonlinear data, which may cause the constructed graph to fail to correctly reflect the actual structural relationship between the data. Second, the graph often contains noise, and the connections between irrelevant nodes may affect the optimal representation learned by the graph convolution network, thereby affecting the classification accuracy. Finally, under the condition of extremely low labeling rate, traditional methods are often insufficient in feature mining and fault diagnosis accuracy. The existence of these problems significantly limits the effectiveness and popularity of graph-based fault diagnosis methods in practical applications. Therefore, exploring and developing new technologies and methods to overcome these limitations is of vital importance to improving the accuracy and reliability of bearing fault diagnosis. Summary of the invention
[0006] The present invention provides a method, electronic equipment and medium for bearing fault diagnosis, the purpose of which is to achieve high-precision classification of a large number of unlabeled samples using very few labeled samples.
[0007] To achieve the above object, the present invention provides a method for bearing fault diagnosis in a first aspect, comprising the following steps:
[0008] Collect vibration signals of bearings in different fault and healthy states, and pre-process the vibration signals;
[0009] Perform multiple sampling on the preprocessed vibration signal to generate signal slices, and annotate a part of the signal slices to obtain labeled data and unlabeled data;
[0010] Divide all data into training set and test set, where the training set contains labeled data and unlabeled data, and the test set contains unlabeled data;
[0011] Based on the distance between the labeled data and the unlabeled data, neighbor nodes are selected to form a K-nearby graph, wherein the distance is calculated by a multi-kernel function consisting of a Gaussian kernel function, a sigmoid kernel function, and a Laplace kernel function;
[0012] Based on the formed K-neighbor graph, an edge self-supervised graph attention network model is established, wherein the edge self-supervised graph attention network model includes two edge self-supervised graph attention network layers and two fully connected layers;
[0013] The training set is sequentially input into two edge self-supervised graph attention network layers and two fully connected layers, and the self-supervised loss and label classifier loss are calculated. The edge self-supervised graph attention network model parameters are updated using the gradient backpropagation method to obtain the trained edge self-supervised graph attention network model.
[0014] The test set of unlabeled data is input into the trained edge self-supervised graph attention network model for fault diagnosis.
[0015] Furthermore, the multi-kernel functions used include Gaussian kernel function, sigmoid kernel function and Laplace kernel function, and the distance between labeled data and unlabeled data is measured by weight coefficient combination, where:
[0016] The Gaussian kernel function distance measurement formula is:
[0017]
[0018] The sigmoid kernel function distance measurement formula is:
[0019]
[0020] The Laplace kernel function distance metric formula is:
[0021]
[0022] The metric formula of the multi-kernel function composed of the Gaussian kernel function, the sigmoid kernel function and the Laplace kernel function is as follows:
[0023] dis(x i ,y j )=w 1 *k gau (x i ,y j )+w 2 *k sig (x i ,y j )+w 3 *k lap (x i ,y j );
[0024] Among them, x i is the central node feature, y j is the edge node feature, e represents the base of the natural logarithm, σ, γ and b are constant terms, σ and γ are set to 1, b is set to 0, Represents x i and j The dot product of , T represents the transpose operation, tanh represents the hyperbolic tangent function; w 1 、w 2 and w 3 is the weight coefficient.
[0025] Furthermore, the method for constructing the K proximity graph includes:
[0026] Selecting a labeled data signal slice as a central node, and using a multi-kernel function composed of a Gaussian function, a sigmoid function, and a Laplace function to calculate the distance between the central node and the unlabeled signal slice;
[0027] The calculated distances are arranged from large to small, and the K nearest neighbor method is used to select the set of neighbor nodes of each central node to construct a K proximity graph, where k is set to a predetermined number of neighbors.
[0028] Furthermore, the method for constructing the edge self-supervised graph attention network model includes:
[0029] Apply a shared linear transformation weight matrix to each node to obtain the output features of the node;
[0030] Use the softmax function and the Leaky ReLU activation function to normalize the attention parameters of each edge and obtain the attention coefficient from the edge node to the center node;
[0031] Combined with the layer attention and dot product attention mechanisms, the unnormalized attention parameters are optimized, the probability of whether there is a connection between two nodes is calculated based on whether the same label exists as a priori, and the binary cross entropy loss function is used to calculate the self-supervised loss.
[0032] Furthermore, the output features are calculated by the following formula:
[0033]
[0034] Among them, h' i represents the output feature, N represents the number of nodes, a ij is the attention coefficient from edge node j to center node i, W is the shared linear transformation weight matrix applied on each node, and h j is the edge node feature input to the network layer, a ij By paying attention to each edge parameter e ij After SoftMax normalization, the attention coefficient expression from edge node j to center node i is:
[0035] a ij =softmax(e ij );
[0036] Among them, e ij is the attention parameter.
[0037] Furthermore, the layer attention is calculated by a single-layer feedforward network, and the dot product attention is calculated using the product of the transpose of the central node feature matrix and the edge node feature matrix as the attention coefficient, and the mathematical expressions are respectively:
[0038] e ij,LA =a T (Wh i ,Wh j );
[0039] e ij,DPA =(Wh i ) T ·Wh j ;
[0040] Among them, e ij,LA is the layer attention, e ij,DPA is the dot product attention, a is the weight vector, which maps the high-dimensional features of length 2F after splicing to real numbers, T represents the transposition operation, and h iRepresents the central node features input to the network layer.
[0041] Furthermore, the calculation formula for the unnormalized attention parameter is as follows:
[0042] e ij,SSGAT =σ(e ij,LA )·e ij,DPA ;
[0043] The formula for calculating the probability of a connection between two nodes is as follows:
[0044] φ ij =σ(e ij,SSGAT );
[0045] The formula for calculating the self-supervised loss using the binary cross entropy loss function is as follows:
[0046] loss SSGAT = -log(φ ij )
[0047] In the formula, e ij,SSGAT is the non-normalized attention parameter; σ is the sigmoid function; φ ij is the probability of an edge between i and j; loss SSGAT is the self-supervision loss.
[0048] Furthermore, the steps of sequentially inputting the training set into the established edge self-supervised graph attention network model include:
[0049] The training set is input into two edge self-supervised graph attention network layers and two fully connected layers in sequence, and the label set predicted by the equation is obtained by the following formula:
[0050] z i =FC(h′ i );
[0051] The classification loss is calculated by the following equation:
[0052]
[0053] The loss function of the edge self-supervised graph attention network is calculated by the following equation:
[0054] Loss = loss SSGAT +loss Class ;
[0055] Among them, Z i To predict the label set, FC represents the fully connected layer, I is the label number, including the true label and the label judged by MK-KNN, and loss class is the classification loss, T is the number of classifications, is the t-dimensional value y of the label i , is the t-dimensional value Z of the predicted label i , Loss is the loss function of the edge self-supervised graph attention network.
[0056] To achieve the above object, the second aspect of the present invention provides an electronic device, comprising: at least one memory and at least one processor;
[0057] The at least one memory is used to store a readable program;
[0058] The at least one processor is configured to call the readable program to execute the method.
[0059] To achieve the above objective, the third aspect of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the method.
[0060] Beneficial effects of the present invention:
[0061] Compared with the prior art, the present invention provides a method, electronic device and medium for bearing fault diagnosis, which significantly improves the accuracy of bearing fault diagnosis under the condition of very few labeled samples by adopting a graph construction method integrating multi-core functions and an edge self-supervised graph attention network. First, the multi-core function graph construction method combines Gaussian kernel, sigmoid kernel and Laplace kernel function, optimizes the structure of the graph, and makes it more accurately reflect the true relationship between nonlinear signal data, thereby effectively improving the quality of graph construction. Secondly, the edge self-supervised graph attention network strengthens the model's robustness to erroneous connections and the ability to recognize key features through layer attention and dot product attention mechanisms, thereby effectively reducing the impact of noise in the self-supervised learning process and improving the accuracy of feature extraction. In addition, in the case of extremely low labeling rate, the method ensures that even in the case of extremely rare labeled samples, sufficient feature information can be mined for accurate fault diagnosis. The comprehensive application of this method not only improves the accuracy of fault diagnosis, but also greatly improves the practicality and reliability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments.
[0063] Figure 1 It is a flow chart of a method for bearing fault diagnosis disclosed in an embodiment of the present invention.
[0064] Figure 2It is a schematic diagram of an overall structure disclosed in an embodiment of the present invention.
[0065] Figure 3 It is a schematic diagram of constructing a multi-core function graph disclosed in an embodiment of the present invention.
[0066] Figure 4 It is an edge self-supervised graph attention network diagram disclosed in an embodiment of the present invention.
[0067] Figure 5 It is a framework diagram of an electronic device disclosed in an embodiment of the present invention.
[0068] Figure numerals: 10, storage; 20, processor. DETAILED DESCRIPTION
[0069] like Figure 1 , Figure 2 As shown, the present invention provides a method for bearing fault diagnosis, comprising the following steps:
[0070] Step S100, collecting vibration signals of the bearing in different fault and healthy states, and preprocessing the vibration signals;
[0071] Specifically, in this step, vibration sensors are first installed on the bearings to capture real-time vibration data of the bearings in different health states, such as normal operation, minor faults, moderate faults, and severe faults. These vibration signals contain dynamic response information of the bearings and can reflect their health status. Once these signals are collected, the next step is to preprocess the signals, which includes steps such as signal filtering, denoising, and normalization to improve signal quality and reduce the impact of environmental noise and non-fault-related vibrations of the equipment itself. For example, high-frequency noise can be removed by a low-pass filter, and the amplitude of the signal can be standardized using normalization, making subsequent processing steps more efficient and accurate.
[0072] Step S200, performing multiple sampling on the preprocessed vibration signal to generate signal slices, and annotating a part of the signal slices to obtain labeled data and unlabeled data;
[0073] In this step, signal slices of multiple time windows are first intercepted from the continuous preprocessed vibration signal through multiple sampling techniques. For example, a fixed time window (such as 1 second) can be set to intercept signal segments to ensure that each slice can represent a part of the signal characteristics. Subsequently, some signal slices are labeled through known fault records, and the specific fault types or health states corresponding to these slices are identified to generate labeled data sets. Unlabeled signal slices are regarded as unlabeled data. These labeled and unlabeled data sets will be used to train and verify deep learning models, where labeled data helps the model learn fault characteristics and unlabeled data is used to test the generalization ability of the model.
[0074] Step S300: Divide all data into a training set and a test set, wherein the training set contains labeled data and unlabeled data, and the test set contains unlabeled data;
[0075] The labeled and unlabeled data obtained in step S200 are classified. In order to optimize the learning process and evaluate the performance of the model, a small amount of labeled and unlabeled data is allocated to the training set, which will be used to train the deep learning model to help the model learn to identify the characteristic patterns under different fault conditions. The remaining unlabeled data is divided into the test set to verify the diagnostic ability and generalization of the model after the model training is completed.
[0076] Step S400, selecting neighbor nodes based on the distance between the labeled data and the unlabeled data to form a K proximity graph, wherein the distance is calculated by a multi-kernel function consisting of a Gaussian kernel function, a sigmoid kernel function, and a Laplace kernel function;
[0077] It can be understood that the labeled data is used as the central node and the unlabeled data is used as the edge node. The distance between nodes is fitted by multiple kernel functions, which makes it have better measurement ability for nonlinear signals and obtains a more accurate graph structure than conventional graphs.
[0078] Step S500: Based on the formed K-neighbor graph, an edge self-supervised graph attention network model is established, wherein the edge self-supervised graph attention network model includes two edge self-supervised graph attention network layers and two fully connected layers;
[0079] Using the distance calculated by the multi-core function in step S400, a K-nearest graph is constructed, which uses data points (including labeled and unlabeled data) as nodes and connects the nearest K neighbors based on similarity. Subsequently, an edge self-supervised graph attention network model is established, which captures and emphasizes important node relationships and features through the edge self-supervised graph attention network layer. Each layer of the graph attention network calculates the weights between nodes and optimizes the flow of information, thereby filtering out noise or irrelevant connections while retaining key information. Then, the fully connected layer in the model is used to further process the output of the graph attention layer, integrate the learned features, and make decisions for the final fault diagnosis. Through this structure, the edge self-supervised graph attention network can not only effectively process and understand the data in the graph structure, but also automatically identify and strengthen the key patterns in the data through a self-supervised learning mechanism, and can achieve efficient learning even when labels are very scarce.
[0080] Step S600: input the training set into two edge self-supervised graph attention network layers and two fully connected layers in sequence, calculate the self-supervised loss and the label classifier loss, and use the gradient backpropagation method to update the edge self-supervised graph attention network model parameters to obtain a trained edge self-supervised graph attention network model;
[0081] In this step, the model first processes the input training data through edge self-supervised graph attention network layers, which focus on important node connections and features through the attention mechanism to extract information related to fault diagnosis. The model's self-supervised loss function is designed to optimize the learning of unlabeled data and strengthen the model's understanding of the data structure, while the label classifier loss directly evaluates the model's prediction accuracy based on labeled data. By jointly optimizing these two losses, the model is able to better learn from labeled and unlabeled data, thereby improving its generalization ability. The gradient backpropagation method is used to update the network parameters based on the loss function to optimize the performance of the entire network. For example, if the model performs poorly in diagnosing a certain fault type, the gradient backpropagation will adjust the relevant weights in the network to improve the diagnostic accuracy of that fault type. This iterative training process continues until the model reaches the predetermined performance standard on the training set, thereby ensuring that the model has high diagnostic efficiency and accuracy in practical applications.
[0082] Step S700: input the test set of unlabeled data into the trained edge self-supervised graph attention network model for fault diagnosis.
[0083] In this step, the trained and optimized model is used to evaluate its performance on unknown data. The unlabeled data in the test set, which contains various vibration signals collected from actual operating conditions, will be input into the model for processing. The model uses the feature recognition and classification capabilities learned in the training phase to predict the fault type for each data sample. For example, the model analyzes the signal features, determines its similarity with various fault modes identified in the training phase, and outputs the most likely fault type. In this process, since the model has adjusted its parameters through labeled and unlabeled training data, it can more accurately classify faults for new and unseen data, demonstrating the generalization and practicality of the model. In this way, fault diagnosis can be performed quickly and accurately in practical applications, helping maintenance personnel to detect and deal with potential mechanical problems in a timely manner.
[0084] like Figure 3 As shown, in step S400, the steps of constructing the multi-core function graph are as follows:
[0085] The labeled data slice is taken as the central node, and the distance between it and the unlabeled real signal slice is calculated. This implementation adopts a multi-kernel function measurement consisting of a Gaussian kernel function, a sigmoid kernel function, and a Laplace kernel function. The calculation formulas are:
[0086] The Gaussian kernel function distance measurement formula is:
[0087]
[0088] The sigmoid kernel function distance measurement formula is:
[0089]
[0090] The Laplace kernel function distance metric formula is:
[0091]
[0092] The metric formula of the multi-kernel function composed of the Gaussian kernel function, the sigmoid kernel function and the Laplace kernel function is as follows:
[0093] dis(x i ,y j )=w 1 *k gau (x i ,y j )+w 2 *k sig (x i ,y j )+w 3 *k lap (x i ,yj );
[0094] Among them, x i is the central node feature, y j is the edge node feature, e represents the base of the natural logarithm, σ, γ and b are constant terms, σ and γ are set to 1, b is set to 0, Represents x i and j The dot product of , T represents the transpose operation, tanh represents the hyperbolic tangent function; w 1 、w 2 and w 3 is the weight coefficient, which needs to be determined according to different data sets and classification tasks. In this embodiment, the value is [w 1 , w 2 , w 3 ]=[0.6,0.2,0.2], for a certain central node, arrange its values with other edge nodes from large to small:
[0095] D={dis 1 (x′,y 1 ), ...., dis n (x′,y n )},(dis 1 >... >dis n )
[0096] The neighbor nodes of a node are selected through k nearest neighbors, which is recorded as:
[0097] Top-k = {x′ 1 , x′ 2 , ..., x′ k}
[0098] Among them, Top-k is x i The nearest neighbor set of k is the number of nearest neighbors, and k unlabeled data are assigned corresponding pseudo labels each time. This step establishes the intrinsic graph structure connection between labeled data and unlabeled data, which can be considered as a label propagation process. Where k = 5.
[0099] like Figure 4 As shown, in step S500, the edge self-supervised graph attention network steps are as follows:
[0100] The input features of the nodes are assumed to be:
[0101] h={h 1 ,h 2 , ..., h N}, h i ∈R F ;
[0102] Where N represents the number of nodes. The output of node features is:
[0103] h′={h′ 1 , h′ 2 , ..., h′ N}, h′ i ∈R F′ ;
[0104] W∈R F′×F is the shared linear transformation weight matrix applied to each node, F′ represents the dimension of the input node features, and F represents the dimension of the output node of this layer. The softmax function is used for normalization and the Leaky ReLU activation function is added to provide nonlinearity. The feature output of the final node is obtained by the following formula:
[0105]
[0106] Among them, h' i represents the output feature, N represents the number of nodes, a ij is the attention coefficient from edge node j to center node i, which indicates the importance of node features of node i to node j, W is the shared linear transformation weight matrix applied to each node, and h j is the edge node feature input to the network layer, a ij By paying attention to each edge parameter e ij After SoftMax normalization, the attention coefficient expression from edge node j to center node i is:
[0107] a ij =softmax(e ij );
[0108] e ij It can be obtained through two commonly used attention mechanisms, namely layer attention e ij,LA and dot product attention e ij,DPA The original layer attention is calculated through a single-layer feed-forward network a(·) to calculate the coefficients, a∈R 2F′ is a weight vector that can map high-dimensional features of length 2F after concatenation to real numbers. Dot product attention comes from node representation learning, which uses the product of the transpose of the central node feature matrix and the edge node feature matrix as the attention coefficient. Their mathematical expressions are respectively:
[0109] e ij,LA =a T (Wh i ,Wh j );
[0110] e ij,DPA=(Wh i ) T ·Wh j ;
[0111] Among them, e ij,LA is the layer attention, e ij,DPA is the dot product attention, a is the weight vector, which maps the high-dimensional features of length 2F after splicing to real numbers, T represents the transposition operation, and h i Represents the central node features input to the network layer.
[0112] An optimized version of the non-normalized attention parameter e is constructed by mixing layer attention and dot product attention. ij,SSGAT . Taking the existence of the same label as a priori condition, the sigmoid function is used to transform e ij,LA Convert to probability value and compare with e ij,DPA Multiplying them together can give the probability of the existence of a graph edge link. ij,SSGAT Neighbor nodes with low connection probability can be discarded while implicitly assigning importance to the remaining nodes.
[0113] e ij,SSGAT =σ(e ij,LA )·e ij,DPA ;
[0114] The attention coefficient of each node pair can be obtained.
[0115] α ij,SSGAT =softmax(e ij,SSGAT );
[0116] The constructed edge self-supervised graph attention network uses the presence or absence of an edge between node pairs to guide attention. Since the edge information is already known when constructing the multi-core function graph, the edge self-supervised graph attention network is used to calculate the similarity between nodes to predict whether two nodes are connected, and then compared with the real edge to calculate the self-supervised loss. For a pair i and j, if there is an edge, the probability is 1, otherwise it is 0. The sigmoid function σ is introduced to derive the probability φ of an edge between i and j ij , where e ij,SSGAT is the non-normalized attention parameter:
[0117] φ ij =σ(e ij,SSGAT );
[0118] The binary cross entropy loss function can be used to calculate the loss between the actual edge label and the self-supervised loss:
[0119] loss SSGAT = -log(φ ij );
[0120] In the formula, e ij,SSGAT is the non-normalized attention parameter; σ is the sigmoid function; φ ij is the probability of an edge between i and j; loss SSGAT is the self-supervision loss.
[0121] The features output by the edge self-supervised graph attention network are input into the fully connected layer to obtain the predicted label set Z = {z 1 , …, z n}, the classification can be expressed as:
[0122] z i =FC(h′ i );
[0123]
[0124] Finally, the loss function of the edge self-supervised graph attention network is obtained as:
[0125] Loss = loss SSGAT +loss Class ;
[0126] Among them, Z i To predict the label set, FC represents the fully connected layer, I is the label number, including the true label and the label judged by MK-KNN, and loss class is the classification loss, T is the number of classifications, is the t-dimensional value y of the label i (one-hot encoding), is the t-dimensional value Z of the predicted label i One-hot encoding), Loss is the loss function of the edge self-supervised graph attention network.
[0127] When using the edge self-supervised graph attention network model for bearing fault diagnosis, the test set processing of unlabeled data is mainly carried out through the following steps:
[0128] Step S1: Perform the same preprocessing operations on the collected unlabeled test set vibration signals, such as normalization and sampling length setting, to ensure that the test data is in the same format as the training data.
[0129] Step S2: For each test sample, use the multi-kernel function graph construction method determined in the training phase (using Gaussian kernel, sigmoid kernel, Laplace kernel function) to calculate the similarity with the labeled training samples and other unlabeled samples. Based on these similarities, the nearest neighbor node is determined for each test sample by the k-nearest neighbor method (such as k=5), and the local graph structure of the test sample is constructed.
[0130] Step S3: Input the constructed graph into the edge self-supervised graph attention network. In this network, the features of each node (test sample) are processed by two edge self-supervised graph attention network layers. These layers use the learned attention mechanism (combining layer attention and dot product attention) to perform weighted aggregation of node features to emphasize important neighbor node features and suppress the influence of irrelevant or noise nodes.
[0131] Step S4: In each layer, the feature update of node i depends on the features of its neighbor node j and the attention coefficient between the two nodes. The attention coefficient is based on the linear transformation of the node features and the activation function (such as Leaky ReLU), and is normalized by the softmax function to determine the contribution of each neighbor node to the feature update of the central node i.
[0132] Step S5, the final stage of the network includes a fully connected layer, which uses the features extracted from the graph attention network layer for final classification. The classifier maps node features to predicted fault types, such as inner race failure, ball bearing failure, outer race failure, or normal.
[0133] Step S6: Although the samples in the test set are unlabeled, the model has learned the ability to distinguish different fault types through labeled samples and self-supervised loss during the training phase. Therefore, when unlabeled test samples pass through this trained network, the network can predict the most likely fault category for each test sample based on the learned feature representation and classification boundaries.
[0134] Step S7: The model outputs the predicted fault category of each test sample. These categories reflect the model's judgment on the fault status of unknown data.
[0135] In order to make the purpose, technical solution and advantages of this embodiment more clear, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention:
[0136] Step 1: Collect vibration signals of bearings in different fault and health states to obtain unlabeled target domain data; take the public bearing dataset of CWRU as an example. This dataset uses SKF 6205 drive end bearings for testing. The sampling frequency of the accelerometer is 48kHz. The bearing loads are divided into 0HP, 1HP, 2HP, and 3HP, and the corresponding speeds are 1797rpm, 1772rpm, 1750rpm, and 1730rpm, respectively. The bearing health status includes four forms: inner ring failure (IF), ball failure (ReF), outer ring failure (OF), and normal (NC).
[0137] Step 2: For the vibration signal of each health condition, a sampling length of 1024 and the same sampling interval are used to ensure that there is no duplication between the data, thus obtaining 400 samples. These 400 samples are then randomly divided into training samples and test samples in a 1:1 ratio. The effectiveness of the proposed method is verified by the accuracy verification of the test set:
[0138] Table 1:
[0139]
[0140] Step 3: Using labeled fault data and unlabeled data, multiple graph structures are formed according to the multi-core function graph construction method proposed in the invention.
[0141] Step 4: Construct a feature extraction network based on edge self-supervised graph attention and obtain the output features through the following formula:
[0142]
[0143] The training set is input into two edge self-supervised graph attention layers and two fully connected layers in sequence, and the label set predicted by the equation is obtained by the following formula:
[0144] z i =FC(h′ i )
[0145] Then calculate the Loss using the following equation, and back propagate the model using the Adam algorithm:
[0146]
[0147] loss SSGAT = -log(φ ij );
[0148] Loss = loss SSGAT +loss Class .
[0149] Step 5: Feed the unlabeled test set into the trained model to obtain the diagnosis results. As shown in Table 2, the proposed bearing fault diagnosis method based on multi-kernel function graph construction and edge self-supervised graph attention network achieves a classification accuracy of 98.67% on the public bearing dataset of CWRU, which is 2.5% higher than the other best performing methods.
[0150] Table 2
[0151] method Test accuracy The method of this embodiment 98.67% Comparison method 1 95.57% Comparison Method 2 96.17% Comparison method 3 90.58% Comparison method 4 94.17% Comparison method 5 95.14% Comparison method 6 95.83% Comparison method 7 91.75%
[0152] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0153] For software implementation, the technology described in this article can be implemented by a unit that performs the functions described in this article. The software code can be stored in a memory and executed by a processor. Figure 5 As shown, the electronic device includes a memory 10 and a processor 20; wherein the memory 10 is used to store a readable program, and the readable program is loaded and executed by the processor 20 to implement the aforementioned method.
[0154] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0155] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0156] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0157] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0158] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk. It should be noted that, in this article, the term "includes", "includes" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "includes one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0159] One or more embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A method for bearing fault diagnosis, characterized in that: The steps include: Collect vibration signals of bearings in different fault and healthy states, and pre-process the vibration signals; Perform multiple sampling on the preprocessed vibration signal to generate signal slices, and annotate a part of the signal slices to obtain labeled data and unlabeled data; Divide all data into training set and test set, where the training set contains labeled data and unlabeled data, and the test set contains unlabeled data; Based on the distance between the labeled data and the unlabeled data, neighbor nodes are selected to form a K-nearby graph, wherein the distance is calculated by a multi-kernel function consisting of a Gaussian kernel function, a sigmoid kernel function, and a Laplace kernel function; Based on the formed K-neighbor graph, an edge self-supervised graph attention network model is established, wherein the edge self-supervised graph attention network model includes two edge self-supervised graph attention network layers and two fully connected layers; The training set is sequentially input into two edge self-supervised graph attention network layers and two fully connected layers, and the self-supervised loss and label classifier loss are calculated. The edge self-supervised graph attention network model parameters are updated using the gradient backpropagation method to obtain the trained edge self-supervised graph attention network model. The test set of unlabeled data is input into the trained edge self-supervised graph attention network model for fault diagnosis.
2. The method for bearing fault diagnosis according to claim 1, characterized in that: The multi-kernel functions used include Gaussian kernel function, sigmoid kernel function and Laplace kernel function, and the distance between labeled data and unlabeled data is measured by weight coefficient combination, where: The Gaussian kernel function distance measurement formula is: The distance measurement formula of the sigmoid kernel function is: The Laplace kernel function distance metric formula is: The metric formula of the multi-kernel function composed of the Gaussian kernel function, the sigmoid kernel function and the Laplace kernel function is as follows: dis(x i ,y j )=w1*k gau (x i ,y j )+w2*k sig (x i ,y j )+w3*k lap (x i y j ): Among them, x i is the central node feature, y j is the edge node feature, e represents the base of the natural logarithm, σ, γ and b are constant terms, σ and γ are set to 1, b is set to 0, Represents x i and j The dot product of , T represents the transpose operation, tanh represents the hyperbolic tangent function; w1, w2 and w3 are weight coefficients.
3. The method for bearing fault diagnosis according to claim 1, characterized in that: in, The construction method of K-proximity graph includes: Selecting a labeled data signal slice as a central node, and using a multi-kernel function composed of a Gaussian function, a sigmoid function, and a Laplace function to calculate the distance between the central node and the unlabeled signal slice; The calculated distances are arranged from large to small, and the K nearest neighbor method is used to select the set of neighbor nodes of each central node to construct a K proximity graph, where k is set to a predetermined number of neighbors.
4. The method for bearing fault diagnosis according to claim 1, characterized in that: The construction method of the edge self-supervised graph attention network model includes: Apply a shared linear transformation weight matrix to each node to obtain the output features of the node; Use the softmax function and the LeakyReLU activation function to normalize the attention parameters of each edge and obtain the attention coefficient from the edge node to the center node; Combined with the layer attention and dot product attention mechanisms, the unnormalized attention parameters are optimized, the probability of whether there is a connection between two nodes is calculated based on whether the same label exists as a priori, and the binary cross entropy loss function is used to calculate the self-supervised loss.
5. The method for bearing fault diagnosis according to claim 4, characterized in that: The output features are calculated by the following formula: Among them, h' i represents the output feature, N represents the number of nodes, a ij is the attention coefficient from edge node j to center node i, W is the shared linear transformation weight matrix applied on each node, and h j is the edge node feature input to the network layer, a ij By paying attention to each edge parameter e ij After SoftMax normalization, the attention coefficient expression from edge node j to center node i is: the ij =softmax(e ij ); Among them, e ij is the attention parameter.
6. The method for bearing fault diagnosis according to claim 5, characterized in that: The layer attention is calculated by a single-layer feedforward network, and the dot product attention is calculated using the product of the transpose of the central node feature matrix and the edge node feature matrix as the attention coefficient. The mathematical expressions are: e ij,LA =a T (Wh i ,Wh j ); e ij,DPA =(Wh i ) T ·Wh j ; Among them, e ij,LA is the layer attention, e ij,DPA is the dot product attention, a is the weight vector, which maps the high-dimensional features of length 2F after splicing to real numbers, T represents the transposition operation, and h i Represents the central node features input to the network layer.
7. The method for bearing fault diagnosis according to claim 6, characterized in that: The unnormalized attention parameter is calculated as follows: And ij,SSAT =σ(e ij,LA )·And ij,DPA ; The formula for calculating the probability of a connection between two nodes is as follows: f ij =σ(e ij,SSGAT ); The formula for calculating the self-supervised loss using the binary cross entropy loss function is as follows: loss SSGAT =-log(φ ij ) In the formula, e ij,SSGAT is the non-normalized attention parameter; σ is the sigmoid function; φ ij is the probability of an edge between i and j; loss SSGAT is the self-supervision loss.
8. The method for bearing fault diagnosis according to claim 7, characterized in that: The steps of sequentially inputting the training set into the established edge self-supervised graph attention network model include: The training set is input into two edge self-supervised graph attention network layers and two fully connected layers in sequence, and the label set predicted by the equation is obtained by the following formula: from i =FC(h′ i ); The classification loss is calculated by the following equation: The loss function of the edge self-supervised graph attention network is calculated by the following equation: Loss=los SSGAT +loss Class ; Among them, Z i To predict the label set, FC represents the fully connected layer, I is the label number, including the true label and the label judged by MK-KNN, and loss class is the classification loss, T is the number of classifications, is the t-dimensional value y of the label i , is the t-dimensional value Z of the predicted label i , Loss is the loss function of the edge self-supervised graph attention network.
9. An electronic device, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a readable program; The at least one processor is used to call the readable program to execute the method according to any one of claims 1-8.
10. A computer-readable medium, characterized in that The computer readable medium stores computer instructions, which, when executed by a processor, cause the processor to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Fault diagnosis method based on adaptive manifold embedding dynamic distribution alignment
CN111829782A
Rolling bearing fault diagnosis method based on SA-ACWGAN-GP
CN113869208A
Train bearing fault diagnosis method, system and device based on data fusion and medium
CN116858540A
Small sample image steganalysis model training method, small sample image steganalysis model analysis method and small sample image steganalysis model training device
CN116894753A
SAGAN-IResNet-based few-sample bearing fault diagnosis method and system, and storage medium
CN117216681A