Gearbox fault diagnosis method based on adaptive convolution and differential translation attention
Patent Information
- Application Number
- CN202611434683.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-10-27
AI Technical Summary
(1)在实际工业环境中,传感器采集的信息往往遭受背景噪声的干扰,并且在故障初期的设备,其故障特征及其微弱;现有的模型在低信噪比下的诊断精度不高,发现早期微弱故障的能力不足;
(1)利用离散小波变换对原始信号进行多频带分解,并结合后续自适应尺度卷积对不同子带特征进行局部模式提取,从而增强信号多尺度特征表达能力,提高模型对复杂故障特征的感知与识别能力;
Smart Images

Figure CN122986397A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mechanical equipment fault testing and diagnosis technology, and in particular to a gearbox fault diagnosis method based on adaptive convolution and differential translation attention. Background Technology
[0002] Gearboxes, as core transmission components of rotating machinery, are widely used in wind power generation, rail transportation, aerospace, and other fields. Due to prolonged operation under harsh conditions such as high speed, heavy load, and variable operating conditions, gears are highly susceptible to failure, thus affecting the normal operation of rotating equipment. Therefore, research on gearbox fault diagnosis is of significant value.
[0003] Currently, gearbox fault diagnosis methods are mainly divided into three categories: signal processing-based methods, traditional machine learning-based methods, and deep learning-based methods.
[0004] Signal processing-based methods, such as Fast Fourier Transform, Wavelet Transform, and Empirical Mode Decomposition, extract time-frequency domain features from vibration signals for fault identification. Among these, Wavelet Transform is widely used due to its excellent time-frequency localization properties. However, these methods rely on manual feature engineering, resulting in strong subjectivity in feature selection and difficulty in adapting to complex and changing working conditions.
[0005] Traditional machine learning methods, such as support vector machines and artificial neural networks, achieve automatic fault identification by training classifiers. These methods reduce human intervention to some extent, but still require manual feature extraction, and their simple model structures make them difficult to adapt to complex fault modes.
[0006] In recent years, with the continuous development of deep learning, research on using deep learning to solve fault diagnosis tasks for rotating equipment has gradually increased. Due to its powerful feature self-learning capability, it avoids the problem of manual feature extraction required by traditional methods. Significant progress has been made in the field of fault diagnosis.
[0007] However, existing deep learning-based diagnostic methods still have the following shortcomings: (1) In actual industrial environments, the information collected by sensors is often subject to interference from background noise, and the fault characteristics of equipment in the early stage of failure are very weak; the existing models have low diagnostic accuracy under low signal-to-noise ratio and are not capable of detecting early weak faults. (2) Existing multi-scale attention methods mainly achieve scale information modeling by fusing different receptive field features. Their focus is more on multi-scale expression at the feature representation level, while they are relatively insufficient in characterizing change information at different time scales. (3) In multi-scale feature extraction, existing methods usually use fixed weights to fuse the outputs of convolution kernels at different scales. However, the fault feature intensity of gearbox fault signals varies in different frequency bands and time locations. Fixed fusion weights cannot be dynamically adjusted according to signal characteristics, which limits the expressive power of the model. Summary of the Invention
[0008] The purpose of this invention is to overcome the above-mentioned defects in the existing technology and propose a gearbox fault diagnosis method based on adaptive convolution and differential translation attention, which aims to improve the accuracy of gear fault diagnosis, especially to effectively achieve fault detection in strong noise environment.
[0009] The technical solution of this invention is: a gearbox fault diagnosis method based on adaptive convolution and differential translation attention, comprising the following steps: S1. Signal acquisition and preprocessing: Acquire multi-channel vibration signals from the gearbox to form the original dataset; S2. Segment the dataset from step S1 to obtain several samples. Each sample contains the same number of data points. Each sample includes data points, fault category labels, and operating condition labels. S3. Construct the DAS-Net model and train it using training set samples; S4. Input the test set samples into the DAS-Net model obtained after training in step S3, output the probability of each type of gear fault corresponding to the sample, and select the category corresponding to the highest probability as the final fault diagnosis result of the sample.
[0010] In step S1 of the present invention, several acceleration sensors are installed on the bearing housing of the gearbox or on the gearbox housing. Vibration signals in the horizontal, axial, and vertical directions are collected by an accelerometer, and the vibration signals collected in the three directions are combined into a multi-channel vibration signal.
[0011] In step S2, the dataset consisting of one-dimensional vibration signals collected by the accelerometer is segmented: the original dataset obtained in step S1 is divided into training set, validation set and test set according to a ratio of 7:1:2; then the sliding window method is used to segment the samples.
[0012] In step S3, the training process of the DAS-Net model is as follows: S3.1. Extract multi-scale features of training set samples using the discrete wavelet transform adaptive multi-scale convolution module; S3.2 Utilize the differential translation multi-scale adaptive attention mechanism to process the downsampled token feature sequence. Perform temporal feature enhancement.
[0013] The specific implementation process of step S3.1 is as follows: S3.1.1 Perform discrete wavelet transform on the training set samples and test set samples, use the predicted wavelet basis function to perform multi-level wavelet decomposition on the training set samples and test set samples, extract multi-scale features on the signal frequency band, and upsample the decomposition coefficients of each level to the original signal length; S3.1.2, Regarding the original signal Discrete wavelet transform is performed, and nearest neighbor interpolation is used to upsample the detail coefficients to the original signal length L to obtain the upsampled detail components of each layer. Perform feature concatenation to obtain the feature concatenation quantity. : , in, The number of detail components; S3.1.3, Feature splicing amount obtained in step S3.1.2 Input an adaptive multi-scale convolutional backbone network and output high-dimensional temporal features. ; Adaptive multi-scale convolutional backbone networks include One-dimensional parallel convolutional sub-layer and adaptive gated fusion sub-layer: Each convolutional kernel in the one-dimensional parallel convolutional layer has a different size, respectively targeting the input features. Perform convolution operations to obtain multiple branches and concatenate them into an output. , : , in, Indicates the convolution output; Indicates the number of convolution branches; Indicates the first One-dimensional convolutional branch; Adaptive gated fusion sublayer accepts multi-branch output First of all, regarding Global pooling is performed to obtain : , in, This is the result after global pooling. , For the real number field; Batch size; This represents the number of channels after pooling. Will The weights are generated by inputting the fully connected layer. : , in, This represents the adaptive scale fusion weight matrix output by the gated network; Indicates the first The adaptive fusion weights correspond to each convolutional branch; B represents the batch size, and N represents the number of convolutional branches. Indicates a fully connected layer; This represents the normalized exponential function; Output each branch Weights of each branch We perform weighted summation to obtain high-dimensional time series features. : , in, This represents the activation function. Indicates the batch normalization layer; S3.1.4 After feature projection and downsampling, the high-dimensional temporal features obtained in step S3.1.3 are transformed... The token feature sequence is obtained by projecting the convolutional layer onto a preset dimension of the model and then performing average pooling. .
[0014] The implementation process of step S3.2 is as follows: S3.2.1, the token feature sequence obtained after downsampling The input consists of a multi-layer stacked DS-MAA encoder layer, each of which includes a multi-scale differential adaptive attention sublayer, a feedforward network sublayer, residual connections, and a layer normalization operation. S3.2.2, Fusing the output of the multi-layered stacked DS-MAA encoder layers. Input feedforward network and residual connections and layer normalization.
[0015] In step S3.2.1, the construction process of the DS-MAA encoder layer is as follows: S3.2.1.1 Constructing transient difference branches: For Token feature sequence Perform transient difference operations to obtain transient difference features: , in, Indicates the first The feature vector at each token position Indicates the first The feature vector at each token position This indicates the transient change characteristics between adjacent tokens; S3.2.1.2 Constructing multi-scale translation difference branches: Set translation delay step For Token feature sequences Perform translation difference operations to obtain multi-scale translation difference features: , in, Indicates the first Feature vectors at each token position; Indicates delay The corresponding translation difference features; S3.2.1.3, Perform multi-branch self-attention modeling: After transient difference and translation difference processing, several difference feature branches are obtained, including transient difference branches and several translation difference branches; For each difference feature branch, construct independent query matrix, key matrix, and value matrix, expressed as follows: , in, Indicates the first Each differential feature branch Indicates the first i The query matrix corresponding to each branch; Indicates the first i The key matrix corresponding to each branch; Indicates the first i The value matrix corresponding to each branch , and These represent the learnable linear mapping weight matrices corresponding to each branch; Self-attention is calculated for each branch separately to obtain the branch attention output: , in, This represents the normalized exponential function; This represents the feature dimension corresponding to each attention head; Indicates the first Enhanced features of each difference branch after self-attention modeling; S3.2.1.4 Perform dynamic soft router gating integration: The attention outputs of each branch are concatenated along the channel dimension to obtain the multi-branch fused feature: , in, This represents the multi-branch enhancement feature after splicing; for The output; This represents the enhanced feature obtained after self-attention modeling of the transient difference branch; , , These represent translation delay steps of 1 and 2 respectively. , and The enhanced features obtained by self-attention modeling of the translation difference branch; Gated networks generate the weight distribution of each branch through a two-layer nonlinear transformation: , in, and All represent learnable parameters; Indicates the activation function; get and satisfy ,in, This represents the dynamic gating weights corresponding to the transient difference branches; , , These represent translation delay steps of 1 and 2 respectively. , and The dynamic gating weights corresponding to the translation difference branches; The final fused output of the DS-MAA encoder layer is: 。
[0016] The specific implementation process of step S3.2.2 is as follows: S3.2.2.1, After the first residual connection and layer normalization, the following is obtained: : , in, Representation layer normalization; Represents the random deactivation function; S3.2.2.2, Input the results of the first residual connection and layer normalization output into the feedforward network to obtain... : , in, This represents a feedforward neural network; S3.2.2.3, the output of the feedforward network The second residual connection and layer normalization are input to obtain the output of the Transformer layer. : , S3.2.2.4, Output of the Transformer layer After stacking several layers, the output of the last Transformer layer is denoted as... ,Will Input the attention pooling layer sublayer and the classification head to obtain the classification result; The attention pooling sublayer consists of a linear layer and a softmax normalization layer. The output of the attention pooling sublayer is... Represented as: , in, This represents the normalized exponential function; Indicates a fully connected layer; The output of the above attention pooling sublayer By inputting the classification header, the predicted probability of the sample category, i.e., the gear fault category, can be obtained. : , in, This is the weight matrix of the first fully connected layer; This is the weight matrix of the second fully connected layer; Indicates the activation function; This is the bias vector of the first fully connected layer; This is the bias vector for the second fully connected layer; The training set samples and validation set samples are input into the DAS-Net model for training. The optimal DAS-Net model is saved after the model fits or reaches the number of rounds set by the early stopping mechanism. The test set sample categories can be output by loading the optimal model for inference test set samples.
[0017] The beneficial effects of this invention are: (1) The original signal is decomposed into multiple frequency bands by using discrete wavelet transform, and local pattern extraction of different sub-band features is performed by combining the subsequent adaptive scale convolution, thereby enhancing the signal's multi-scale feature expression ability and improving the model's ability to perceive and identify complex fault features. (2) The Differential Shift Multi-scale Adaptive Attention module (DS-MAA) proposed in this application enhances local impact through transient difference, constructs change features at different time scales through multi-scale shift difference, and realizes adaptive learning of multi-scale temporal information by using dynamic gating fusion and self-attention modeling, thereby achieving collaborative modeling of fault impact information and global temporal structure information.
[0018] (3) By combining discrete wavelet transform, adaptive multi-scale convolution and differential translation multi-scale adaptive attention mechanism, the ability to represent weak fault features and changes in different time scales under noisy conditions is enhanced, and the ability to distinguish between different gear fault types is improved, thereby improving the accuracy and robustness of gearbox fault diagnosis under strong noise conditions. Attached Figure Description
[0019] Figure 1 This is a flowchart of the method described in this application; Figure 2 This is a flowchart of the discrete wavelet transform adaptive multi-scale convolution module; Figure 3 This is a flowchart of the differential translation multi-scale adaptive attention mechanism proposed in this application; Figure 4 This is a flowchart of the DAS-Net model proposed in this application. Detailed Implementation
[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0021] Specific details are set forth in the following description to provide a full understanding of the invention. However, the invention can be practiced in many ways other than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0022] This application discloses a gearbox fault diagnosis method based on adaptive convolution and differential translation attention, the flowchart of which is shown below. Figure 1 As shown. The method includes the following steps.
[0023] The first step is signal acquisition and preprocessing, which involves acquiring multi-channel vibration signals from the gearbox to form the original dataset.
[0024] In this embodiment, multiple sensors are installed on the bearing housing inside the gearbox or on the gearbox housing. These sensors are accelerometers, and multiple accelerometers are used to collect data in the horizontal direction. Direction, axis The direction of the direction of the vertical direction is Vibration signals from three directions are collected and combined to form a multi-channel vibration signal. In this embodiment, the sampling frequency of the accelerometer is 5120 Hz.
[0025] The second step is to segment the dataset obtained in the first step to obtain several samples. Each sample contains the same number of data points, and each sample includes: data points, fault category labels, and operating condition labels.
[0026] The dataset consisting of one-dimensional vibration signals collected by an accelerometer is segmented as follows: First, the original data is read and divided into training, validation, and test sets in a ratio of 7:1:2; then, the sliding window method is used for sample segmentation. In this application, the sample length is set to 2048, the overlap rate is set to 0, and each sample contains vibration signals in three directions, so the sample dimension is [2048, 3].
[0027] The third step is to build the DAS-Net model and train it using the training set.
[0028] The DAS-Net model first uses discrete wavelet transform to perform multi-scale time-frequency decomposition on the input multi-channel vibration signal, and then concatenates the original signal with high-frequency detail components from each layer to obtain enhanced multi-scale input features. Subsequently, the enhanced multi-scale features are used to extract local multi-scale fault features through one-dimensional convolutional branches with different receptive fields, and an adaptive gating mechanism is used to weight and fuse the features from each scale branch to obtain high-dimensional temporal features. Then, one-dimensional convolution is projected onto a preset embedding dimension, and temporal downsampling is performed through pooling to obtain a token feature sequence. Further, the token sequence is used to construct feature change representations at different time scales through transient difference branches and multi-scale translation difference branches, and combined with self-attention and dynamic gating fusion mechanisms to obtain the enhanced temporal feature output. Finally, the temporal feature output is input into a pooling layer and a classification head, outputting the predicted probabilities of K gear state categories, and the category corresponding to the highest predicted probability is used as the gearbox fault diagnosis result.
[0029] The DAS-Net model is trained using the training set, and the specific process is as follows.
[0030] First, the multi-scale features of the training set samples are extracted using the discrete wavelet transform adaptive multi-scale convolution module, and the implementation process is as follows.
[0031] (i) Perform discrete wavelet transform on the training set samples and test set samples, and use prediction wavelet basis functions, such as db4, sym4, etc., to perform multi-level wavelet decomposition on the training set samples and test set samples, extract multi-scale features on the signal frequency band, and upsample the decomposition coefficients of each level to the original signal length.
[0032] (II) On the original signal Discrete wavelet transform is performed, and nearest neighbor interpolation is used to upsample the detail coefficients to the original signal length L to obtain the upsampled detail components of each layer. Then the original signal The feature concatenation is obtained by concatenating the features of each layer's upsampled detail components along the channel dimension. : , in, In this embodiment, the number of detail components is... .
[0033] (III) Receive the feature splicing data obtained from the above steps. Input an adaptive multi-scale convolutional backbone network and output high-dimensional temporal features. .
[0034] Adaptive multi-scale convolutional backbone networks include Each layer consists of a one-dimensional parallel convolutional sublayer and an adaptive gated fusion sublayer. In the one-dimensional parallel convolutional layer, each convolutional kernel has a different size, which affects the input features. Perform convolution operations to obtain multiple branches and concatenate them into an output. , .
[0035] , in, Indicates the convolution output. Indicates the number of convolution branches. Indicates the first Each convolutional branch has a different temporal receptive field: small kernels are used to extract local peaks, minor defects on the tooth surface, and short-term impacts; large kernels are used to extract long-range modulation, wear trends, and low-frequency envelope information.
[0036] Adaptive gated fusion sublayer accepts multi-branch output First, through a learnable gating network, for Global pooling is performed to obtain : , in, This is the result after global pooling. , For the real number field; Batch size; This represents the number of channels after pooling.
[0037] Then, The weights are generated by inputting the fully connected layer. : , in, , where represents the adaptive fusion weight corresponding to the i-th convolutional branch, B represents the batch size, and N represents the number of convolutional branches; Indicates the first Adaptive fusion weights corresponding to each convolutional branch; Indicates a fully connected layer; This represents the normalized exponential function.
[0038] The outputs of each branch are weighted and summed with the fusion weights of each branch to obtain high-dimensional time-series features. : , in, This represents the activation function. This indicates the batch normalization layer.
[0039] (iv) After feature projection and downsampling, the high-dimensional time-series features obtained in the above steps are transformed. The token feature sequence is obtained by projecting it onto a predefined dimension of the model through a convolutional layer and then performing average pooling. .
[0040] Second, the token feature sequence obtained after downsampling is processed using a differential translation multi-scale adaptive attention mechanism. Perform temporal feature enhancement.
[0041] By extracting local variation features between adjacent time points through transient differential branching, and constructing feature variation representations at different time delay scales through multi-scale differential adaptive attention sublayers, the model's ability to represent fault impact information, periodic variation information, and long-range temporal dependencies is enhanced. Simultaneously, a dynamic gating fusion mechanism is introduced to adaptively weight and fuse the output features of different multi-scale differential adaptive attention sublayers, enabling the model to automatically select more discriminative time scale information based on the characteristic state of the input vibration signal.
[0042] First, the downsampled token feature sequence is input into a multi-layered stacked DS-MAA encoder layer. Each DS-MAA encoder layer includes a multi-scale differential adaptive attention sublayer, a feedforward network sublayer, residual connections, and layer normalization operations. The DS-MAA encoder layer proposed in this application no longer relies on the single feature correlation modeling method in the traditional multi-head attention mechanism. Instead, it extracts the changing features of the input token feature sequence at different time scales by constructing transient differential branches and multi-scale translational differential branches.
[0043] The construction process of the DS-MAA encoder layer is as follows.
[0044] A. Construct the transient difference branch. Let the token feature sequence of the input multi-scale difference adaptive attention sublayer be... , This represents the temporal feature representation obtained after feature projection and temporal downsampling. To enhance the local variation information between adjacent time steps, the token feature sequence is... Perform transient difference operations to obtain transient difference features: , in, Indicates the first The feature vector at each token position Indicates the first The feature vector at each token position This represents the transient change characteristics between adjacent tokens. This transient difference branch is used to highlight the local abrupt response caused by gear failure impact and suppress slowly changing background components.
[0045] B. Construct a multi-scale translation difference branch. To further extract feature change information at different time intervals, multiple translation delay steps are set. and the token feature sequence Perform translation difference operations to obtain multi-scale translation difference features: , in, Indicates the translation delay step size. Indicates the first The feature vector at each token position Indicates delay The corresponding translation difference features. By setting multiple different... The values can be used to construct differential branches at different time scales. Smaller translation delay steps are used to capture local transient impact changes, while larger translation delay steps are used to sense relatively long-range periodic modulation information, thus taking into account the time response differences under different fault modes.
[0046] C. Perform multi-branch self-attention modeling. After transient differencing and translational differencing, multiple difference feature branches are obtained, including transient differencing branches and several translational differencing branches. For each difference feature branch, an independent query matrix, key matrix, and value matrix are constructed, with the following expressions: , in, Indicates the first Each differential feature branch , and They represent the first i The query matrix, key matrix, and value matrix corresponding to each branch. , and These represent the learnable linear mapping weight matrices corresponding to each branch. Then, self-attention is calculated for each branch to obtain the branch attention output: , in, This represents the normalized exponential function used to calculate attention weights; This represents the feature dimension corresponding to each attention head; Indicates the first Enhanced features of the difference branches after self-attention modeling. By performing self-attention modeling on different difference branches separately, the model can learn the fault impact features and temporal dependencies at different time scales.
[0047] D. Perform dynamic soft-router gating fusion. To adaptively fuse features from different differential branches without manually setting fixed fusion weights, the attention outputs of each branch are concatenated along the channel dimension to obtain multi-branch fused features: , in, This represents the multi-branch enhancement feature after splicing; for The output. This represents the enhanced feature obtained after self-attention modeling of the transient difference branch; , , These represent translation delay steps of 1 and 2 respectively. , and The enhanced features are obtained by self-attention modeling of the translation difference branch.
[0048] Gated networks generate the weight distribution of each branch through a two-layer nonlinear transformation: , in and All are learnable parameters; This represents the activation function.
[0049] Therefore, we get and satisfy ;in, This represents the dynamic gating weights corresponding to the transient difference branches; These represent translation delay steps of 1 and 2 respectively. , and The dynamic gating weights corresponding to the translational difference branches.
[0050] The final fused output of the DS-MAA encoder layer is: , Through the Softmax competition mechanism, different branches can dynamically adjust their contribution ratios based on the current sample features, enabling the model to automatically select the time scale information with the greatest discriminative power.
[0051] (ii) Fusing the output of multi-layer stacked DS-MAA encoder layers The specific process for inputting the feedforward network and residual connections, along with layer normalization, is as follows.
[0052] A. After undergoing the first residual connection and layer normalization, the following is obtained: : , in, Representation layer normalization; This represents the random deactivation function.
[0053] B. Input the results of the first residual connection and layer normalization output into the feedforward network to obtain... : , in, This represents a feedforward neural network.
[0054] C. The output of the feedforward network The second residual connection and layer normalization are input to obtain the output of the Transformer layer. : , D. Output of the Transformer layer Multiple layers are stacked, and the output of the last Transformer layer is denoted as... ,Will Input the attention pooling layer sublayer and the classification head to obtain the classification result.
[0055] The attention pooling sublayer consists of a linear layer and a softmax normalization layer. The output of the attention pooling sublayer is... Represented as: , in, This represents the normalized exponential function; This indicates a fully connected layer.
[0056] The output of the above attention pooling sublayer By inputting the classification header, you can obtain the predicted probability of the sample category, i.e., the gear fault category. : , in, This is the weight matrix of the first fully connected layer; This is the weight matrix of the second fully connected layer; Indicates the activation function; This is the bias vector of the first fully connected layer; This is the bias vector for the second fully connected layer.
[0057] The training and validation sets are input into the DAS-Net model above for training. Training ends when the early stopping mechanism is triggered or after all epochs are completed, and the best DAS-Net model is loaded and saved.
[0058] The fourth step is to input the test set samples into the DAS-Net model obtained after training. After the model propagates forward, the classification head outputs the probability of each type of gear fault corresponding to the sample. The gear fault categories include gear cracks, tooth surface wear, broken teeth, tooth surface pitting, and healthy. The category with the highest probability is selected as the final fault diagnosis result of the sample.
[0059] In this embodiment, the initial settings are 100 epochs, 32 batch size, and 2048 signal segment length. The optimizer is selected as follows. The initial learning rate is The learning rate scheduler is a cosine annealing scheduler, and the weight decay is... Based on the gearbox vibration characteristics, a publicly available dataset was selected as the training dataset. The dataset was divided into a training set, a validation set, and a test set in a ratio of 7:1:2, with an overlap rate of 0.
[0060] To simulate real-world experimental conditions, this implementation uses additive white Gaussian noise to construct fault dataset samples under different signal-to-noise ratios. The formula is as follows: , Table 1 Comparison of Transformer before and after improvement
[0061] Table 1 shows that the DAS-Net model described in this application represents an improvement in noise signal classification, and maintains a high classification accuracy even in strong noise environments.
[0062] The above provides a detailed description of the gearbox fault diagnosis method based on adaptive convolution and differential translation attention provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this invention. The above description of the disclosed embodiments enables those skilled in the art to implement or use this invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of this invention. Therefore, this invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A gearbox fault diagnosis method based on adaptive convolution and differential translation attention, characterized in that, Includes the following steps: S1. Signal acquisition and preprocessing: Acquire multi-channel vibration signals from the gearbox to form the original dataset; S2. Segment the dataset from step S1 to obtain several samples. Each sample contains the same number of data points. Each sample includes data points, fault category labels, and operating condition labels. S3. Construct the DAS-Net model and train it using training set samples; S4. Input the test set samples into the DAS-Net model obtained after training in step S3, output the probability of each type of gear fault corresponding to the sample, and select the category corresponding to the highest probability as the final fault diagnosis result of the sample.
2. The gearbox fault diagnosis method based on adaptive convolution and differential translation attention as described in claim 1, characterized in that, In step S1, several acceleration sensors are installed on the bearing housing of the gearbox or on the gearbox housing. Vibration signals in the horizontal, axial, and vertical directions are collected by an accelerometer, and the vibration signals collected in the three directions are combined into a multi-channel vibration signal.
3. The gearbox fault diagnosis method based on adaptive convolution and differential translation attention as described in claim 1, characterized in that, In step S2, the dataset consisting of one-dimensional vibration signals collected by the accelerometer is segmented: the original dataset obtained in step S1 is divided into a training set, a validation set, and a test set in a ratio of 7:1:
2. Then, the sliding window method was used for sample segmentation.
4. The gearbox fault diagnosis method based on adaptive convolution and differential translation attention as described in claim 1, characterized in that, In step S3, the training process of the DAS-Net model is as follows: S3.
1. Extract multi-scale features of training set samples using the discrete wavelet transform adaptive multi-scale convolution module; S3.2 Utilize the differential translation multi-scale adaptive attention mechanism to process the downsampled token feature sequence. Perform temporal feature enhancement.
5. The gearbox fault diagnosis method based on adaptive convolution and differential translation attention according to claim 4, characterized in that, The specific implementation process of step S3.1 is as follows: S3.1.1 Perform discrete wavelet transform on the training set samples and test set samples, use the predicted wavelet basis function to perform multi-level wavelet decomposition on the training set samples and test set samples, extract multi-scale features on the signal frequency band, and upsample the decomposition coefficients of each level to the original signal length; S3.1.2, the original signal Discrete wavelet transform is performed, and nearest neighbor interpolation is used to upsample the detail coefficients to the original signal length L to obtain the upsampled detail components of each layer. Perform feature concatenation to obtain the feature concatenation quantity. : , in, The number of detail components; S3.1.3, Feature splicing amount obtained in step S3.1.2 Input an adaptive multi-scale convolutional backbone network and output high-dimensional temporal features. ; Adaptive multi-scale convolutional backbone networks include One-dimensional parallel convolutional sub-layer and adaptive gated fusion sub-layer: Each convolutional kernel in the one-dimensional parallel convolutional layer has a different size, respectively targeting the input features. Perform convolution operations to obtain multiple branches and concatenate them into an output. , : , in, Indicates the convolution output; Indicates the number of convolution branches; Indicates the first One-dimensional convolutional branch; Adaptive gated fusion sublayer accepts multi-branch output First of all, regarding Global pooling is performed to obtain : , in, This is the result after global pooling. , For the real number field; Batch size; This represents the number of channels after pooling. Will The weights are generated by inputting the fully connected layer. : , in, This represents the adaptive scale fusion weight matrix output by the gated network; Indicates the first The adaptive fusion weights correspond to each convolutional branch; B represents the batch size, and N represents the number of convolutional branches. Indicates a fully connected layer; This represents the normalized exponential function; Output each branch Weights of each branch We perform weighted summation to obtain high-dimensional time series features. : , in, This represents the activation function. Indicates the batch normalization layer; S3.1.4 After feature projection and downsampling, the high-dimensional temporal features obtained in step S3.1.3 are transformed... The token feature sequence is obtained by projecting the convolutional layer onto a preset dimension of the model and then performing average pooling. .
6. The gearbox fault diagnosis method based on adaptive convolution and differential translation attention according to claim 4, characterized in that, The implementation process of step S3.2 is as follows: S3.2.1, the token feature sequence obtained after downsampling The input consists of a multi-layer stacked DS-MAA encoder layer, each of which includes a multi-scale differential adaptive attention sublayer, a feedforward network sublayer, residual connections, and a layer normalization operation. S3.2.2, Fusing the output of the multi-layered stacked DS-MAA encoder layers. Input feedforward network and residual connections and layer normalization.
7. The gearbox fault diagnosis method based on adaptive convolution and differential translation attention as described in claim 6, characterized in that, In step S3.2.1, the construction process of the DS-MAA encoder layer is as follows: S3.2.1.1 Constructing transient difference branches: For Token feature sequence Perform transient difference operations to obtain transient difference features: , in, Indicates the first The feature vector at each token position Indicates the first The feature vector at each token position This indicates the transient change characteristics between adjacent tokens; S3.2.1.2 Constructing multi-scale translation difference branches: Set translation delay step For Token feature sequences Perform translation difference operations to obtain multi-scale translation difference features: , in, Indicates the first Feature vectors at each token position; Indicates delay The corresponding translation difference features; S3.2.1.3, Perform multi-branch self-attention modeling: After transient difference and translation difference processing, several difference feature branches are obtained, including transient difference branches and several translation difference branches; For each difference feature branch, construct independent query matrix, key matrix, and value matrix, expressed as follows: , in, Indicates the first Each differential feature branch Indicates the first i The query matrix corresponding to each branch; Indicates the first i The key matrix corresponding to each branch; Indicates the first i The value matrix corresponding to each branch , and These represent the learnable linear mapping weight matrices corresponding to each branch; Self-attention is calculated for each branch separately to obtain the branch attention output: , in, This represents the normalized exponential function; This represents the feature dimension corresponding to each attention head; Indicates the first Enhanced features of each difference branch after self-attention modeling; S3.2.1.4 Perform dynamic soft router gating integration: The attention outputs of each branch are concatenated along the channel dimension to obtain the multi-branch fused feature: , in, This represents the multi-branch enhancement feature after splicing; for The output; This represents the enhanced feature obtained after self-attention modeling of the transient difference branch; , , These represent translation delay steps of 1 and 2 respectively. , and The enhanced features obtained by self-attention modeling of the translation difference branch; Gated networks generate the weight distribution of each branch through a two-layer nonlinear transformation: , in, and All represent learnable parameters; Indicates the activation function; get and satisfy ,in, This represents the dynamic gating weights corresponding to the transient difference branches; , , These represent translation delay steps of 1 and 2 respectively. , and The dynamic gating weights corresponding to the translation difference branches; The final fused output of the DS-MAA encoder layer is: 。 8. The gearbox fault diagnosis method based on adaptive convolution and differential translation attention according to claim 6, characterized in that, The specific implementation process of step S3.2.2 is as follows: S3.2.2.1, After the first residual connection and layer normalization, the following is obtained: : , in, Representation layer normalization; Represents the random deactivation function; S3.2.2.2, Input the results of the first residual connection and layer normalization output into the feedforward network to obtain... : , in, This represents a feedforward neural network; S3.2.2.3, the output of the feedforward network The second residual connection and layer normalization are input to obtain the output of the Transformer layer. : , S3.2.2.4, Output of the Transformer layer After stacking several layers, the output of the last Transformer layer is denoted as... ,Will Input the attention pooling layer sublayer and the classification head to obtain the classification result; The attention pooling sublayer consists of a linear layer and a softmax normalization layer. The output of the attention pooling sublayer is... Represented as: , in, This represents the normalized exponential function; Indicates a fully connected layer; The output of the above attention pooling sublayer By inputting the classification header, the predicted probability of the sample category, i.e., the gear fault category, can be obtained. : , in, This is the weight matrix of the first fully connected layer; This is the weight matrix of the second fully connected layer; Indicates the activation function; This is the bias vector of the first fully connected layer; This is the bias vector for the second fully connected layer; The training set samples and validation set samples are input into the DAS-Net model for training. The optimal DAS-Net model is saved after the model fits or reaches the number of rounds set by the early stopping mechanism. The test set sample categories can be output by loading the optimal model for inference test set samples.