A lightweight bearing fault diagnosis method based on multi-scale depth separable convolution

CN122986743APending Publication Date: 2026-10-27ANHUI UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611149723.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]然而,现有基于标准卷积或多尺度标准卷积的轴承故障诊断模型通常存在参数量大、计算量高的问题

Benefits of technology

1、本发明采用多尺度深度可分离卷积模块对输入样本进行特征提取,通过一维深度卷积层与逐点卷积层配合替代标准卷积结构,减少了模型参数数量和计算量,使轻量化诊断模型更适于部署在嵌入式监测系统、无线传感器节点和微控制器等资源受限的边缘设备中。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122986743A_ABST
    Figure CN122986743A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of bearing fault diagnosis, and particularly relates to a lightweight bearing fault diagnosis method based on multi-scale deep separable convolution, which comprises the following steps: collecting original vibration signals of a rolling bearing, pre-processing the original vibration signals to obtain input samples; constructing a lightweight diagnosis model, inputting the input samples into a multi-scale deep separable convolution module to extract multiple scale features; weighting and fusing the multiple scale features through a sub-block level channel attention module to obtain fused fault features; obtaining a prediction result of a fault category through the dot product of the category center vector of a classification head and the feature vector; constructing a combined loss function according to the fault category prediction result, the normalized feature vector and the normalized category center vector, and training the lightweight diagnosis model according to the combined loss function. The present application is used to reduce the parameter quantity and computational complexity of the bearing fault diagnosis model while improving the expression ability of the model to multi-scale local fault features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bearing fault diagnosis technology, and specifically to a lightweight bearing fault diagnosis method based on multi-scale depth separable convolution. Background Technology

[0002] Rolling bearings are critical components in rotating machinery, and their operating condition directly affects the safety and stability of the equipment. During long-term operation, bearings are prone to damage such as inner ring failure, outer ring failure, and rolling element failure due to factors such as load fluctuations, insufficient lubrication, assembly errors, and fatigue wear. Bearing failures typically manifest in vibration signals as impact components, periodic modulation components, and frequency band characteristic changes. Therefore, vibration signal-based bearing fault diagnosis methods are widely used in equipment condition monitoring.

[0003] Traditional bearing fault diagnosis methods typically rely on manual extraction of time-domain, frequency-domain, or time-frequency-domain features, followed by classifiers such as support vector machines and random forests for fault identification. These methods are highly dependent on human experience and are prone to problems such as insufficient feature representation and unstable category recognition under conditions of changing operating conditions, noise interference, and weak fault features.

[0004] With the development of deep learning technology, convolutional neural networks have been applied to bearing fault diagnosis. Existing methods typically segment and normalize the original vibration signal, then extract fault features using a one-dimensional convolutional neural network, and output the fault category using fully connected layers and a Softmax classifier. To extract fault features at different scales, some methods use multiple standard convolutional layers with different kernel sizes to process the vibration signal in parallel, and then concatenate or add the features output by each convolutional branch.

[0005] However, existing bearing fault diagnosis models based on standard convolution or multi-scale standard convolution typically suffer from large parameter counts and high computational costs. As the number of convolutional kernels, channels, and network layers increases, the model's storage overhead and floating-point operations increase significantly, making it difficult to deploy in resource-constrained edge devices such as embedded monitoring systems, wireless sensor nodes, and microcontrollers.

[0006] Meanwhile, existing multi-scale convolution methods typically fuse features from different scales by directly splicing or adding them together, lacking fine-tuning of the importance of different scale branches and channel features. Since the fault impact features in bearing vibration signals are localized and have weak amplitude characteristics, simple fusion methods easily introduce redundant and noisy features, affecting the representation effect of multi-scale fault features.

[0007] Furthermore, existing bearing fault diagnosis models often employ fully connected layers combined with Softmax classifiers for classification, making the classification results susceptible to changes in features. In industrial settings, vibration signal amplitudes vary with rotational speed, load, installation location, and acquisition conditions, leading to unstable classification boundaries. Additionally, training models solely using the cross-entropy loss function lacks sufficient constraints on the aggregation of similar features and the separation of features from different categories, easily resulting in loose intra-class distribution and unclear inter-class boundaries. Summary of the Invention

[0008] This invention aims to solve the above-mentioned technical problems by providing a lightweight bearing fault diagnosis method based on multi-scale depth separable convolution. While reducing the number of bearing fault diagnosis model parameters and computational complexity, it improves the model's ability to express multi-scale local fault features and enhances the discriminative power between different fault categories.

[0009] The objective of this invention can be achieved through the following technical solutions: A lightweight bearing fault diagnosis method based on multi-scale depth-separable convolution includes the following steps: The original vibration signal of the rolling bearing is collected, and the original vibration signal is preprocessed to obtain the input sample; A lightweight diagnostic model is constructed, which includes a multi-scale depthwise separable convolution module, a sub-block level channel attention module, a feature normalization module, and a category center classification head; The input sample is input into the multi-scale depthwise separable convolution module to extract features at multiple scales. The sub-block-level channel attention module performs weighted fusion of the multiple scale features to obtain fused fault features; global average pooling is used to process the fused fault features to obtain a feature matrix composed of multiple feature vectors; matrix multiplication is performed between the feature matrix and the transpose of the category center matrix in the category center classification head to obtain the fault category prediction result; the feature normalization module normalizes the feature vectors and the category center vectors in the category center matrix to obtain normalized feature vectors and normalized category centers; A combined loss function is constructed based on the fault category prediction results, the normalized feature vectors, and the normalized category centers, and the lightweight diagnostic model is trained based on the combined loss function. The combined loss function includes a cross-entropy loss applied to the fault category prediction results, an intra-class compaction loss used to constrain normalized feature vectors of the same fault category to be close to the corresponding normalized category centers, and an inter-class separation loss used to constrain the normalized category centers of different fault categories to be separated from each other.

