Gear fault diagnosis method, gear fault diagnosis device, gear fault diagnosis equipment and medium

By using the method of strengthening class-level matching network and adaptive comparison learning loss function in gear fault diagnosis, the misclassification problem caused by neglecting category identification in cross-domain distribution alignment in the prior art is solved, and higher diagnostic accuracy and training stability are achieved.

CN120105183APending Publication Date: 2025-06-06SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510168925.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The prior art focuses on cross-domain distribution alignment in gearbox fault diagnosis, ignoring the discernibility between different categories, resulting in a large number of misclassifications near the classifier decision boundary.

Method used

Using a method based on a reinforced class-level matching network, a gear fault diagnosis model suitable for label-free target conditions is constructed, and a probability tag obtained by the network is used as a pseudo-label for class-level matching of the target domain, and a multi-step training mechanism is added to solve the problem of misclassification of samples near the decision boundary. At the same time, an adaptive comparative learning loss function was introduced to correct the disadvantage of poor robustness of the loss function in the maximizing classifier differential network.

Benefits of technology

Aligning at the class level is achieved, misclassification near the classifier decision boundary is reduced, and the accuracy of gear fault diagnosis and training stability are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120105183A_ABST
    Figure CN120105183A_ABST
Patent Text Reader

Abstract

The invention provides a gear fault diagnosis method, device and equipment based on an enhanced class-level matching network, and a medium, and relates to the technical field of gear fault diagnosis, and the method comprises the steps: collecting gear vibration signals of a gear under an original working condition of a gear fault type labeled with a label and under a target working condition of a gear fault type not labeled with a label; and respectively obtaining an original working condition sample and a target working condition sample. And inputting the original working condition sample and the target working condition sample into a preset enhanced class-level matching network for training to obtain a gear fault diagnosis model, inputting a to-be-detected gear vibration signal under the target working condition into the gear fault diagnosis model, and outputting a gear fault diagnosis result. According to the method, class-level alignment can be realized, and the problem that a large amount of misclassification exists near the decision boundary of the classifier is solved; and the defect that the robustness of the maximum classifier difference original loss function is relatively poor is corrected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gear fault diagnosis, and in particular to a gear fault diagnosis method, device, equipment and medium based on an enhanced class-matching network. Background Art

[0002] Gearbox is an important component in wind turbines, and its failure may bring huge economic losses and serious safety hazards. Due to the harsh working environment and the changing loads, gearbox failures occur frequently. According to statistics, gearbox failures account for about 10% of the total number of wind turbine failures, and the average downtime of wind turbines caused by gearbox failures is about 6 days. Therefore, gearbox fault diagnosis research is of great significance to improving the safety and economy of wind turbine production.

[0003] In recent years, with the continuous development of deep learning technology, a large number of rotating machinery fault diagnosis methods based on deep learning have emerged due to its advantages of high diagnostic accuracy and independence from expert knowledge. However, the application of these methods is based on the assumption that the training samples and the test samples have similar feature distributions and that the samples are labeled. However, as the working conditions of the equipment continue to change, the feature distribution of the sample data may also change accordingly, so this assumption is difficult to hold in actual industrial applications. In order to solve the above problems, many deep learning algorithms based on unsupervised domain adaptation have been introduced into gearbox fault diagnosis. At present, unsupervised domain adaptation methods have achieved good results in cross-domain fault diagnosis of rotating machinery, but the existing methods mainly focus on cross-domain distribution alignment, while ignoring the identifiability between different categories, resulting in a large number of misclassifications near the decision boundary of the classifier. Summary of the invention

[0004] The purpose of the present invention is to provide a gear fault diagnosis method, device, equipment and medium based on an enhanced class-level matching network, which is used to solve the problem that the prior art mainly focuses on cross-domain distribution alignment, but ignores the identifiability between different categories, resulting in a large number of misclassifications near the classifier decision boundary. It can achieve class-level alignment and solve the problem of a large number of misclassifications near the classifier decision boundary.

[0005] In order to achieve the above objectives, in a first aspect, the present invention provides a gear fault diagnosis method based on an enhanced class-matching network, comprising:

[0006] Step 1: Collect the gear vibration signal of the gear under the original working condition with the gear fault type marked by a label, assign a prediction label according to the gear state, obtain the pre-processed gear vibration signal, perform data segmentation on the pre-processed gear vibration signal, and obtain the original working condition sample;

