Planetary gearbox fault diagnosis method and device based on improved loss function

CN118484768BActive Publication Date: 2024-09-17BENXI IRON & STEEL (GROUP) INFORMATION AUTOMATION CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410931759.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-09-17
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

When there are many fault types and complex working conditions, the existing technology has limited generalization ability and poor accuracy in planetary gearbox fault diagnosis, making it difficult to meet the needs in the context of industrial big data.

Method used

Using a method based on an improved loss function, a diagnostic network is built through a graph neural network, combining the linear classifier branch and the supervised contrastive learning branch, using graph data to extract characteristic information of the gearbox health status, reducing reliance on prior knowledge and expert experience. Improve the accuracy and adaptability of fault diagnosis.

Benefits of technology

It achieves a more accurate extraction of gearbox health status characteristics in non-Euclidean space, improves the accuracy and generalization ability of fault diagnosis, reduces the dependence on expert experience, and is suitable for industrial big data with huge volume and sparse value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118484768B
    Figure CN118484768B
Patent Text Reader

Abstract

The present invention provides a planetary gearbox fault diagnosis method and device based on an improved loss function. By constructing a sample graph data set for normalized sample vibration data, a graph neural network is used to effectively develop the implicit interdependence between sample nodes, and the edges between nodes are used to reflect the interconnection between samples. At the same time, two feature learning routes are provided. The supervised comparative learning branch can learn a high-dimensional feature representation space with intra-class compactness and inter-class separability based on enhanced samples of the original samples. The linear classifier branch can identify the similarities between samples with the same label by mapping samples of the same type to the same 1-hot encoding vector based on the original samples. Model training is performed based on the model losses corresponding to the above two branches, which can improve the feature extraction capability of the model, increase the model classification accuracy, and have better adaptability in the face of industrial big data with huge volume and sparse value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a planetary gearbox fault diagnosis method and device based on an improved loss function. Background Art

[0002] Planetary gearboxes have the advantages of small size, large transmission ratio, strong load-bearing capacity, stable operation and high working efficiency. They have been widely used in large and complex mechanical equipment such as helicopters, wind power generation, heavy trucks and ships. However, as the main transmission component of rotating machinery, gearboxes work under impact, alternating loads and drastic changes in working conditions for a long time. Their key components (gears and bearings, etc.) are prone to failure, causing huge economic losses and serious accidents. Therefore, it is of great economic and safety significance to diagnose gearbox faults and find fault information in time.

[0003] With the advent of the big data era, massive operating data of modern mechanical equipment are monitored and transmitted in real time with the support of Internet of Things technology. Most of these data are characterized by rapid generation, huge volume, sparse value, and multi-source heterogeneity. Traditional machine learning methods require complex signal filtering and noise reduction processing and rely on expert experience to extract and screen data features. They lack adaptability, are difficult to independently mine data features, and have weak fault characterization capabilities. They are increasingly unable to meet the needs of fault diagnosis in the context of industrial big data.

[0004] Shallow machine learning methods have better adaptability, reduce complex signal processing processes, and improve recognition accuracy. Common methods include fuzzy reasoning, support vector machines, sparse representation, random forests, etc., but these methods still rely heavily on expert experience for feature selection. The fault diagnosis method based on the combination of manual feature extraction and traditional machine learning has reduced the dependence on prior knowledge to a certain extent, improved recognition accuracy, and has the advantages of simple implementation and low computational overhead, but its generalization ability is limited when there are many fault types and complex working conditions. Summary of the invention

[0005] The present invention provides a planetary gearbox fault diagnosis method and device based on an improved loss function, which are used to solve the defects of the prior art in that the generalization ability is limited and the fault diagnosis accuracy is poor when there are many fault types and complex working conditions.

[0006] The present invention provides a planetary gearbox fault diagnosis method based on an improved loss function, comprising:

[0007] Data collection steps: Collect sample vibration data of sample planetary gearboxes in different health states;

[0008] Single-round training steps: converting each sample vibration data in the current batch into sample graph data, obtaining enhanced sample data of each sample vibration data, converting each enhanced sample data into sample enhanced graph data, inputting the sample graph data corresponding to each sample vibration data into a linear classifier branch of a diagnostic network, obtaining a classification model loss corresponding to the linear classifier branch, and / or inputting the sample enhanced graph data corresponding to each enhanced sample data into a supervised contrast learning branch of the diagnostic network, obtaining a supervised contrast model loss corresponding to the supervised contrast learning branch, and updating parameters of the diagnostic network based on the classification model loss and / or the supervised contrast model loss;

[0009] Iterative training step: repeatedly executing the single round training step until the iterative convergence condition is reached to obtain a trained diagnostic network;

[0010] Model reasoning step: converting the vibration data of the planetary gearbox to be diagnosed into graph data, and performing fault diagnosis on the graph data of the planetary gearbox to be diagnosed based on the trained diagnostic network.

[0011] According to a planetary gearbox fault diagnosis method based on an improved loss function provided by the present invention, the diagnostic network includes a backbone feature extraction network, a linear layer and a projection layer, the linear classifier branch of the diagnostic network is composed of the backbone feature extraction network and the linear layer, the supervised contrast learning branch of the diagnostic network is composed of the backbone feature extraction network and the projection layer, and the backbone feature extraction network is constructed based on a graph neural network.

[0012] According to a planetary gearbox fault diagnosis method based on an improved loss function provided by the present invention, the sample enhancement graph data corresponding to each enhanced sample data is input into the supervised contrast learning branch of the diagnostic network to obtain the supervised contrast model loss corresponding to the supervised contrast learning branch, including:

[0013] The supervised contrast model loss corresponding to the supervised contrast learning branch is calculated based on the following formula:

[0014]