[0010] Further, the original vibration signal is preprocessed to obtain input samples, including: dividing the original vibration signal into sample segments of fixed length according to a preset sample length; normalizing each sample segment to obtain normalized sample segments; and using the normalized sample segments as the input samples. Further, the multi-scale depth-separable convolution module includes a first multi-scale depth-separable convolution branch and a second multi-scale depth-separable convolution branch; the first multi-scale depth-separable convolution branch includes three parallel one-dimensional depth convolution layers with kernel sizes of 3, 5, and 7; the second multi-scale depth-separable convolution branch includes three parallel one-dimensional depth convolution layers with kernel sizes of 9, 11, and 13. Further, both the first and second multi-scale depth-separable convolution branches include multi-scale depth-separable convolution units. The multi-scale depth-separable convolutional unit includes three parallel one-dimensional depth convolutional layers, a sub-block level channel attention sub-module, a first batch normalization layer, a first SiLU activation layer, a first max pooling layer, a 1×1 pointwise convolutional layer, a second batch normalization layer, a second SiLU activation layer, and a second max pooling layer. The kernel sizes of the three parallel one-dimensional deep convolutional layers are set to k, k+2 and k+4 respectively. The stride of the three parallel one-dimensional deep convolutional layers is the same, and the feature length is kept unchanged by zero padding. The three parallel one-dimensional deep convolutional layers perform convolution processing on the features input to the corresponding branches to obtain three branch-scale features; the three branch-scale features are stacked according to the scale dimension to obtain a branch multi-scale stacked feature with shape B×3×C×L, where B is the batch size, C is the number of feature channels, and L is the feature length. The branch multi-scale stacked features are input into the sub-block level channel attention submodule for weighted processing to obtain branch weighted multi-scale features; the branch weighted multi-scale features are then fused element-wise according to the scale dimension to obtain branch fusion features with shape B×C×L. The branch fusion features are sequentially input into the first batch of normalization layers, the first SiLU activation layer, and the first max pooling layer for processing to obtain the first pooling feature. The first pooling feature is then input into the 1×1 pointwise convolutional layer for channel adjustment to obtain the channel adjustment feature. The channel adjustment feature is then sequentially input into the second batch of normalization layers, the second SiLU activation layer, and the second max pooling layer for processing to obtain the branch output feature. Further, the branch multi-scale stacked features are input into the sub-block-level channel attention submodule; the C feature channels in the branch multi-scale stacked features are respectively used as C sub-blocks, and the feature length dimension in the branch multi-scale stacked features is used as the statistical dimension. Global average pooling is performed on the branch multi-scale stacked features along the statistical dimension to obtain average pooled statistical features with shape B×3×C×1; global max pooling is performed on the branch multi-scale stacked features along the statistical dimension to obtain max pooled statistical features with shape B×3×C×1. The average pooling statistical features are input into a shared two-dimensional convolutional network to obtain a first attention intermediate feature; the max pooling statistical features are input into the shared two-dimensional convolutional network to obtain a second attention intermediate feature; the first attention intermediate feature and the second attention intermediate feature are added together and normalized using the Sigmoid function to obtain attention weights of shape B×3×C×1; the attention weights are broadcast and multiplied with the branch multi-scale stacked features to obtain the branch weighted multi-scale features of shape B×3×C×L. Further, the shared two-dimensional convolutional network includes a first 1×1 two-dimensional convolutional layer, a SiLU activation layer, and a second 1×1 two-dimensional convolutional layer. The first 1×1 two-dimensional convolutional layer has 3 input channels and 3 output channels, which is the integer result of dividing 3 by a preset compression factor of 0.5. The second 1×1 two-dimensional convolutional layer has 3 input channels and 3 output channels, which is the integer result of dividing 3 by the preset compression factor. The average pooling statistical features are input into the first 1×1 two-dimensional convolutional layer for convolution processing, activated by the SiLU activation layer, and then input into the second 1×1 two-dimensional convolutional layer for convolution processing to obtain the first attention intermediate feature with shape B×3×C×1. The max pooling statistical features are input into the first 1×1 two-dimensional convolutional layer for convolution processing, activated by the SiLU activation layer, and then input into the second 1×1 two-dimensional convolutional layer for convolution processing to obtain the second attention intermediate feature with shape B×3×C×1. Further, the fused fault features are normalized by the feature normalization module to obtain a normalized feature vector, including: performing global average pooling on the fused fault features to obtain a fault feature vector with shape B×D, where B is the batch size and D is the feature vector dimension; performing L2 normalization on the fault feature vector fi corresponding to the i-th sample to obtain the normalized feature vector corresponding to the i-th sample, where the normalized feature vector is represented as: in, This represents the L2 norm of the fault feature vector f; The category center classification head includes a learnable category center matrix, which has a shape of C×D, where C is the number of fault categories and D is the dimension of the feature vector. Define the category center vector corresponding to the j-th fault category in the j-th row of the learnable category center matrix; perform L2 normalization on the category center vector to obtain the normalized category center corresponding to the j-th fault category, wherein the normalized category center is represented as: in, Represents the category center vector The L2 norm.

