Mechanical fault diagnosis method based on double topological graphs and consistency representation learning network
By constructing a dual-topology graph and a consistency representation learning network, and combining graph semi-supervised learning and a dynamically enhanced graph attention module, the problem of performance degradation of graph neural networks under very few labeled samples is solved, and efficient diagnosis is achieved in rotating machinery fault diagnosis.
Patent Information
- Application Number
- CN202511595865.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-02-10
AI Technical Summary
Existing mechanical fault diagnosis methods based on graph neural networks suffer from severe performance degradation with very few labeled samples, failing to fully capture the feature relationships between mechanical fault samples. Furthermore, they rely on a large number of labeled samples for training, leading to difficulties and high costs in data labeling during practical operation.
A mechanical fault diagnosis method based on dual topology graphs and consistency representation learning networks is adopted. Two topology graphs are constructed by K-nearest neighbor algorithm and ∈-neighborhood graph. The idea of graph semi-supervised learning is used to propagate the real label information of labeled samples to unlabeled nodes along the radial edge. Combined with gated dynamic enhanced graph attention module and consistency representation learning network, the effective utilization of very few labeled samples is achieved.
It significantly improves the accuracy and efficiency of mechanical fault diagnosis with very few labeled samples, effectively utilizes unlabeled samples, and enhances the diagnostic performance of graph neural networks with very few labeled samples.
Smart Images