[0007] Step 2: Collect the gear vibration signal under the target working condition without labeling the gear fault type, obtain the target working condition sample, and divide it into a training set, a test set and a validation set according to a preset ratio;

[0008] Step 3: Input the original working condition samples and the target working condition samples into the preset enhanced class-level matching network for training to obtain a gear fault diagnosis model;

[0009] Step 4: Input the gear vibration signal under the target working condition to be detected into the gear fault diagnosis model, and output the gear fault diagnosis result.

[0010] According to a gear fault diagnosis method based on an enhanced class-matching network provided by the present invention, gear fault types include normal state, tooth surface damage, tooth surface wear, tooth root fracture and tooth missing.

[0011] According to a gear fault diagnosis method based on an enhanced class-matching network provided by the present invention, data segmentation is performed on a pre-processed gear vibration signal to obtain an original working condition sample, including:

[0012] Acquire a preprocessed gear vibration signal within a preset time period, and determine the total length of sample data, the length of a single sample data, and the sliding window overlap rate of the preprocessed gear vibration signal;

[0013] The data point indexes of multiple sample data are obtained in sequence according to the length of a single sample data and the sliding window overlap ratio;

[0014] The total number of sample data is obtained based on the data point index of multiple sample data, the sample data with a preset ranking before the total number of sample data is extracted, and each sample data is stacked into a two-dimensional signal to obtain the original working condition sample.

[0015] According to a gear fault diagnosis method based on an enhanced class-matching network provided by the present invention, step 3 specifically includes:

[0016] Determine the model framework of the enhanced class-level matching network, input the original working condition samples, training set and test set into the model framework for training, establish the mapping relationship between the target working condition samples and the predicted labels, stop training when the objective function meets the iteration termination condition, and obtain the trained initial model;

[0017] The validation set is used to perform performance verification and comparison on the trained initial model, and the gear fault diagnosis model is output.

[0018] According to a gear fault diagnosis method based on an enhanced class-level matching network provided by the present invention, the model framework includes a feature extractor and two classifiers; the feature extractor includes a multimodal convolution module, a convolution layer, a pooling layer and a flattening layer, and the multimodal convolution module is used to extract shallow features; the classifier includes two fully connected layers, which are used to discriminate and classify shallow features, thereby obtaining the gear fault type.

[0019] According to a gear fault diagnosis method based on an enhanced class-level matching network provided by the present invention, the multimodal convolution module includes a convolution channel with a convolution kernel size of 1×1, a convolution channel with a convolution kernel size of 3×3, and a composite convolution channel consisting of a convolution kernel size of 5×5 and a convolution kernel size of 3×3, and then two convolution layers with a convolution kernel size of 5×5 are stacked.

[0020] According to a gear fault diagnosis method based on an enhanced class-level matching network provided by the present invention, the enhanced class-level matching network includes a class-level matching mechanism maximum classifier framework and an adaptive contrast learning class-level matching mechanism;

[0021] The adaptive contrastive learning class-level matching mechanism includes:

[0022] The original working condition sample is recorded as X s , the corresponding predicted label is recorded as Y s , X s With Y s Together they constitute the original working condition set D s , X s The feature set is denoted as Z s , taking each sample as an anchor point in turn; the target working condition sample is recorded as X t ;

[0023] The target domain samples with the same predicted labels as the anchor samples are taken as positive samples, and the target domain samples with different predicted labels as the anchor samples are taken as negative samples. The set of positive samples is recorded as Z p , the set of negative samples is recorded as Z s ;

[0024] Negative samples are weighted, and the weight calculation formula is:

[0025]

[0026] In the formula, is the source domain sample feature, Z n The kth sample feature in ; For each Different categories of samples The weight of; μ and σ are hyperparameters, μ and σ control Weight distribution of samples of different categories;

[0027] The adaptive contrastive learning loss function is calculated as:

[0028]

[0029] In the formula, Z p The jth sample feature in |Z p | and |Z n |Respectively with the source domain sample features The number of samples of the same category and the characteristics of the source domain samples The number of samples of different categories; τ is the temperature coefficient;

[0030] The class-level matching mechanism of the maximum classifier framework includes:

[0031] The first stage, working condition matching:

[0032] (1) By minimizing the cross entropy L of the original working condition samples S and the maximum mean difference L between the original working condition with labels and the target working condition without labels MMD , the loss function is:

[0033]

[0034] In the formula, X s and Y s The i-th sample in and the predicted label of the i-th sample, represents the i-th data from the source domain, represents the true label of the source domain; F(·) represents the feature extractor; 1(·) represents the one-hot function; M represents the total number of sample categories; E, E p 、E Q represents mathematical expectation; denotes the reproducing kernel Hilbert space represented by kernel k, and φ(·) denotes the mapping to the reproducing kernel Hilbert space;

[0035] (2) Fix the network parameters of the feature extractor and maximize the difference loss function L between the target condition probability outputs of the two classifiers adv , and minimize the cross entropy L of the original working condition samples S , the total loss function is:

[0036]

[0037] In the formula, and They represent the probability output of the Mth category data in the target domain on the two classifiers, Indicates D t The jth sample in ;

[0038] (3) Fix the parameters of the two classifiers and minimize the difference loss function L between the target condition probability outputs of the two classifiers adv , so that the samples with different classifications of the target working condition on the two classifiers fall into the common feature space of the original working condition of the two classifiers, and repeat l times. The loss function is:

[0039]

[0040] Repeat steps (1) to (3) until the number of iterations preset in the first stage is reached;

[0041] The second stage is fault class level matching:

[0042] (4) By minimizing the cross entropy L of the original working condition samples S and the maximum mean difference L between the original working condition with labels and the target working condition without labels MMD , the loss function is:

[0043]

[0044] In the formula, Represents the features extracted from samples with the true label M in the source domain; Represents the features extracted from the samples with the predicted label M in the target domain;

[0045] (5) With the network parameters of the feature extractor fixed, the total loss function is:

[0046]

[0047] (6) Fix the parameters of the two classifiers and minimize the difference loss function L between the target domain probability outputs of the two classifiers adv , and add the adaptive contrast learning loss function, repeat l times, the loss function is:

[0048]

[0049] Where h is the loss function coefficient;

[0050] Repeat steps (4) to (6) until the preset number of iterations in the second stage is reached.

[0051] In a second aspect, the present invention provides a gear fault diagnosis device based on an enhanced class-matching network, comprising:

[0052] The preprocessing module is used to collect the gear vibration signal under the original working condition with the gear fault type labeled, and assign the prediction label according to the gear state to obtain the preprocessed gear vibration signal, and perform data segmentation on the preprocessed gear vibration signal to obtain the original working condition sample;

[0053] An acquisition module is used to acquire gear vibration signals under target working conditions without labeling the gear fault type, obtain target working condition samples, and divide them into a training set, a test set, and a validation set according to a preset ratio;

[0054] A training module is used to input the original working condition samples and the target working condition samples into a preset enhanced class-level matching network for training to obtain a gear fault diagnosis model;

[0055] The diagnosis module is used to input the gear vibration signal under the target working condition to be detected into the gear fault diagnosis model and output the gear fault diagnosis result.

[0056] In a third aspect, the present invention 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 computer program, the gear fault diagnosis method based on an enhanced class-matching network of the first aspect is implemented.

[0057] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the gear fault diagnosis method based on an enhanced class-matching network of the first aspect.

[0058] The present invention provides a gear fault diagnosis method, device, equipment and medium based on an enhanced class-level matching network. By constructing a gear fault diagnosis model based on an enhanced class-level matching network suitable for unlabeled target conditions, on the basis of the maximum classifier difference transfer learning model, the probability labels obtained by the network are used as pseudo labels for class-level matching of the target domain, and a multi-step training mechanism is added to solve the problem of misclassification of samples near the decision boundary to enhance the class-level matching ability of the model; an adaptive contrast learning loss function is introduced to solve the shortcomings of poor robustness and parameter sensitivity of the loss function in the maximum classifier difference network. The model can be well applied to unlabeled gear fault diagnosis tasks, with higher accuracy and more stable training. Compared with the prior art, the beneficial effects of the present invention include at least the following two points:

[0059] (1) Through a multi-step training mechanism, the model can achieve class-level alignment, solving the problem of a large number of misclassifications near the classifier decision boundary.