[0015] Among them, L supCon is the supervised contrast model loss corresponding to the supervised contrast learning branch, L i,supCon is the sample augmented graph data x i The corresponding single-sample learning loss, i∈I={1...2N} is the sample index of the sample enhancement graph data corresponding to each enhanced sample data, N is the number of sample vibration data in the current batch; P(i) is the number of sample enhancement graph data that does not contain sample enhancement graph data x i But with the sample augmented graph data xi The sample collection with the same fault label, |P(i)| is the total number of sample enhancement graph data contained in the sample collection P(i); A(i) is the number of sample enhancement graph data that does not contain sample enhancement graph data x i The sample collection of ; exp(·) is the exponential function; z i 、z p and z a is the sample augmented graph data x i 、x p and x a The feature representation after the projection layer; is the dot product; is the temperature coefficient.

[0016] According to a planetary gearbox fault diagnosis method based on an improved loss function provided by the present invention, sample graph data corresponding to sample vibration data, sample enhanced graph data corresponding to enhanced sample data, and graph data corresponding to vibration data of the planetary gearbox to be diagnosed are converted based on the following steps:

[0017] Normalizing the vibration data to be converted to obtain normalized vibration data; wherein the vibration data to be converted is sample vibration data, enhanced sample data or vibration data of a planetary gearbox to be diagnosed;

[0018] The normalized vibration data is sampled and divided based on a preset sampling length and a sliding distance to obtain a plurality of normalized sub-data; wherein any normalized sub-data corresponds to a graph node;

[0019] For any normalized sub-data, multiple neighbor graph nodes of the any normalized sub-data are determined from other normalized sub-data based on the K nearest neighbor algorithm, and the edge weights between the any normalized sub-data and each neighbor graph node are calculated;

[0020] Based on the neighbor graph nodes of each normalized sub-data and the edge weights between each normalized sub-data and its each neighbor graph node, the graph data of the vibration data to be converted is constructed; wherein the graph data of the vibration data to be converted is the sample graph data corresponding to the sample vibration data, the sample enhanced graph data corresponding to the enhanced sample data, or the graph data corresponding to the vibration data of the planetary gearbox to be diagnosed.

[0021] According to a planetary gearbox fault diagnosis method based on an improved loss function provided by the present invention, the calculating of the edge weights between any normalized sub-data and each neighbor graph node includes:

[0022] The edge weight between any normalized sub-data and any neighbor graph node is calculated using the following formula:

[0023]

[0024] in, is any normalized sub-data x i,nol The neighbor node set of d(x i,nol , x j,nol ) is any normalized sub-data x i,nol and neighbor node x j,nol The Euclidean distance between is the bandwidth of the Gaussian kernel function.

[0025] According to a planetary gearbox fault diagnosis method based on an improved loss function provided by the present invention, the parameter updating of the diagnosis network based on the classification model loss and / or the supervised comparison model loss includes:

[0026] Calculating the total model loss based on the classification model loss and its weight and the supervised comparison model loss and its weight;

[0027] Parameters of the diagnosis network are updated based on the total model loss.

[0028] According to a planetary gearbox fault diagnosis method based on an improved loss function provided by the present invention, the fault diagnosis of the image data of the planetary gearbox to be diagnosed based on the trained diagnostic network includes:

[0029] Performing feature extraction on the graph data of the planetary gearbox to be diagnosed based on the backbone feature extraction network of the diagnosis network to obtain a feature vector of the graph data of the planetary gearbox to be diagnosed;

[0030] Based on the linear layer of the diagnosis network, probability prediction of each fault type is performed on the feature vector of the graph data of the planetary gearbox to be diagnosed, so as to obtain the fault probability of each fault type of the planetary gearbox to be diagnosed.

[0031] The present invention also provides a planetary gearbox fault diagnosis device based on an improved loss function, comprising:

[0032] A data acquisition unit, used for collecting sample vibration data of the sample planetary gearbox in different health states;

[0033] A single-round training unit, used for converting each sample vibration data in the current batch into sample graph data, obtaining enhanced sample data of each sample vibration data, and after converting each enhanced sample data into sample enhanced graph data, inputting the sample graph data corresponding to each sample vibration data into a linear classifier branch of a diagnostic network to obtain a classification model loss corresponding to the linear classifier branch, and / or inputting the sample enhanced graph data corresponding to each enhanced sample data into a supervised contrast learning branch of the diagnostic network to obtain a supervised contrast model loss corresponding to the supervised contrast learning branch, and performing parameter update on the diagnostic network based on the classification model loss and / or the supervised contrast model loss;

[0034] An iterative training unit, used for repeatedly calling the single-round training unit until an iterative convergence condition is reached to obtain a trained diagnostic network;

[0035] The model inference unit is used to convert the vibration data of the planetary gearbox to be diagnosed into graph data, and perform fault diagnosis on the graph data of the planetary gearbox to be diagnosed based on the trained diagnostic network.

[0036] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the planetary gearbox fault diagnosis method based on the improved loss function as described above is implemented.

[0037] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for diagnosing a planetary gearbox fault based on an improved loss function as described in any one of the above is implemented.

[0038] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned planetary gearbox fault diagnosis methods based on the improved loss function.