Figure CN121502291A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mechanical fault diagnosis technology, and more specifically, relates to a mechanical fault diagnosis method based on a dual topology graph and a consistency representation learning network. Background Technology
[0002] As a critical component of transmission systems, rotating machinery is widely used in industries such as automobile manufacturing, wind turbines, and aerospace. However, rotating machinery typically operates under conditions of variable speed, high temperatures, and dynamic loads, making critical load-bearing transmission components such as gears and bearings prone to failure. This can lead to significant economic losses or even catastrophic accidents. Therefore, researching advanced and precise fault detection technologies is essential for improving the reliability of critical rotating machinery.
[0003] With the rapid development of modern sensor technology and computing power, deep learning-based fault diagnosis methods have achieved successful applications in the field of mechanical fault diagnosis due to their powerful feature extraction capabilities. They can automatically learn high-level discriminative feature representations from raw data and achieve intelligent diagnosis of mechanical equipment, avoiding reliance on expert experience. However, most deep learning models, such as Convolutional Neural Networks (CNNs), Sparse Autoencoders (SAEs), Transformers, and Recurrent Neural Networks (RNNs), can only learn feature representations from sample data in Euclidean space and cannot model the relationships between samples.
[0004] In fault detection of rotating equipment, changes in machine health status can significantly alter the relationships between monitoring signals. Therefore, monitoring and modeling the relationships between acquired signals is an effective approach to fault diagnosis. Traditional fault feature extraction techniques heavily rely on expert prior knowledge for manual judgment, limiting their application efficiency and scope. Common machine learning models, such as CNN, SAE, Transformer, and RNN mentioned above, are limited to feature mining of Euclidean data and cannot model the relationships between mechanical fault signals, thus restricting diagnostic capabilities. As a non-Euclidean data paradigm, graphs, by establishing edge connections between central nodes and neighboring nodes, can model the relationship patterns in physical and network systems. Furthermore, graph neural networks (GNNs) can aggregate neighbor information to learn the feature representation of each central node while capturing the relationships between nodes. Therefore, by constructing a topological graph structure to establish connections between fault samples and building a graph neural network model, fault features and their interrelationships can be mined, leading to more accurate diagnosis. However, current graph neural network-based diagnostic methods are limited to constructing a single topological graph structure to establish connections between samples. The connection forms are simplistic, and information from different topological graphs cannot be directly fused due to significant differences in feature extraction, resulting in insufficient mining of node relationships. Therefore, traditional graph neural network-based diagnostic methods have limited ability to mine graph data information and cannot fully capture the feature relationships between mechanical fault samples, greatly affecting the actual fault diagnosis results. Furthermore, existing graph neural network models heavily rely on a large number of labeled samples (more than 50% of the total samples) to train an effective model. In practical operating environments, obtaining sufficient labeled data is very difficult because data labeling is usually a time-consuming and costly process. Therefore, this fault diagnosis method needs improvement. Summary of the Invention
[0005] To address the shortcomings of existing technologies, the present invention aims to provide a mechanical fault diagnosis method based on dual topology graphs and consistency representation learning networks. This method aims to solve the problem of severely degraded diagnostic performance of existing graph neural network models when there are very few labeled samples, based on the semi-supervised learning concept of graphs.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] A mechanical fault diagnosis method based on dual-topology graph and consistency representation learning network includes acquiring vibration signals of rotating machinery and determining a mechanical fault diagnosis model. The method extracts spectral domain features of the vibration signals and inputs them into the mechanical fault diagnosis model to output diagnostic results. Determining the mechanical fault diagnosis model includes acquiring the original vibration signals of the rotating machinery, extracting spectral domain features of the original vibration signals of known faults, dividing the spectral domain features into n non-overlapping labeled samples, and dividing the divided spectral domain labeled samples into training, validation, and test sets. A neural network model is formed through a model training phase and a model testing phase to form the mechanical fault diagnosis model. The model training involves: firstly... The training set data is expanded to form a training set graph data, which consists of real labels and pseudo-label samples. The training set contains less than 3% of the n non-overlapping labeled samples. The method for constructing the training set graph data is as follows: two different topological graphs are constructed using the K-nearest neighbor algorithm and the ∈-neighborhood graph. Based on the topological graph structure, the labeled sample is placed at the center node of the topological graph and is denoted as the real label node. The real label information of the center node is propagated along the radial edges to the remaining nodes around the center node and is denoted as pseudo-label nodes. Thus, a training set graph data containing a limited number of real labels and a large number of pseudo labels is obtained. The training set graph data is used to train the model.
[0008] The solution further includes the following process for constructing the topology graph using the K-nearest neighbor algorithm:
[0009] I. Define the partitioned training set as ,in Indicates inclusion For each data point sample, calculate the Manhattan distance between each sample and all other samples, as shown below:
[0010]
[0011] In the above formula Indicates sample and Manhattan distance; in order to establish effective connections, select target samples. Calculate the adjacency matrix of the nearest neighbor nodes and establish the edge set. Adjacency matrix The calculation is as follows:
[0012]
[0013] In the above formula Indicates target sample Others in The set of Manhattan distances of the samples in the dataset; Represents the nearest neighbor algorithm; if Manhattan distance exist Center front Within a minimum value, the node is considered to be... and nodes There are edges connecting them and Otherwise, there is no edge connecting the two nodes and Obtained through calculation Establish the edge set of the topological graph ,
[0014] II. Edge Weight Set calculate:
[0015]
[0016] in: Represents the bandwidth variance of the Gaussian function; obtains , and Then, the topological graph constructed using the K-nearest neighbor algorithm is defined as follows: .
[0017] The scheme further includes the following process for constructing the topology graph from the ∈-neighborhood graph:
[0018] First, construct the ∈-neighborhood graph based on cosine similarity as follows.
[0019]
[0020] in Represents a node In the neighbor set of the ∈-neighborhood graph; express The cosine similarity with other samples in the training set is calculated, where ∈ represents the threshold. Equation (4) indicates that if the cosine similarity between two nodes is greater than the threshold, an edge connection is generated; otherwise, there is no connection between the two nodes.
[0021] Calculate the edge weight set between connected nodes The calculation is as follows:
[0022]
[0023] in ;
[0024] Encode the edge weights and edge structure of the ∈-neighborhood graph into an adjacency matrix. as follows:
[0025]
[0026] in: Represents a node with neighbors The set of cosine similarities of other nodes in the array; It is a function representing the set of cosine similarities. The values in the table are sorted from largest to smallest, and the cosine similarity value is the first one. One of the maximum values, then ,otherwise ,get After that, the target node of The nearest neighbors are also determined through the adjacency matrix. Determine the edge structure with the nearest neighbor node ,according to , and The ∈-neighborhood graph is defined as .
[0027] The scheme further includes: the propagation of the real label information of the central node along the radial edge to the remaining nodes surrounding the central node, which are called pseudo-label nodes, is determined based on the smoothness assumption theory, in the same topology graph, each node shares the same label information.
[0028] The scheme further includes: the propagation of the real label information of the central node along the radial edge to the remaining nodes surrounding the central node, denoted as pseudo-label nodes, is represented as follows:
[0029]
[0030]
[0031] in: and Representing the ∈-neighborhood graph respectively The topology graph constructed by the K-nearest neighbor algorithm Middle node Authentic label information and This represents nodes in two different topological graphs. Pseudo-label information, This represents the set of real label information and pseudo label information contained in the topology graph.
[0032] The solution further includes: the steps in the model training phase include:
[0033] I. Construct a gated dynamic augmented graph attention layer based on the PyTorch deep learning framework to extract topological graph feature representations:
[0034] The dynamically enhanced graph attention layer includes a dynamic attention mechanism that calculates dynamic attention coefficients between nodes; the dynamic attention coefficients are calculated as follows:
[0035]
[0036] in: Represents a learnable attention mechanism vector; Represents the learnable weight matrix; This represents the enhancement factor; the enhancement factor is designed as follows:
[0037]
[0038] By using enhancement factors, the feature differences between nodes are amplified during the node feature aggregation process, thereby highlighting the contributions of important nodes;
[0039] II. Calculate the normalized attention weights:
[0040]
[0041] III. Based on normalized attention weights, calculate the aggregated features output by dynamically enhanced attention layers:
[0042]
[0043] in: and These represent nonlinear activation functions;
[0044] IV. Calculate the filtered noise information through gating mechanisms and multi-head attention:
[0045]
[0046] in: This represents the feature information output by dynamically enhancing the graph attention layer; This represents the feature information output through gating mechanisms and multi-head self-attention; This represents the sigmoid activation function; Feature information representing the output of multi-head self-attention:
[0047]
[0048] in: Indicates the first Features of the output of each head; Represent a learnable matrix; Indicates the number of attention heads. ; This indicates that the dynamically enhanced attention layer outputs aggregated features. Dimensions; query vector Key vector Sum value vector :
[0049]
[0050]
[0051]
[0052] in: , and It is a learnable matrix;
[0053]
[0054] in: Indicates the scale factor;
[0055] V. A consistency representation learning network based on the PyTorch deep learning framework, and a two-layer gated dynamic augmented graph attention module, including:
[0056] The dual-branch feature extraction channel extracts the ∈-neighborhood graph separately. The topology graph constructed by the K-nearest neighbor algorithm The feature information is obtained; the consistent embedding representation features of the two topological graphs are obtained through the consistency representation constraint loss; finally, the extracted consistent embedding representation features are input into the fully connected layer to realize node classification.
[0057] VI. A dual-branch feature extraction channel based on a two-layer gated dynamic augmented graph attention module to extract ∈-neighborhood graphs. The topology graph constructed by the K-nearest neighbor algorithm Feature information:
[0058]
[0059]
[0060] Based on the consistency constraint loss of symmetric KL divergence, the consistency of the embedded representation information extracted by the two branches of the constraint is calculated:
[0061]
[0062] in: This represents the loss due to consistency constraints; Indicates KL divergence:
[0063]
[0064] VII. Consistent embedding representation obtained through concatenation and normalization:
[0065]
[0066] Consistency embedding is used to input the fully connected layer (FC) to obtain node prediction results. :
[0067]
[0068] 8. Measure the difference between the predicted results and the true labels, and calculate the cross-entropy loss:
[0069]
[0070] in: Indicates the number of categories; This represents the training set containing both real and pseudo labels; Indicates label of dimensional vector, Indicates predicted label of A dimensional vector; the final loss function is defined as:
[0071]
[0072] 9. Optimize the loss function using the Adam optimizer and update the network parameters using the gradient backpropagation algorithm.
[0073] The scheme further includes: the model testing phase: inputting the test set data of the labeled samples of known faults into the trained mechanical fault diagnosis model to obtain mechanical fault prediction results, comparing the prediction results with the real label information of the test samples to statistically analyze the prediction accuracy, and realizing model reliability testing.
[0074] The beneficial effects of this invention are as follows: Compared with the prior art, this invention changes the traditional model training sample extraction method, and uses the graph semi-supervised approach to solve the problem of performance degradation of traditional graph neural networks in actual diagnostic scenarios due to the limited number of labeled samples. The effectiveness and superiority of this invention have been verified on a rotating machinery dataset containing very few labeled samples. The main beneficial effects are as follows:
[0075] a) This invention constructs two different topological graph data, connecting a limited number of labeled samples and a large number of unlabeled samples in a graph form, and designs a graph label transfer method based on the smoothness assumption theory to transfer the labeled sample information to the unlabeled nodes along the edge structure, thereby realizing the utilization of a large number of unlabeled samples.
[0076] b) This invention designs a gated dynamic enhanced graph attention module. Compared with traditional graph convolutional layers, the gated dynamic enhanced graph attention module can obtain the feature differences between nodes by designing an enhancement factor and a dynamic attention mechanism, and realize the weighted aggregation of node information through the obtained dynamic attention weight coefficients, thereby achieving more effective topological graph feature extraction.
[0077] c) This invention constructs a consistency representation learning network model based on the PyTorch deep learning framework. By designing a dual-branch feature extraction channel to extract feature information from two different topological graphs, and obtaining a consistent embedding representation through symmetric KL divergence constraints, the fusion of information from different topological graphs is achieved. Experiments demonstrate that the consistency representation learning network can effectively improve the diagnostic performance of other graph baseline models with limited labeled samples.
[0078] The invention will be further explained in detail below with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0079] Figure 1 This is a schematic diagram of the mechanical fault diagnosis model constructed according to the present invention;
[0080] Figure 2 This is a schematic diagram of the dual-topology diagnostic model of the present invention;
[0081] Figure 3 This serves as an experimental platform for the Xi'an Jiaotong University planetary gearbox dataset.
[0082] Figure 4 Set up an information table for the planetary gearbox dataset;
[0083] Figure 5 List of diagnostic results for planetary gearboxes using different methods;
[0084] Figure 6 A chart showing the diagnostic results of the dual topology graph for the planetary gearbox dataset (Proposed);
[0085] Figure 7 A dynamic graph of attention network diagnostic results for the planetary gearbox dataset (LPS-DGAT);
[0086] Figure 8 A graph of diagnostic results from a convolutional neural network (GCN) for a planetary gearbox dataset;
[0087] Figure 9 A graph of the attention network diagnostic results (GAT) for the planetary gearbox dataset;
[0088] Figure 10 A graph of diagnostic results for graph isomorphic networks (GIN) in the planetary gearbox dataset;
[0089] Figure 11 A graph of diagnostic results for a graph isomorphic network (ChebyNet) for a planetary gearbox dataset;
[0090] Figure 12 The results are from five independent experiments using the planetary gearbox dataset. Detailed Implementation
[0091] A mechanical fault diagnosis method based on dual-topology graph and consistency representation learning network includes acquiring vibration signals of rotating machinery and determining a mechanical fault diagnosis model, extracting spectral domain features of the vibration signals and inputting them into the mechanical fault diagnosis model to output diagnosis results; the determination of the mechanical fault diagnosis model includes: acquiring the original vibration signals of rotating machinery, extracting spectral domain features of the original vibration signals of known faults, dividing the spectral domain features into n non-overlapping labeled samples, and dividing the divided spectral domain labeled samples into training set, validation set and test set; a neural network model is formed into the mechanical fault diagnosis model through a model training stage and a model testing stage; wherein, the model training: first First, the training set data is expanded to form training set graph data, which consists of real labels and pseudo-label samples. The training set contains less than 3% of the n non-overlapping labeled samples. The training set graph data is constructed by using the K-nearest neighbor algorithm and the ∈-neighborhood graph to build two different topological graphs. Based on the topological graph structure, the labeled sample is placed at the center node of the topological graph and is denoted as the real label node. The real label information of the center node is propagated along the radial edges to the remaining nodes around the center node and is denoted as pseudo-label nodes. Thus, a training set graph data containing a limited number of real labels and a large number of pseudo labels is obtained. The training set graph data is then used to train the model.
[0092] like Figure 1 As shown, the steps for determining the mechanical fault diagnosis model described above can be summarized as follows:
[0093] Step 1: Data Acquisition Stage: Collect raw vibration signals of rotating machinery under different conditions based on accelerometers;
[0094] Step 2: Dual Topology Graph Construction Stage: Obtain the spectral domain features of the vibration signal, divide the spectral domain features into n non-overlapping samples, and divide the divided spectral domain samples into a training set, a validation set, and a test set, where the training set contains a very small number of labeled samples; construct two different topology graphs using the K-nearest neighbor algorithm and the ∈-neighborhood graph construction method; based on the topology graph structure, propagate the label information of the labeled central nodes in the training set along the edges to the unlabeled nodes to obtain training set graph data containing a limited number of real labels and a large number of pseudo labels;
[0095] Step 3: Model Training Phase: Construct a gated dynamic augmented graph attention module to extract topological graph feature representations; based on the constructed gated dynamic augmented graph attention module, build a consistency representation learning network to extract consistent embedding representations of two different topological graphs, and input the extracted features into a fully connected layer to achieve classification; train using training set data, validate using validation set data, and update the consistency representation learning framework parameters using gradient backpropagation algorithm;
[0096] Step 4: Model Testing Phase: Input the test set data with known label information into the trained consistency representation learning network to obtain mechanical fault prediction results. Compare the prediction results with the real labels to statistically analyze the prediction accuracy and achieve model reliability testing.
[0097] Step 2 further includes:
[0098] Step 2.1: Obtain the spectral representation of the vibration signal through Fast Fourier Transform; divide the spectral domain features of the signal into n samples, and further divide them into training set and test set. In the training set, only a very small number of samples of each health state contain true label information, and the test set consists of samples with known labels (used to verify model performance).
[0099] Step 2.2: For the training set, construct two different topological graphs using the K-nearest neighbor algorithm and the ∈-neighborhood graph construction method; the process of constructing the topological graph using the K-nearest neighbor algorithm is as follows:
[0100] Step 2.3, Label Information Transfer: Two different topological graphs are constructed using the K-Nearest Neighbors algorithm and the ∈-neighborhood graph construction method. In both methods, only the target nodes contain label information. Based on the smoothness assumption, we propose a graph label transfer method to achieve the transfer of label information between target nodes. In semi-supervised learning, the smoothness assumption posits that samples with similar features have a high probability of sharing the same label information. Through the aforementioned topological graph construction, we achieve clustering of samples with similar features via graph connectivity. Therefore, within the same topological graph, each node has a greater probability of possessing the same label information.
[0101] Step 3 further includes:
[0102] Step 3.1: Construct a gated dynamic enhanced graph attention module based on the PyTorch deep learning framework to extract topological graph feature representations. This module is a variant of the graph attention layer. By designing a dynamic enhanced graph attention layer, it improves the ability of traditional graph attention layers to capture the differences between nodes, enabling subtle differences between sample nodes with similar features to still be effectively captured. Furthermore, by applying a gating mechanism and multi-head self-attention, the influence of noise information on the extracted discriminative features is reduced.
[0103] The dynamic enhanced graph attention layer includes a dynamic attention mechanism, which specifically obtains the dynamic attention coefficients between nodes by designing an enhancement factor and changing the calculation order of traditional learnable weights and learnable attention vectors.
[0104] Step 3.2: Build a consistency representation learning network based on the PyTorch deep learning framework; this model designs a dual-branch feature extraction channel based on a two-layer gated dynamic augmented graph attention module, extracting ∈-neighborhood graphs respectively. The topology graph constructed by the K-nearest neighbor algorithm The feature information is obtained; further, the consistent embedding representation features of the two topological graphs are obtained by designing a consistent representation constraint loss; finally, the extracted consistent embedding representation features are input into the fully connected layer to realize node classification.
[0105] Step 3.3: Train the consistency representation learning network on a training set containing very few labeled samples, optimize the loss function of equation (24) using the Adam optimizer, and continuously update the parameters of the consistency representation learning network using the gradient backpropagation algorithm.
[0106] The process of constructing the topology graph using the K-nearest neighbor algorithm is as follows:
[0107] I. Define the partitioned training set as ,in Indicates inclusion For each data point sample, calculate the Manhattan distance between each sample and all other samples, as shown below:
[0108]
[0109] In the above formula Indicates sample and Manhattan distance; in order to establish effective connections, select target samples. Calculate the adjacency matrix of the nearest neighbor nodes and establish the edge set. Adjacency matrix The calculation is as follows:
[0110]
[0111] In the above formula Indicates target sample Others in The set of Manhattan distances of the samples in the dataset; Represents the nearest neighbor algorithm; if Manhattan distance exist Center front Within a minimum value, the node is considered to be... and nodes There are edges connecting them and Otherwise, there is no edge connecting the two nodes and Obtained through calculation Establish the edge set of the topological graph ,
[0112] II. Edge Weight Set calculate:
[0113]
[0114] in: Represents the bandwidth variance of the Gaussian function; obtains , and Then, the topological graph constructed using the K-nearest neighbor algorithm is defined as follows: .
[0115] The process of constructing the topology graph from the ∈-neighborhood graph is as follows:
[0116] First, construct the ∈-neighborhood graph based on cosine similarity as follows.
[0117]
[0118] in Represents a node In the neighbor set of the ∈-neighborhood graph; express The cosine similarity with other samples in the training set is calculated, where ∈ represents the threshold. Equation (4) indicates that if the cosine similarity between two nodes is greater than the threshold, an edge connection is generated; otherwise, there is no connection between the two nodes.
[0119] Calculate the edge weight set between connected nodes The calculation is as follows:
[0120]
[0121] in ;
[0122] Encode the edge weights and edge structure of the ∈-neighborhood graph into an adjacency matrix. as follows:
[0123]
[0124] in: Represents a node with neighbors The set of cosine similarities of other nodes in the array; It is a function representing the set of cosine similarities. The values in the table are sorted from largest to smallest, and the cosine similarity value is the first one. One of the maximum values, then ,otherwise ,get After that, the target node of The nearest neighbors are also determined through the adjacency matrix. Determine the edge structure with the nearest neighbor node ,according to , and The ∈-neighborhood graph is defined as .
[0125] The statement that the real label information of the central node is propagated along the radial edges to the remaining nodes surrounding the central node and are called pseudo-label nodes is based on the smoothness assumption theory, which states that in the same topological graph, each node has a high probability of sharing the same label information.
[0126] The process of propagating the real label information of the central node along the radiating edge to the remaining nodes surrounding the central node, referred to as pseudo-label nodes, is represented as follows:
[0127]
[0128]
[0129] in: and Representing the ∈-neighborhood graph respectively The topology graph constructed by the K-nearest neighbor algorithm Middle node Authentic label information and This represents nodes in two different topological graphs. Pseudo-label information, This represents the set of real label information and pseudo label information contained in the topology graph.
[0130] The steps in the model training phase include:
[0131] I. Construct a gated dynamic augmented graph attention layer based on the PyTorch deep learning framework to extract topological graph feature representations:
[0132] The dynamically enhanced graph attention layer includes a dynamic attention mechanism that calculates dynamic attention coefficients between nodes; the dynamic attention coefficients are calculated as follows:
[0133]
[0134] in: Represents a learnable attention mechanism vector; Represents the learnable weight matrix; This represents the enhancement factor; the enhancement factor is designed as follows:
[0135]
[0136] By using enhancement factors, the feature differences between nodes are amplified during the node feature aggregation process, thereby highlighting the contributions of important nodes;
[0137] II. Calculate the normalized attention weights:
[0138]
[0139] III. Based on normalized attention weights, calculate the aggregated features output by dynamically enhanced attention layers:
[0140]
[0141] in: and These represent nonlinear activation functions;
[0142] IV. Calculate the filtered noise information through gating mechanisms and multi-head attention:
[0143]
[0144] in: This represents the feature information output by dynamically enhancing the graph attention layer; This represents the feature information output through gating mechanisms and multi-head self-attention; This represents the sigmoid activation function; Feature information representing the output of multi-head self-attention:
[0145]
[0146] in: Indicates the first Features of the output of each head; Represent a learnable matrix; Indicates the number of attention heads. ; This indicates that the dynamically enhanced attention layer outputs aggregated features. Dimensions; query vector Key vector Sum value vector :
[0147]
[0148]
[0149]
[0150] in: , and It is a learnable matrix;
[0151]
[0152] in: Indicates the scale factor;
[0153] V. A consistency representation learning network based on the PyTorch deep learning framework, and a two-layer gated dynamic augmented graph attention module, including:
[0154] The dual-branch feature extraction channel extracts the ∈-neighborhood graph separately. The topology graph constructed by the K-nearest neighbor algorithm The feature information is obtained; the consistent embedding representation features of the two topological graphs are obtained through the consistency representation constraint loss; finally, the extracted consistent embedding representation features are input into the fully connected layer to realize node classification.
[0155] VI. A dual-branch feature extraction channel based on a two-layer gated dynamic augmented graph attention module to extract ∈-neighborhood graphs. The topology graph constructed by the K-nearest neighbor algorithm Feature information:
[0156]
[0157]
[0158] Based on the consistency constraint loss of symmetric KL divergence, the consistency of the embedded representation information extracted by the two branches of the constraint is calculated:
[0159]
[0160] in: This represents the loss due to consistency constraints; Indicates KL divergence:
[0161]
[0162] VII. Consistent embedding representation obtained through concatenation and normalization:
[0163]
[0164] Consistency embedding is used to input the fully connected layer (FC) to obtain node prediction results. :
[0165]
[0166] 8. Measure the difference between the predicted results and the true labels, and calculate the cross-entropy loss:
[0167]
[0168] in: Indicates the number of categories; This represents the training set containing both real and pseudo labels; Indicates label of dimensional vector, Indicates predicted label of A dimensional vector; the final loss function is defined as:
[0169]
[0170] 9. Optimize the loss function using the Adam optimizer and update the network parameters using the gradient backpropagation algorithm.
[0171] The model testing phase involves inputting the test set data of labeled samples with known faults into the trained mechanical fault diagnosis model to obtain mechanical fault prediction results. The prediction results are then compared with the real label information of the test samples to statistically analyze the prediction accuracy, thereby achieving model reliability testing.
[0172] This embodiment uses a planetary gearbox data atlas to verify the test results of the mechanical fault diagnosis method based on dual topology graphs and a consistency representation learning network. For example... Figure 3 As shown in (a), the test bench consists of a 3-phase 3HP drive motor, a planetary gearbox, a controller, a parallel gearbox, a brake, and two PCB352C04 one-dimensional accelerometers mounted vertically and horizontally. Vibration signals in the Y direction were used in the experiment. The motor speed was set to 1800 r / min, and the sampling frequency was 20480 Hz.
[0173] This embodiment considers nine health states of a planetary gearbox, including four types of bearing failures, four types of gear failures, and one normal state. Specifically, the four types of bearing failures are outer ring failure, inner ring failure, rolling element failure, and a combination of the above three types of bearing failures. Gear failures include tooth root cracks, missing teeth, broken teeth, and tooth surface wear, such as… Figure 3 As shown in (b).
[0174] Each health state contains 200 samples, of which 40 are randomly selected for training; the remainder are used for testing. Of the 40 training samples, only 2 are labeled, a labeling rate of only 1%. Each sample contains 2048 sampling points. Detailed experimental settings are attached. Figure 4 Information table. To reduce randomness and experimental error, each experiment was repeated 5 times, with no overlapping sampling points between samples. The specific diagnostic results of different methods under the five evaluation indicators in this embodiment are shown in Table 5.
[0175] Figure 5 The list shows the diagnostic results of the proposed method on the planetary gearbox dataset. It can be seen that the DGD_CRLN method proposed in this embodiment achieved the highest classification accuracy in all five experiments. The average classification accuracy of this method is significantly higher than that of the semi-supervised fault diagnosis method using LPS-DGAT and other graph baseline models, indicating that the designed method has effectiveness and advantages in diagnosing rotating machinery faults under low annotation rates. The confusion matrices of different methods are shown in Figures 7 to 7. Figure 11 As shown, it can be seen that, except for health states (7) and (8), the method proposed in this embodiment has an accuracy rate of over 93% for detecting most other health states, with the prediction of health states 0, 1, 2, and 3 being completely accurate, reaching 100%. In contrast, the comparative method performs poorly in identifying more health states, and its overall average classification accuracy is significantly lower than that of the proposed method.
[0176] like Figure 12 The t-SNE feature visualization results shown demonstrate that the neural network (GDEGAT) based on the gated dynamic enhanced graph attention module described in this embodiment, as well as other baseline models combining the mechanical fault diagnosis method based on dual topological graphs and consistency representation learning networks (DGD_CRLN) of this invention, can more effectively cluster samples under the same health state and establish clearer boundaries between different health states. These results fully demonstrate that the (DGD_CRLN) method described in this invention can significantly improve the capabilities of various graph neural network (GNNs) models in semi-supervised diagnostic tasks. Figure 5 As shown in the table, in the embodiment without using DGD_CRLN, the GDEGAT feature extraction module described in this embodiment outperforms the other five baseline models in all five evaluation metrics, indicating that the module integrates gating mechanism and enhanced dynamic attention.
Claims
1. A mechanical fault diagnosis method based on dual topology graphs and consistent representation learning networks, comprising acquiring vibration signals of rotating machinery and determining a mechanical fault diagnosis model, extracting spectral domain features of the vibration signals and inputting them into the mechanical fault diagnosis model to output diagnosis results; wherein determining the mechanical fault diagnosis model comprises acquiring the original vibration signals of rotating machinery, extracting spectral domain features of the original vibration signals of known faults, dividing the spectral domain features into n non-overlapping labeled samples, and dividing the divided spectral domain labeled samples into training sets, validation sets, and test sets, wherein a neural network model is formed into the mechanical fault diagnosis model through a model training stage and a model testing stage; characterized in that, The model training involves first expanding the training set data to form a training set graph data, which consists of real labeled and pseudo-labeled samples. The training set contains less than 3% of the n non-overlapping labeled samples. The training set graph data is constructed by using the K-nearest neighbor algorithm and the ∈-neighborhood graph to create two different topological graphs. Based on the topological graph structure, labeled samples are placed at the center node of the topological graph and denoted as real label nodes. The real label information of the center node is propagated along the radial edges to the remaining nodes around the center node and denoted as pseudo label nodes. In this way, a training set graph data containing a limited number of real labels and a large number of pseudo labels is obtained, and the training set graph data is used to train the model.
2. The mechanical fault diagnosis method according to claim 1, characterized in that, The process of constructing the topology graph using the K-nearest neighbor algorithm is as follows: I. Define the partitioned training set as ,in Indicates inclusion For each data point sample, calculate the Manhattan distance between each sample and all other samples, as shown below: In the above formula Indicates sample and Manhattan distance; in order to establish effective connections, select target samples. Calculate the adjacency matrix of the nearest neighbor nodes and establish the edge set. Adjacency matrix The calculation is as follows: In the above formula Indicates target sample Others in The set of Manhattan distances of the samples in the dataset; Represents the nearest neighbor algorithm; if the Manhattan distance... exist Center front Within a minimum value, the node is considered to be... and nodes There are edges connecting them and Otherwise, there is no edge connecting the two nodes and Obtained through calculation Establish the edge set of the topological graph , II. Edge Weight Set calculate: in: Represents the bandwidth variance of the Gaussian function; obtains , and Then, the topological graph constructed using the K-nearest neighbor algorithm is defined as follows: .
3. The mechanical fault diagnosis method according to claim 1, characterized in that, The process of constructing the topology graph from the ∈-neighborhood graph is as follows: First, construct the ∈-neighborhood graph based on cosine similarity as follows. in Represents a node In the neighbor set of the ∈-neighborhood graph; express The cosine similarity with other samples in the training set is calculated, where ∈ represents the threshold. Equation (4) indicates that if the cosine similarity between two nodes is greater than the threshold, an edge connection is generated; otherwise, there is no connection between the two nodes. Calculate the edge weight set between connected nodes The calculation is as follows: in ; Encode the edge weights and edge structure of the ∈-neighborhood graph into an adjacency matrix. as follows: in: Represents a node with neighbors The set of cosine similarities of other nodes in the array; It is a function that represents the set of cosine similarities. The values in the table are sorted from largest to smallest, and the cosine similarity value is the first one. One of the maximum values, then ,otherwise ,get After that, the target node of The nearest neighbors are also determined through the adjacency matrix. Determine the edge structure with the nearest neighbor node ,according to , and The ∈-neighborhood graph is defined as .
4. The mechanical fault diagnosis method according to claim 1, characterized in that, The method of propagating the real label information of the central node along the radial edge to the remaining nodes surrounding the central node, which are called pseudo-label nodes, is determined based on the smoothness assumption theory, which states that each node in the same topology graph shares the same label information.
5. The mechanical fault diagnosis method according to claim 1, characterized in that, The process of propagating the real label information of the central node along the radiating edge to the remaining nodes surrounding the central node, referred to as pseudo-label nodes, is represented as follows: in: and Representing the ∈-neighborhood graph respectively The topology graph constructed by the K-nearest neighbor algorithm Middle node Real label information, and This represents nodes in two different topological graphs. Pseudo-label information, This represents the set of real label information and pseudo label information contained in the topology graph.
6. The mechanical fault diagnosis method according to claim 1, characterized in that, The steps in the model training phase include: I. Constructing a gated dynamic augmented graph attention layer based on the PyTorch deep learning framework to extract topological graph feature representations: The dynamically enhanced graph attention layer includes a dynamic attention mechanism that calculates dynamic attention coefficients between nodes; the dynamic attention coefficients are calculated as follows: in: Represents a learnable attention mechanism vector; Represents the learnable weight matrix; This represents the enhancement factor; the enhancement factor is designed as follows: By using enhancement factors, the feature differences between nodes are amplified during the node feature aggregation process, thereby highlighting the contributions of important nodes; II. Calculate the normalized attention weights: III. Based on normalized attention weights, calculate the aggregated features output by dynamically enhanced attention layers: in: and These represent nonlinear activation functions; IV. Calculate the filtered noise information through gating mechanisms and multi-head attention: in: This represents the feature information output by dynamically enhancing the graph attention layer; This represents the feature information output through gating mechanisms and multi-head self-attention; This represents the sigmoid activation function; Feature information representing the output of multi-head self-attention: in: Indicates the first Features of the output of each head; Represent a learnable matrix; Indicates the number of attention heads. ; This indicates that the dynamically enhanced attention layer outputs aggregated features. Dimensions; query vector Key vector Sum value vector : in: , and It is a learnable matrix; in: Indicates the scale factor; V. A consistency representation learning network based on the PyTorch deep learning framework, and a two-layer gated dynamic augmented graph attention module, including: The dual-branch feature extraction channel extracts the ∈-neighborhood graph separately. The topology graph constructed by the K-nearest neighbor algorithm The feature information is obtained; the consistent embedding representation features of the two topological graphs are obtained through the consistency representation constraint loss; finally, the extracted consistent embedding representation features are input into the fully connected layer to realize node classification. VI. A dual-branch feature extraction channel based on a two-layer gated dynamic augmented graph attention module to extract ∈-neighborhood graphs. The topology graph constructed by the K-nearest neighbor algorithm Feature information: Based on the consistency constraint loss of symmetric KL divergence, the consistency of the embedded representation information extracted by the two branches of the constraint is calculated: in: This represents the loss due to consistency constraints. Indicates KL divergence: VII. Consistent embedding representation obtained through concatenation and normalization: Consistency embedding is used to input the fully connected layer (FC) to obtain node prediction results. :
8. Measure the difference between the predicted results and the true labels, and calculate the cross-entropy loss: in: Indicates the number of categories; This represents the training set containing both real and pseudo labels; Indicates label of dimensional vector, Indicates predicted label of A dimensional vector; the final loss function is defined as:
9. Optimize the loss function using the Adam optimizer and update the network parameters using the gradient backpropagation algorithm.
7. The mechanical fault diagnosis method according to claim 6, characterized in that, The model testing phase involves inputting the test set data of labeled samples with known faults into the trained mechanical fault diagnosis model to obtain mechanical fault prediction results. The prediction results are then compared with the real label information of the test samples to statistically analyze the prediction accuracy, thereby achieving model reliability testing.