[0011] Furthermore, the feature matrix is ​​multiplied by the transpose of the learnable category center matrix to obtain a fault category prediction matrix logits of shape B×C. The fault category prediction matrix logits is used as the classification logic value; the fault category prediction result is determined based on the maximum value of the prediction value corresponding to each fault category in the classification logic value.

[0012] Furthermore, a combined loss function is constructed based on the fault category prediction result, the normalized feature vector, and the normalized category center vector, including: Obtain the normalized feature vectors, true fault category labels, and classification logical values ​​corresponding to B input samples within a batch, wherein the true fault category labels constitute a label vector `labels` with a length of B; determine the cross-entropy loss based on the classification logical values ​​and the label vector `labels`. ; The intra-class compaction loss is determined based on the distance between the normalized feature vector corresponding to each input sample and the normalized class center vector indicated by the label vector. The intra-class compact loss Represented as: in, Here, centers[labels] is the normalized feature vector corresponding to the input samples within the batch, and centers[labels] is the normalized class center vector selected based on the label vector labels. 2 represents the sum of squares of the differences between the components of the vector, and mean represents the average value of the input samples within the batch; The inter-class separation loss is determined based on the distance between the normalized class center vectors corresponding to different fault categories and the preset interval parameter. The inter-class separation loss Represented as: Where p and q are the category numbers of different fault categories, margin is the preset interval parameter, centers[p] is the normalized category center vector corresponding to the p-th fault category, and centers[q] is the normalized category center vector corresponding to the q-th fault category. This means taking the larger of 0 and the value within the parentheses. This represents the average value of the category centers for different fault categories; based on the cross-entropy loss... The intra-class compaction loss and the inter-class separation loss Determine the combined loss function The combined loss function Represented as: in, and This is the loss weighting coefficient.

[0013] Furthermore, based on the aforementioned combined loss function The model parameters of the lightweight diagnostic model and the learnable class center matrix are updated using the gradient descent method. Repeat the update process of the model parameters and the learnable class center matrix until the preset training rounds are reached to obtain the trained lightweight diagnostic model; Real-time rolling bearing vibration signals are collected, preprocessed, and then input into the trained lightweight diagnostic model to obtain real-time fault category prediction results.

[0014] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention uses a multi-scale depth-separable convolutional module to extract features from input samples. By combining one-dimensional depth convolutional layers with pointwise convolutional layers to replace the standard convolutional structure, the number of model parameters and computational load are reduced, making the lightweight diagnostic model more suitable for deployment in resource-constrained edge devices such as embedded monitoring systems, wireless sensor nodes, and microcontrollers.

[0015] 2. This invention extracts vibration signal features within different scale ranges through a first multi-scale depth separable convolution branch and a second multi-scale depth separable convolution branch, and stacks and fuses multiple scale features according to scale dimensions, enabling the lightweight diagnostic model to simultaneously extract local impact features and fault change features within a wider scale range in rolling bearing vibration signals.

[0016] 3. This invention uses a sub-block-level channel attention module to weight multi-scale stacked features, taking the channel dimension as the sub-block dimension, and combining global average pooling, global max pooling, and shared convolutional networks to generate attention weights. This enables the model to perform differentiated recalibration of branches at different scales and sub-blocks at different channels, reducing the impact of redundant and noisy features on fault diagnosis results.

[0017] 4. This invention normalizes the class centers in the feature and classification head calculations, uses the normalized feature vectors and class centers to calculate intra-class compaction loss and inter-class separation loss, and uses a combined loss function including cross-entropy loss, intra-class compaction loss and inter-class separation loss to train a lightweight diagnostic model. This reduces the impact of feature magnitude variation on classification results and improves the consistency of features of the same type of fault and the distinguishability between different fault categories. Attached Figure Description

[0018] Figure 1 This is an overall flowchart of the lightweight bearing fault diagnosis method of the present invention; Figure 2 This is a schematic diagram of the multi-scale depth-separable convolution module structure of the present invention; Figure 3 This is a flowchart of the internal calculation process of the sub-block level channel attention module of the present invention. Detailed Implementation

[0019] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0020] like Figures 1 to 3 The lightweight bearing fault diagnosis method shown includes the following steps: The raw vibration signals of the rolling bearing are collected and preprocessed to obtain input samples. The continuously collected bearing vibration signals are converted into sample data suitable for processing by the lightweight diagnostic model. The data scale difference between different samples is reduced through preprocessing, providing a unified input basis for subsequent feature extraction.

[0021] A lightweight diagnostic model is constructed, which includes a multi-scale deep separable convolution module, a sub-block level channel attention module, a feature normalization module, and a category center classification head. The model structure required for bearing fault diagnosis is determined so that the lightweight diagnostic model can sequentially complete multi-scale feature extraction, feature weighted fusion, feature normalization, and fault category discrimination.

[0022] Input samples are fed into a multi-scale depth-separable convolutional module to extract features at multiple scales; different receptive fields are used to extract fault information at different scales from the rolling bearing vibration signal, and the number of parameters and computational cost in the feature extraction process are reduced by using a depth-separable convolutional structure.