[0060] (2) An adaptive contrastive learning loss function for transfer learning is proposed, which corrects the poor robustness of the original loss function of maximum classifier difference and enables the model to have the ability to bring together samples of the same category and push away samples of different categories. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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.

[0062] In the attached picture:

[0063] Figure 1 It is a flow chart of the gear fault diagnosis method based on the enhanced class-matching network of the present invention;

[0064] Figure 2 This is a schematic diagram of the overall process of step 3 of the present invention;

[0065] Figure 3 It is a schematic diagram of the structure of the electronic device of the present invention. DETAILED DESCRIPTION

[0066] 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.

[0067] Some embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0068] Example 1

[0069] See also Figure 1 This embodiment provides a gear fault diagnosis method based on an enhanced class-matching network, comprising the following steps:

[0070] Step 1: Collect the gear vibration signal of the gear under the original working condition with the gear fault type marked by a label, assign a prediction label according to the gear state, obtain the pre-processed gear vibration signal, perform data segmentation on the pre-processed gear vibration signal, and obtain the original working condition sample;

[0071] Specifically, the gear fault types may include normal state, tooth surface damage, tooth surface wear, tooth root fracture, and missing teeth.

[0072] Among them, the pre-processed gear vibration signal is segmented to obtain the original working condition samples, including:

[0073] Acquire a preprocessed gear vibration signal within a preset time period, and determine the total length of sample data, the length of a single sample data, and the sliding window overlap rate of the preprocessed gear vibration signal;

[0074] The data point indexes of multiple sample data are obtained in sequence according to the length of a single sample data and the sliding window overlap ratio;

[0075] The total number of sample data is obtained based on the data point index of multiple sample data, the sample data with a preset ranking before the total number of sample data is extracted, and each sample data is stacked into a two-dimensional signal to obtain the original working condition sample.

[0076] Step 2: Collect the gear vibration signal under the target working condition without labeling the gear fault type, obtain the target working condition sample, and divide it into a training set, a test set and a validation set according to a preset ratio;

[0077] Step 3: Input the original working condition samples and the target working condition samples into the preset enhanced class-level matching network for training to obtain a gear fault diagnosis model;

[0078] It should be noted that the enhanced class-level matching network is an improvement on the maximum classifier difference model. On this basis, a class-level matching mechanism and an adaptive contrastive learning loss function are added to improve the robustness of the model. The network model structure of the enhanced class-level matching network includes a feature extractor consisting of a multimodal convolutional module, a convolutional layer, a pooling layer, and a flattening layer, and two classifiers consisting of fully connected layers. The feature extractor is used to extract sample features, and the classifier is used to classify samples based on the extracted sample features.

[0079] Step 3 specifically includes: determining the model framework of the enhanced class-level matching network, inputting the training set and the test set divided by the original working condition samples and the target working condition samples into the model framework for training, establishing a mapping relationship between the target working condition samples and the predicted labels, stopping the training when the objective function meets the iteration termination condition, and obtaining the trained initial model;

[0080] The performance of the trained initial model is verified and compared using the validation set divided by the target working condition samples, and the gear fault diagnosis model is output.

[0081] The model framework includes a feature extractor F and two classifiers C 1 With C 2. The feature extractor extracts shallow features through a multimodal convolution module, which includes a convolution channel with a convolution kernel size of 1×1, a convolution channel with a convolution kernel size of 3×3, and a composite convolution channel consisting of a convolution kernel size of 5×5 and a convolution kernel size of 3×3, and then two convolution layers with a convolution kernel size of 5×5. The classifier consists of two fully connected layers, which discriminate and classify the shallow features extracted by the feature extractor to obtain the type of gear fault. The two classifiers compete with each other during training, so that the decision boundary of the classifier can adapt to the unlabeled target working condition.

[0082] The overall process is as follows Figure 2 The following is a detailed description.

[0083] The enhanced class-level matching network includes a class-level matching mechanism maximum classifier framework and an adaptive contrastive learning class-level matching mechanism. The adaptive contrastive learning class-level matching mechanism is as follows:

[0084] (1) Select anchor point: record the original working condition sample as X s , the corresponding predicted label is recorded as Y s , X s With Y s Together they constitute the original working condition set D s , X s The feature set is denoted as Z s , taking each sample as an anchor point in turn; the target working condition sample is recorded as X t .

