Small sample fault diagnosis method for mechanical transmission components based on twin network
By using a twin network-based method in fault diagnosis of mechanical transmission components, the signal characteristics are featured embedded and the signal diagram is constructed, and the problem of insufficient fault diagnosis performance under small sample noise interference is solved, achieving higher diagnostic accuracy and robustness.
Patent Information
- Application Number
- CN202411227749.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-09-03
AI Technical Summary
The existing technology has insufficient fault diagnosis performance of mechanical transmission components under small sample noise interference conditions, mainly due to the low quality of graph neural networks when constructing an adjacency matrix, resulting in low diagnostic accuracy.
The twin network-based method is used to feature embed signal features to improve the accuracy of signal graphs, build signal graphs through K nearest neighbor algorithm, and combine graph neural network to perform node classification to improve the accuracy of fault diagnosis.
Through the combination of twin networks and graph neural networks, topological relationships and dependencies in sample data are effectively mined and utilized, which significantly improves the accuracy of small sample fault diagnosis and enhances the robustness of the method.
Smart Images

Figure CN119167086B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of mechanical transmission component fault diagnosis, and more specifically, relates to a small sample fault diagnosis method for mechanical transmission components based on a twin network. Background Art
[0002] Mechanical transmission components, such as bearings and gears, play a vital role in mechanical systems. However, long-term operation will inevitably cause damage to key transmission components such as wear and pitting. As these damages worsen, it is easy to cause failures in the damaged components themselves, adjacent components, and even the entire machine. Diagnosing early damage to components is of great significance to avoid continued deterioration of failures.
[0003] At present, the fault diagnosis method for mechanical transmission parts is mainly based on data-driven deep learning methods. Deep learning methods can extract a variety of complex features from input data. Compared with machine learning methods or time-frequency analysis methods, they have stronger feature extraction capabilities and are more adaptable to large-scale data. They are the most widely used and more flexible methods in current research. However, the currently widely used deep learning method is a deep neural network based on convolution kernel feature extraction, which cannot handle the topological relationship between samples and will lose the dependency relationship between samples that is beneficial to fault diagnosis, resulting in insufficient diagnostic performance.
[0004] In practical engineering applications, on the one hand, certain types of failures occurring on mechanical parts are themselves low-probability events, so obtaining large-scale labeled fault data samples is usually difficult and expensive. On the other hand, due to environmental factors such as electromagnetic interference in sensor data acquisition, unstable mechanical vibration in the operation of transmission parts, and temperature fluctuations, there are various types of noise in the sample data collected in real industrial scenarios. These noises will affect the clarity and accuracy of the fault signal and interfere with fault diagnosis. Combining the above two factors, studying the fault diagnosis of transmission parts under the condition of small sample noise interference has important practical engineering significance.
[0005] At present, there are three main methods for dealing with the small sample problem in the field of fault diagnosis: (1) Data sample enhancement method that generates pseudo samples based on the original samples to assist training. When the training sample size is too small, the features of the generated samples will lack diversity and the fault information contained will also be limited. (2) Transfer learning method that transfers the knowledge learned in the source domain to the target domain to assist reasoning. However, its defects are also very obvious. Transfer learning requires a source domain dataset with sufficient sample size for auxiliary training, which actually has high requirements for data. (3) Meta-learning method that uses special training mechanism. The problem faced by this method is that its training process is relatively complicated and requires a lot of computing resources and time to train the model. In order to solve the problem that key fault features are interfered or even submerged by random noise, there are two main approaches in the current fault diagnosis methods based on deep learning: (1) Reduce the interference of noise by using methods such as denoising, filtering, and feature screening in the data preprocessing stage. (2) Introduce some mechanisms to enhance robustness or improve the model structure in the method model, such as using regularization technology, multi-scale feature learning, introducing random perturbations, etc., to reduce the impact of random noise on diagnostic performance.
[0006] Graph Neural Network (GNN) is a neural network method for processing graph structured data. GNN can ensure the efficiency and accuracy of sample information transmission and aggregation by aggregating domain node features, and can fully explore and utilize the topological relationships and dependencies implicit in the data, solving the drawbacks of mainstream neural network methods. However, graph neural networks still have certain problems under small sample noise conditions. The premise of efficient aggregation of features from neighborhood nodes by graph neural networks is that the neighborhood nodes should be of the same category as the central node. However, due to the scarcity of samples and the interference of samples by noise, nodes of different categories will be incorrectly connected, that is, the quality of adjacency matrix construction will decrease. Therefore, how to improve the construction quality of the adjacency matrix in graph neural networks under small sample noise interference conditions is the core issue of this type of method. Summary of the invention
[0007] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a small sample fault diagnosis method for mechanical transmission components based on twin networks, embed signal features based on twin networks, improve the accuracy of the generated signal graph, better extract the implicit topological relationship between signals, and improve the accuracy of small sample fault diagnosis.
[0008] In order to achieve the above-mentioned purpose of the invention, the small sample fault diagnosis method of mechanical transmission components based on twin network of the present invention comprises the following steps:
[0009] S1: Set sensors according to actual needs, collect signal samples of mechanical transmission components in normal state and M different fault states, and the number of signal samples in each state is dm Determined according to the actual needs of small sample fault diagnosis, m = 0 represents the normal state, m = 1, 2, ..., M represents the fault state of the corresponding sequence number, for each signal sample x i Mark the serial number S of the corresponding state i , i=1,2,…,D, S i =0,1,…,M, thus obtaining the training sample set;
[0010] S2: For each signal sample x in the training sample set i Extract signal feature F i ;
[0011] S3: Construct a twin network, including two parameter-sharing feature extraction subnetworks, and embed the signal features of the two signal samples in the input signal sample pair to obtain embedded features;
[0012] S4: Combine the signal samples in the training sample set in pairs to obtain signal sample pairs (x i ,x i′ ), i′=1,2,…,D&i′≠i; let the number of signal sample pairs be G=D(D-1) / 2, for each signal sample pair P g =(x g,1 ,x g,2 ) for labeling, g = 1, 2, ..., G, when the signal sample x g,1 and signal sample x g,2 Corresponding to the same fault state, it is a positive sample, let the label Y g =0, otherwise it is a negative sample pair, let the label Y g =1; use all signal samples to P g =(x g,1 ,x g,2 ) signal characteristics (F g,1 ,F g,2 ) and label Y g Train the twin network to obtain a trained twin network;
[0013] S5: For each signal sample pair (x i ,x i′ ) signal characteristics (F i ,F i′ ) Input the trained twin network to get the embedded feature pair (V i ,V i′ ), calculate the embedding feature V i and V i′ The similarity of the signal sample pair (x i ,x i′) in the sample; then the K nearest neighbor algorithm is used to obtain each signal sample x i The most similar K neighbors get the neighbor set; each signal sample x i As a node, the signal feature F extracted in step S2 i As node features, the edges between nodes are determined based on the neighbor set to generate a signal graph;
[0014] S6: Build a node classification model based on graph neural network to predict the fault status category of each node in the signal graph according to the input signal graph;
[0015] S7: using the signal graph obtained in step S5 to train the node classification model, to obtain a trained node classification model;
[0016] S8: When fault diagnosis of mechanical transmission components is required, a number of signal samples to be detected are randomly collected, and the signal features of each signal sample to be detected are extracted using the same method as in step S2. Then, signal sample pairs are obtained by combining them in pairs. A signal graph to be detected is generated using the same method as in step S5. The signal graph to be detected is input into a trained node classification model to obtain the fault state category corresponding to each node, thereby obtaining the fault diagnosis result of each signal sample to be detected.
[0017] The present invention is a small sample fault diagnosis method for mechanical transmission components based on a twin network. Signal samples of the mechanical transmission components are collected under normal conditions and different fault conditions to obtain a training sample set, signal features are extracted for each signal sample, a twin network is constructed, and the twin network is trained using signal sample pairs obtained by combining signal samples in the training sample set in pairs. Each signal sample pair is then input into the trained twin network to obtain an embedded feature pair and calculate the similarity of the two signal samples accordingly. A K-nearest neighbor (KNN) algorithm is used to obtain a neighbor set of each signal sample, thereby constructing a signal graph of the training sample set, a node classification model based on a graph neural network is constructed and trained using the signal graph of the training sample set. When fault diagnosis of the mechanical transmission component is required, a signal graph of the signal sample to be detected is generated and input into the trained node classification model to obtain a fault diagnosis result of the signal sample to be detected.
[0018] The present invention has the following beneficial effects:
[0019] 1) The present invention effectively mines and utilizes the topological relationships and dependencies implicit in the sample data through the twin network and graph neural network. The proposed method extracts data features more fully than the mainstream deep learning method. To address the problem of poor quality of adjacency matrix construction under the combined influence of small samples and noise interference, the proposed method introduces the twin network into the adjacency matrix construction process, which greatly improves the quality of the generated signal graph structure data, and the fault diagnosis accuracy is also significantly improved.
[0020] 2) In view of the problem that the fault diagnosis accuracy drops significantly when the noise interference intensity is large, the present invention further designs a dynamic intensity noise injection module, which further improves the diagnostic accuracy and robustness of the proposed method;
[0021] 3) In the field of small sample fault diagnosis, the currently commonly used data enhancement methods are prone to single pseudo-sample features, transfer learning methods require additional source domain data sets for auxiliary training, and the meta-learning method training process is complex and time-consuming. The method proposed in the present invention is a simpler and more effective solution, which effectively avoids the above problems and can still achieve good diagnostic performance, and has more application prospects in actual industrial scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flowchart of a specific implementation method of a small sample fault diagnosis method of a mechanical transmission component based on a twin network of the present invention;
[0023] Figure 2 is a structural diagram of the twin network in this embodiment;
[0024] Figure 3 is a structural diagram of a twin network in which a dynamic intensity noise injection module is introduced in this embodiment;
[0025] Figure 4 is a comparison table of test results of the rolling bearing data set under 5-shot and 3-shot conditions in this embodiment;
[0026] Figure 5 is a comparison table of test results of the planetary gearbox data set under 5-shot and 3-shot conditions in this embodiment;
[0027] Figure 6 is a comparison chart of the test results of the present invention and the comparative method under 5-shot conditions in this embodiment;
[0028] Figure 7 3-shot test results of the present invention and the comparative method in this embodiment. DETAILED DESCRIPTION
[0029] The specific implementation of the present invention is described below in conjunction with the accompanying drawings so that those skilled in the art can better understand the present invention. It should be noted that in the following description, when the detailed description of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here.
[0030] Example
[0031] Figure 1 This is a flowchart of a specific implementation of the method for diagnosing small sample faults of mechanical transmission components based on twin networks of the present invention. Figure 1 As shown, the specific steps of the small sample fault diagnosis method of mechanical transmission components based on twin network of the present invention include:
[0032] S101: Obtain training samples:
[0033] Sensors are set up according to actual needs to collect signal samples of mechanical transmission components in normal state and M different fault states. The number of signal samples in each state is d m Determined according to the actual needs of small sample fault diagnosis, m = 0 represents the normal state, m = 1, 2, ..., M represents the fault state of the corresponding sequence number, for each signal sample x i Mark the serial number S of the corresponding state i , i=1,2,…,D, S i =0,1,…,M, thereby obtaining a training sample set. m ∈[3,5].
[0034] S102: Obtaining signal sample characteristics:
[0035] Although the time domain signal contains extremely rich features of the original fault signal, the fault features are not clear enough and are not suitable for being directly sent to the network for training. In order to embed the fault information into the node features, the present invention firstly performs a i Extract signal feature F i , thereby extracting key information and improving the accuracy of fault diagnosis.
[0036] In this embodiment, the signal feature adopts the feature based on the spectrum, and the specific extraction method is as follows:
[0037] Extract signal samples x by Fast Fourier Transform i The characteristic spectrum X contained in i [k], the expression is as follows:
[0038]
[0039] Where j is the imaginary unit, x i[n] represents the signal sample x i The signal value at sampling point n, n = 0, 1, ..., N-1, N is the number of points of Fourier transform. The setting of the number of points will affect the frequency resolution and the dimension of the spectrum data.
[0040] Characteristic spectrum X i [k] is a complex signal. The present invention focuses on its energy distribution, i.e., amplitude information, rather than its phase information, so the spectrum signal is modulated. Since the spectrum signal after modulation generally contains several main frequency components with extremely high peak values, and the range of variation of the spectrum value is too large, there is a risk of gradient explosion and gradient disappearance, so it is also necessary to undergo a normalization operation to obtain the normalized characteristic spectrum X i [k] norm As the signal feature F i , the specific method is as follows:
[0041] X i ′[k]=log(X i [k]|+1), k=0,1,2,...,N-1
[0042]
[0043] Among them, max() and min() represent the maximum and minimum values respectively.
[0044] In this embodiment, the spectrum X is obtained by fast Fourier transform i [k] is modulo to get the amplitude, then add 1 to it and perform logarithmic transformation to get X i ′[k], so that the smaller amplitude part of the spectrum is amplified, and the larger amplitude main frequency part is reduced, which can highlight the characteristics of weak fault signals. i ′[k] is normalized to obtain the normalized spectrum data X i [k] norm The normalized spectrum data after the above processing can be used as the signal sample x i The eigenvector F of [n] i , realizing the mapping of time domain vibration signal samples to signal features.
[0045] S103: Building a twin network:
[0046] In the present invention, node-level fault diagnosis is realized based on graph neural network, so first of all, it is necessary to generate a signal graph, that is, take each signal sample as a node, and determine the connection relationship of the nodes according to the correlation between the signal samples. KNN is the most widely used method at present. This method calculates the distance between a signal sample and each other signal sample, and then selects several signal samples closest to the signal sample as neighbors. When this method is applied to the construction process of the adjacency matrix of the graph, the distance between the node features is measured, and then each node is allowed to establish an undirected edge with several nodes closest to it, thereby generating the adjacency matrix of the graph.
[0047] In the present invention, Euclidean distance is selected as the distance measurement method in KNN, in which an important parameter K needs to be set, which represents the number of neighbor nodes of each node as K. The setting method is to perform pre-training at different parameters K, record the results, and select the parameter K with the best observation effect as the result. The mathematical expression of determining the adjacency relationship through KNN is as follows:
[0048]
[0049] in Represents any node v i The set of K nearest neighbor nodes, E represents the set of edges between nodes, e ij ∈E represents the node v i To node v j edge.
[0050] The advantage of graph neural networks is that they can not only extract key features from the node features themselves, but also allow the central node to aggregate and learn useful features from the neighboring nodes. This makes the graph neural network have a strong feature extraction capability, but it also introduces some problems. For node-level classification tasks, the premise that the graph neural network can aggregate useful features from the neighborhood node features is that the neighborhood nodes should belong to the same category as the central node. For fault diagnosis problems, this means that the fault categories of the signal samples corresponding to the neighborhood nodes and the central node should be the same. Because for the same type of fault, the fault signal samples obtained by different rounds of sampling will contain similar fault feature information, and for signal samples of different fault types, the fault features are different or not completely the same.
[0051] The commonly used method of constructing an adjacency matrix through KNN is more effective when the noise in the signal sample is small. However, when the intensity of the noise in the node is large, the useful fault features are seriously submerged, and due to the randomness of the noise, the sample feature vectors of the same fault that were originally distributed relatively closely in the feature space become more scattered, and are easily confused with the sample feature vectors of other fault types. Furthermore, when the power of the noise is close to or exceeds the power of the original sample signal, random noise will become the main influencing factor of the feature vector distribution, and various types of samples will be completely confused. Directly determining the connection relationship between the edges of the nodes through KNN will lead to a large number of incorrect connections, and this method of constructing the adjacency matrix will be completely inapplicable.
[0052] In order to solve the problem that noise interference affects the construction quality of the adjacency matrix, the present invention constructs a twin network, including two parameter-sharing feature extraction subnetworks, which respectively embed the signal features of the two signal samples in the input signal sample pair to obtain embedded features, thereby mapping the feature space of the original signal samples into an embedded feature space. In the embedded feature space, the distance between the sample features of the same fault type is closer, and the distance between the sample features of different fault types is farther away, thereby improving the problem of severe feature confusion and poor quality of graph structure data construction when the samples are interfered by noise.
[0053] Figure 2 is a structural diagram of the twin network in this embodiment. Figure 2 As shown, in this embodiment, the twin network includes two feature extraction sub-networks with the same structure, and the weight parameters in the two sub-networks are shared between each other. Table 1 is a structure and parameter table of the feature extraction sub-network in this embodiment.
[0054]
[0055]
[0056] Table 1
[0057] like Figure 2As shown in Table 1, each feature extraction subnetwork in the twin network of the present invention includes a cascaded first one-dimensional convolution layer, a first ReLU activation layer, a first maximum pooling layer, a second one-dimensional convolution layer, a second ReLU activation layer, a second maximum pooling layer, a first linear layer, a third ReLU activation layer, and a second linear layer. The convolution kernel size of each one-dimensional convolution layer is 3*1. The purpose of designing a small-size convolution kernel is to capture the local key spectral features in the feature vector and avoid paying too much attention to the characteristics of global random noise when the receptive field is too large. The Relu activation function is used in the network to improve the nonlinearity of the network and improve the expression ability of the network. The maximum pooling layer is introduced after the convolution layer to reduce the dimension of the feature, reduce the complexity of network calculation, and reduce the risk of overfitting.
[0058] The output feature of each feature extraction subnetwork is the embedded feature of the original signal sample feature, which has the same dimension as the input feature. In fact, it adjusts the distribution position of the original sample feature in the feature space to reduce the degree of confusion of the fault feature caused by the noise in the sample.
[0059] S104: Training the twin network:
[0060] The training sample set in step S101 is used to train the twin network. The specific method is: the signal samples in the training sample set are combined in pairs to obtain signal sample pairs (x i ,x i′ ), i′=1,2,…,D&i′≠i. The number of signal sample pairs is G=D(D-1) / 2, and each signal sample pair is P g =(x g,1 ,x g,2 ), g = 1, 2, ..., G, label each signal sample pair. When the signal sample x g,1 and signal sample x g,2 Corresponding to the same fault state, it is a positive sample, let the label Y g =0, otherwise it is a negative sample pair, let the label Y g = 1. Use all signal samples to P g =(x g,1 ,x g,2 ) signal characteristics (F g,1 ,F g,2 ) and label Y g Train the twin network to obtain a trained twin network.
[0061] In practical applications, the setting of the loss function has a great impact on the training of the twin network. In order to improve the training effect of the twin network, in this embodiment, the classic contrast loss function is improved, and the calculation formula of the improved contrast loss function L is as follows:
[0062]
[0063] Among them, Dis() represents the distance between features, M min 、M max Respectively represent the preset lower threshold and upper threshold.
[0064] This improvement is aimed at the first term of the loss function. For positive sample pairs, it does not require the distance between the two samples to be infinitely close to 0, but only requires that the distance between the two samples is less than the given lower limit threshold M. min For negative sample pairs, the distance between the two is required to be greater than the given upper threshold M max The reason for the above improvements is that when the network training approaches the convergence state, the loss function value of the second term is significantly smaller than the first term. It is easy to imagine that for several signal samples of the same category, after a neural network mapping, it is difficult to make the feature distance between them 0, that is, the feature vectors of all signal samples after mapping are exactly the same, so the loss function value of this term is too large. This will cause the loss function to try to reduce the loss function value of the first term during the network training process at the end of convergence, but will cause obvious oscillation, which is not conducive to network training. The improvement in the above formula reduces the harshness of the first term and can make the network easier to reach a convergence state.
[0065] In addition, research has found that the twin network has a high diagnostic accuracy when the noise power does not exceed the original sample power, but when the noise power is further enhanced, the mapping ability of the twin network shows obvious limitations, and it cannot effectively reduce the distance between fault samples of the same category, and the distance between fault samples of different categories is alienated. At the same time, the accuracy of fault diagnosis has also dropped significantly. The main reason for this problem is that the test samples are disturbed by strong random noise and feature drift occurs, and even the sample features are completely submerged, and noise becomes the dominant factor in determining feature distribution. In this case, it is difficult to achieve a good clustering effect for the features of samples of different categories after being mapped by the same twin network, and a large amount of confusion will still occur.
[0066] In order to reduce the impact of strong noise on the performance of the twin network during the adjacency matrix construction process, this embodiment further introduces a dynamic intensity noise injection (DINI) module in the training stage of the twin network. Figure 3 is a structural diagram of the twin network that introduces the dynamic intensity noise injection module in this embodiment. Figure 3 As shown in Figure 2, during the training of the twin network, a dynamic intensity noise injection module is used before each iteration to inject random noise into each input signal sample pair P. g =(x g,1 ,x g,2 ) signal characteristics (Fg,1 ,F g,2 ), the signal characteristic pair of injected noise is obtained Then the signal characteristics are Enter the twin network. The specific method of injecting noise is as follows:
[0067] For the signal sample pair P g =(x g,1 ,x g,2 ) signal characteristics (F g,1 ,F g,2 ), in each signal feature F g,α The signal characteristics after injecting random noise of a certain signal-to-noise ratio The mathematical expression of is as follows:
[0068]
[0069] Among them, α=1,2, GN(·) function represents the signal-to-noise ratio parameter SNR in the signal feature F g,α Random noise is injected into the , and the length(·) function is used to obtain the signal feature F g,α The Random(·) function is used to generate a random noise signal of the specified number of points that follows a standard normal distribution.
[0070] It should be noted that the dynamic intensity noise injection module is to inject random noise into the node pairs of the twin network, rather than injecting noise into the node features, that is, for each signal feature pair (F g,1 ,F g,2 ) injects noise, and its mathematical expression is as follows:
[0071]
[0072] The benefit of injecting noise in this way is that it greatly increases the efficiency of noise injection, because for D signal samples, when noise is injected into the signal sample, in each iteration of training, D random noises are actually injected into the network, but when noise is injected into the node pair, in each iteration of training, 0.5D random noises are actually injected into the network. 2 There are random noises (no repeated sampling when constituting signal sample pairs). For fault diagnosis problems, D is the number of all signal samples. This process can greatly increase the amount of random noise introduced during the training process.
[0073] In this embodiment, the noise intensity in each iteration is set to be able to change dynamically with the training process. The implementation method is to control the noise intensity with the loss function L of the twin network, and transform the value of the loss function into a fixed noise intensity range through nonlinear mapping. The constructed nonlinear mapping is as follows:
[0074] SNR = SNR max +2·(SNR min -SNR max )·sigmoid(-L)
[0075] Among them, SNR max and SNR min are the preset maximum and minimum signal-to-noise ratio, L is the loss function of the previous iteration, and sigmoid() represents the sigmoid activation function.
[0076] Random noise of dynamic intensity has two advantages. On the one hand, for noise of fixed intensity, the network may over-learn the characteristics of the introduced noise interference and ignore the useful fault characteristics. On the other hand, the intensity of the introduced random noise will gradually decrease as the loss function value decreases. Compared with random noise interference of fixed intensity, such a training strategy can make the network easier to converge while receiving more random noise disturbances.
[0077] The dynamic intensity noise injection module does not essentially increase the number of original samples, nor does it increase the amount of learnable parameters of the twin network. In fact, it gives a margin to each small sample in the feature space of the input sample. The original sample is only represented by a point in the feature space, and after the dynamic intensity noise injection process, each small sample is represented in the feature space as a space centered on the original sample. Because of this, sample data interfered by noise may still fall into this space, and the robustness of the network is also improved.
[0078] By introducing the above-mentioned dynamic intensity noise injection module, the improved network avoids over-adapting to the noise or slight changes in the small sample training data, avoids converging to the local optimal solution, reduces the risk of overfitting the model to small sample data, and improves the model's resistance to noise interference in the sample. The robustness of the method will be improved.
[0079] S105: Generate a signal graph of the training sample set:
[0080] After training the twin network, the embedded features obtained by mapping the original sample features through the twin network can be used to generate a signal graph of the training sample set for subsequent node classification model training. The specific method is as follows:
[0081] For each signal sample pair (x i ,x i′ ) signal characteristics (F i ,F i′ ) Input the trained twin network to get the embedded feature pair (V i ,V i′ ), calculate the embedding feature V i and V i′ The similarity of the signal sample pair (x i ,x i′ ) in the sample. Then the K nearest neighbor algorithm is used to obtain each signal sample x i The most similar K neighbors get the neighbor set; each signal sample x i As a node, the signal feature F extracted in step S102 i As node features, the edges between nodes are determined based on the neighbor sets to generate a signal graph.
[0082] S106: Building a node classification model based on graph neural network:
[0083] A node classification model based on graph neural network is constructed to predict the fault status category of each node in the signal graph according to the input signal graph.
[0084] Node classification is a common application of graph neural networks, and its specific principles and processes are not described here. In this embodiment, the node classification model uses a graph convolutional network GCN (Graph Convolutional Networks) or a graph attention network GATv2 (Graph attention network version 2)
[0085] Table 2 is the structure and parameter table of the graph convolutional network GCN in this embodiment.
[0086]
[0087]
[0088] Table 2
[0089] As shown in Table 2, the graph convolutional network in this embodiment includes two convolutional layers, and the feature dimension of the second hidden layer is mapped to the required output dimension through the fully connected layer. The ReLU activation function is used after the convolutional layer to alleviate the problem of gradient disappearance. In addition, the dropout layer is introduced to randomly ignore some nodes during the training process to reduce the risk of overfitting of the model.
[0090] Table 3 is the structure and parameter table of the middle attention network GATv2 in this embodiment.
[0091]
[0092] Table 3
[0093] As shown in Table 3, the structure of the graph attention network GATv2 in this embodiment is similar to the structure of the graph convolutional neural network GCN described above, and also includes two convolutional layers, and finally a fully connected layer is used to obtain the desired output dimension. The special feature is the introduction of a multi-head attention mechanism, which enhances the network's ability to learn features through multiple heads in parallel. The Elu activation function is used after the convolutional layer, which has a smooth gradient over the entire input range. This activation function can not only alleviate the problems of gradient vanishing and gradient exploding, but also help avoid neuron death.
[0094] S107: Training node classification model:
[0095] The signal graph obtained in step S5 is used to train the node classification model to obtain a trained node classification model. In this embodiment, a conventional cross entropy loss function is used when training the node classification model.
[0096] S108: Fault diagnosis:
[0097] When fault diagnosis of mechanical transmission components is required, a number of signal samples to be detected are randomly collected, and the signal features of each signal sample to be detected are extracted using the same method in step S102. Then, signal sample pairs are obtained by combining them in pairs. A signal graph to be detected is generated using the same method in step S105. The signal graph to be detected is input into the trained node classification model to obtain the fault state category corresponding to each node, thereby obtaining the fault diagnosis result of each signal sample to be detected.
[0098] Example
[0099] In order to better illustrate the technical scheme and technical effects of the present invention, a specific example is used to analyze and illustrate the work flow and technical effects of the present invention. In order to verify the effectiveness and generalization of the proposed method in the problem of transmission component fault diagnosis, this embodiment selects two mechanical components as typical representatives of transmission components, namely rolling bearings that play a supporting role in the transmission system and planetary gearboxes responsible for transmitting power and torque. The failure mechanisms of the two components are different and are widely used in industry. The present invention will use them as an example for fault diagnosis research. In this embodiment, the fault data sets of the two transmission components are vibration data collected by single-source sensors, among which the Case Western Reserve rolling bearing data set is collected by an accelerometer in a single direction, which is single-channel data. The planetary gearbox data set collected by this embodiment is collected by a three-axis accelerometer, which is three-channel data. Table 4 is a detailed information table of the two data sets used in this embodiment.
[0100]
[0101] Table 4
[0102] The data volume of the small sample data set studied in this embodiment is five samples (5-shot) and three samples (3-shot), that is, the sample data volume used for training for each fault mode is only 5 and 3. The noise interference condition is achieved by artificially adding a certain decibel of Gaussian random noise to the normal data volume test set of 100 samples for each fault mode. The graph neural networks used in this embodiment are graph convolutional neural networks and graph attention networks. These two networks are the benchmark networks for most of the current graph neural networks. The fault diagnosis experiments based on them also prove that the present invention is generally effective in fault diagnosis problems based on graph neural networks. The improved performance of the present invention is illustrated by conducting and analyzing fault diagnosis ablation experiments on two typical objects under small sample noise interference conditions.
[0103] The original time domain vibration signal is segmented by a sliding window, and the signal features of each signal sample are extracted using a spectrum-based feature extraction method. In each type of fault mode sample, 3-shot or 5-shot is divided for training, and 100 samples are used for testing. The divided signal features are respectively determined by three methods to determine the node connection relationship. The first is to directly use KNN to measure the spatial distance between sample features and determine the node connection relationship. The second is the improved method of the twin network innovatively introduced by the present invention (denoted as Siam-GNN, Siam-GATv2). The third is the improved method of the present invention further introducing the dynamic intensity noise injection module in the twin network (denoted as DINISiam-GNN, DINISiam-GATv2). The latter two methods both need to construct the node features as node pair features first, and then obtain the embedded features through the corresponding network mapping. Finally, KNN is used to measure the spatial distance between the embedded features to determine the connection relationship between the nodes. Based on the node features and the connection relationship, the training set and test set of the graph structure data can be constructed. The present invention studies the problem of fault diagnosis under noise interference, so random noise of specified power intensity is injected into the test set. This embodiment studies 9 kinds of random noise intensities, namely 10, 4, 2, 0, -2, -4, -6, -8, and -10dB. The node classification model is composed of GCN and GATv2. The accuracy of the method can be obtained by training on a small sample training set and completing the test on a normal sample size test set. Since the present invention involves adding random noise interference to the test sample, in order to reduce the impact of the randomness of a single test, improve the stability of the evaluation of the embodiment results, and verify the repeatability of the embodiment results, this embodiment is repeated 10 times under each condition, and the mean and standard deviation of the repeated fault diagnosis accuracy are calculated as the final result of the embodiment.
[0104] Table 5 is a comparison table of test results of the rolling bearing data set under 5-shot conditions in this embodiment.
[0105]
[0106]
[0107] Table 5
[0108] Table 5 is a comparison table of test results of the rolling bearing data set under 3-shot conditions in this embodiment.
[0109] Noise intensity KNN-GCN Siam-GCN DINISiam-GCN KNN-GATv2 Siam-GATv2 DINISiam-GATv2 10dB 95.156±0.535 95.857±0.156 96.736±0.157 95.042±0.341 96.724±0.441 96.779±0.174 4dB 86.578±0.916 92.421±0.431 96.299±0.217 86.223±0.680 92.477±0.737 96.399±0.205 2dB 79.999±0.879 90.846±0.188 96.066±0.148 79.656±1.386 91.978±0.630 95.644±0.340 0dB 72.679±0.828 88.034±0.460 94.623±0.410 73.078±1.704 87.956±0.763 94.744±0.502 -2dB 67.967±0.352 83.800±0.432 92.099±0.190 69.301±0.685 83.467±0.934 93.523±0.237 -4dB 60.800±1.007 78.052±0.372 88.644±0.923 62.734±0.584 78.423±1.062 88.756±0.912 -6dB 51.667±1.006 73.432±1.540 80.256±0.34 55.266±1.116 73.456±0.578 80.323±0.654 -8dB 43.934±1.679 62.111±0.693 69.767±0.645 46.456±0.983 65.245±0.398 74.178±0.643 -10dB 36.444±0.253 58.335±1.963 64.955±0.794 39.091±1.960 57.588±1.192 64.789±1.243
[0110] Table 6
[0111] Figure 4 This is a comparison table of the test results of the rolling bearing data set under 5-shot and 3-shot conditions in this embodiment. Figure 4 As shown in the figure, the two improvements of the Siam-GNN method and the DINISiam-GNN method proposed in the present invention have significantly improved the fault diagnosis accuracy. Except for the conditions of 5-shot and 10dB noise, the traditional KNN-GATv2 method has a slight lead of 0.33% over the DINISiam-GCN method. Under all other test conditions, the best diagnostic accuracy appears in the final improved method of the present invention, namely DINISiam-GCN and DINISiam-GATv2.
[0112] It can be further found that under the same experimental conditions, when the adjacency matrix construction method is the same, the diagnostic accuracy obtained by the node classification model using GCN and GATv2 is relatively close, and the optimal diagnostic results appear in both classification networks, which shows that in this embodiment, the selection of the node classification model is not the main factor affecting the diagnostic accuracy. However, when the construction method of the adjacency matrix is improved from the traditional KNN method to the method of introducing the twin network, and further improved to the method of introducing the dynamic intensity noise injection module, the diagnostic accuracy is significantly improved. In addition, with the increase of the noise level in the sample, the present invention is significantly slower than the traditional method in the rate of decline of the diagnostic accuracy, which proves the effectiveness and robustness of the improved method proposed by the present invention.
[0113] By analyzing the standard deviation calculated after 10 repeated tests, it can be seen that on the rolling bearing data set, the standard deviation of the present invention is generally smaller than or close to that of the traditional method. As the noise level in the sample increases, the standard deviation shows an overall upward trend, but it is within an acceptable range, which proves that the present invention has good repeatability under the test conditions of random noise interference.
[0114] When conducting fault diagnosis tests on planetary gearboxes, since the test data is three-channel time-domain vibration data, which is different from the single-channel data of rolling bearings, it is necessary to perform additional splicing operations on the three-channel data. Specifically, the vibration signal of each channel is FFT-ed and logarithmically normalized to obtain a normalized spectrum, and then the normalized spectra of the three channels are spliced to obtain a data set suitable for network training. This processing method avoids improving the network structure while introducing three-channel data, and also fully extracts features from the data of each channel. It is a simple and efficient processing method.
[0115] Table 7 is a comparison table of test results of the planetary gearbox data set under 5-shot conditions in this embodiment.
[0116] Noise intensity KNN-GCN Siam-GCN DINISiam-GCN KNN-GATv2 Siam-GATv2 DINISiam-GATv2 10dB 94.049±0.612 96.672±0.426 97.215±0.226 93.670±0.453 96.113±0.435 97.744±0.426 4dB 81.170±0.798 89.671±0.761 95.415±0.340 81.271±0.697 90.499±0.577 95.757±0.337 2dB 77.400±1.606 83.219±0.394 93.787±0.556 78.186±0.823 85.171±0.615 94.358±0.331 0dB 73.271±1.019 81.314±0.709 91.128±0.526 77.029±0.959 83.428±0.710 92.943±0.332 -2dB 69.072±0.896 72.957±0.606 89.728±0.808 70.657±1.545 76.284±1.130 91.171±0.419 -4dB 61.015±1.191 66.086±1.011 89.000±0.274 63.799±1.021 67.644±0.980 88.053±0.440 -6dB 52.157±1.456 61.516±1.241 84.900±0.447 53.157±0.760 63.300±0.732 85.229±0.571 -8dB 42.243±1.199 59.345±1.137 80.371±0.891 46.758±0.929 59.086±1.104 80.460±0.533 -10dB 35.314±0.808 53.471±1.071 70.143±0.957 40.229±0.688 51.685±0.951 70.685±0.778
[0117] Table 7 and Table 8 are comparison tables of the test results of the planetary gearbox data set under 3-shot conditions in this embodiment.
[0118] Noise intensity VGCN Siam-GCN DINISiam-GCN KNN-GATv2 Siam-GATv2 DINISiam-GATv2 10dB 86.329±1.847 94.674±0.831 96.015±0.734 88.589±1.559 95.014±0.604 97.001±0.408 4dB 75.000±1.469 85.927±0.560 94.929±0.917 79.655±1.514 87.872±0.765 95.485±0.580 2dB 75.147±1.254 83.557±0.867 92.500±0.910 77.943±1.109 85.701±0.649 93.271±0.592 0dB 72.500±0.969 79.972±0.936 90.570±0.825 75.113±0.959 79.542±0.959 92.356±0.757 -2dB 66.700±1.112 69.356±0.921 86.601±0.773 69.159±0.955 72.600±0.624 89.442±0.418 -4dB 58.886±1.096 65.671±1.132 83.137±1.286 61.859±1.069 69.214±0.761 84.431±0.696 -6dB 53.857±1.102 60.100±0.981 77.658±0.827 55.099±0.949 62.287±0.671 78.772±0.564 -8dB 43.356±0.553 56.386±0.540 71.171±0.937 47.128±0.788 58.958±0.534 71.943±0.509 -10dB 37.929±0.526 47.956±0.660 64.894±0.765 40.971±1.099 51.285±0.690 65.515±0.650
[0119] Table 8
[0120] Figure 5 This is a comparison table of the test results of the planetary gearbox data set under 5-shot and 3-shot conditions in this embodiment. As shown in Table 7, Table 8 and Figure 5 As shown in the figure, under all test conditions, the best diagnostic accuracy appeared in the final improved method, and the DINISiam-GATv2 method was ahead of the DINISiam-GCN method and achieved the best diagnostic accuracy. In addition, due to the data set, the fault diagnosis accuracy of planetary gearboxes is generally lower than that of rolling bearings, but the obtained diagnostic rate results are also very good, especially when the noise intensity in the sample is enhanced, the diagnostic accuracy of the improved method DINISiam-GNN decreases the slowest, indicating that this method has excellent robustness.
[0121] Judging from the standard deviation calculated from repeated tests, when the node classification models use GCN and GATv2 respectively, the repeated test standard deviation of the final improved method DINISiam-GNN is generally the best method under the same test conditions, which once again proves the strong repeatability of the present invention.
[0122] The results of the ablation test have verified that the method proposed in the present invention is superior to the current mainstream graph neural network fault diagnosis method. This embodiment will further conduct comparative tests to evaluate the performance of the method proposed in the present invention. The method for conducting comparative tests includes:
[0123] (1) ResNet-18: This network is a classic neural network model. By introducing the residual module, it can effectively alleviate the problem of gradient vanishing, making the network easier to train.
[0124] (2) DenseNet: This network designs a denser connection mechanism in CNN, and the previous layers are densely connected to all the subsequent layers.
[0125] (3) TBPN: Two-branch prototype network is a cutting-edge algorithm for solving small sample fault diagnosis problems. This method sends the time domain signal and the frequency domain signal into two parallel branches of the network for feature extraction, infers the prototype features of the time-frequency features, and then performs aggregation operations to achieve classification. The model is trained using the Episodic Training Strategy (ETS) in meta-learning during the training phase. During the testing phase, the distance between the time-frequency features of the test sample after passing through the branch network and the prototype features is measured, and fault classification is achieved after aggregation operations.
[0126] (4) CASN: Channel attention siamese networks is an improved metric learning twin network algorithm and is also a cutting-edge small sample fault diagnosis method. This method constructs the small sample data for training into sample pairs and feeds them into the twin network, measures the Euclidean distance vector between the sample pairs, and converts the distance vector into a disparity score through a full connection operation. In the model training phase, the disparity score is constrained by the loss function, so that the disparity scores of samples of the same category are smaller and the disparity scores of samples of different categories are larger. In the test phase, by measuring the disparity scores between the test sample and all training samples, the fault category with the smallest overall disparity score is selected as the classification result of the test sample.
[0127] In addition, this embodiment still uses the current mainstream fault diagnosis methods based on KNN-GCN and KNN-GATv2 as benchmark algorithms and adds them to the comparative test. Finally, the comparative test also includes the DINISiam-GCN and DINISiam-GATv2 fault diagnosis main methods proposed in the present invention.
[0128] The comparative test is based on the CWRU rolling bearing public data set, and two small sample levels of 5-shot and 3-shot are designed. The comparative test is carried out under four noise levels: without noise, 4dB, 0dB and -4dB. Similar to the test conducted in Section 4.2, since there is artificially added random noise in this test, in order to avoid the randomness of the single generated noise, 10 repeated tests are carried out, and the mean and standard deviation of the fault diagnosis accuracy obtained from the repeated tests are calculated as the final test results.
[0129] Table 9 is a comparison table of the test results of the present invention and the comparative method under 5-shot conditions in this embodiment.
[0130]
[0131]
[0132] Table 9
[0133] Table 10 is a comparison table of the test results of the present invention and the comparative method under 5-shot conditions in this embodiment.
[0134] Noise intensity ResNet-18 DenseNet TBPN CASN Noise-free 65.801±6.528 64.498±4.152 96.745±0.645 81.024±4.203 4dB 15.265±3.317 15.777±4.334 92.745±1.240 73.034±4.082 0dB 12.388±1.916 13.143±2.142 87.244±5.323 59.411±3.478 -4dB 11.132±0.046 11.632±1.337 79.211±5.160 46.944±4.799 Noise intensity KNN-GCN KNN-GATv2 DINISiam-GCN DINISiam-GATv2 Noise-free 96.478±0.403 95.690±0.669 96.956±0.431 96.802±0.178 4dB 86.578±0.916 86.223±0.680 96.299±0.217 96.399±0.205 0dB 72.679±0.828 73.078±1.704 94.623±0.410 94.744±0.502 -4dB 60.800±1.007 62.734±0.584 88.644±0.923 88.756±0.912
[0135] Table 10
[0136] Figure 6 3 is a comparison chart of the test results of the present invention and the comparative method under 5-shot conditions in this embodiment. Figure 7 This is a comparison chart of the test results of the present invention and the comparative method under 3-shot conditions in this embodiment. As shown in Table 9, Table 10, Figure 6 and Figure 7It can be seen that the two classic methods, ResNet-18 and DenseNet, cannot obtain satisfactory diagnostic results even in the absence of noise interference. When there is noise interference, the diagnostic accuracy for the 9-category fault diagnosis problem is close to one-ninth, indicating that the method is basically ineffective. The diagnostic accuracy of the TBPN method and the CASN method is relatively excellent when there is no noise interference, but as the noise interference level increases, the diagnostic accuracy drops rapidly. Compared with the two, the robustness of the TBPN method is better than that of CASN. The DINISiam-GNN method proposed in the present invention achieved the best diagnostic accuracy under most experimental conditions. Only under 5-shot and noise-free conditions was the accuracy lower than the KNN-GNN method by about 0.5%. Under this experimental condition, the performance of the two methods was close. As the noise interference level increases, except for the DINISiam-GNN method proposed in the present invention, which has the slowest performance decline, the mean diagnostic accuracy is 91.945% and 93.200% in 5-shot and -4dB noise interference; the diagnostic accuracy in 3-shot and -4dB noise interference is 88.644% and 88.756%, respectively. These two groups of diagnostic results are much higher than other comparison methods. From the standard deviation calculated by repeated tests, the standard deviation of the method proposed in the present invention is the smallest overall, and its repeatability is the best. It also proves that its diagnostic accuracy is not prone to serious deviations under individual noise interference, which preliminarily proves that the DINISiam-GNN method is more reliable in actual industrial application scenarios.
[0137] Based on the above analysis of the comparative test results, the present invention is superior to the classical method. Compared with the two cutting-edge small sample fault diagnosis methods, it not only has the best fault diagnosis accuracy, but also has the strongest robustness under noise interference, and also shows excellent repeatability in repeated tests.
[0138] Although the above describes the illustrative specific embodiments of the present invention to facilitate those skilled in the art to understand the present invention, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
Claims
1. A small sample fault diagnosis method for mechanical transmission components based on twin networks, characterized in that: The following steps are involved: S1: Set sensors according to actual needs, collect signal samples of mechanical transmission components in normal state and M different fault states, and the number of signal samples in each state is d m Determined according to the actual needs of small sample fault diagnosis, m = 0 represents the normal state, m = 1, 2, ..., M represents the fault state of the corresponding sequence number, for each signal sample x i Mark the serial number S of the corresponding state i , i=1,2,…,D, S i =0,1,…,M, thus obtaining the training sample set; S2: For each signal sample x in the training sample set i Extract signal feature F i ; S3: Construct a twin network, including two parameter-sharing feature extraction subnetworks, and embed the signal features of the two signal samples in the input signal sample pair to obtain embedded features; S4: Combine the signal samples in the training sample set in pairs to obtain signal sample pairs (x i ,x i′ ), i′=1,2,…,D&i′≠i; the number of signal sample pairs is G=D(D-1) / 2, and each signal sample pair is P g =(x g,1 ,x g,2 ), g = 1, 2, ..., G, label each signal sample pair. When the signal sample x g,1 and signal sample x g,2 Corresponding to the same fault state, it is a positive sample, let the label Y g =0, otherwise it is a negative sample pair, let the label Y g =1; use all signal samples to P g =(x g,1 ,x g,2 ) signal characteristics (F g,1 ,F g,2 ) and label Y g Train the twin network to obtain a trained twin network; S5: For each signal sample pair (x i ,x i′ ) signal characteristics (F i ,F i′ ) Input the trained twin network to get the embedded feature pair (V i ,V i′ ), calculate the embedding feature V i and V i′ The similarity of the signal sample pair (x i ,x i′ ) in the sample; then the K nearest neighbor algorithm is used to obtain each signal sample x i The most similar K neighbors get the neighbor set; each signal sample x i As a node, the signal feature F extracted in step S2 i As node features, the edges between nodes are determined based on the neighbor set to generate a signal graph; S6: Build a node classification model based on graph neural network to predict the fault status category of each node in the signal graph according to the input signal graph; S7: using the signal graph obtained in step S5 to train the node classification model, to obtain a trained node classification model; S8: When fault diagnosis of mechanical transmission components is required, a number of signal samples to be detected are randomly collected, and the signal features of each signal sample to be detected are extracted using the same method as in step S2. Then, signal sample pairs are obtained by combining them in pairs. A signal graph to be detected is generated using the same method as in step S5. The signal graph to be detected is input into a trained node classification model to obtain the fault state category corresponding to each node, thereby obtaining the fault diagnosis result of each signal sample to be detected.
2. The small sample fault diagnosis method for mechanical transmission components according to claim 1 is characterized in that: The number of signal samples d in step S1 m ∈[3,5].
3. The small sample fault diagnosis method for mechanical transmission components according to claim 1 is characterized in that: In step S2, the signal feature F is extracted i The method is: First, the signal sample x is extracted by fast Fourier transform i The characteristic spectrum X contained in i [k]: Where j is the imaginary unit, x i [n] represents the signal sample x i The signal value at sampling point n, n = 0, 1, ..., N-1, N is the number of points of Fourier transform; The normalization operation is performed using the following method to obtain the normalized characteristic spectrum X i [k] norm As the signal feature F i : X i ′[k]=log(X i [k]|+1),k=0,1,2,...,N-1 Among them, max() and min() represent the maximum and minimum values respectively.
4. The small sample fault diagnosis method for mechanical transmission components according to claim 1, characterized in that: The calculation formula of the loss function L during the twin network training in step S4 is as follows: Among them, Dis() represents the distance between features, M min 、M max Respectively represent the preset lower threshold and upper threshold.
5. The small sample fault diagnosis method for mechanical transmission components according to claim 1, characterized in that: In step S4, during the training of the twin network, a dynamic intensity noise injection module is used before each iteration to inject random noise into each input signal sample pair P. g =(x g,1 ,x g,2 ) signal characteristics (F g,1 ,F g,2 ), the signal characteristic pair of injected noise is obtained Then the signal characteristics are Enter the twin network and inject noise into the formula: Among them, α = 1, 2, SNR represents the signal-to-noise ratio parameter, and the length(·) function represents the signal feature F. g,α The Random(·) function is used to generate a random noise signal of the specified number of points that follows a standard normal distribution.
6. The small sample fault diagnosis method for mechanical transmission components according to claim 5, characterized in that: The calculation formula of the signal-to-noise ratio parameter SNR is: SNR=SNR max +2·(SNR min -SNR max )·sigmoid(-L) Among them, SNR max and SNR min are the preset maximum and minimum signal-to-noise ratio, L is the loss function of the previous iteration, and sigmoid() represents the sigmoid activation function.
Citation Information
Patent Citations
Small sample fault detection algorithm based on twin adaptive space-time diagram neural network
CN117609840A
Rolling bearing small sample fault diagnosis method based on twinborn multi-scale residual network
CN118171147A