[0023] A sub-block-level channel attention module weights and fuses features at multiple scales to obtain fused fault features. Weights are generated based on the importance of features at different scales and sub-blocks in different channels. Multiple scale features are then recalibrated and fused, reducing the impact of redundant and noisy features on subsequent diagnostic results. Global average pooling is used to process the fused fault features, yielding feature vectors. These feature vectors are then multiplied with the class centers in the classification head to obtain fault class predictions. A feature normalization module normalizes the fused fault features and the class centers in the classification head, resulting in normalized feature vectors and class centers. This transformation of the fused fault features and class centers into a unified-scale feature representation ensures that subsequent intra-class compactness loss and inter-class separation loss calculations only consider the angle between vectors.

[0024] A combined loss function is constructed based on the fault category prediction results, normalized feature vectors, and normalized class center vectors. A lightweight diagnostic model is then trained using this combined loss function. Cross-entropy loss constrains the fault category prediction results, intra-class compaction loss constrains the normalized feature vectors of the same fault category to move closer to their corresponding normalized class center vectors, and inter-class separation loss constrains the normalized class center vectors of different fault categories to separate from each other. This jointly optimizes the model parameters and class centers of the lightweight diagnostic model. The combined loss function includes cross-entropy loss applied to the fault category prediction results, intra-class compaction loss constraining the normalized feature vectors of the same fault category to move closer to their corresponding normalized class center vectors, and inter-class separation loss constraining the normalized class center vectors of different fault categories to separate from each other.

[0025] Specifically, the original vibration signal is preprocessed to obtain input samples, including the following specific implementation methods: The original vibration signal during the operation of the rolling bearing is collected by a vibration sensor installed at the test location of the rolling bearing. The original vibration signal is a one-dimensional time-series signal continuously acquired according to a preset sampling frequency. According to the input requirements of the lightweight diagnostic model, the sample length is preset, and the original vibration signal is divided into multiple sample segments of fixed length according to the sample length.

[0026] In one implementation, a sliding window approach can be used to segment the original vibration signal. Specifically, a window of length equal to a preset sample length is slid sequentially along the time direction of the original vibration signal, capturing one sample segment with each slide. The sliding distance between two adjacent sample segments can be preset based on the number of training samples and the real-time requirements of diagnosis. When the remaining data length at the end of the original vibration signal is less than the preset sample length, the insufficient data can be discarded, or it can be padded with zeros to form a sample segment of fixed length.

[0027] For each sample segment, its amplitude is normalized. Specifically, the amplitude distribution of each sampling point within the sample segment is first statistically analyzed, and then the amplitude of each sampling point within the sample segment is scaled according to the statistical results to ensure that the amplitudes of different sample segments are within a relatively uniform data range. This normalization process can reduce the impact of differences in vibration signal amplitudes from different acquisition batches, under different load conditions, and with different sensor installation states on model training and fault diagnosis results.

[0028] After normalization, each normalized sample segment is organized into one-dimensional input data that the lightweight diagnostic model can accept, and this one-dimensional input data is used as the input sample. During the training phase, the input samples are also assigned corresponding fault category labels; during the online diagnosis phase, the input samples are fed into the trained lightweight diagnostic model to obtain the corresponding fault category prediction results. Specifically, as follows... Figure 2 and Figure 3 As shown, the multi-scale depthwise separable convolution module includes a first multi-scale depthwise separable convolution branch and a second multi-scale depthwise separable convolution branch. These two branches are configured in parallel to extract convolutional features from the input samples at different scales. The first multi-scale depthwise separable convolution branch includes three parallel one-dimensional deep convolutional layers with kernel sizes of 3, 5, and 7, while the second multi-scale depthwise separable convolution branch includes three parallel one-dimensional deep convolutional layers with kernel sizes of 9, 11, and 13. In other words, the first multi-scale depthwise separable convolution branch uses a smaller kernel size group to perform convolution processing on the input samples, while the second multi-scale depthwise separable convolution branch uses a larger kernel size group.

[0029] Furthermore, both the first and second multi-scale depth-separable convolutional branches include multi-scale depth-separable convolutional units. Each multi-scale depth-separable convolutional unit comprises three parallel one-dimensional deep convolutional layers, a sub-block-level channel attention submodule, a first batch normalization layer, a first SiLU activation layer, a first max-pooling layer, a 1×1 pointwise convolutional layer, a second batch normalization layer, a second SiLU activation layer, and a second max-pooling layer. For each multi-scale depth-separable convolutional unit, the kernel sizes of the three parallel one-dimensional deep convolutional layers are set to k, k+2, and k+4, respectively. When the multi-scale depth-separable convolutional unit belongs to the first multi-scale depth-separable convolutional branch, k is 3; when it belongs to the second multi-scale depth-separable convolutional branch, k is 9. The stride of all three parallel one-dimensional deep convolutional layers is the same, and zero-padding is used to pad the features input to the corresponding branches, ensuring that the feature length remains unchanged before and after convolution processing.

[0030] During convolution processing, after the input samples are fed into the multi-scale depthwise separable convolution module, they enter the first and second multi-scale depthwise separable convolution branches, respectively. Within each branch, the features input to the corresponding branch are fed into three parallel one-dimensional depthwise convolutional layers. These three layers perform depthwise convolution processing according to their respective kernel sizes, resulting in three branch-scale features. Since the three parallel one-dimensional depthwise convolutional layers all use the same length and zero-padding, the three branch-scale features maintain consistency in the feature length dimension, facilitating subsequent stacking in the scale dimension.