[0039] The planetary gearbox fault diagnosis method and device based on the improved loss function provided by the present invention establish a model in a non-Euclidean space, construct a sample graph data set for the normalized sample vibration data, so as to use the graph neural network to effectively develop the implicit mutual dependence between sample nodes, and use the edges between nodes to reflect the mutual connection between samples, so that the feature information characterizing the health status of the gearbox in the sample vibration data can be more accurately extracted; at the same time, two feature learning routes are provided, the supervised comparative learning branch can learn a high-dimensional feature representation space with intra-class compactness and inter-class separability based on the enhanced samples of the original samples, and the linear classifier branch can be based on the original samples. By mapping the same type of samples to the same 1-hot encoding vector to identify the similarity between samples with the same label, the model training is performed based on the model losses corresponding to the above two branches, which can improve the feature extraction ability of the model, increase the model classification accuracy, greatly reduce the dependence on prior knowledge and expert experience, and have better adaptability in the face of industrial big data with huge volume and sparse value. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 It is a flow chart of a planetary gearbox fault diagnosis method based on an improved loss function provided by the present invention;

[0042] Figure 2 It is a schematic diagram of the structure of the diagnostic network provided by the present invention;

[0043] Figure 3 It is a schematic diagram of the graph data construction process provided by the present invention;

[0044] Figure 4 It is a structural schematic diagram of a planetary gearbox fault diagnosis device based on an improved loss function provided by the present invention;

[0045] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] Figure 1 is a flow chart of a planetary gearbox fault diagnosis method based on an improved loss function provided by the present invention, such as Figure 1 As shown, the method includes:

[0048] Data collection step 110: collecting sample vibration data of the sample planetary gearbox in different health states;

[0049] Single-round training step 120: converting each sample vibration data in the current batch into sample graph data, obtaining enhanced sample data of each sample vibration data, and after converting each enhanced sample data into sample enhanced graph data, inputting the sample graph data corresponding to each sample vibration data into a linear classifier branch of a diagnosis network to obtain a classification model loss corresponding to the linear classifier branch, and / or inputting the sample enhanced graph data corresponding to each enhanced sample data into a supervised contrast learning branch of the diagnosis network to obtain a supervised contrast model loss corresponding to the supervised contrast learning branch, and updating parameters of the diagnosis network based on the classification model loss and / or the supervised contrast model loss;

[0050] Iterative training step 130: repeatedly executing the single round training step until the iterative convergence condition is reached to obtain a trained diagnostic network;

[0051] Model reasoning step 140: converting the vibration data of the planetary gearbox to be diagnosed into graph data, and performing fault diagnosis on the graph data of the planetary gearbox to be diagnosed based on the trained diagnosis network.

[0052] Specifically, in the model training stage, sample vibration data of the sample planetary gearbox in different health states can be first collected, and corresponding fault labels can be set for each sample vibration data. Among them, the fault label corresponding to the sample vibration data can be used to indicate the fault type corresponding to the corresponding sample planetary gearbox. In some embodiments, a planetary gearbox fault diagnosis test bench can be built, which is mainly composed of a drive motor, a gearbox, a magnetic powder loader, etc. In order to reflect different health states, a part of a gear tooth can be cut off as a fault by wire cutting technology. The planetary gearbox of the test bench is connected by a coupling before and after. By disassembling the coupling, the planetary gearbox can be removed and the core components such as the bearing gear inside it can be replaced. By replacing the bearing gears with different faults, sample vibration data of the sample planetary gearbox in different health states can be collected. Among them, the motor input speed can be set to 1500rpm, the data sampling frequency is set to 12800Hz, and the sampling time is 30s.

[0053] The sample vibration data of the planetary gearbox in the above fault diagnosis test bench at different health states are collected by using an acceleration sensor. However, it is difficult to observe regular periodic impact characteristics in the time domain waveform of the sample vibration data, and the amplitude of noise and other irrelevant interference frequencies is more prominent. Therefore, the characteristic information representing the health state of the gearbox cannot be extracted from the original sample vibration data by the traditional time domain analysis method. In this regard, the collected sample vibration data can be normalized so that the neural network can accelerate the convergence, and then a sample graph data set is constructed for the normalized sample vibration data, and the randomly shuffled sample graph data set is divided into a training set and a test set in a certain ratio (for example, 8:2), so as to train the model using the sample graph data in the training set, and evaluate the performance of the trained model using the sample graph data in the test set. By converting the sample vibration data into sample graph data to train the diagnostic network, a model can be established in a non-Euclidean space, so that the implicit interdependence between sample nodes can be effectively extracted using a graph neural network (such as a graph attention network), and the edges between nodes can be used to reflect the interconnection between samples, so that the characteristic information representing the health state of the gearbox in the sample vibration data can be more accurately extracted.

[0054] Therefore, in some embodiments, a linear classifier can be constructed based on a backbone feature extraction network and a linear layer as a diagnostic network (equivalent to a linear classifier branch). The backbone feature extraction network is constructed based on a graph neural network, for example, it can be constructed based on a two-layer graph attention network, and the linear layer can be constructed based on a single-layer fully connected layer. The linear layer can contain C neurons to output the fault probability corresponding to C different fault types. In a round of iterative training of the model, each sample vibration data in the current batch can be converted into sample graph data, and the sample graph data corresponding to each sample vibration data is input into the diagnostic network to obtain the classification model loss, and the gradient of each node is calculated by back propagation based on the classification model loss, and the model parameters of the diagnostic network are updated based on the SGD optimizer. Repeating the above iterative training process, a trained diagnostic network can be obtained for fault diagnosis of a planetary gearbox. After the sample graph data corresponding to any sample vibration data is input into the diagnostic network, the backbone feature extraction network will perform graph feature extraction on the sample graph data to obtain the feature vector of the sample graph data, and then the linear layer will perform multi-classification on the feature vector of the sample graph data to obtain the fault probability of various fault types corresponding to the sample vibration data. Based on the fault probabilities of various fault types corresponding to each sample vibration data and the fault labels of each sample vibration data, the above classification model loss can be calculated using the cross entropy loss function. For example, the classification model loss can be calculated in the following way:

[0055]

