A semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation
The semi-supervised gear fault diagnosis method, which combines collaborative feature enhancement and dynamic threshold adaptation, solves the problems of scarce labeled samples and class imbalance, thereby improving the accuracy and stability of gear fault diagnosis and making it applicable to the field of gear fault diagnosis.
Patent Information
- Application Number
- CN202611123098.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2046-07-28
AI Technical Summary
Existing gear fault diagnosis methods suffer from insufficient diagnostic performance and stability under conditions of scarce labeled samples and class imbalance. Furthermore, fixed pseudo-label thresholds can easily lead to error accumulation, affecting diagnostic accuracy and robustness.
A semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation is adopted. By constructing a model including a Transformer encoder and a dual classifier, information interaction between labeled and unlabeled samples is realized. Pseudo-labels are filtered out through a dynamic threshold adaptation mechanism, and a joint optimization objective is constructed to improve diagnostic performance.
It improves the accuracy, stability, and generalization ability of gear fault diagnosis, and can effectively utilize unlabeled sample information under conditions of class imbalance and label scarcity, suppressing false label noise and improving the robustness and engineering applicability of the model.
Smart Images

Figure CN122634357B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of gear fault diagnosis technology, and relates to a semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation. Background Technology
[0002] Gears are key fundamental components in mechanical transmission systems, widely used in rotating machinery such as mining equipment, metallurgical equipment, rail transportation, wind power equipment, power transmission devices, and industrial production lines. During long-term service, gears typically endure heavy loads, high speeds, impacts, changes in lubrication conditions, and complex time-varying operating conditions, making them prone to pitting, wear, tooth breakage, and combined damage. If gear faults are not detected in time, they can lead to decreased transmission efficiency, equipment downtime, and even safety accidents. Therefore, accurate, stable, and rapid gear fault diagnosis is of significant engineering importance.
[0003] Traditional gear fault diagnosis methods typically rely on human experience and signal processing techniques to extract features, such as time-domain statistics, frequency-domain spectral features, wavelet transform, empirical mode decomposition, variational mode decomposition, and envelope analysis. These features are then combined with classifiers such as support vector machines, nearest neighbor classifiers, decision trees, or random forests to complete fault identification. However, these methods are highly dependent on manual feature design and expert experience, and their diagnostic performance and generalization ability are easily limited when there is strong noise, complex operating conditions, or weak fault features.
[0004] With the development of deep learning, models such as convolutional neural networks, recurrent neural networks, and Transformers can automatically learn fault features from raw monitoring signals, improving the automation level of gear fault diagnosis. In particular, Transformers can model long-range dependencies and global contextual information in time series through self-attention mechanisms, making them suitable for feature extraction from complex mechanical vibration signals. However, in real-world industrial scenarios, fault state samples occur infrequently, and manual labeling requires specialized knowledge and is costly, resulting in a limited number of labeled fault samples available for training. Simultaneously, the number of normal samples often far exceeds the number of fault samples, leading to a significant imbalance in class distribution. These factors easily cause overfitting, biased learning, and blurred fault category boundaries in deep learning diagnostic models.
[0005] Semi-supervised learning can utilize both a small number of labeled samples and a large number of unlabeled samples simultaneously, making it suitable for solving the label scarcity problem in mechanical fault diagnosis. Existing semi-supervised fault diagnosis methods often employ strategies such as pseudo-labeling, self-supervised learning, or consistency regularization, but they still have the following shortcomings: First, some methods only use unlabeled samples as independent data, ignoring the semantic interaction between labeled and unlabeled samples; second, pseudo-label selection usually uses a fixed threshold, which easily excludes a large number of potentially valid samples in the early stages of training, and is difficult to adaptively adjust according to changes in model confidence in the later stages; third, a single classification branch is prone to error accumulation when noisy pseudo-labels are present, affecting the model's convergence stability and diagnostic accuracy.
[0006] Therefore, there is an urgent need for a gear fault diagnosis method that can make full use of unlabeled vibration samples under the conditions of scarce labeled samples and class imbalance, realize information interaction between labeled and unlabeled samples at the feature layer, and suppress false label noise at the decision layer, so as to improve the accuracy, robustness and engineering applicability of the diagnostic model. Summary of the Invention
[0007] The purpose of this invention is to address the problems in gear fault diagnosis, such as insufficient labeled samples, unbalanced distribution of fault categories, insufficient utilization of potential information from unlabeled samples, error accumulation caused by fixed pseudo-label thresholds, and insufficient stability of single classification branches. This invention proposes a semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation, thereby improving the accuracy, stability, and generalization ability of gear fault diagnosis.
[0008] This invention provides a semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation, characterized in that it includes:
[0009] S1: Collect the original vibration signal during the gear operation, preprocess the original vibration signal to obtain the original vibration sample, divide the original vibration sample into a labeled training sample set, an unlabeled training sample set and a test sample set, and form a semi-supervised training batch by combining the labeled training sample and the unlabeled training sample according to a preset ratio.
[0010] S2: Construct an initial fault diagnosis model including the Transformer encoder backbone network and the classification network, using labeled training samples as input, and perform supervised pre-training on the Transformer encoder backbone network and the classification network.
[0011] S3: Input the semi-supervised training batches into the pre-trained Transformer encoder backbone network to extract the original fault features of each sample and form the original fault feature matrix;
[0012] S4: Based on the collaborative feature enhancement matrix, the original fault feature matrix is linearly mapped so that each sample feature interacts with the features of neighboring samples to obtain the enhanced feature matrix;
[0013] S5: Construct a first classifier and a second classifier. Input the original fault feature matrix into the first classifier and the enhanced feature matrix into the second classifier to obtain the probability of the first fault category corresponding to the original fault features and the probability of the second fault category corresponding to the enhanced features, respectively.
[0014] S6: Generate candidate pseudo-labels and maximum prediction confidence of unlabeled training samples based on the first classifier, and use a dynamic threshold function that changes with the training rounds to select high-confidence unlabeled training samples.
[0015] S7: Construct a supervised classification loss based on labeled training samples, construct a pseudo-label loss based on high-confidence unlabeled training samples and their pseudo-labels, and construct a consistency collaboration loss based on the probability of the first fault category and the probability of the second fault category.
[0016] S8: The joint optimization objective is constructed by supervising classification loss, pseudo-label loss and consistency collaboration loss. The network parameters of the Transformer encoder backbone network, the first classifier and the second classifier are updated by backpropagation to obtain the trained semi-supervised gear fault diagnosis model.
[0017] S9: In the online diagnosis phase, the test sample set is input into the trained semi-supervised gear fault diagnosis model. The Transformer encoder extracts fault features, and the classifier outputs the probability of each fault category. The gear fault diagnosis result is determined based on the category corresponding to the highest probability.
[0018] The semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation of the present invention has the following beneficial effects:
[0019] This invention obtains stable initial fault feature representations through labeled supervised pre-training, alleviating the problem of unstable model training under label scarcity conditions; it achieves information interaction between labeled and unlabeled training samples through a collaborative feature enhancement matrix, improving the discriminative and generalization capabilities of feature representations; by setting up a dual-classifier parallel structure to process the original fault features and enhanced features separately, it can jointly suppress pseudo-label noise from both the feature layer and the decision layer; through a dynamic threshold adaptive mechanism, it gradually adjusts the pseudo-label selection criteria according to the training rounds, balancing the utilization rate of unlabeled training samples in the early stages of training and the reliability of pseudo-labels in the later stages; through the joint optimization of supervised classification loss, pseudo-label loss, and consistency collaborative loss, it can improve the accuracy, robustness, and engineering applicability of gear fault diagnosis under conditions of class imbalance and insufficient labeled samples. Attached Figure Description
[0020] Figure 1 This is a flowchart of a semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation according to the present invention. Detailed Implementation
[0021] To make the technical solution and beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The present invention addresses the problems in gear operation status monitoring, such as difficulty in obtaining fault samples, insufficient number of labeled samples, unbalanced category distribution, insufficient utilization of unlabeled samples, and the tendency for errors to accumulate due to fixed pseudo-label thresholds. It proposes a semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation.
[0022] like Figure 1 As shown, a semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation according to the present invention includes:
[0023] S1: Collect raw vibration signals during gear operation, preprocess the raw vibration signals to obtain raw vibration samples, divide the raw vibration samples into labeled training sample sets, unlabeled training sample sets, and test sample sets, and combine the labeled and unlabeled training samples into a semi-supervised training batch according to a preset ratio, specifically:
[0024] Step S11: Acquire raw vibration signals .
[0025] Step S12: Process the original vibration signal Perform sliding window division, and let the window length be... Step size is Then the first The original vibration samples are:
[0026]
[0027] Step S13: Normalize the original vibration samples to obtain normalized vibration samples; in specific implementation, the following standardization method can be adopted:
[0028]
[0029] in, To avoid extremely small constants with a denominator of zero, The mean, Let Variance be the variance.
[0030] Step S14: Based on whether the original vibration samples have fault category labels, divide the normalized vibration samples into labeled training sample sets. Unlabeled training sample set and test sample set ; This indicates that there are labeled training samples. One-hot encoding of the fault categories corresponding to the labeled training samples; This indicates that there are no labeled training samples. This indicates a test sample.
[0031] Step S15: After normalization, Each labeled training sample and The unlabeled training samples are sorted to form a semi-supervised training batch:
[0032]
[0033]
[0034] in, Indicates the number of sensor channels.
[0035] In practice, the original vibration signals can be collected by accelerometers installed on the gearbox housing, bearing housing, or other locations with obvious vibration response. Based on the actual operating state of the gear, corresponding fault category labels are assigned to some of the original vibration samples. These fault categories may include normal state, broken tooth fault, combined broken tooth and wear fault, pitting fault, combined pitting and wear fault, and wear fault. Original vibration samples without fault category labels are used as unlabeled training samples for semi-supervised training.
[0036] S2: Construct an initial fault diagnosis model including a Transformer encoder backbone network and a classification network. Using labeled training samples as input, perform supervised pre-training on the Transformer encoder backbone network and the classification network, specifically as follows:
[0037] Step S21: Construct an initial fault diagnosis model including a Transformer encoder backbone network and a classification network. The Transformer encoder backbone network includes: an input embedding layer, a position encoding layer, a multi-head self-attention layer, a feedforward neural network layer, a residual connection layer, and a layer normalization layer.
[0038] Step S22: Pre-training phase using labeled training sample set As input, there will be labeled training samples. Input Transformer encoder backbone network The initial fault characteristics are obtained:
[0039]
[0040] Step S23: Input the initial fault features into the classification network The unnormalized classification score was obtained. Fault Category Probability And the final classification results :
[0041]
[0042]
[0043]
[0044] The pre-training loss uses cross-entropy loss:
[0045]
[0046] in, Let i be the one-hot encoding of the i-th labeled sample belonging to the c-th type of fault. Let be the probability that the i-th labeled sample belongs to the c-th type of fault; For the number of gear fault categories, minimize the cross-entropy loss. This allows the Transformer encoder backbone network to learn initial fault discrimination features from vibration signals, providing stable parameter initialization for subsequent semi-supervised training. It avoids training instability caused by low-quality pseudo-labels during direct semi-supervised training.
[0047] After pre-training is completed, the parameters of the Transformer encoder backbone network are retained as the initial parameters for semi-supervised training, and two parallel classifiers are constructed.
[0048] S3: Input the semi-supervised training batches into the pre-trained Transformer encoder backbone network to extract the original fault features of each sample, forming the original fault feature matrix, specifically:
[0049] The semi-supervised training batch consists of labeled and unlabeled training samples. Input the pre-trained Transformer encoder For any sample in the semi-supervised training batch First, the initial sequence representation is obtained through input embedding and positional encoding:
[0050]
[0051] in, The output of the Transformer encoder embedding layer, and For embedding layer parameters, It is a positional encoding used to preserve the sequential information of different sampling positions in a time series.
[0052] In the In the Transformer encoding layer, for the th Attention head, query matrix Key matrix Sum matrix They are respectively:
[0053]
[0054]
[0055]
[0056] in, For the first The output of each Transformer coding layer; , and For the first The learnable weight matrix corresponding to each attention head.
[0057] No. The output of each attention head is:
[0058]
[0059] in, This is the scaling factor.
[0060] The results from multiple attention heads are concatenated and linearly mapped to form a multi-head attention output:
[0061]
[0062] in, This is for outputting the projection matrix.
[0063] After residual connections, layer normalization, and feedforward neural networks, the first... The output of the Transformer coding layer :
[0064]
[0065] in, For layer normalization processing, It is a feedforward neural network.
[0066] go through After the Transformer encoder layer, global average pooling or class labeling is used to obtain the global fault features for each sample:
[0067]
[0068] For all samples in the batch, the original fault feature matrix extracted by the Transformer encoder is represented as:
[0069] .
[0070] S4: Based on the collaborative feature enhancement matrix, a linear mapping is performed on the original fault feature matrix, enabling information interaction between each sample feature and its neighboring sample features, resulting in the enhanced feature matrix, specifically:
[0071] To achieve deep semantic interaction between labeled and unlabeled training samples, a collaborative feature enhancement matrix is constructed. For the original fault feature matrix Perform a linear mapping to obtain the enhanced feature matrix. :
[0072]
[0073] The collaborative feature enhancement matrix satisfies the following constraints:
[0074]
[0075]
[0076]
[0077]
[0078] Where B is the size of the semi-supervised training batch. For matrix The element in row a, column b, For matrix The a-th row.
[0079] In a preferred embodiment, a tridiagonal neighborhood perturbation matrix is used for construction. :
[0080]
[0081] in, Let be the adjacency matrix representing the relationships between adjacent samples. At this point, the th... The enhancement features are:
[0082]
[0083] Therefore, the enhanced features of each sample mainly retain their original semantics, while appropriately introducing auxiliary information from adjacent labeled or unlabeled samples, thereby enhancing the robustness and generalization ability of the features.
[0084] S5: Construct a first classifier and a second classifier. Input the original fault feature matrix into the first classifier and the enhanced feature matrix into the second classifier to obtain the first fault category probability corresponding to the original fault features and the second fault category probability corresponding to the enhanced features, respectively.
[0085] Build the first classifier Second classifier The first and second classifiers each consist of a fully connected layer, a normalization layer, a nonlinear activation layer, and a softmax output layer. The first classifier receives the original fault feature matrix. The second classifier receives the enhanced feature matrix. Output the probability of each fault category:
[0086]
[0087]
[0088] in, for The i-th original fault feature in for The i-th enhanced feature, They represent the first The probability of the fault category obtained by classifying a sample through two classification branches.
[0089] S6: Based on the first classifier, candidate pseudo-labels and maximum prediction confidence of unlabeled training samples are generated. A dynamic threshold function that changes with training rounds is used to filter out high-confidence unlabeled training samples. Specifically:
[0090] Step S61: For unlabeled training samples, generate candidate pseudo-labels based on the output of the first classifier. and maximum prediction confidence :
[0091]
[0092]
[0093] in, Let be the probability that the i-th unlabeled training sample output by the first classifier belongs to the c-th type of fault.
[0094] Step S62: To avoid underutilization of unlabeled training samples or accumulation of erroneous pseudo-labels due to a fixed threshold, a dynamic threshold function that varies with the training epochs is constructed. When expressed as a percentage, the threshold function is... The dynamic threshold for round training is:
[0095]
[0096] Dynamic threshold From the main growth item and oscillating terms The system is composed of components. In the early stages of training, a lower threshold is used to absorb more information from unlabeled samples, while in the later stages of training, the threshold is gradually increased to filter out low-confidence pseudo-labels.
[0097]
[0098]
[0099] in, The total number of training rounds. and As the attenuation factor, Contribute weights to the preceding and following training phases. The logarithmic perturbation factor, The amplitude coefficient, For frequency coefficients, The coefficient is the exponential decay coefficient; when using probabilistic methods for pseudo-label filtering, the filtering criteria are:
[0100]
[0101] in, For indicator functions, when When, it indicates the first A certain number of unlabeled training samples are selected as high-confidence unlabeled training samples and used in pseudo-label training. Otherwise, they are not used for pseudo-label loss calculation.
[0102] S7: Construct a supervised classification loss based on high-confidence unlabeled training samples, construct a pseudo-label loss based on high-confidence unlabeled training samples and their pseudo-labels, and construct a consistency collaboration loss based on the probabilities of the first and second fault categories. Specifically:
[0103] Step S71: In the semi-supervised training phase, construct a supervised classification loss based on the labeled training samples. :
[0104]
[0105] in, Let i be the one-hot encoding of the i-th labeled sample belonging to the c-th type of fault. This represents the probability that the i-th labeled training sample output by the first classifier belongs to the c-th type of fault. This represents the probability that the i-th labeled training sample output by the second classifier belongs to the c-th type of fault;
[0106] Step S72: Construct a pseudo-label loss based on high-confidence unlabeled training samples and their pseudo-labels. :
[0107]
[0108]
[0109] in, Candidate pseudo-labels The corresponding one-hot encoding; Candidate pseudo-labels One-hot encoding for type c faults, This represents the number of unlabeled training samples in the batch.
[0110] Step S73: To ensure that the two classification branches maintain stable and consistent predictions on unlabeled training samples, construct a consistency collaborative loss:
[0111]
[0112] in, Let be the failure probability of the i-th unlabeled training sample output by the first classifier. This represents the failure probability of the i-th unlabeled training sample output by the second classifier.
[0113] S8: The joint optimization objective is constructed by supervising classification loss, pseudo-label loss and consistency collaboration loss. The network parameters of the Transformer encoder backbone network, the first classifier and the second classifier are updated through backpropagation. During the training process, feature extraction, feature enhancement, probability output, dynamic threshold screening, loss calculation and parameter update are repeatedly performed until the preset number of training rounds is reached or the convergence condition is met, and the semi-supervised gear fault diagnosis model is obtained after training.
[0114] In practice, the joint optimization objective is as follows:
[0115]
[0116] in, and The non-negative weighting coefficients are minimized. The semi-supervised gear fault diagnosis model improves diagnostic performance by utilizing the explicit supervision information from labeled samples, as well as the latent structural information from unlabeled samples and the consistency constraints of the two classification branches.
[0117] S9: In the online diagnosis phase, the test sample set is input into the trained semi-supervised gear fault diagnosis model. The Transformer encoder extracts fault features, and the classifier outputs the probability of each fault category. The gear fault diagnosis result is determined based on the category corresponding to the highest probability.
[0118] After training, the trained Transformer encoder is obtained. First classifier Second classifier A semi-supervised gear fault diagnosis model was constructed. For the vibration sample to be tested... Its diagnostic output is:
[0119]
[0120]
[0121] When the samples to be tested are input in batches and collaborative enhancement is allowed, the following is further obtained:
[0122]
[0123]
[0124] The probabilities of the two classifier branches can be weighted and fused:
[0125]
[0126] The final gear failure category is:
[0127]
[0128] Simultaneously output This serves as the confidence level corresponding to the fault category. Thus, a complete end-to-end diagnostic process is achieved, from vibration signal input to fault category output.
[0129] When online diagnostics only inputs a single vibration sample and does not perform batch enhancement, let The final fault category is directly output by the first classifier. Therefore, this invention enables a complete semi-supervised fault diagnosis process, from original vibration signal input, Transformer feature extraction, collaborative feature enhancement, dynamic pseudo-label screening, joint loss optimization to the final fault category output.
[0130] The above description is only a preferred embodiment of the present invention and is not intended to limit the ideas of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation, characterized in that, include: S1: Collect the original vibration signal during gear operation, preprocess the original vibration signal to obtain the original vibration sample, divide the original vibration sample into a labeled training sample set, an unlabeled training sample set and a test sample set, and form a semi-supervised training batch by combining the labeled training sample and the unlabeled training sample according to a preset ratio. S2: Construct an initial fault diagnosis model including the Transformer encoder backbone network and the classification network, using labeled training samples as input, and perform supervised pre-training on the Transformer encoder backbone network and the classification network. S3: Input the semi-supervised training batches into the pre-trained Transformer encoder backbone network to extract the original fault features of each sample and form the original fault feature matrix; S4: Based on the collaborative feature enhancement matrix, the original fault feature matrix is linearly mapped so that each sample feature interacts with the features of neighboring samples to obtain the enhanced feature matrix; S5: Construct a first classifier and a second classifier. Input the original fault feature matrix into the first classifier and the enhanced feature matrix into the second classifier to obtain the probability of the first fault category corresponding to the original fault features and the probability of the second fault category corresponding to the enhanced features, respectively. S6: Generate candidate pseudo-labels and maximum prediction confidence of unlabeled training samples based on the first classifier, and use a dynamic threshold function that changes with the training rounds to select high-confidence unlabeled training samples. S7: Construct a supervised classification loss based on labeled training samples, construct a pseudo-label loss based on high-confidence unlabeled training samples and their pseudo-labels, and construct a consistency collaborative loss based on the probability of the first fault category and the probability of the second fault category. S8: The joint optimization objective is constructed by using supervised classification loss, pseudo-label loss and consistency collaboration loss. The network parameters of the Transformer encoder backbone network, the first classifier and the second classifier are updated through backpropagation to obtain the trained semi-supervised gear fault diagnosis model. S9: In the online diagnosis phase, the test sample set is input into the trained semi-supervised gear fault diagnosis model. The Transformer encoder extracts fault features, and the classifier outputs the probability of each fault category. The gear fault diagnosis result is determined based on the category corresponding to the highest probability.
2. The semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation according to claim 1, characterized in that, Step S1 specifically involves: Step S11: Acquire the raw vibration signal using an accelerometer installed on the gearbox housing or bearing housing. ; Step S12: Process the original vibration signal Perform sliding window division, and let the window length be... Step size is Then the first The original vibration samples are: Step S13: Normalize the original vibration samples to obtain normalized vibration samples; Step S14: Based on whether the original vibration samples have fault category labels, divide the normalized vibration samples into labeled training sample sets. Unlabeled training sample set and test sample set ; This indicates that there are labeled training samples. One-hot encoding of the fault categories corresponding to the labeled training samples; This indicates that there are no labeled training samples. Indicates the test sample; Step S15: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Each labeled training sample and The unlabeled training samples are sorted to form a semi-supervised training batch: in, The number of sensor channels is indicated; the fault categories include at least one of the following: normal state, broken tooth fault, combined broken tooth and wear fault, pitting fault, combined pitting and wear fault, and wear fault.
3. The semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation according to claim 2, characterized in that, Step S2 specifically involves: Step S21: Construct an initial fault diagnosis model including a Transformer encoder backbone network and a classification network. The Transformer encoder backbone network includes: an input embedding layer, a position encoding layer, a multi-head self-attention layer, a feedforward neural network layer, a residual connection layer, and a layer normalization layer. Step S22: Pre-training phase using labeled training sample set As input, there will be labeled training samples. Input Transformer encoder backbone network The initial fault characteristics are obtained: Step S23: Input the initial fault features into the classification network The unnormalized classification score was obtained. and fault category probability : The pre-training loss uses cross-entropy loss: in, Let i be the one-hot encoding of the i-th labeled sample belonging to the c-th type of fault. Let be the probability that the i-th labeled sample belongs to the c-th type of fault; For the number of gear fault categories, minimize the cross-entropy loss. This enables the Transformer encoder to learn initial fault discrimination features from vibration signals, providing stable parameter initialization for subsequent semi-supervised training.
4. The semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation according to claim 2, characterized in that, Step S3 specifically involves: The semi-supervised training batch consists of labeled and unlabeled training samples. Input the pre-trained Transformer encoder For any sample in the semi-supervised training batch First, the initial sequence representation is obtained through input embedding and positional encoding: in, The output of the Transformer encoder embedding layer, and For embedding layer parameters, This is a positional encoding used to preserve the sequential information of different sampling positions in a time series; In the In the Transformer encoding layer, for the th Attention head, query matrix Key matrix Sum matrix They are respectively: in, For the first The output of each Transformer coding layer; , and For the first The learnable weight matrix corresponding to each attention head; No. The output of each attention head is: in, This is the scaling factor; The results from multiple attention heads are concatenated and linearly mapped to form a multi-head attention output: in, To output the projection matrix; After residual connections, layer normalization, and feedforward neural networks, the first... The output of the Transformer coding layer : in, For layer normalization processing, It is a feedforward neural network; go through After the Transformer encoder layer, global average pooling or class labeling is used to obtain the global fault features for each sample: For all samples in the batch, the original fault feature matrix extracted by the Transformer encoder is represented as: 。 5. The semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation according to claim 1, characterized in that, Step S4 specifically involves: Constructing a collaborative feature enhancement matrix For the original fault feature matrix Perform a linear mapping to obtain the enhanced feature matrix. : The collaborative feature enhancement matrix satisfies the following constraints: Where B is the size of the semi-supervised training batch. For matrix The element in row a, column b, For matrix The a-th row.
6. The semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation according to claim 1, characterized in that, Step S5 specifically involves: Build the first classifier Second classifier The first and second classifiers each consist of a fully connected layer, a normalization layer, a nonlinear activation layer, and a softmax output layer; the first classifier receives the original fault feature matrix. The second classifier receives the enhanced feature matrix. Output the probability of each fault category: in, for The i-th original fault feature in for The i-th enhanced feature, They represent the first The probability of the fault category obtained by classifying a sample through two classification branches.
7. The semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation according to claim 6, characterized in that, Step S6 specifically involves: Step S61: For unlabeled training samples, generate candidate pseudo-labels based on the output of the first classifier. and maximum prediction confidence : in, Let be the probability that the i-th unlabeled training sample output by the first classifier belongs to the c-th type of fault. Step S62: Construct a dynamic threshold function that varies with the training rounds, expressed as a percentage, for the th round... The dynamic threshold for round training is: Among them, the main growth item for: Oscillating term for: in, The total number of training rounds. and As the attenuation factor, Contribute weights to the preceding and following training phases. The logarithmic perturbation factor, The amplitude coefficient, For frequency coefficients, The coefficient is the exponential decay coefficient; when using probabilistic methods for pseudo-label filtering, the filtering criteria are: in, For indicator functions, when When, it indicates the first One unlabeled training sample was selected as a high-confidence unlabeled training sample and participated in pseudo-label training.
8. The semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation according to claim 7, characterized in that, Step S7 specifically involves: Step S71: In the semi-supervised training phase, construct a supervised classification loss based on the labeled training samples. : in, Let i be the one-hot encoding of the i-th labeled sample belonging to the c-th type of fault. This represents the probability that the i-th labeled training sample output by the first classifier belongs to the c-th type of fault. This represents the probability that the i-th labeled training sample output by the second classifier belongs to the c-th type of fault; Step S72: Construct a pseudo-label loss based on high-confidence unlabeled training samples and their pseudo-labels. : in, Candidate pseudo-labels The corresponding one-hot encoding; Candidate pseudo-labels One-hot encoding for type c faults, This represents the number of unlabeled training samples in the batch. Step S73: Construct the consistent collaborative loss: in, Let be the failure probability of the i-th unlabeled training sample output by the first classifier. This represents the failure probability of the i-th unlabeled training sample output by the second classifier.
9. The semi-supervised gear fault diagnosis method based on collaborative feature enhancement and dynamic threshold adaptation according to claim 8, characterized in that, The joint optimization objective in step S8 is: in, and The non-negative weighting coefficients are minimized. The semi-supervised gear fault diagnosis model improves diagnostic performance by utilizing the explicit supervision information from labeled samples, as well as the latent structural information from unlabeled samples and the consistency constraints of the two classification branches.