[0085] (2) Divide positive and negative samples: The target domain samples with the same predicted labels as the anchor samples are regarded as positive samples, and the target domain samples with different predicted labels as the anchor samples are regarded as negative samples. The set of positive samples is recorded as Z p , the set of negative samples is recorded as Z n .

[0086] (3) Negative sample weighting: Negative samples are weighted using the following formula: The calculation formula is as follows:

[0087]

[0088] In the formula, is the source domain sample feature, and Z p and Z n The j-th sample feature and the k-th sample feature in ; For each Different categories of samples The weight of τ, μ and σ are hyperparameters, where τ is the temperature coefficient, μ and σ control Weight distribution of samples of different categories.

[0089] (4) Calculate the adaptive contrastive learning loss function: The adaptive contrastive learning loss function is calculated by the following formula to gather samples of the same category of unlabeled target conditions and push away samples of different categories:

[0090]

[0091] In the formula, |Z p | and |Z n |Respectively with the source domain sample features The number of samples of the same category and The number of samples of different categories; τ is a hyperparameter, where τ is the temperature coefficient.

[0092] The class-level matching mechanism maximum classifier framework includes the first and second stages, and its specific steps are as follows:

[0093] The first stage, working condition matching:

[0094] (1) By minimizing the cross entropy L of the original working condition samples S and the maximum mean difference L between the original working condition with labels and the target working condition without labels MMD , so that the network can learn the information under the original working condition with labels and reduce the difference in the output characteristics between the original working condition with labels and the target working condition without labels. Its loss function is shown as follows:

[0095]

[0096] In the formula, X s and Y s The i-th sample and the label of the i-th sample in ; F(·) represents the feature extractor; Represents the i-th data from the source domain; represents the true label of the source domain; 1(·) represents the one-hot function; M represents the total number of sample categories; E, E p 、E Q represents mathematical expectation; Denotes the reproducing kernel Hilbert space (RKHS) represented by kernel k, and φ(·) denotes the mapping to the reproducing kernel Hilbert space.

[0097] (2) Fix the network parameters of the feature extractor and maximize the difference loss function L between the target condition probability outputs of the two classifiers adv , and minimize the cross entropy L of the original working condition samples S , at this time the two classifiers C 1 and C 2The decision boundary can distinguish the target domain samples that do not fall into the common original working condition feature space of the two classifiers, that is, the samples whose classification results are different due to the difference in decision boundaries of the two classifiers.

[0098] The total loss function of the second step is as follows:

[0099]

[0100] In the formula, and Respectively represent the target domain M-th category data in classifier C 1 and classifier C 2 The probability output on Indicates D t The jth sample in .

[0101] (3) Fixed classifier C 1 and classifier C 2 The parameters of the two classifiers are minimized, and the difference loss function L of the target condition probability output is minimized. adv , so that the samples with different classifications of the target working condition on the two classifiers fall into the common feature space of the original working condition of the two classifiers. This step needs to be repeated l times.

[0102] The loss function of the third step is as follows:

[0103]

[0104] Repeat steps (1) to (3) until the number of iterations preset in the first stage is reached.

[0105] The second stage is fault class level matching:

[0106] (4) By minimizing the cross entropy L of the original working condition samples S and the maximum mean difference L between the original working condition with labels and the target working condition without labels MMD , so that the network can learn the information under the original working condition with labels and reduce the difference in the output characteristics between the original working condition with labels and the target working condition without labels. Its loss function is shown as follows:

[0107]

[0108] In the formula, Represents the features extracted from samples with label M in the source domain; Represents the features extracted from samples with pseudo label M in the target domain.

[0109] (5) The network parameters of the feature extractor are fixed, which is the same as step (2) in the first stage. The total loss function is shown as follows:

[0110]

[0111] (6) Fixed classifier C 1 and classifier C 2 The parameters of the target domain probability output of the two classifiers are minimized. adv , and add the adaptive contrast learning loss function to further bring the samples of the same category closer and push the samples of different categories apart. This step needs to be repeated l times. The loss function is defined as follows:

[0112]

[0113] Where h is the loss function coefficient.

[0114] Repeat steps (4) to (6) until the preset number of iterations in the second stage is reached.