[0056] Among them, L CE is the classification model loss, L i,CE is the single sample classification loss of the i-th sample vibration data, N is the number of sample vibration data in the current batch, and C is the total number of fault types; is the indicator function. If the fault label of the i-th sample vibration data is equal to y c If it is 1, it is 0; otherwise, p ic is the fault type y corresponding to the i-th sample vibration data output by the linear layer c probability of failure.

[0057] In other embodiments, in order to learn a high-dimensional feature representation space with intra-class compactness and inter-class separability, so as to further improve the diagnostic network's ability to extract feature information representing the health status of the gearbox in sample vibration data, a supervised comparative learning branch can be first constructed based on the backbone feature extraction network and the projection layer. Among them, the backbone feature extraction network has the same structure as the backbone feature extraction network given in the above embodiment, which will not be repeated here; the projection layer can be constructed based on multiple layers (for example, two layers) of fully connected layers. In a round of iterative training, the data enhancement method can be used to obtain enhanced sample data of each sample vibration data in the current batch (for example, for sample vibration data x i Perform data enhancement to obtain enhanced sample data x' 2i-1 and x' 2i , where the enhanced sample data x' 2i-1 and x' 2i With the sample vibration data x i The fault labels are the same), each enhanced sample data is converted into sample enhanced graph data and then input into the above-mentioned supervised contrast learning branch to obtain the supervised contrast model loss corresponding to the supervised contrast learning branch, and the parameters of the supervised contrast learning branch are updated based on the supervised contrast model loss. Repeat the above iterative training process to obtain a trained supervised contrast learning branch. Subsequently, the projection layer is removed, the model parameters of the backbone feature extraction network are frozen, and a single-layer linear classifier is trained on the high-dimensional features extracted by the backbone feature extraction network. The linear classifier results show the pros and cons of feature extraction, thereby obtaining a diagnostic network composed of a trained backbone feature extraction network and a linear classifier.

[0058] In other embodiments, the classification model loss and the supervised contrast model loss can be used for training in a simple and efficient manner in one training step, thereby simplifying the training process while taking into account the compatibility between high-dimensional feature representation and classifier construction. Specifically, Figure 2As shown, a diagnostic network can be constructed based on a backbone feature extraction network, a linear layer and a projection layer, wherein the backbone feature extraction network and the linear layer constitute a linear classifier branch of the diagnostic network, and the backbone feature extraction network and the projection layer constitute a supervised contrast learning branch of the diagnostic network. In a round of iterative training, on the one hand, the sample graph data corresponding to each sample vibration data is input into the linear classifier branch of the diagnostic network to obtain the classification model loss corresponding to the linear classifier branch, wherein the calculation method of the classification model loss is as described in the above embodiment and will not be repeated here; on the other hand, each enhanced sample data is converted into sample enhanced graph data and then input into the above supervised contrast learning branch to obtain the supervised contrast model loss corresponding to the supervised contrast learning branch, thereby updating the parameters of the diagnostic network based on the above classification model loss and / or supervised contrast model loss. Repeat the above iterative training process, remove the projection layer, and a trained diagnostic network can be obtained.

[0059] It can be seen that the above classification model loss identifies the similarities between samples with the same label by mapping similar samples to the same 1-hot encoding vector for classification, while the supervised contrast model loss can minimize the distance ratio within the class and between classes. By combining these two loss functions, the backbone feature extraction network will learn more discriminative feature representations, thereby improving the classification accuracy of the diagnostic network. In some embodiments, the total model loss can be calculated based on the classification model loss and its weights and the supervised contrast model loss and its weights, so as to update the parameters of the diagnostic network based on the total model loss. The total model loss is shown in the following formula:

[0060]

[0061] Where: L Hybrid is the total loss of the model; L CE is the classification model loss; L supCon is the supervised contrast model loss; λ is a hyperparameter that adjusts the proportion of the weights of the two loss functions.

[0062] In some embodiments, the supervised contrastive model loss corresponding to the supervised contrastive learning branch may be calculated as follows:

[0063]

[0064] Among them, L supCon is the supervised contrastive model loss corresponding to the supervised contrastive learning branch, L i,supCon is the sample augmented graph data x i The corresponding single-sample learning loss, i∈I={1...2N} is the sample index of the sample enhancement graph data corresponding to each enhanced sample data, N is the number of sample vibration data in the current batch; P(i) is the number of sample enhancement graph data that does not contain sample enhancement graph data xi But with the sample augmented graph data x i The sample collection with the same fault label, |P(i)| is the total number of sample enhancement graph data contained in the sample collection P(i); A(i) is the number of sample enhancement graph data that does not contain sample enhancement graph data x i The sample collection of ; exp(·) is the exponential function; z i 、z p and z a is the sample augmented graph data x i 、x p and x a The feature representation after the projection layer; is the dot product; is the temperature coefficient.

[0065] From the above formula, we can see that for the anchor sample x i , all the samples in the enhanced graph data that are related to sample x i Samples with the same fault label are considered positive samples as the numerator in the formula, which will enable the model to close the distance between samples of the same type and obtain a more compact intra-class representation. Therefore, the above-mentioned supervised contrast model loss can use the fault label information to close the distance between samples of the same type and push the distance between samples of different classes away, thereby obtaining a sample representation with intra-class compactness and inter-class separability, which improves the diagnostic network's ability to extract feature information representing the health status of the gearbox in sample vibration data.

[0066] In some embodiments, sample graph data corresponding to sample vibration data, sample enhanced graph data corresponding to enhanced sample data, and graph data corresponding to vibration data of the planetary gearbox to be diagnosed can be converted based on the following steps:

[0067] 1) Normalizing the vibration data to be converted to obtain normalized vibration data; wherein the vibration data to be converted is sample vibration data, enhanced sample data or vibration data of a planetary gearbox to be diagnosed; for example, the normalization process may be performed in the following manner:

[0068]

[0069] Where: x i is each point in the vibration data to be converted; x min is the minimum value in the vibration data to be converted; x max is the maximum value in the vibration data to be converted, X nol is x i The normalized value.

[0070] 2) Based on the preset sampling length and sliding distance, the above normalized vibration data is sampled and divided to obtain multiple normalized sub-data; wherein, any normalized sub-data corresponds to a graph node. Assuming that the sampling length is Y and the sliding distance is S, a data set M containing multiple normalized sub-data can be obtained, which is calculated by the following formula:

[0071]

[0072] Where: d is the number of normalized sub-data; floor is the floor function; x 1,nol 、x 2,nol , ..., x d,nol is the normalized sub-data obtained by division.

[0073] 3) For any normalized sub-data, multiple neighbor graph nodes of the normalized sub-data are determined from other normalized sub-data based on the K nearest neighbor algorithm, and the edge weights between the normalized sub-data and each neighbor graph node are calculated. Among them, the number of nodes N in the graph, the number of neighbors k of each node, and the distance evaluation method between nodes can be predetermined. For example, the Euclidean distance evaluation can be used to calculate the distance between nodes, and then the first k nodes closest to the current node are taken as its neighbor graph nodes. Here, the edge weight between any normalized sub-data and any of its neighbor graph nodes can be calculated using the following formula:

[0074]

[0075] in, is the normalized sub-data x i,nol The neighbor node set of d(x i,nol , x j,nol ) is the normalized sub-data x i,nol and neighbor node x j,nol The Euclidean distance between is the bandwidth of the Gaussian kernel function.

[0076] 4) Based on the neighbor graph nodes of each normalized sub-data and the edge weights between each normalized sub-data and its neighbor graph nodes, we can construct Figure 3 The graph data of the vibration data to be converted shown in the figure has N nodes, and the connection relationship between the nodes is consistent with the relationship between the node and its neighboring nodes determined in the previous step. The graph data of the vibration data to be converted is the sample graph data corresponding to the sample vibration data, the sample enhanced graph data corresponding to the enhanced sample data, or the graph data corresponding to the vibration data of the planetary gearbox to be diagnosed.

[0077] After obtaining the trained diagnostic network, the vibration data of the planetary gearbox to be diagnosed can be converted into graph data in the above manner, and fault diagnosis can be performed on the graph data of the planetary gearbox to be diagnosed based on the trained diagnostic network. Among them, feature extraction can be performed on the graph data of the planetary gearbox to be diagnosed based on the backbone feature extraction network of the diagnostic network to obtain the feature vector of the graph data of the planetary gearbox to be diagnosed, and then the probability of each fault type is predicted for the feature vector of the graph data of the planetary gearbox to be diagnosed based on the linear layer of the diagnostic network to obtain the fault probability of each fault type of the planetary gearbox to be diagnosed.

[0078] In summary, the method provided by the embodiment of the present invention establishes a model in a non-Euclidean space, constructs a sample graph data set for the normalized sample vibration data, and utilizes the graph neural network to effectively develop the implicit interdependence between sample nodes, and utilizes the edges between nodes to reflect the interconnection between samples, thereby more accurately extracting the feature information characterizing the health status of the gearbox in the sample vibration data; at the same time, two feature learning routes are provided, the supervised comparative learning branch can learn a high-dimensional feature representation space with intra-class compactness and inter-class separability based on the enhanced samples of the original samples, and the linear classifier branch can identify the similarities between samples with the same label based on the original samples by mapping the same type of samples to the same 1-hot encoding vector. Model training is performed based on the model losses corresponding to the above two branches, which can improve the feature extraction ability of the model, increase the model classification accuracy, greatly reduce the dependence on prior knowledge and expert experience, and have better adaptability in the face of industrial big data with huge volume and sparse value.

[0079] The planetary gearbox fault diagnosis device based on the improved loss function provided by the present invention is described below. The planetary gearbox fault diagnosis device based on the improved loss function described below and the planetary gearbox fault diagnosis method based on the improved loss function described above can be referenced to each other.

[0080] Based on any of the above embodiments, Figure 4 is a schematic diagram of the structure of a planetary gearbox fault diagnosis device based on an improved loss function provided by the present invention, such as Figure 4 As shown, the device comprises:

[0081] The data collection unit 410 is used to collect sample vibration data of the sample planetary gearbox in different health states;

[0082] The single-round training unit 420 is used to convert each sample vibration data in the current batch into sample graph data, obtain enhanced sample data of each sample vibration data, and after converting each enhanced sample data into sample enhanced graph data, input the sample graph data corresponding to each sample vibration data into a linear classifier branch of the diagnosis network to obtain a classification model loss corresponding to the linear classifier branch, and / or input the sample enhanced graph data corresponding to each enhanced sample data into a supervised contrast learning branch of the diagnosis network to obtain a supervised contrast model loss corresponding to the supervised contrast learning branch, and update the parameters of the diagnosis network based on the classification model loss and / or the supervised contrast model loss;

[0083] An iterative training unit 430, used to repeatedly call the single-round training unit until an iterative convergence condition is reached to obtain a trained diagnostic network;

[0084] The model inference unit 440 is used to convert the vibration data of the planetary gearbox to be diagnosed into graph data, and perform fault diagnosis on the graph data of the planetary gearbox to be diagnosed based on the trained diagnosis network.