[0031] Subsequently, the three branch-scale features are stacked according to the scale dimension to obtain the branch-multi-scale stacked feature. The shape of the branch-multi-scale stacked feature is B×3×C×L, where B represents the batch size, 3 represents the number of scales corresponding to the three different convolutional kernel sizes within the same branch, C represents the number of feature channels, and L represents the feature length. The branch-multi-scale stacked feature retains the scale dimension, channel dimension, and feature length dimension, and serves as the input to the sub-block-level channel attention submodule.

[0032] Specifically, after inputting the branch-scale stacked features into the sub-block-level channel attention submodule, the sub-block-level channel attention submodule treats the C feature channels in the branch-scale stacked features as C sub-blocks, and uses the feature length dimension in the branch-scale stacked features as the statistical dimension. Global average pooling is performed along the statistical dimension on the branch-scale stacked features to obtain average pooled statistical features of shape B×3×C×1; global max pooling is also performed along the statistical dimension to obtain max pooled statistical features of shape B×3×C×1.

[0033] Furthermore, the average pooling statistical features and max pooling statistical features are input into a shared two-dimensional convolutional network. The shared two-dimensional convolutional network includes a first 1×1 two-dimensional convolutional layer, a SiLU activation layer, and a second 1×1 two-dimensional convolutional layer. The first 1×1 two-dimensional convolutional layer has 3 input channels and the number of output channels is the integer result of dividing 3 by a preset compression factor of 0.5. The second 1×1 two-dimensional convolutional layer also has 3 input channels and the number of output channels. The average pooling statistical features are input into the first 1×1 two-dimensional convolutional layer for convolution processing, then activated by the SiLU activation layer, and then input into the second 1×1 two-dimensional convolutional layer for convolution processing, resulting in a first attention intermediate feature with a shape of B×3×C×1. The max pooling statistical features are processed using the same shared two-dimensional convolutional network to obtain a second attention intermediate feature with a shape of B×3×C×1.

[0034] The intermediate features of the first and second attention are added together and normalized using the Sigmoid function to obtain attention weights of shape B×3×C×1. These attention weights are then broadcast along the feature length dimension and multiplied element-wise with the branch-weighted multi-scale stacked features to obtain branch-weighted multi-scale features of shape B×3×C×L. This process preserves the feature structure corresponding to the three scale branches and performs weighting along both the scale and channel sub-block dimensions.

[0035] Furthermore, the branch-weighted multi-scale features are element-wise accumulated and fused according to the scale dimension to obtain a branch-fused feature of shape B×C×L. The branch-fused feature is then sequentially input into the first normalization layer, the first SiLU activation layer, and the first max-pooling layer for processing to obtain the first pooling feature. The first pooling feature is then input into a 1×1 pointwise convolutional layer for channel adjustment to obtain the channel-adjusted feature. The channel-adjusted feature is then sequentially input into the second normalization layer, the second SiLU activation layer, and the second max-pooling layer for processing to obtain the branch output feature.

[0036] In the first multi-scale depth-separable convolutional branch, the first branch output features are obtained according to the above processing procedure; in the second multi-scale depth-separable convolutional branch, the second branch output features are obtained according to the above processing procedure. The first branch output features and the second branch output features are used as inputs for subsequent fusion processing.

[0037] Specifically, global average pooling is used to convert the fused fault features into fixed-dimensional fault feature vectors. The extracted fault feature vectors are then multiplied with the class centers in the classification head to obtain the fault class prediction matrix logits. The shape of the logits matrix is ​​B×C, where B represents the number of input samples in the batch and C represents the number of fault classes. Each row in the logits matrix corresponds to one input sample, and each column corresponds to one fault class.

[0038] The element in the i-th row and j-th column of the logits matrix represents the similarity between the feature vector corresponding to the i-th input sample and the category center corresponding to the j-th fault category. After using the fault category prediction matrix logits as the classification logical value, for the i-th input sample, the predicted values ​​in each column of the i-th row of the classification logical value are compared, and the fault category with the largest predicted value is determined as the fault category prediction result for the i-th input sample.

[0039] The similarity relationship between feature vectors and category centers is converted into fault category judgment results. Through matrix multiplication, the similarity between each input sample in a batch and each fault category center can be calculated simultaneously, so that each input sample obtains a classification logical value corresponding to each fault category.

[0040] Furthermore, the fused fault features are normalized using a feature normalization module to obtain a normalized feature vector. This includes: performing global average pooling on the fused fault features to obtain a fault feature vector of shape B×D, where B is the batch size and D is the feature vector dimension. In one implementation, the feature vector dimension D can be set to 120. L2 normalization is then performed on the fault feature vector fi corresponding to the i-th sample to obtain the normalized feature vector corresponding to the i-th sample. The normalized feature vector is represented as: in, Let f represent the L2 norm of the fault feature vector f; after performing the above L2 normalization process on B input samples in the batch, a normalized feature matrix composed of multiple normalized feature vectors is obtained. The category center classification head includes a learnable category center matrix, which has a shape of C×D, where C is the number of fault categories and D is the feature vector dimension. Fault categories can include normal categories, inner ring fault categories, outer ring fault categories, and rolling element fault categories. The number of fault categories C can be set to 10. Define the class center vector corresponding to the j-th fault category in the j-th row of the learnable class center matrix; perform L2 normalization on the class center vector to obtain the normalized class center vector corresponding to the j-th fault category, which is expressed as: in, Represents the category center vector The L2 norm.