[0115] The gear fault diagnosis model thus obtained can obtain the fault diagnosis result by inputting the signal to be detected under the unlabeled target working condition into the model.

[0116] Step 4: Input the gear vibration signal under the target working condition to be detected into the gear fault diagnosis model, and output the gear fault diagnosis result.

[0117] It should be noted that the gear fault diagnosis method based on the enhanced class-level matching network of the present invention can achieve more effective cross-domain fault diagnosis, wherein the enhanced class-level matching network is improved in the following two aspects on the basis of maximizing the classifier difference:

[0118] (1) The probabilistic labels obtained by the network are used as pseudo labels for class-level matching in the target domain, and a multi-step training mechanism is added to solve the problem of misclassification of samples near the decision boundary, so as to enhance the class-level matching ability of the model.

[0119] (2) An adaptive contrastive learning loss function is introduced to correct the shortcomings of the loss function in the maximization classifier difference network, which is poor in robustness and sensitive to parameters.

[0120] Example 2

[0121] This embodiment provides a gear fault diagnosis device based on an enhanced class-matching network, which corresponds to the method of embodiment 1 and includes:

[0122] The preprocessing module is used to collect the gear vibration signal under the original working condition with the gear fault type labeled, and assign the prediction label according to the gear state to obtain the preprocessed gear vibration signal, and perform data segmentation on the preprocessed gear vibration signal to obtain the original working condition sample;

[0123] An acquisition module is used to acquire gear vibration signals under target working conditions without labeling the gear fault type, obtain target working condition samples, and divide them into a training set, a test set, and a validation set according to a preset ratio;

[0124] A training module is used to input the original working condition samples and the target working condition samples into a preset enhanced class-level matching network for training to obtain a gear fault diagnosis model;

[0125] The diagnosis module is used to input the gear vibration signal under the target working condition to be detected into the gear fault diagnosis model and output the gear fault diagnosis result.

[0126] Example 3

[0127] Figure 3 An example of a structural diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other via the communication bus 840. The memory 830 stores a computer program that can be run on the processor 810, and when the processor 810 executes the computer program, the gear fault diagnosis method based on the enhanced class-level matching network of Example 1 is implemented.

[0128] Example 4

[0129] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the gear fault diagnosis method based on an enhanced class-matching network of Embodiment 1 is implemented.

[0130] It should be noted that the computer-readable storage medium of the present embodiment may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0131] In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device, or device. In this embodiment, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, device, or device. The computer program contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0132] The computer readable storage medium can be written in one or more programming languages ​​or a combination thereof to execute the computer program of the present embodiment, and the programming language includes an object-oriented programming language, such as Java, Python, C++, and also includes a conventional procedural programming language, such as C language or a similar programming language. The program can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0133] The following is a specific embodiment of the present invention.

[0134] Gear vibration signals of different gear states under the original working condition of 120r / min speed with labels and the target working condition of 180r / min speed without labels are collected to obtain the original working condition samples and the target working condition samples. The target working condition samples are divided into training set (number of training samples), test set (number of test samples) and validation set (number of validation samples) according to the division ratio of 9:1:1. The data types include five types of data: normal state, gear damage, tooth surface wear, tooth root fracture and missing teeth. The specific sample data are shown in Table 1.

[0135] Table 1. Sample data

[0136] Fault type Number of training samples Number of test samples Number of validation samples Label Normal state 7200 800 800 0 Gear damage 7200 800 800 1 Tooth wear 7200 800 800 2 Tooth root fracture 7200 800 800 3 Missing teeth 7200 800 800 4

[0137] The training set is input into the enhanced class-level matching network for training, and a mapping relationship between the input data and the predicted label is established. When the objective function meets the iteration termination condition, the training is stopped to obtain the initial model after training.

[0138] The trained initial model was tested on the validation set and then compared with the comparison models CNN (convolutional neural network), MMD (maximum mean difference), Deep-CORAL (unsupervised domain adaptation method), DANN (deep adversarial neural network) and MCD (maximum classifier difference). The diagnostic accuracy is shown in Table 2.

[0139] Table 2. Diagnostic accuracy

[0140] Model Accuracy CNN 75.3% MMD 79.8% Deep-CORAL 83.1% DANN 88.9% MCD 89.3% Gear Fault Diagnosis Model 95.5%