[0085] The device provided by the embodiment of the present invention establishes a model in a non-Euclidean space and constructs a sample graph data set for the normalized sample vibration data, so as to utilize the graph neural network to effectively develop the implicit interdependence between sample nodes, and utilize the edges between nodes to reflect the interconnection between samples, thereby more accurately extracting the feature information characterizing the health status of the gearbox in the sample vibration data; at the same time, two feature learning routes are provided, the supervised comparative learning branch can learn a high-dimensional feature representation space with intra-class compactness and inter-class separability based on the enhanced samples of the original samples, and the linear classifier branch can identify the similarities between samples with the same label based on the original samples by mapping the same type of samples to the same 1-hot encoding vector. Model training is performed based on the model losses corresponding to the above two branches, which can improve the feature extraction capability of the model, increase the model classification accuracy, greatly reduce the dependence on prior knowledge and expert experience, and have better adaptability in the face of industrial big data with huge volume and sparse value.

[0086] Based on any of the above embodiments, the diagnostic network includes a backbone feature extraction network, a linear layer and a projection layer, the linear classifier branch of the diagnostic network is composed of the backbone feature extraction network and the linear layer, the supervised contrast learning branch of the diagnostic network is composed of the backbone feature extraction network and the projection layer, and the backbone feature extraction network is constructed based on a graph neural network.

[0087] Based on any of the above embodiments, the step of inputting the sample enhancement graph data corresponding to each enhanced sample data into the supervised contrast learning branch of the diagnostic network to obtain the supervised contrast model loss corresponding to the supervised contrast learning branch includes:

[0088] The supervised contrast model loss corresponding to the supervised contrast learning branch is calculated based on the following formula:

[0089]

[0090] Among them, L supCon is the supervised contrast model loss corresponding to the supervised contrast learning branch, L i,supCon is the sample augmented graph data x i The corresponding single-sample learning loss, i∈I={1...2N} is the sample index of the sample enhancement graph data corresponding to each enhanced sample data, N is the number of sample vibration data in the current batch; P(i) is the number of sample enhancement graph data that does not contain sample enhancement graph data x i But with the sample augmented graph data x i The sample collection with the same fault label, |P(i)| is the total number of sample enhancement graph data contained in the sample collection P(i); A(i) is the number of sample enhancement graph data that does not contain sample enhancement graph data x i The sample collection of ; exp(·) is the exponential function; z i 、z p and z a is the sample augmented graph data x i 、x p and x a The feature representation after the projection layer; is the dot product; is the temperature coefficient.

[0091] Based on any of the above embodiments, the sample graph data corresponding to the sample vibration data, the sample enhanced graph data corresponding to the enhanced sample data, and the graph data corresponding to the vibration data of the planetary gearbox to be diagnosed are converted based on the following steps:

[0092] Normalizing the vibration data to be converted to obtain normalized vibration data; wherein the vibration data to be converted is sample vibration data, enhanced sample data or vibration data of a planetary gearbox to be diagnosed;

[0093] The normalized vibration data is sampled and divided based on a preset sampling length and a sliding distance to obtain a plurality of normalized sub-data; wherein any normalized sub-data corresponds to a graph node;

[0094] For any normalized sub-data, multiple neighbor graph nodes of the any normalized sub-data are determined from other normalized sub-data based on the K nearest neighbor algorithm, and the edge weights between the any normalized sub-data and each neighbor graph node are calculated;

[0095] Based on the neighbor graph nodes of each normalized sub-data and the edge weights between each normalized sub-data and its each neighbor graph node, the graph data of the vibration data to be converted is constructed; wherein the graph data of the vibration data to be converted is the sample graph data corresponding to the sample vibration data, the sample enhanced graph data corresponding to the enhanced sample data, or the graph data corresponding to the vibration data of the planetary gearbox to be diagnosed.

[0096] Based on any of the foregoing embodiments, the calculating the edge weight between any of the normalized sub-data and each neighbor graph node includes:

[0097] The edge weight between any normalized sub-data and any neighbor graph node is calculated using the following formula:

[0098]

[0099] in, is any normalized sub-data x i,nol The neighbor node set of d(x i,nol , x j,nol ) is any normalized sub-data x i,nol and neighbor node x j,nol The Euclidean distance between is the bandwidth of the Gaussian kernel function.

[0100] Based on any of the foregoing embodiments, the step of updating the parameters of the diagnostic network based on the classification model loss and / or the supervised contrast model loss includes:

[0101] Calculating the total model loss based on the classification model loss and its weight and the supervised comparison model loss and its weight;

[0102] Parameters of the diagnosis network are updated based on the total model loss.

[0103] Based on any of the above embodiments, the performing fault diagnosis on the image data of the planetary gearbox to be diagnosed based on the trained diagnostic network includes:

[0104] Performing feature extraction on the graph data of the planetary gearbox to be diagnosed based on the backbone feature extraction network of the diagnosis network to obtain a feature vector of the graph data of the planetary gearbox to be diagnosed;

[0105] Based on the linear layer of the diagnosis network, probability prediction of each fault type is performed on the feature vector of the graph data of the planetary gearbox to be diagnosed, so as to obtain the fault probability of each fault type of the planetary gearbox to be diagnosed.

[0106] Figure 5 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 5 As shown, the electronic device may include: a processor (processor) 510, a memory (memory) 520, a communication interface (Communications Interface) 530 and a communication bus 540, wherein the processor 510, the memory 520, and the communication interface 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 520 to execute the planetary gearbox fault diagnosis method based on the improved loss function, which includes: a data collection step: collecting sample vibration data of the sample planetary gearbox in different health states; a single-round training step: converting each sample vibration data in the current batch into sample graph data, obtaining enhanced sample data of each sample vibration data, and converting each enhanced sample data into sample enhanced graph data, inputting the sample graph data corresponding to each sample vibration data into the linear classifier branch of the diagnosis network to obtain the classification model loss corresponding to the linear classifier branch, and / or, inputting the sample enhanced graph data corresponding to each enhanced sample data into the supervised contrast learning branch of the diagnosis network to obtain the supervised contrast model loss corresponding to the supervised contrast learning branch, and updating the parameters of the diagnosis network based on the classification model loss and / or the supervised contrast model loss; an iterative training step: repeatedly executing the single-round training step until the iterative convergence condition is reached to obtain a trained diagnosis network; a model inference step: converting the vibration data of the planetary gearbox to be diagnosed into graph data, and performing fault diagnosis on the graph data of the planetary gearbox to be diagnosed based on the trained diagnosis network.