[0041] Global average pooling is used to convert the fused fault features into fixed-dimensional fault feature vectors, and then L2 normalization is applied to these fault feature vectors to obtain normalized feature vectors. Simultaneously, the learnable class center matrix in the class center classifier is limited, and the class center vectors are also L2 normalized to obtain normalized class center vectors. This serves to establish a unified scale for feature representation and class center representation for subsequent cosine similarity classification, allowing subsequent loss calculations to be based on the normalized feature vectors and class centers.

[0042] Specifically, a combined loss function is constructed based on the fault category prediction results, normalized feature vectors, and normalized category center vectors, including: Obtain the normalized feature vectors, true fault category labels, and classification logistic values ​​corresponding to the B input samples in the batch. The true fault category labels form a label vector `labels` with length B. Determine the cross-entropy loss based on the classification logistic values ​​and the label vector `labels`. ; The intra-class compaction loss is determined based on the distance between the normalized feature vector corresponding to each input sample and the normalized class center vector indicated by the label vector. Intraclass compact loss Represented as: in, Here, centers[labels] is the normalized feature vector corresponding to the input samples within the batch, and centers[labels] is the normalized class center vector selected based on the label vector labels. 2 represents the sum of squares of the differences between the components of the vector, and mean represents the average value of the input samples within the batch; The inter-class separation loss is determined based on the distance between the normalized class center vectors corresponding to different fault categories and the preset interval parameter. Inter-class separation loss Represented as: Where p and q are the category numbers of different fault categories, margin is the preset interval parameter, centers[p] is the normalized category center vector corresponding to the p-th fault category, and centers[q] is the normalized category center vector corresponding to the q-th fault category. This means taking the larger of 0 and the value within the parentheses. This represents the average value of the category centers for different fault categories; based on the cross-entropy loss... Intraclass compact loss and inter-class separation loss Determine the combined loss function Combination loss function Represented as: in, and This is the loss weighting coefficient.

[0043] Cross-entropy loss is used to measure the difference between the predicted fault category and the true fault category based on the classification logistic value and the true fault category label, enabling the model to learn to classify the input sample as the correct fault category.

[0044] Intra-class compact loss is used to constrain the normalized feature vector corresponding to each input sample to be close to the normalized class center vector corresponding to its true fault class, so that the sample features of the same fault class are more concentrated in the feature space, reducing the dispersion of samples of the same class due to changes in operating conditions, noise interference, or amplitude fluctuations.

[0045] Inter-class separation loss is used to constrain the normalized class center vectors corresponding to different fault categories to maintain a preset interval, so that different fault categories have clearer class boundaries in the feature space and reduce the probability of confusion between similar fault types.

[0046] The combined loss function is used to weight and fuse the cross-entropy loss, intra-class compaction loss, and inter-class separation loss to form a unified model training objective. This allows the lightweight diagnostic model to focus on both the accuracy of fault category prediction and the aggregation of similar features and the separation of dissimilar centers during training, thereby improving the discriminativeness of the normalized feature space.

[0047] Specifically, during the training phase, input samples with true fault category labels are fed into the lightweight diagnostic model. These samples sequentially pass through a multi-scale depthwise separable convolutional module, a sub-block-level channel attention module, a feature normalization module, and a category center classification head, yielding the corresponding classification logical value, normalized feature vector, and normalized category center vector for each input sample. Then, a combined loss function is calculated based on the classification logical value, true fault category label, normalized feature vector, and normalized category center vector. .

[0048] After obtaining the combination loss function Then, the combined loss function Backpropagation is performed to obtain the gradients corresponding to the parameters of each network layer in the lightweight diagnostic model, as well as the gradient corresponding to the learnable class center matrix. Subsequently, gradient descent is used to update the model parameters and the learnable class center matrix of the lightweight diagnostic model based on the gradients, so that the fault category prediction results output by the lightweight diagnostic model in subsequent iterations gradually approach the true fault category labels.

[0049] During each training round, input samples are read from the training sample set according to a preset batch size, and the forward propagation, combined loss function calculation, backpropagation, and parameter update processes are repeatedly executed. After completing one training round, the process continues to the next training round until the preset number of training rounds is reached. After training, the trained lightweight diagnostic model is saved, including the updated model parameters and the updated learnable class center matrix.

[0050] During the online diagnostic phase, real-time rolling bearing vibration signals are acquired and processed using the same preprocessing methods as in the training phase to obtain real-time input samples. These real-time input samples are then fed into the trained lightweight diagnostic model to sequentially obtain real-time normalized feature vectors, real-time classification logic values, and real-time fault category prediction results. The real-time fault category prediction results are used to represent the bearing operating state or fault type corresponding to the real-time rolling bearing vibration signals.

[0051] The training and inference phases of this embodiment include: Historical vibration data of rolling bearings are collected, and the corresponding fault types are labeled on the historical vibration data. The historical vibration data is segmented and normalized to obtain training input samples. The training input samples are input into a lightweight diagnostic model, and forward computation is performed through the lightweight diagnostic model to obtain normalized feature vectors, cosine similarity matrices, and fault category prediction results. The combined loss function is calculated based on the fault category prediction results, the true fault category labels, the normalized feature vectors, and the normalized category center vectors. Backpropagation is performed based on the combined loss function, and the model parameters and learnable category center matrix of the lightweight diagnostic model are updated. The forward computation, combined loss function calculation, and parameter update process are repeated until the preset training rounds are reached or the preset convergence condition is met. The trained lightweight diagnostic model and the updated learnable category center matrix are saved.