[0141] It can be seen that the gear fault diagnosis model based on the enhanced class-level matching network of the present invention has achieved a diagnostic accuracy of 95.5%. Compared with the comparison models CNN, MMD, Deep-CORAL, DANN and MCD, the average test accuracy has increased by 20.2%, 15.7%, 12.4%, 6.6% and 6.2% respectively. This shows that the multi-step training strategy of pseudo labels and the adaptive contrast learning loss function in the gear fault diagnosis model of the present invention can effectively solve the problem of difficult classification of samples near the decision boundary, that is, it strengthens the class-level matching ability of the model, and further shows that the model has better fault diagnosis accuracy and domain adaptation ability.

[0142] In summary, the present invention constructs a gear fault diagnosis model based on an enhanced class-level matching network suitable for unlabeled target working conditions. On the basis of the maximum classifier difference transfer learning model, the probability labels obtained by the network are used as pseudo labels for class-level matching of the target domain, and a multi-step training mechanism is added to solve the problem of sample misclassification near the decision boundary to enhance the class-level matching ability of the model; an adaptive contrast learning loss function is introduced to solve the shortcomings of poor robustness and parameter sensitivity of the loss function in the maximum classifier difference network. The model can be well applied to unlabeled gear fault diagnosis tasks, with higher accuracy and more stable training.

[0143] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the embodiments disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A gear fault diagnosis method based on an enhanced class-matching network, characterized in that: include: Step 1: collecting the gear vibration signal of the gear under the original working condition with the gear fault type marked by a label, and assigning a prediction label according to the gear state to obtain a pre-processed gear vibration signal, and performing data segmentation on the pre-processed gear vibration signal to obtain the original working condition sample; Step 2: Collect the gear vibration signal under the target working condition without labeling the gear fault type, obtain the target working condition sample, and divide it into a training set, a test set and a validation set according to a preset ratio; Step 3: Input the original working condition samples and the target working condition samples into the preset enhanced class-level matching network for training to obtain a gear fault diagnosis model; Step 4: input the gear vibration signal under the target working condition to be detected into the gear fault diagnosis model, and output the gear fault diagnosis result.

2. The gear fault diagnosis method based on enhanced class matching network according to claim 1 is characterized in that: The gear fault types include normal state, tooth surface damage, tooth surface wear, tooth root fracture and tooth missing.

3. The gear fault diagnosis method based on enhanced class matching network according to claim 1 is characterized in that: The data segmentation of the pre-processed gear vibration signal to obtain the original working condition sample includes: Acquire the preprocessed gear vibration signal within a preset time period, and determine the total length of sample data, the length of a single sample data, and the sliding window overlap rate of the preprocessed gear vibration signal; The data point indexes of multiple sample data are obtained in sequence according to the length of a single sample data and the sliding window overlap ratio; The total number of sample data is obtained based on the data point index of multiple sample data, the sample data with a preset ranking before the total number of sample data is extracted, and each sample data is stacked into a two-dimensional signal to obtain the original working condition sample.

4. The gear fault diagnosis method based on enhanced class matching network according to claim 3 is characterized in that: The step 3 specifically includes: Determine the model framework of the enhanced class-level matching network, input the original working condition samples, training set and test set into the model framework for training, establish a mapping relationship between the target working condition samples and the predicted labels, stop training when the objective function meets the iteration termination condition, and obtain a trained initial model; The validation set is used to perform performance verification and comparison on the trained initial model, and the gear fault diagnosis model is output.

5. The gear fault diagnosis method based on enhanced class matching network according to claim 4 is characterized in that: The model framework includes a feature extractor and two classifiers; the feature extractor includes a multimodal convolution module, a convolution layer, a pooling layer and a flattening layer, and the multimodal convolution module is used to extract shallow features; the classifier includes two fully connected layers, which are used to discriminate and classify the shallow features, thereby obtaining the gear fault type.

6. The gear fault diagnosis method based on enhanced class matching network according to claim 5 is characterized in that: The multimodal convolution module includes a convolution channel with a convolution kernel size of 1×1, a convolution channel with a convolution kernel size of 3×3, and a composite convolution channel consisting of a convolution kernel size of 5×5 and a convolution kernel size of 3×3, and then two convolution layers with a convolution kernel size of 5×5.