[0107] In addition, the logic instructions in the above-mentioned memory 520 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0108] On the other hand, the present invention also provides a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, when the program instructions are executed by the computer, the computer can execute the planetary gearbox fault diagnosis method based on the improved loss function provided by the above methods, the method comprising: a data collection step: collecting sample vibration data of the sample planetary gearbox in different health states; a single-round training step: converting each sample vibration data in the current batch into sample graph data respectively, obtaining enhanced sample data of each sample vibration data, converting each enhanced sample data into sample enhanced graph data respectively, and converting the sample data corresponding to each sample vibration data into sample enhanced graph data; The graph data is input into the linear classifier branch of the diagnostic network to obtain the classification model loss corresponding to the linear classifier branch, and / or the sample enhanced graph data corresponding to each enhanced sample data is input into the supervised contrast learning branch of the diagnostic network to obtain the supervised contrast model loss corresponding to the supervised contrast learning branch, and the parameters of the diagnostic network are updated based on the classification model loss and / or the supervised contrast model loss; iterative training step: repeatedly executing the single round training step until the iterative convergence condition is reached to obtain a trained diagnostic network; model reasoning step: converting the vibration data of the planetary gearbox to be diagnosed into graph data, and performing fault diagnosis on the graph data of the planetary gearbox to be diagnosed based on the trained diagnostic network.

[0109] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the above-mentioned planetary gearbox fault diagnosis method based on the improved loss function, the method comprising: a data collection step: collecting sample vibration data of a sample planetary gearbox in different health states; a single-round training step: converting each sample vibration data in the current batch into sample graph data respectively, obtaining enhanced sample data of each sample vibration data, converting each enhanced sample data into sample enhanced graph data respectively, and then inputting the sample graph data corresponding to each sample vibration data into a linear classifier branch of a diagnostic network, The classification model loss corresponding to the linear classifier branch is obtained, and / or the sample enhancement graph data corresponding to each enhanced sample data is input into the supervised contrast learning branch of the diagnostic network to obtain the supervised contrast model loss corresponding to the supervised contrast learning branch, and the diagnostic network is parameter updated based on the classification model loss and / or the supervised contrast model loss; an iterative training step: repeatedly executing the single round training step until the iterative convergence condition is reached to obtain a trained diagnostic network; a model inference step: converting the vibration data of the planetary gearbox to be diagnosed into graph data, and performing fault diagnosis on the graph data of the planetary gearbox to be diagnosed based on the trained diagnostic network.

[0110] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0111] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A planetary gearbox fault diagnosis method based on improved loss function, characterized in that: include: Data collection steps: Collect sample vibration data of sample planetary gearboxes in different health states; Single round training steps: convert each sample vibration data in the current batch into sample graph data, obtain enhanced sample data of each sample vibration data, convert each enhanced sample data into sample enhanced graph data, input the sample graph data corresponding to each sample vibration data into the linear classifier branch of the diagnosis network, obtain the classification model loss corresponding to the linear classifier branch, and input the sample enhanced graph data corresponding to each enhanced sample data into the supervised contrast learning branch of the diagnosis network, obtain the supervised contrast model loss corresponding to the supervised contrast learning branch, and update the parameters of the diagnosis network based on the classification model loss and the supervised contrast model loss; Iterative training step: repeatedly executing the single round training step until the iterative convergence condition is reached to obtain a trained diagnostic network; Model reasoning step: converting the vibration data of the planetary gearbox to be diagnosed into graph data, and performing fault diagnosis on the graph data of the planetary gearbox to be diagnosed based on the trained diagnostic network; The diagnostic network includes a backbone feature extraction network, a linear layer and a projection layer, the linear classifier branch of the diagnostic network is composed of the backbone feature extraction network and the linear layer, the supervised contrast learning branch of the diagnostic network is composed of the backbone feature extraction network and the projection layer, and the backbone feature extraction network is constructed based on a graph neural network; The sample graph data corresponding to the sample vibration data, the sample enhanced graph data corresponding to the enhanced sample data, and the graph data corresponding to the vibration data of the planetary gearbox to be diagnosed are converted based on the following steps: Normalizing the vibration data to be converted to obtain normalized vibration data; wherein the vibration data to be converted is sample vibration data, enhanced sample data or vibration data of a planetary gearbox to be diagnosed; The normalized vibration data is sampled and divided based on a preset sampling length and a sliding distance to obtain a plurality of normalized sub-data; wherein any normalized sub-data corresponds to a graph node; For any normalized sub-data, multiple neighbor graph nodes of the any normalized sub-data are determined from other normalized sub-data based on the K nearest neighbor algorithm, and the edge weights between the any normalized sub-data and each neighbor graph node are calculated; Based on the neighbor graph nodes of each normalized sub-data and the edge weights between each normalized sub-data and its each neighbor graph node, the graph data of the vibration data to be converted is constructed; wherein the graph data of the vibration data to be converted is the sample graph data corresponding to the sample vibration data, the sample enhanced graph data corresponding to the enhanced sample data, or the graph data corresponding to the vibration data of the planetary gearbox to be diagnosed.