[0052] Real-time vibration signals of rolling bearings are collected; the real-time vibration signals are segmented and normalized using the same preprocessing method as in the training phase to obtain real-time input samples; the real-time input samples are input into the trained lightweight diagnostic model to obtain real-time normalized feature vectors and real-time cosine similarity matrices; the real-time cosine similarity matrix is ​​used as the classification logic value, and the fault category corresponding to the largest cosine similarity among the classification logic values ​​is selected as the real-time fault category prediction result.

[0053] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0054] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in sequences other than those illustrated or described herein.

[0055] The present invention has been further described above with reference to specific embodiments. However, it should be understood that the specific description herein should not be construed as limiting the nature and scope of the present invention. Various modifications made to the above embodiments by those skilled in the art after reading this specification are all within the scope of protection of the present invention.

Claims

1. A lightweight bearing fault diagnosis method based on multi-scale depth-separable convolution, characterized in that, Includes the following steps: The original vibration signal of the rolling bearing is collected, and the original vibration signal is preprocessed to obtain the input sample; A lightweight diagnostic model is constructed, which includes a multi-scale depthwise separable convolution module, a sub-block level channel attention module, a feature normalization module, and a category center classification head; The input sample is input into the multi-scale depthwise separable convolution module to extract features at multiple scales. The multiple scale features are weighted and fused using the sub-block-level channel attention module to obtain fused fault features; The fused fault features are processed by global average pooling to obtain a feature matrix composed of multiple feature vectors; the feature matrix is ​​multiplied by the transpose of the category center matrix in the category center classification head to obtain the fault category prediction result; the feature normalization module is used to normalize the feature vectors and the category center vectors in the category center matrix to obtain normalized feature vectors and normalized category centers. A combined loss function is constructed based on the fault category prediction results, the normalized feature vectors, and the normalized category centers, and the lightweight diagnostic model is trained based on the combined loss function. The combined loss function includes a cross-entropy loss applied to the fault category prediction results, an intra-class compaction loss used to constrain normalized feature vectors of the same fault category to be close to the corresponding normalized category centers, and an inter-class separation loss used to constrain the normalized category centers of different fault categories to be separated from each other.

2. The lightweight bearing fault diagnosis method based on multi-scale depth-separable convolution according to claim 1, characterized in that, The original vibration signal is preprocessed to obtain input samples, including: dividing the original vibration signal into sample segments of fixed length according to a preset sample length; normalizing each sample segment to obtain a normalized sample segment; and using the normalized sample segment as the input sample.

3. The lightweight bearing fault diagnosis method based on multi-scale depth-separable convolution according to claim 1, characterized in that, The multi-scale depth-separable convolutional module includes a first multi-scale depth-separable convolutional branch and a second multi-scale depth-separable convolutional branch; the first multi-scale depth-separable convolutional branch includes three parallel one-dimensional depth convolutional layers with kernel sizes of 3, 5 and 7 respectively; the second multi-scale depth-separable convolutional branch includes three parallel one-dimensional depth convolutional layers with kernel sizes of 9, 11 and 13 respectively.

4. The lightweight bearing fault diagnosis method based on multi-scale depth-separable convolution according to claim 3, characterized in that, Both the first multi-scale depth-separable convolution branch and the second multi-scale depth-separable convolution branch include multi-scale depth-separable convolution units; The multi-scale depth-separable convolutional unit includes three parallel one-dimensional depth convolutional layers, a sub-block level channel attention sub-module, a first batch normalization layer, a first SiLU activation layer, a first max pooling layer, a 1×1 pointwise convolutional layer, a second batch normalization layer, a second SiLU activation layer, and a second max pooling layer. The kernel sizes of the three parallel one-dimensional deep convolutional layers are set to k, k+2 and k+4 respectively. The stride of the three parallel one-dimensional deep convolutional layers is the same, and the feature length is kept unchanged by zero padding. The three parallel one-dimensional deep convolutional layers perform convolution processing on the features input to the corresponding branches to obtain three branch-scale features; The three branch scale features are stacked according to the scale dimension to obtain a branch multi-scale stacked feature with shape B×3×C×L, where B is the batch size, C is the number of feature channels, and L is the feature length. The branch multi-scale stacked features are input into the sub-block level channel attention submodule for weighted processing to obtain branch weighted multi-scale features; the branch weighted multi-scale features are then fused element-wise according to the scale dimension to obtain branch fusion features with shape B×C×L. The branch fusion features are sequentially input into the first batch of normalization layers, the first SiLU activation layer, and the first max pooling layer for processing to obtain the first pooling feature; the first pooling feature is input into the 1×1 pointwise convolutional layer for channel adjustment to obtain the channel adjustment feature; the channel adjustment feature is sequentially input into the second batch of normalization layers, the second SiLU activation layer, and the second max pooling layer for processing to obtain the branch output feature.