7. The gear fault diagnosis method based on enhanced class matching network according to claim 4 is characterized in that: The enhanced class-level matching network includes a class-level matching mechanism maximum classifier framework and an adaptive contrastive learning class-level matching mechanism; The adaptive contrastive learning class-level matching mechanism includes: The original working condition sample is recorded as X s , the corresponding predicted label is recorded as Y s , X s With Y s Together they constitute the original working condition set D s , X s The feature set is denoted as Z s , taking each sample as an anchor point in turn; the target working condition sample is recorded as X t ; The target domain samples with the same predicted labels as the anchor samples are taken as positive samples, and the target domain samples with different predicted labels as the anchor samples are taken as negative samples. The set of positive samples is recorded as Z p , the set of negative samples is recorded as Z s ; Negative samples are weighted, and the weight calculation formula is: In the formula, is the source domain sample feature, Z n The kth sample feature in ; For each Different categories of samples The weight of; μ and σ are hyperparameters, μ and σ control Weight distribution of samples of different categories; The adaptive contrastive learning loss function is calculated as: In the formula, Z p The jth sample feature in |Z p | and |Z n |Respectively with the source domain sample features The number of samples of the same category and the characteristics of the source domain samples The number of samples of different categories; τ is the temperature coefficient; The class-level matching mechanism maximum classifier framework includes: The first stage, working condition matching: (1) By minimizing the cross entropy L of the original working condition samples S and the maximum mean difference L between the original working condition with labels and the target working condition without labels MMD , and the loss function is: In the formula, X s and Y s The i-th sample in and the predicted label of the i-th sample, represents the i-th data from the source domain, represents the true label of the source domain; F(·) represents the feature extractor; 1(·) represents the one-hot function; M represents the total number of sample categories; E, E p 、E Q represents mathematical expectation; denotes the reproducing kernel Hilbert space represented by kernel k, and φ(·) denotes the mapping to the reproducing kernel Hilbert space; (2) Fix the network parameters of the feature extractor and maximize the difference loss function L between the target condition probability outputs of the two classifiers adv , and minimize the cross entropy L of the original working condition samples S , the total loss function is: In the formula, and They represent the probability output of the Mth category data in the target domain on the two classifiers, Indicates D t The jth sample in ; (3) Fix the parameters of the two classifiers and minimize the difference loss function L between the target condition probability outputs of the two classifiers adv , so that the samples with different classifications of the target working condition on the two classifiers fall into the common feature space of the original working condition of the two classifiers, and repeat l times. The loss function is: Repeat steps (1) to (3) until the number of iterations preset in the first stage is reached; The second stage is fault class level matching: (4) By minimizing the cross entropy L of the original working condition samples S and the maximum mean difference L between the original working condition with labels and the target working condition without labels MMD , the loss function is: In the formula, Represents the features extracted from samples with the true label M in the source domain; Represents the features extracted from the samples with the predicted label M in the target domain; (5) With the network parameters of the feature extractor fixed, the total loss function is: (6) Fix the parameters of the two classifiers and minimize the difference loss function L between the target domain probability outputs of the two classifiers adv , and add the adaptive contrast learning loss function, repeat l times, the loss function is: Where h is the loss function coefficient; Repeat steps (4) to (6) until the preset number of iterations in the second stage is reached.

8. A gear fault diagnosis device based on an enhanced class-matching network, characterized in that: include: A preprocessing module is used to collect the gear vibration signal of the gear under the original working condition with a label indicating the gear fault type, and assign a prediction label according to the gear state to obtain a preprocessed gear vibration signal, and perform data segmentation on the preprocessed gear vibration signal to obtain an original working condition sample; An acquisition module is used to acquire gear vibration signals under target working conditions without labeling the gear fault type, obtain target working condition samples, and divide them into a training set, a test set, and a validation set according to a preset ratio; A training module is used to input the original working condition samples and the target working condition samples into a preset enhanced class-level matching network for training to obtain a gear fault diagnosis model; The diagnosis module is used to input the gear vibration signal under the target working condition to be detected into the gear fault diagnosis model and output the gear fault diagnosis result.

9. 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 computer program, the gear fault diagnosis method based on the enhanced class-matching network as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the gear fault diagnosis method based on the enhanced class-matching network as described in any one of claims 1 to 7 is implemented.