2. The planetary gearbox fault diagnosis method based on improved loss function according to claim 1, characterized in that: The step of inputting the sample enhancement graph data corresponding to each enhanced sample data into the supervised contrast learning branch of the diagnostic network to obtain the supervised contrast model loss corresponding to the supervised contrast learning branch includes: The supervised contrast model loss corresponding to the supervised contrast learning branch is calculated based on the following formula: Among them, L supCon is the supervised contrast model loss corresponding to the supervised contrast learning branch, L i,supCon is the sample augmented graph data x i The corresponding single-sample learning loss, i∈I={1...2N} is the sample index of the sample enhancement graph data corresponding to each enhanced sample data, N is the number of sample vibration data in the current batch; P(i) is the number of sample enhancement graph data that does not contain sample enhancement graph data x i But with the sample augmented graph data x i The sample collection with the same fault label, |P(i)| is the total number of sample enhancement graph data contained in the sample collection P(i); A(i) is the number of sample enhancement graph data that does not contain sample enhancement graph data x i The sample collection of ; exp(·) is the exponential function; z i 、z p and z a is the sample augmented graph data x i 、x p and x a The feature representation after the projection layer; is the dot product; is the temperature coefficient.

3. The planetary gearbox fault diagnosis method based on improved loss function according to claim 1, characterized in that: The calculating the edge weight between any normalized sub-data and each neighbor graph node includes: The edge weight between any normalized sub-data and any neighbor graph node is calculated using the following formula: in, is any normalized sub-data x i,nol The neighbor node set of d(x i,nol , x j,nol ) is any normalized sub-data x i,nol and neighbor node x j,nol The Euclidean distance between is the bandwidth of the Gaussian kernel function.

4. The planetary gearbox fault diagnosis method based on improved loss function according to claim 1, characterized in that: The updating of parameters of the diagnostic network based on the classification model loss and the supervised contrast model loss includes: Calculating the total model loss based on the classification model loss and its weight and the supervised comparison model loss and its weight; Parameters of the diagnosis network are updated based on the total model loss.

5. The planetary gearbox fault diagnosis method based on improved loss function according to claim 1, characterized in that: The performing fault diagnosis on the image data of the planetary gearbox to be diagnosed based on the trained diagnostic network comprises: Performing feature extraction on the graph data of the planetary gearbox to be diagnosed based on the backbone feature extraction network of the diagnosis network to obtain a feature vector of the graph data of the planetary gearbox to be diagnosed; Based on the linear layer of the diagnosis network, probability prediction of each fault type is performed on the feature vector of the graph data of the planetary gearbox to be diagnosed, so as to obtain the fault probability of each fault type of the planetary gearbox to be diagnosed.

6. A planetary gearbox fault diagnosis device based on an improved loss function, characterized in that: include: A data acquisition unit, used for collecting sample vibration data of the sample planetary gearbox in different health states; A single-round training unit is used to convert each sample vibration data in the current batch into sample graph data, obtain enhanced sample data of each sample vibration data, and after converting each enhanced sample data into sample enhanced graph data, input the sample graph data corresponding to each sample vibration data into a linear classifier branch of a diagnosis network to obtain a classification model loss corresponding to the linear classifier branch, and input the sample enhanced graph data corresponding to each enhanced sample data into a supervised contrast learning branch of the diagnosis network to obtain a supervised contrast model loss corresponding to the supervised contrast learning branch, and update the parameters of the diagnosis network based on the classification model loss and the supervised contrast model loss; An iterative training unit, used for repeatedly calling the single-round training unit until an iterative convergence condition is reached to obtain a trained diagnostic network; A model reasoning unit, used for converting vibration data of the planetary gearbox to be diagnosed into graph data, and performing fault diagnosis on the graph data of the planetary gearbox to be diagnosed based on the trained diagnostic network; The diagnostic network includes a backbone feature extraction network, a linear layer and a projection layer, the linear classifier branch of the diagnostic network is composed of the backbone feature extraction network and the linear layer, the supervised contrast learning branch of the diagnostic network is composed of the backbone feature extraction network and the projection layer, and the backbone feature extraction network is constructed based on a graph neural network; The sample graph data corresponding to the sample vibration data, the sample enhanced graph data corresponding to the enhanced sample data, and the graph data corresponding to the vibration data of the planetary gearbox to be diagnosed are converted based on the following steps: Normalizing the vibration data to be converted to obtain normalized vibration data; wherein the vibration data to be converted is sample vibration data, enhanced sample data or vibration data of a planetary gearbox to be diagnosed; The normalized vibration data is sampled and divided based on a preset sampling length and a sliding distance to obtain a plurality of normalized sub-data; wherein any normalized sub-data corresponds to a graph node; For any normalized sub-data, multiple neighbor graph nodes of the any normalized sub-data are determined from other normalized sub-data based on the K nearest neighbor algorithm, and the edge weights between the any normalized sub-data and each neighbor graph node are calculated; Based on the neighbor graph nodes of each normalized sub-data and the edge weights between each normalized sub-data and its each neighbor graph node, the graph data of the vibration data to be converted is constructed; wherein the graph data of the vibration data to be converted is the sample graph data corresponding to the sample vibration data, the sample enhanced graph data corresponding to the enhanced sample data, or the graph data corresponding to the vibration data of the planetary gearbox to be diagnosed.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the planetary gearbox fault diagnosis method based on the improved loss function as described in any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the planetary gearbox fault diagnosis method based on the improved loss function as claimed in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Time sequence equipment fault diagnosis method based on comparison self-supervised learning

    CN116070128A

  • Gearbox fault diagnosis method based on semi-supervised dynamic graph attention

    CN116894215A

  • Lightweight rotating machine fault diagnosis method based on multi-scale information fusion

    CN117113170A

  • Small sample fault diagnosis method and system based on Meta-GraphSage network

    CN117892194A