5. The lightweight bearing fault diagnosis method based on multi-scale depth-separable convolution according to claim 4, characterized in that, The branch multi-scale stacked features are input into the sub-block level channel attention submodule; the C feature channels in the branch multi-scale stacked features are respectively used as C sub-blocks, and the feature length dimension in the branch multi-scale stacked features is used as the statistical dimension; Global average pooling is performed on the branch multi-scale stacked features along the statistical dimension to obtain average pooled statistical features with shape B×3×C×1; global max pooling is performed on the branch multi-scale stacked features along the statistical dimension to obtain max pooled statistical features with shape B×3×C×1. The average pooling statistical features are input into a shared two-dimensional convolutional network to obtain the first attention intermediate features; the max pooling statistical features are input into the shared two-dimensional convolutional network to obtain the second attention intermediate features; the first attention intermediate features and the second attention intermediate features are added together and normalized by the Sigmoid function to obtain attention weights with shape B×3×C×1. The attention weights are broadcast and multiplied with the branch multi-scale stacked features to obtain the branch weighted multi-scale features with shape B×3×C×L.

6. The lightweight bearing fault diagnosis method based on multi-scale depth-separable convolution according to claim 5, characterized in that, The shared two-dimensional convolutional network includes a first 1×1 two-dimensional convolutional layer, a SiLU activation layer, and a second 1×1 two-dimensional convolutional layer; The first 1×1 two-dimensional convolutional layer has 3 input channels and 3 output channels, which is the integer result of dividing 3 by a preset compression factor of 0.

5. The second 1×1 two-dimensional convolutional layer has 3 input channels and 3 output channels, which is the integer result of dividing 3 by the preset compression factor. The average pooling statistical features are input into the first 1×1 two-dimensional convolutional layer for convolution processing, and then activated by the SiLU activation layer. They are then input into the second 1×1 two-dimensional convolutional layer for convolution processing to obtain the first attention intermediate features with shape B×3×C×1. The max pooling statistical features are input into the first 1×1 two-dimensional convolutional layer for convolution processing, and then activated by the SiLU activation layer. They are then input into the second 1×1 two-dimensional convolutional layer for convolution processing to obtain the second attention intermediate features with shape B×3×C×1.

7. The lightweight bearing fault diagnosis method based on multi-scale depth-separable convolution according to claim 1, characterized in that, The fused fault features are normalized using the feature normalization module to obtain a normalized feature vector. This includes: performing global average pooling on the fused fault features to obtain a fault feature vector of shape B×D, where B is the batch size and D is the feature vector dimension; and performing L2 normalization on the fault feature vector fi corresponding to the i-th sample to obtain the normalized feature vector corresponding to the i-th sample. The normalized feature vector is expressed as: in, This represents the L2 norm of the fault feature vector f; The category center classification head includes a learnable category center matrix, which has a shape of C×D, where C is the number of fault categories and D is the dimension of the feature vector. Define the category center vector corresponding to the j-th fault category in the j-th row of the learnable category center matrix; perform L2 normalization on the category center vector to obtain the normalized category center corresponding to the j-th fault category, wherein the normalized category center is represented as: in, Represents the category center vector The L2 norm.

8. The lightweight bearing fault diagnosis method based on multi-scale depth-separable convolution according to claim 7, characterized in that, The feature matrix is ​​multiplied by the transpose of the learnable class center matrix to obtain a fault class prediction matrix logits of shape B×C. The fault category prediction matrix logits is used as the classification logic value; the fault category prediction result is determined based on the maximum value of the prediction value corresponding to each fault category in the classification logic value.

9. The lightweight bearing fault diagnosis method based on multi-scale depth-separable convolution according to claim 8, characterized in that, A combined loss function is constructed based on the fault category prediction result, the normalized feature vector, and the normalized category center vector, including: Obtain the normalized feature vectors, true fault category labels, and classification logical values ​​corresponding to B input samples within a batch, wherein the true fault category labels constitute a label vector `labels` with a length of B; determine the cross-entropy loss based on the classification logical values ​​and the label vector `labels`. ; The intra-class compaction loss is determined based on the distance between the normalized feature vector corresponding to each input sample and the normalized class center vector indicated by the label vector. The intra-class compact loss Represented as: in, Here, centers[labels] is the normalized feature vector corresponding to the input samples within the batch, and centers[labels] is the normalized class center vector selected based on the label vector labels. 2 represents the sum of squares of the differences between the components of the vector, and mean represents the average value of the input samples within the batch; The inter-class separation loss is determined based on the distance between the normalized class center vectors corresponding to different fault categories and the preset interval parameter. The inter-class separation loss Represented as: Where p and q are the category numbers of different fault categories, margin is the preset interval parameter, centers[p] is the normalized category center vector corresponding to the p-th fault category, and centers[q] is the normalized category center vector corresponding to the q-th fault category. This means taking the larger of 0 and the value within the parentheses. This represents the average value of the category centers for different fault categories; based on the cross-entropy loss... The intra-class compaction loss and the inter-class separation loss Determine the combined loss function The combined loss function Represented as: in, and This is the loss weighting coefficient.

10. The lightweight bearing fault diagnosis method based on multi-scale depth-separable convolution according to claim 9, characterized in that, Based on the combined loss function The model parameters of the lightweight diagnostic model and the learnable class center matrix are updated using the gradient descent method. Repeat the update process of the model parameters and the learnable class center matrix until the preset training rounds are reached to obtain the trained lightweight diagnostic model; Real-time rolling bearing vibration signals are collected, preprocessed, and then input into the trained lightweight diagnostic model to obtain real-time fault category prediction results.