Bearing fault diagnosis method and system under uneven conditions of variable speed working conditions and samples, and storage medium
Patent Information
- Application Number
- CN202611178397.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-20
AI Technical Summary
[0011]为了解决时变转速工况下轴承振动信号受转速调制、故障冲击特征辨识度不足,导致实际工程应用中轴承故障识别精度受限的技术问题,本发明提供了一种用于轴承故障诊断的门控特征金字塔时序特征提取方法
1、在时序特征提取方法中,首先采用四组配置不同卷积核与空洞率的深度可分离卷积分支并行处理输入信号,在多个感受野尺度下同时捕获短时细微故障冲击与长时转速调制特征,且深度可分离卷积的轻量化结构从源头控制了参数量与计算开销;随后通过三级时域下采样构建通道数逐层翻倍、时间分辨率逐层降低的特征金字塔层级,并在每一层级独立接入Mamba块,利用选择性状态空间模型的线性时间复杂度优势完成各分辨率下的长程时序依赖建模,充分挖掘不同尺度下的故障演化规律;最终采用自顶向下的门控融合机制,以高层语义特征生成的自适应门控权重逐级向下调制低层细节特征,筛选保留与故障相关的有效分量、抑制转速波动带来的无关扰动,最终输出多尺度信息互补的增强时序特征,在维持极低参数规模与计算成本的前提下,显著提升了变速非平稳信号下故障特征的辨识度与表征能力。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of bearing fault diagnosis technology, specifically a gated feature pyramid temporal feature extraction method for bearing fault diagnosis, a training method for a variable speed bearing fault diagnosis model oriented to unbalanced samples, a bearing fault diagnosis method under variable speed operating conditions and unbalanced samples, a bearing fault diagnosis system under variable speed operating conditions and unbalanced samples, and a computer-readable storage medium. Background Technology
[0002] Bearings are critical equipment in energy, transportation, and high-end manufacturing sectors, and their health directly impacts production safety and operational efficiency. However, these devices are prone to various failures due to environmental disturbances and changes in operating conditions. Even more challenging is the fact that many devices in industrial settings do not operate at constant speeds; for example, the bearing speed in vehicle transmission systems varies with road conditions, and production line equipment experiences frequent start-ups and shutdowns. These time-varying speed operating conditions cause signals to exhibit non-stationary characteristics, significantly increasing the difficulty of fault diagnosis.
[0003] For fault diagnosis under time-varying speed conditions, traditional spectral methods (such as Fourier transform) struggle to effectively handle non-stationary vibration signals. To address this, sequential tracking techniques have been introduced, resampling non-stationary time-domain signals to a stationary angular domain to extract speed-related fault features. However, this method heavily relies on accurate speed measurement signals, which is often insufficient in real-world industrial scenarios. Therefore, researchers have turned to more adaptive time-frequency analysis techniques, such as short-time Fourier transform and wavelet transform. In recent years, a series of advanced time-frequency analysis methods have emerged. Zhang proposed a multi-extraction speed synchronous linear frequency modulation transform, which achieves efficient and accurate extraction of instantaneous frequencies of multi-component signals through adaptive linear frequency modulation parameter search, high-order instantaneous frequency iterative estimation, and synchronous extraction operator, thereby improving the fault diagnosis performance of variable speed bearings (Zhang, WY, Wu, TH, Xue, ZK, Zhang, B., Wang, C., & Luo, H. (2024). Toward efficient and accurate extraction of instantaneous frequency with chirplet transform and its applications in bearing fault diagnosis. Mechanical Systems and Signal Processing, 209, 111116.). Jiang adaptively segmented the signal using spectral trends, then quantified the fault information of each mode using characteristic harmonic peak values, and finally automatically filtered fault-related modes using difference ratios (Jiang, ZH, Li, FC, Li, MZ, & Xu, X. (2025). Noise-robust compound fault feature extraction of variable speed rotating machinery via an amplitude modulation-driven decomposition framework. Advanced Engineering Informatics, 67, 103501.). Although such methods can effectively identify fault characteristics, their performance still depends heavily on key parameter settings and their generalization ability is limited.
[0004] With the development of machine learning, intelligent fault diagnosis methods have become a research focus. Chen proposed an end-to-end fault diagnosis architecture based on multi-channel calibration and window shifting of Transformer (Chen, ZH, Chen, JL, Liu, S., Feng, Y., He, S., & Xu, E. (2022). Multi-channel CalibratedTransformer with Shifted Windows for few-shot fault diagnosis under sharpspeed variation. ISA Transactions.). Ma combined the time-domain and frequency-domain features of vibration signals and proposed an efficient time-frequency domain fusion network with a dual encoder and single decoder architecture (Ma, R., Chen, J., Feng, Y., Zhou, Z., & Xie, J. (2025). TFD-former: Time-frequency domain fusiondecoders for effective and robust fault diagnosis under time-varying speeds. Knowledge-Based Systems, 316, 113410.).
[0005] These models can efficiently identify mechanical faults under time-varying speed conditions. However, in practice, obtaining fault samples (especially rare faults) is extremely costly and scarce, while normal samples account for the vast majority. This data pattern is further amplified in the complex context of time-varying speeds, which can easily lead to the model overfitting to the majority class, while its ability to identify fault modes in the key minority classes is insufficient and its generalization performance is reduced.
[0006] Considering the imbalanced data situation of fault categories, Sun et al. selected a portion of frequencies from the spectrum as node features to construct a frequency time-series graph that can map time-varying fault information, and then designed a graph generative classification adversarial network (Sun, S., Xia, X., & Zhou, H. (2025). A graph representation learning-based method for fault diagnosis of rotating machinery under time-varying speed conditions. Nonlinear Dynamics, 113, 17449–17475.). This network uses a generator to expand the training samples and assists the classifier in mining fault feature information in the graph to achieve diagnosis. However, this method relies on complex spectrum analysis and graph structure processing, resulting in high computational cost and difficulty in industrial deployment. Li et al. assigned differentiated oversampling weights to different samples based on sample density and relative distance, and used variable K-nearest neighbors (VKNNs) to increase minority class samples, thereby solving the problem of imbalanced and unevenly distributed fault data. However, clustering, distance matrix and other operations brought a large iterative computational overhead (Li, S., Peng, YF, Shen, YP, Zhao, S., Shao, H., Bin, G., Guo, Y., Yang, X., & Fan, C. (2024). Rolling bearing fault diagnosis under dataimbalance and variable speed based on adaptive clustering weightedoversampling. Reliability Engineering and System Safety, 244, 109938.).In addition, Xu et al. combined continuous wavelet transform, stochastic Fourier eigenmaps, and sample weighting and feature decorrelation mechanisms to mine the intrinsic features of bearing faults using ResNet34, achieving effective fault diagnosis. However, the multi-layer nonlinear operations required for stochastic Fourier features and feature decorrelation also led to high computational costs (Xu, ZB, Lee, CKM, & Wong, CN (2025). A novel fault diagnosis method based on deep stable learning for bearings with imbalanced data samples. Expert Systems with Applications, 281, 127634.).
[0007] While existing diagnostic models have demonstrated excellent performance in diagnosing class imbalance faults under time-varying conditions, they still have the following challenges and limitations: 1. The collected samples exhibit an imbalance in quantity across different categories. When there are few samples of a certain type of fault, the effective information available for characterizing fault features is very limited. Especially under time-varying speed conditions, different fault characteristics may exhibit similar distribution characteristics in a single signal domain, making it difficult for the model to effectively capture their subtle differences. This poses a significant challenge to the model's feature extraction capabilities. Although existing methods can achieve good fault diagnosis, traditional time-frequency analysis methods rely heavily on key parameter settings, and intelligent fault diagnosis largely depends on complex data preprocessing procedures, with cumbersome model structures and high computational costs.
[0008] 2. Existing research, when addressing class imbalance, often focuses on the difference in sample size between healthy and faulty states, but fails to adequately consider the distribution imbalance that also exists among fault categories. In real-world industrial scenarios, the frequency of occurrence of different fault types often varies significantly. This skewed distribution within the fault sample can cause the model to be biased towards relatively common fault modes, resulting in insufficient ability to identify a few or rare faults, thus affecting the overall reliability and safety of the diagnostic system.
[0009] 3. The computing resources and deployment conditions in industrial sites are usually limited. Therefore, while ensuring the accuracy and stability of diagnosis, intelligent fault diagnosis methods should also minimize the parameter scale and computing overhead as much as possible.
[0010] In summary, existing time-varying speed bearing fault diagnosis technologies have not yet formed a complete and adaptable solution from low-level feature extraction and mid-level model training to high-level system application, making it difficult to simultaneously address three major engineering challenges: At the feature extraction level, it cannot simultaneously consider the accurate modeling of multi-scale non-stationary fault features and lightweight computational overhead. Traditional time-frequency methods are highly parameter-dependent and lack generalization ability under operating conditions, while existing deep networks have redundant structures and high barriers to edge deployment. At the training and optimization level, insufficient attention is paid to the imbalance distribution within fault categories. Existing imbalance handling algorithms generally have high computational complexity, and supervised contrastive learning does not fully utilize the supervision signals of scarce samples, making it difficult to effectively curb the problems of model bias towards the majority class and degradation of minority class recognition performance. At the overall diagnosis level, the complementary information value of multi-channel sensor signals has not been fully released, making it impossible to achieve high-precision and high-robust bearing fault diagnosis simultaneously in industrial sites with limited sample numbers and computing resources, thus restricting the large-scale application of intelligent diagnostic technology in variable speed equipment. Summary of the Invention
[0011] To address the technical problem that bearing vibration signals are modulated by rotational speed and lack sufficient identification of fault impact features under time-varying speed conditions, thus limiting the accuracy of bearing fault identification in practical engineering applications, this invention provides a gated feature pyramid temporal feature extraction method for bearing fault diagnosis.
[0012] To address the technical problem of high false negative rates for rare faults in the trained diagnostic model due to the difficulty in collecting bearing fault samples in industrial settings and the significant differences in the number of samples for different fault types, this invention provides a training method for a variable speed bearing fault diagnosis model oriented towards imbalanced samples.
[0013] To address the technical challenges of insufficient overall identification accuracy and poor reliability of existing diagnostic solutions in industrial settings, which are caused by variable speed operation, uneven distribution of fault samples, and limited computing power of monitoring equipment, making it difficult to meet the needs of on-site operation and maintenance, this invention provides a bearing fault diagnosis method under variable speed operating conditions and uneven sample distribution.
[0014] Based on the above three methods, the present invention also provides a bearing fault diagnosis system under variable speed conditions and sample imbalance conditions, and a computer-readable storage medium.
[0015] To achieve the above objectives, the present invention provides the following technical solution: A gated feature pyramid temporal feature extraction method for bearing fault diagnosis receives a one-dimensional vibration temporal signal of bearing operation acquired by a vibration sensor, performs feature encoding processing on the vibration temporal signal, and outputs multi-scale temporal features for fault classification and identification, including the following steps: The vibration time series signal is input in parallel into four groups of depth-separable convolutional branches with different kernel sizes and hole rates to extract local time series features under different receptive fields. Channel attention adaptive recalibration is performed on each local time series feature, and then the features are concatenated along the channel dimension and fused by convolution to obtain the basic time series features. The basic temporal features are downsampled in the temporal domain at three levels to form three-layer pyramid features with different resolutions. Mamba blocks are then connected to each layer of pyramid features to perform long-range temporal dependency modeling on each layer of features, thereby obtaining the dependency-enhanced temporal features of the corresponding layer. A top-down gating fusion strategy is adopted for the three-layer dependency enhancement time series features. The low-level features are aligned to the high-level time scale. The gating weights generated by the high-level semantic features are used to modulate the low-level features step by step. Finally, the features of each level are mapped to a unified scale and then fused by mean fusion to output multi-scale time series features for bearing fault classification.
[0016] As a further improvement to the above scheme: the kernel and dilation ratio combinations of the four groups of depthwise separable convolutional branches are (3,1), (5,2), (9,3), and (15,4) respectively; the channel attention adopts the SE channel attention mechanism to adaptively recalibrate the feature response of each channel and strengthen the feature channels related to fault impact; the number of channels of the pyramid features from the bottom layer to the top layer doubles and the time length is halved layer by layer. The shapes of the low, medium and high-level features corresponding to the first, second and third layers are (B,C,L), (B,2C,L / 2), and (B,4C,L / 4) respectively, where B is the batch size, C is the number of basic channels, and L is the time length of the basic temporal feature.
[0017] As a further improvement to the above solution, the gating fusion strategy specifically includes: The first-level dependency-enhanced temporal features and the second-level dependency-enhanced temporal features are aligned to the time scale of the third-level dependency-enhanced temporal features through average pooling. The first gate weight is generated from the third-level dependency enhancement temporal features, and the aligned second-level dependency enhancement temporal features are then subjected to element-wise weighted modulation to obtain the modulated second-level features. The second gate weights are generated from the modulated second-level features, and the aligned first-level dependency enhancement temporal features are subjected to element-wise weighted modulation to obtain the modulated first-level features. The third-level dependent enhanced temporal features, the modulated second-level features, and the modulated first-level features are uniformly mapped to the same number of channels and time scale, and then mean fusion is performed to output multi-scale temporal features.
[0018] A training method for a variable speed bearing fault diagnosis model oriented towards imbalanced samples is proposed. Based on a variable speed bearing vibration sample set with fault category labels constructed from vibration sensors, the method divides the sample into a training set and a validation set, constructs a diagnostic network, and iteratively optimizes the network parameters using a loss function to generate a bearing fault diagnosis model that can be deployed in industrial monitoring equipment. The method includes the following training steps: The feature encoding unit of the diagnostic network uses a gated feature pyramid temporal feature extraction method for bearing fault diagnosis to extract features from the input vibration time-series signal; Data augmentation is applied to each sample in the training set to generate an augmented view. The original signal of the sample is used as the original view, and the original view and the corresponding augmented view form a homologous positive sample pair. The original view is input into the online diagnostic network to obtain the original view embedding features, and the augmented view is input into the EMA teacher network to obtain the augmented view stable embedding features. A joint loss function is used to train the diagnostic network end-to-end: the classification branch uses a weighted cross-entropy loss based on the number of effective samples, and assigns differentiated class weights according to the number of training samples in each class to improve the loss gradient contribution of fault classes with fewer than a set threshold; the representation branch uses a homologous weighted supervised contrastive loss, which constructs a sample feature set based on the original view embedding features and the enhanced view stable embedding features, uses the feature embeddings of samples of the same class as positive sample pairs, and applies weighted reinforcement constraints to the cross-view positive sample pairs corresponding to the same sample to improve the intra-class clustering and inter-class separability of the feature space; After training convergence, the diagnostic network parameters are saved to obtain a fault diagnosis model that can be deployed on bearing condition monitoring equipment.
[0019] As a further improvement to the above scheme: In the homologous weighted supervised contrast loss, the weight of the cross-view positive sample pair consisting of the original view embedding features and the enhanced view stable embedding features corresponding to the same sample is greater than the weight of the positive sample pair consisting of different samples of the same kind.
[0020] A bearing fault diagnosis method under variable speed operating conditions and sample imbalance conditions, which collects vibration time-series signals of the bearing during operation using dual-channel vibration sensors arranged at the bearing measuring points, inputs the preprocessed signals into a fault diagnosis model for calculation, outputs the bearing fault category results, and uses them for equipment health status management, including the following steps: The vibration time series signal was preprocessed by slicing it into equal-length slices and normalizing it to obtain standardized dual-channel samples; The two signals of the standardized dual-channel sample are respectively input into two independent symmetric coding branches of the fault diagnosis model. Each coding branch adopts the gated feature pyramid temporal feature extraction method for bearing fault diagnosis and outputs single-channel temporal features respectively. Two single-channel temporal features are input into a bidirectional cross-attention module. The single-channel temporal features of any coding branch are used as queries and the single-channel temporal features of the other coding branch are used as keys and values for bidirectional attention interaction. The resulting two-channel interactive temporal features are then output. The single-channel temporal features after two-way interaction are fused by adaptive gating to obtain joint features, which are then input into the Mamba block for global temporal dependency modeling to obtain global dependency-enhanced joint features. Attention pooling is applied to the global dependency enhancement joint features to obtain global feature representations. The input to the classification head outputs bearing fault category diagnosis results. The fault diagnosis model used to obtain the diagnosis results is trained using a sample imbalance-oriented variable speed bearing fault diagnosis model training method. The diagnostic results are output to the equipment operation and maintenance management unit to trigger corresponding health status prompts or warning actions.
[0021] As a further improvement to the above scheme, adaptive gating fusion specifically refers to: The single-channel temporal features after two-way interaction are concatenated along the channel dimension, and after 1×1 convolution and batch normalization, the gate weights G are generated by the Sigmoid activation function. First, the gating weight G is multiplied element-wise with the temporal feature Fx after interaction with the first coding branch. Then, (1-G) is multiplied element-wise with the temporal feature Fy after interaction with the second coding branch. Finally, the results of the two element-wise multiplications are concatenated along the channel dimension to obtain the joint feature F.
[0022] As a further improvement to the above scheme, bearing failure categories include four types: healthy condition, inner ring failure, outer ring failure, and ball failure.
[0023] A bearing fault diagnosis system under variable speed operating conditions and sample imbalance conditions includes: The vibration acquisition module includes a dual-channel vibration sensor arranged at the bearing measuring point to acquire two vibration signals during the bearing operation. The preprocessing module is used to slice and normalize the acquired vibration signals to obtain standardized samples. The diagnostic calculation module contains a fault diagnosis model trained by a training method for variable speed bearing fault diagnosis model oriented to unbalanced samples. It is used to execute the bearing fault diagnosis method under variable speed conditions and unbalanced sample conditions and generate bearing fault category results. The operation and maintenance output module is used to receive diagnostic results and output bearing health status prompts, or trigger corresponding fault warnings and operation and maintenance scheduling instructions.
[0024] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a gated feature pyramid temporal feature extraction method for bearing fault diagnosis, or a training method for a variable speed bearing fault diagnosis model oriented towards sample imbalance, or a bearing fault diagnosis method under variable speed operating conditions and sample imbalance conditions.
[0025] Compared with the prior art, the beneficial effects of the present invention are: 1. In the temporal feature extraction method, four sets of depthwise separable convolutional branches with different configurations of convolutional kernels and dilation rates are first used to process the input signal in parallel. This captures short-term subtle fault impacts and long-term speed modulation features at multiple receptive field scales. The lightweight structure of depthwise separable convolution controls the number of parameters and computational overhead from the source. Subsequently, a feature pyramid hierarchy is constructed by three-level temporal downsampling, with the number of channels doubling layer by layer and the temporal resolution decreasing layer by layer. Mamba blocks are independently connected to each level. The linear time complexity advantage of the selective state-space model is used to complete the long-range temporal dependency modeling at each resolution, fully exploring the fault evolution law at different scales. Finally, a top-down gating fusion mechanism is adopted. The adaptive gating weights generated by high-level semantic features modulate the low-level detailed features step by step, filtering and retaining the effective components related to the fault and suppressing irrelevant disturbances caused by speed fluctuations. Finally, enhanced temporal features with complementary information at multiple scales are output. Under the premise of maintaining extremely low parameter scale and computational cost, the identification and representation ability of fault features under variable speed non-stationary signals are significantly improved.
[0026] 2. In the bearing fault diagnosis model training method, firstly, a lightweight data augmentation method with slight temporal shift and Gaussian noise injection is used to generate a homologous augmented view for each sample. This expands the supervision density of effective training samples without introducing a complex generative model, especially alleviating the feature sparsity problem caused by the scarcity of minority class samples. Secondly, a class-reweighted cross-entropy loss based on the number of effective samples is adopted. Differentiated loss weights are dynamically allocated according to the number of samples in each class, explicitly amplifying the gradient contribution of minority fault classes and correcting the model bias dominated by the majority class from the classification decision boundary level. Furthermore, homologous weighted supervised contrastive loss is used. On the basis of aggregating positive samples of the same class, additional weights are applied to the high-confidence positive sample pairs formed by cross-views of the same sample to strengthen them. Even in scenarios with a limited number of minority class samples, it can still provide stable and reliable feature consistency constraints. Combined with the smooth embedding features generated by the EMA teacher network, the intra-class clustering and inter-class discrimination are improved from the feature space level. Finally, through the weighted joint end-to-end optimization of classification loss and contrastive loss, the model performance degradation caused by sample imbalance is effectively alleviated under controllable training computation costs, and the recognition accuracy and training stability of rare fault types are significantly improved.
[0027] 3. In the bearing fault diagnosis method, a vibration acquisition scheme with radial and axial dual-channel physical layout is first adopted to obtain complementary fault impact signals from different load directions, thereby improving the richness of the original fault information from the data input end and making up for the insufficient information density of single-channel signals in the case of scarce samples. Secondly, two parameter-independent symmetric coding branches are adopted to call the lightweight gated feature pyramid temporal feature extraction method to complete multi-scale feature encoding for the two signals respectively, which is adapted to the non-stationary signal characteristics under variable speed conditions. Moreover, the entire process adopts the Mamba structure with depth separable convolution and linear complexity to strictly control the number of parameters and inference overhead of the overall network. Subsequently, a bidirectional cross-attention module is used to achieve cross-channel information interaction between the two features, mining the fault correlation characteristics between different sensing directions and further amplifying the complementary information gain. Then, adaptive gating fusion and fusion-level Mamba block are used to complete global temporal dependency modeling, resulting in more discriminative global fault features. Finally, the fault category results are output through attention pooling and classification head, directly driving on-site audible and visual warnings, operation and maintenance work order push and other physical control actions, forming a complete technical closed loop from physical signal acquisition to engineering operation and maintenance implementation. Under the condition of limited edge computing power, it simultaneously ensures the adaptability to variable speed conditions, the robustness of sample imbalance and the feasibility of engineering deployment. Attached Figure Description
[0028] Figure 1 This is a schematic diagram of the feature pyramid Mamba module based on a gating mechanism.
[0029] Figure 2 This is a schematic diagram of the structure of a Mamba block.
[0030] Figure 3 A schematic diagram of the overall architecture of the end-to-end unbalanced training method used for bearing fault diagnosis model training.
[0031] Figure 4 This is a schematic diagram of the IDB-MambaNet structure.
[0032] Figure 5 A comparison chart of macro F1-Scores for each model in the dataset.
[0033] Figure 6 A bubble chart comparing the number of parameters, floating-point operations, and average accuracy for each model.
[0034] Figure 7 This is a comparison chart of the spatial distribution of features. Detailed Implementation
[0035] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] This specific implementation addresses the pain points in bearing fault diagnosis under time-varying speed conditions and imbalanced sample scenarios. It systematically discloses a complete technical solution from low-level feature extraction and mid-level model training to high-level diagnostic applications, along with a physical system, software storage media, and experimental verification. The core approach first proposes a gated feature pyramid temporal feature extraction method. This method extracts local features in parallel through four sets of depthwise separable convolutions with different receptive fields. A multi-resolution feature pyramid is constructed using three levels of downsampling, and Mamba blocks are introduced at each level to complete long-range temporal dependency modeling. A top-down gated weighted fusion mechanism then outputs multi-scale enhanced temporal features, balancing non-stationary signal representation capabilities with lightweight computational overhead. Based on this, a model training method for imbalanced samples is proposed. A dual-view training architecture is constructed, consisting of an online diagnostic network and an EMA teacher network. Data augmentation is applied to the original samples to generate homologous positive sample pairs. A joint loss method consisting of effective sample number-weighted cross-entropy loss and homologous weighted supervised contrast loss is used. The loss function is optimized end-to-end to mitigate model bias caused by class imbalance from both the decision boundary and feature space dimensions. A complete bearing fault diagnosis method is then proposed, employing a dual-channel vibration acquisition scheme. Single-channel features are extracted through two parameter-independent symmetric coding branches, and cross-channel information complementarity is achieved through bidirectional cross-attention, adaptive gating fusion, and fusion-level Mamba global modeling. The resulting fault category output drives equipment operation and maintenance management actions. A corresponding entity diagnosis system consisting of vibration acquisition, preprocessing, diagnostic calculation, and operation and maintenance output modules is also disclosed, along with a computer-readable storage medium storing the corresponding algorithm program as a deployment platform. Finally, six imbalanced task control experiments on the KAIST variable speed bearing dataset verify the comprehensive advantages of this scheme in imbalance robustness, diagnostic stability, and lightweight deployment from multiple dimensions, including diagnostic accuracy, macro F1 score, model complexity, and feature visualization. This provides a complete and feasible technical path for bearing condition monitoring in industrial settings.
[0037] I. Gated Feature Pyramid Temporal Feature Extraction Method for Bearing Fault Diagnosis
[0038] This feature extraction method is the core feature extraction foundation of the entire invention, such as... Figure 1As shown in the Feature Pyramid Mamba Module (GFPM) based on the gating mechanism, the input is the one-dimensional vibration time-series signal of the bearing operation collected by the vibration sensor, and the tensor shape is (B,1,L), where B is the training batch size and L is the time length of a single sample.
[0039] The one-dimensional vibration time-series signal of the bearing operation input to this feature extraction method comes from a vibration acquisition system deployed in the industrial field: a piezoelectric accelerometer is rigidly fixed in the radial main load-bearing area of the bearing housing, and analog-to-digital conversion is completed through charge conditioning and a high-speed data acquisition card. After detrending, anti-aliasing filtering, equal-length slicing, and normalization preprocessing, the signal is obtained. Each sample contains 2048 sampling points (input signal length L=2048), representing a time-domain sequence of physical quantities that truly reflects the bearing's operating state. The output is a multi-scale time-series feature for fault classification and identification. This feature extraction method specifically includes the following steps: (a) Multi-scale local coding The input bearing vibration timing signal is input in parallel into four groups of depth-separable convolution branches with different convolution kernel sizes and void ratios, covering local modes of short-term fault impact and long-term operating condition modulation under different receptive fields.
[0040] The kernel size k and dilation d of the four groups of depthwise separable convolutional branches are (3,1), (5,2), (9,3), and (15,4), respectively. Each group of depthwise separable convolutional branches adopts a depthwise separable convolutional structure of depthwise convolution + pointwise convolution, which reduces the number of computational parameters while ensuring feature extraction capabilities.
[0041] Local temporal features output from separable convolutional branches at each depth are adaptively recalibrated using the SE channel attention mechanism: first, channel statistics are generated through global average pooling, then channel weights are generated through two fully connected layers and the Sigmoid activation function, and features are weighted channel by channel to strengthen fault-related feature channels and suppress background noise components.
[0042] The features of the four depthwise separable convolution branches, after being recalibrated by channel attention, are concatenated along the channel dimension and then fused along the channel dimension by 1×1 convolution to obtain the basic temporal features. The tensor shape is (B,C,L), where C is the number of basic channels. In this method, C=24.
[0043] (ii) Hierarchical temporal modeling
[0044] The basic temporal features are downsampled in the temporal domain at three levels to form a three-layer pyramid feature structure from high resolution to low resolution. The number of channels in each layer doubles while the time length is halved, with the following shapes: First-level temporal features: (B,C,L)=(B,24,2048); Second-level temporal features: (B,2C,L / 2)=(B,48,1024); Third-level temporal features: (B,4C,L / 4)=(B,96,512); Mamba blocks are integrated into each pyramid feature layer, and long-range temporal dependency modeling is performed on each feature layer to obtain the dependency-enhanced temporal features of the corresponding layer.
[0045] The Mamba blocks accessed by the aforementioned pyramid features have the following internal structure: Figure 2 As shown. In the Mamba block, the input temporal features are first normalized by an LN layer and then enter the main computation branch: first, they are expanded in dimension by a linear projection layer (Linear layer), which is divided into two parallel paths: one is to extract local temporal patterns by a causal one-dimensional convolutional layer (Conv layer), and then activated by a sigmoid activation function (σ) to generate adaptive gating weights; the other is fed into a selective state space model (SSM) to complete long-range state space modeling; the output of the SSM is multiplied element-wise with the gating weights to complete selective feature weighting, and then mapped back to the original feature dimension by a Linear layer; the output of the main branch is added element-wise with the original input features through residual connections, and finally outputs the final temporal enhancement features by a random deactivation layer (Dropout layer).
[0046] In this embodiment, the core parameter of the Mamba block is set to: state dimension d. state =16, convolution width d conv =4, expansion factor expand=2. The Mamba block captures fault correlation features over a long time range in linear time complexity through a selective state-space modeling mechanism, adapting to the modeling requirements of non-stationary signals under variable speed conditions.
[0047] (III) Top-down gating fusion
[0048] A top-down gating fusion strategy is adopted for the three-layer dependency enhancement time series features. The low-level features are aligned to the high-level time scale. The gating weights generated by the high-level semantic features are used to modulate the low-level features step by step. Finally, the features of each level are mapped to a unified scale and then fused by mean fusion to output multi-scale time series features for bearing fault classification.
[0049] The specific implementation process of gating fusion is as follows: Scale alignment: The first-level dependency augmentation time series features and the second-level dependency augmentation time series features are aligned to the time scale of the third-level dependency augmentation time series features through average pooling, that is, unified to a length L / 4=512; First-layer gated modulation: The third-layer dependent enhancement temporal features are generated by 1×1 convolution, batch normalization and sigmoid activation function to generate the first gate weights, with the weight values ranging from [0,1]. The first gate weights are used to perform element-wise weighted modulation on the aligned second-layer dependent enhancement temporal features to obtain the modulated second-layer features. Second-layer gated modulation: The modulated second-level features are processed by 1×1 convolution, batch normalization and sigmoid activation function to generate second-level gate weights; the aligned first-level dependency enhancement temporal features are then weighted element-wise using the second-level gate weights to obtain the modulated first-level features. Unified fusion: The third-level dependent augmented temporal features, the modulated second-level features, and the modulated first-level features are all mapped to the same number of channels C=24 and the same time length 512 through 1×1 convolution. Then, the mean is calculated in the channel dimension to complete the fusion. Finally, the multi-scale temporal features are output with tensor shape (B,24,512).
[0050] This top-down gating fusion mechanism can use high-level semantic features to progressively filter effective components in low-level details that are consistent with fault semantics, suppress irrelevant disturbances caused by speed fluctuations, and achieve synergistic enhancement of multi-scale features.
[0051] II. Training Method for Variable Speed Bearing Fault Diagnosis Models with Imbalanced Samples
[0052] The end-to-end unbalanced training architecture used in this bearing fault diagnosis model training method is as follows: Figure 3 As shown, the architecture comprises two parts: a main diagnostic network IDB-MambaNet and a supervised contrastive learning branch. The main network takes preprocessed dual-channel vibration samples as the original view input, completing feature extraction and fault classification. Simultaneously, data augmentation is applied to the original samples to obtain an augmented view, which is input into the momentum-updated EMA teacher network to generate stable feature embeddings. These embeddings, combined with the original view embeddings output by the main network, construct a homologous weighted contrastive loss. This loss, along with the classification loss, jointly optimizes the parameters of the entire network, generating a bearing fault diagnosis model that can be deployed on industrial monitoring equipment. The method specifically includes the following steps: (I) Diagnostic Network Infrastructure Construction The diagnostic network adopts a dual-branch symmetric coding structure. The parameters of the two coding branches are independent and do not share with each other. Each coding branch uses the gated feature pyramid temporal feature extraction method for bearing fault diagnosis described above to extract features from the dual-channel vibration signals. The two coding branches are connected in sequence to a bidirectional cross-attention module, an adaptive gated fusion unit, a fusion-level Mamba module, and an attention pooling layer. The classification head and projection head are then connected at the back end of the pooling layer.
[0053] (II) Sample Augmentation and Dual-View Feature Extraction
[0054] A vibration acquisition system identical to that in Part 1 is deployed on a bearing test bench or at the industrial site to collect vibration data covering four operating conditions: healthy state, inner ring fault, outer ring fault, and ball fault. Each set of data is recorded synchronously with the corresponding speed range and fault severity level. Maintenance personnel then label each signal segment with a fault category label based on the bearing disassembly and inspection results, forming a labeled raw vibration dataset.
[0055] Samples were extracted from the original dataset according to the set category sample ratio to construct a variable speed bearing vibration sample set with different category distributions; the sample set was randomly divided into a training set and a validation set at a ratio of 7:3, and 1000 sets of class-balanced samples were independently extracted as a test set. All samples were uniformly processed into a one-dimensional time series of length 2048.
[0056] Data augmentation is applied to each sample in the training set to generate an augmented view. The original signal of the sample is used as the original view, and the original view and the corresponding augmented view constitute a pair of positive samples from the same source.
[0057] Data augmentation in the training method of this model includes: Timing shift: Randomly shift the timing position of the signal within ±10% of the sample length; Gaussian noise injection: random Gaussian noise with a signal-to-noise ratio of 0~10dB is superimposed onto the signal.
[0058] The original view is input into the online diagnostic network, and after feature extraction and mapping with the projection head, the original view embedding feature z is obtained. (1) ∈R B×D (R represents the real number field, z) (1) The i-th row vector (the embedding features corresponding to the original view of the i-th sample), where D is the embedding feature dimension, and in this embodiment D=128; The augmented view is input into the EMA teacher network, and after feature extraction with the same structure and mapping with the projection head, the stable embedding feature z of the augmented view is obtained. (2) ∈R B×D (z) (2) The i-th row vector (Embedded features corresponding to the i-th sample augmented view) The parameters of the EMA teacher network are obtained by updating the parameters of the online diagnostic network using an exponential moving average. The update formula is: ; in, , Let θ be the parameters of the teacher network after training rounds t and t-1. t Let α be the parameters of the online network after the t-th round of training. emaThe momentum coefficient of the EMA is taken as α in this embodiment. ema =0.999.
[0059] The EMA teacher network can generate more stable feature representations, improving the training stability of contrastive learning.
[0060] (III) End-to-end training of joint loss function
[0061] The diagnostic network is trained end-to-end using a joint loss function, which consists of two parts: the weighted cross-entropy loss of the classification branch and the homologous weighted supervision contrast loss of the representation branch.
[0062] 1. Classification branch: Weighted cross-entropy loss based on the number of valid samples.
[0063] Suppose there are K fault categories, and the category label of the i-th sample is y. i The logits output by the classification header is z. i ∈R K Its c-th component is z i,c The predicted probability of class c is obtained by using the softmax function: ; In the formula, exp(·) is a logarithmic function with the natural constant as the base; z i,j Let j be the j-th component of the i-th sample.
[0064] Differential class weights are assigned based on the number of training samples in each class, and the class weights are calculated using an effective sample count mechanism: ; In the formula, w c Let n be the class weight of class c. c Let be the number of training samples in class c, and β be the class weight balancing factor, with a value range of [0,1). In this embodiment, β=0.9999. This mechanism can dynamically saturate the weights as the number of samples increases, automatically increasing the loss gradient contribution of fault classes with fewer samples, and alleviating the training bias caused by class imbalance.
[0065] Construct a weighted cross-entropy loss based on class weights: ; In the formula, Let y be the true class of the i-th sample. i The corresponding loss weight; p i (y i Let y be the true class of the i-th sample. i The predicted probability.
[0066] 2. Characterization Branch: Homologous Weighted Supervisory Contrast Loss
[0067] Based on dual-view embedding features, a homology-weighted supervised contrastive loss is constructed to constrain the intra-class clustering and inter-class separability of the feature space during training. The specific process is as follows: The original view embedding features and the enhanced view stable embedding features are concatenated along the batch dimension to construct the total sample feature set and the corresponding label set: ; In the formula, Z is the total feature matrix after embedding and stitching all samples in the batch with dual views, containing a total of 2B feature vectors; y is the label vector corresponding to the total feature matrix. i is the true label of the fault category corresponding to the i-th sample, and is the vertical splicing label.
[0068] To filter out positive sample pairs of the same type, a positive sample mask matrix M of size 2B×2B is constructed. + The element in its i-th row and j-th column satisfy: ; Further considering the cross-view positive sample pairs of the same sample, their positions in the feature set are (i, i+B) and (i+B, i), respectively. Based on this, the same-origin cross-view mask moment M is defined. s The element in its i-th row and j-th column satisfy: ; Compared to positive sample pairs composed of different samples of the same type, positive sample pairs from the same source across views have higher confidence in their supervisory signals, especially in scenarios where a few fault-type samples are scarce, providing more stable feature consistency constraints. Therefore, explicit weighting is applied to positive sample pairs from the same source across views, defining a positive sample weight matrix W, where the element w in the i-th row and j-th column is... ij for: ; Where α is the weighting coefficient for positive pairs of the same origin, which is used to amplify the contribution of positive sample pairs of the same origin across views in the loss calculation.
[0069] Based on the aforementioned mask matrix and positive sample weights, a homogeneous weighted supervised contrastive loss L is constructed. con : ; In the formula, z i z j z a These are the i, j, and a-th eigenvectors in the total feature matrix Z, respectively. To compare the temperature coefficient of loss and adjust the compactness of the feature distribution, it is set to 0.07 in this embodiment.
[0070] This loss design retains the core mechanism of "aggregation of similar features" in supervised contrastive learning, while focusing on strengthening the constraint effect of positive sample pairs from the same source across views. This enables contrastive learning to obtain stable supervision signals with high confidence even in scenarios with small samples and sparse intra-class distribution, further improving the feature discriminativeness of a few fault categories and the stability of model training.
[0071] (iii) Total joint losses
[0072] The final joint loss function is: ; Wherein, λ is the contrast loss weight coefficient, and in this embodiment, λ=0.1.
[0073] The AdamW optimizer is used to update network parameters during training, with the weight decay factor set to 10. -4 The initial learning rate is set to 10. -3 The learning rate scheduling strategy of preheating cosine annealing is adopted, with 5 preheating rounds and a total of 100 training rounds. The batch size B=32.
[0074] (iv) Model saving
[0075] During training, the diagnostic accuracy is monitored on the validation set. After training converges, the network parameters with the best performance on the validation set are saved to obtain a fault diagnosis model that can be deployed on bearing condition monitoring equipment.
[0076] III. Bearing Fault Diagnosis Methods under Variable Speed Operating Conditions and Sample Imbalance Conditions
[0077] This bearing fault diagnosis method uses dual-channel vibration sensors placed at bearing measuring points to collect vibration time-series signals during bearing operation. After preprocessing, the signals are input into a fault diagnosis model for calculation, and the bearing fault category results are output for equipment health status management.
[0078] The inference structure of the variable speed bearing fault diagnosis network IDB-MambaNet used in this embodiment is as follows: Figure 4 As shown, the network adopts a dual-branch symmetric coding architecture, performing independent multi-scale feature extraction on the radial and axial sensing signals respectively. Cross-channel information interaction is achieved through a bidirectional cross-attention module, followed by global temporal modeling through adaptive gating fusion and a fusion-level Mamba module. Finally, after attention pooling, fault category prediction and feature embedding are output separately. The complete implementation process of this diagnostic method is described in detail below.
[0079] (I) Signal Acquisition and Preprocessing
[0080] Two vibration signals during bearing operation are acquired using a dual-channel piezoelectric vibration acceleration sensor. The two sensors are respectively arranged at radial and axial measuring points on the bearing housing to acquire the bearing vibration acceleration time-domain signal under time-varying speed conditions. The sampling frequency is set according to the operating conditions; in this embodiment, a sampling frequency of 25.6kHz is used.
[0081] The acquired continuous vibration sequence was sliced into equal-length segments, and a non-overlapping sliding window was used to divide the signal into sample segments of uniform length, with each sample having 2048 sampling points. The segmented samples were then subjected to Z-score normalization to eliminate the influence of amplitude differences, resulting in standardized dual-channel samples with tensor shapes of (B, 2, 2048).
[0082] (II) Two-branch feature extraction
[0083] The two signals of the standardized dual-channel sample are respectively input into the two independent symmetric coding branches of the fault diagnosis model. Each coding branch adopts the gated feature pyramid temporal feature extraction method for bearing fault diagnosis described in Part 1, and performs multi-scale temporal feature encoding on the two signals respectively, and outputs single-channel temporal features with the shape (B,24,512).
[0084] The fault diagnosis model was trained using the sample-imbalanced variable speed bearing fault diagnosis model training method described in Part II.
[0085] Furthermore, it should be noted that the two symmetrical encoding branches of the front-end structural layer belong to the signal processing paths on the network input side, corresponding to the radial and axial physical vibration sensor signals, respectively. The two branches have independent parameters and both employ a gated feature pyramid temporal feature extraction method to complete single-channel feature encoding. Their function is to fully mine the fault information of the two sensor signals, providing a multi-source feature foundation for subsequent cross-channel interactive fusion. The classification and representation branches of the back-end loss layer belong to the training and optimization paths on the network output side. They share the same global feature representation after bidirectional cross-attention, adaptive gated fusion, global temporal modeling, and attention pooling, but are connected to different output heads: the classification branch connects to the classification head, outputting the fault category prediction result, corresponding to the weighted cross-entropy loss, undertaking the core task of fault identification; the representation branch connects to the projection head, outputting a low-dimensional feature embedding vector, corresponding to the homogeneous weighted supervised contrastive loss, undertaking the auxiliary task of optimizing the feature space distribution. This dual-branch approach only takes effect simultaneously during the model training phase; during the inference and deployment phase, only the classification branch outputs the final diagnostic result.
[0086] (III) Two-way cross-attention interaction
[0087] The timing features of the two single-channel inputs are fed into a bidirectional cross-attention module to achieve cross-channel fault information complementarity, and the timing features after the interaction of the two channels are output. The specific process is as follows: First-direction interaction: Using the single-channel timing features of the first coding branch as the query and the single-channel timing features of the second coding branch as the key and value, calculate the cross-attention weighted features to realize the information transmission from the second signal to the first signal; Second-direction interaction: Using the single-channel timing features of the second coding branch as the query and the single-channel timing features of the first coding branch as the key and value, the reverse cross-attention weighted features are calculated to realize the information transmission from the first signal to the second signal.
[0088] After bidirectional interaction, both features are fused with complementary fault information from the other channel, outputting the timing features after the two-way interaction, with the tensor shape maintained as (B,24,512).
[0089] (iv) Adaptive gating fusion and global temporal modeling
[0090] The temporal features after the two interactions are fused using adaptive gating to obtain joint features, which are then input into the fusion-level Mamba module for global temporal dependency modeling to obtain globally dependent enhanced joint features. The specific process is as follows: Adaptive Gated Fusion: The temporal features after two interactions are concatenated along the channel dimension, and after 1×1 convolution and batch normalization, gating weights are generated by the Sigmoid activation function. The gating weight G is element-wise multiplied with the temporal feature Fx after interaction with the first encoding branch, and (1-G) is element-wise multiplied with the temporal feature Fy after interaction with the second encoding branch. The results of the two element-wise multiplications are then concatenated along the channel dimension to obtain the joint feature. , ⊙ indicates element-wise multiplication.
[0091] Adaptive gating fusion can dynamically adjust the contribution weights of the two coding branches according to the input signal, thereby achieving adaptive information fusion.
[0092] Global temporal modeling: The joint features are input into a two-layer fusion-level Mamba module to further model global long-range dependencies across time steps, capture the global fault association structure after cross-channel fusion, and output global dependency-enhanced joint features with tensor shape (B, 24, 512).
[0093] (V) Attention Pooling and Diagnostic Output
[0094] Attention pooling is applied to the joint features that enhance global dependencies: adaptive weights are generated in the time dimension by one-dimensional convolution and the Softmax function, and the features at each time step are weighted and summed to compress the three-dimensional temporal features into a two-dimensional global feature representation with shape (B,24).
[0095] The two-dimensional global feature representation is input into the classification head, which consists of two fully connected layers and a ReLU activation function. The classification head outputs the predicted probability of each fault category, and the category corresponding to the maximum probability is taken as the bearing fault category diagnosis result.
[0096] The diagnostic results are output to the equipment operation and maintenance management unit, which triggers corresponding health status prompts, fault warnings, or operation and maintenance scheduling instructions based on the fault type and severity, supporting condition-based maintenance and safe operation of industrial equipment. In this embodiment, bearing fault categories include four types: health status, inner ring fault, outer ring fault, and ball fault.
[0097] The diagnostic results are output to the equipment operation and maintenance management unit, which triggers corresponding health status prompts, fault warnings, or operation and maintenance scheduling instructions based on the fault type and severity, supporting condition-based maintenance and safe operation of industrial equipment. In this embodiment, bearing fault categories include four types: health status, inner ring fault, outer ring fault, and ball fault.
[0098] 1. For bearings with a diagnosis of being in a healthy state, the operation and maintenance management unit outputs a routine health status prompt: the local display unit shows the bearing's operating status as "normal" in real time, the background synchronously accumulates and records the equipment's running time and dynamically updates the vibration characteristic baseline, generates standardized health status reports at preset periodic intervals and uploads them to the equipment operation and maintenance cloud platform, without triggering any alarm actions, and the equipment maintains normal production operation scheduling.
[0099] 2. For early minor faults (fault characteristic amplitude below the preset first-level alarm threshold) in the inner ring, outer ring, or ball bearing, the operation and maintenance management unit outputs a first-level early warning: the local display unit marks the corresponding fault type and warning level, illuminates the yellow status indicator light, and pushes an abnormal equipment status reminder to the operation and maintenance personnel's terminal via industrial Ethernet; the operation and maintenance scheduling side automatically generates a planned maintenance work order, includes the bearing in the list to be inspected in the next predetermined shutdown maintenance window, and simultaneously increases the frequency of data acquisition and diagnosis at this measurement point to continuously track the evolution trend of fault characteristics.
[0100] 3. For inner ring, outer ring, or ball bearing faults that are detected as having significant mid-term faults (fault characteristic amplitudes between the first and second level alarm thresholds), the operation and maintenance control unit outputs a second-level fault warning: the local display unit highlights the fault category, severity level, and estimated remaining availability, triggers the light and sound alarm unit to issue intermittent audible and visual alerts, and simultaneously pushes fault alarm details to the operation and maintenance team and equipment management department; the operation and maintenance dispatch side immediately activates the unplanned maintenance plan, coordinates the corresponding bearing spare parts and maintenance personnel, and arranges short-term shutdown maintenance while ensuring production order, to curb further deterioration of the fault.
[0101] 4. For inner ring, outer ring, or ball bearing failures that are detected as late-stage serious faults (fault characteristic amplitude exceeding the preset level 2 alarm threshold), the operation and maintenance management unit outputs a level 3 emergency warning: the local audible and visual alarm unit continuously issues high-frequency audible and visual alarms, and the operation and maintenance management unit simultaneously sends a load reduction or protective shutdown command to the equipment main control system, forcing the equipment to switch to a safe operation mode; the operation and maintenance dispatch side triggers the emergency repair process, immediately dispatches an emergency repair work order, dispatches on-site operation and maintenance personnel to the scene for immediate handling, and coordinates with upstream and downstream production processes to adjust production plans to prevent serious equipment damage and safety accidents.
[0102] IV. Bearing Fault Diagnosis System under Variable Speed Operating Conditions and Sample Imbalance Conditions
[0103] This bearing fault diagnosis system is a practical implementation of the aforementioned diagnostic methods. It adopts a layered hardware architecture of data acquisition, preprocessing, calculation, and output, and can be directly deployed at the end-side monitoring nodes of bearing equipment in industrial settings. This enables real-time, accurate, and lightweight diagnosis of bearing faults under variable speed conditions. The system specifically includes the following modules: (a) Vibration Acquisition Module The vibration acquisition module is a hardware unit for physical signal acquisition, consisting of a dual-channel piezoelectric vibration acceleration sensor, a charge conditioning circuit, and a high-speed synchronous data acquisition card.
[0104] Two vibration sensors are fixed to the radial main load measuring point and axial measuring point of the bearing housing to be monitored via magnetic rigid mounts, respectively; or any two axes of a triaxial vibration sensor are arranged parallel to the radial and axial directions of the bearing housing to be monitored to monitor the vibration at the corresponding measuring points. The measuring points are aligned with the load area of the inner ring of the bearing to ensure that the fault impact vibration can be effectively picked up by the sensor through the rigid transmission path; the charge signal output by the sensor is connected to the matching charge conditioning circuit to complete the charge-to-voltage conversion and amplitude gain conditioning, and then connected to the high-speed synchronous data acquisition card to complete the analog-to-digital conversion.
[0105] In this embodiment, the sampling frequency of the data acquisition card is set to 25.6kHz, and it has a built-in 8th-order Butterworth anti-aliasing low-pass filter with a cutoff frequency of 12.8kHz. It can continuously acquire two synchronous vibration acceleration time-domain signals during the bearing's time-varying speed operation, providing raw physical quantity data for subsequent diagnosis.
[0106] (ii) Preprocessing module
[0107] The preprocessing module is implemented based on an embedded digital signal processor. Its input is connected to the data acquisition card of the vibration acquisition module. It is used to perform standardized preprocessing on the raw vibration signal, specifically performing the following operations: First, a polynomial fitting algorithm is used to remove low-frequency baseline drift and sensor zero bias from the original signal, resulting in a detrended vibration time series signal. Then, a non-overlapping sliding window is used to slice the continuous time series signal into equal-length slices, with each segment having 2048 sampling points. Finally, Z-score normalization is performed on each segment to eliminate the influence of amplitude magnitude differences, generating standardized dual-channel samples and transmitting them to the diagnostic calculation module.
[0108] (III) Diagnostic Calculation Module
[0109] The diagnostic computing module has a built-in ARM architecture edge computing unit, and can also use an FPGA acceleration unit according to computing power requirements. The module stores the fault diagnosis model trained by the aforementioned training method for variable speed bearing fault diagnosis model oriented to sample imbalance.
[0110] After receiving the standardized dual-channel samples output by the preprocessing module, this module calls the built-in fault diagnosis model to execute the complete diagnostic calculation process: the two signals are respectively input into the two independent symmetric coding branches of the model, and the single-channel multi-scale feature encoding is completed by the gated feature pyramid temporal feature extraction method; then, cross-channel information complementarity is achieved through the bidirectional cross-attention module, and joint features are obtained through adaptive gating fusion; subsequently, global temporal dependency modeling is completed through the fusion-level Mamba module to obtain global dependency enhanced joint features; finally, the bearing fault category diagnosis result is output after attention pooling and classification head calculation.
[0111] In this embodiment, the diagnostic model adopts a lightweight network structure with an overall parameter count of less than 0.3M, enabling millisecond-level real-time diagnosis on low-computing-power edge devices and adapting to deployment constraints in industrial settings.
[0112] (iv) Operation and Maintenance Output Module
[0113] The operation and maintenance output module is the physical output unit of the system, consisting of a local display unit, an audible and visual alarm unit, and an industrial Ethernet communication interface.
[0114] The local display unit is used to display bearing operating status, fault type, confidence level and other information in real time for on-site maintenance personnel to view intuitively; when the diagnostic result determines that the fault status, the audible and visual alarm unit triggers the corresponding level of audible and visual prompts to realize on-site immediate warning; the industrial Ethernet communication interface is used to synchronously upload diagnostic results and raw vibration data to the equipment operation and maintenance cloud platform, supporting remote status monitoring and fault repair work order push, and supporting condition-based maintenance and full life cycle management of industrial equipment.
[0115] Through the collaborative design of hardware architecture and lightweight diagnostic models, this system can simultaneously adapt to three types of industrial scenario constraints: time-varying speed conditions, unbalanced sample categories, and limited edge computing power. It has the advantages of low deployment cost, high diagnostic accuracy, and strong operational stability.
[0116] V. Computer-readable storage media
[0117] This computer-readable storage medium stores computer program code that can be executed by a processor.
[0118] When the computer program is loaded and executed by the processor, it can realize any of the technical solutions described in the aforementioned methods, including: realizing a gated feature pyramid temporal feature extraction method for bearing fault diagnosis to complete multi-scale feature encoding of vibration signals; or realizing a training method for a variable speed bearing fault diagnosis model oriented to unbalanced samples to complete unbalanced training and optimization of the diagnostic model; or realizing a bearing fault diagnosis method under variable speed operating conditions and unbalanced sample conditions to complete end-to-end intelligent diagnosis of bearing faults.
[0119] Computer-readable storage media include, but are not limited to, physical media capable of storing computer program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and flash memory cards. They can be widely used in industrial monitoring terminals, edge computing devices, cloud servers, and other carriers, facilitating the software distribution, version iteration, and engineering implementation of diagnostic algorithms.
[0120] VI. Experimental Verification
[0121] To systematically verify the comprehensive performance of the gated feature pyramid temporal feature extraction method for bearing fault diagnosis, the training method for variable speed bearing fault diagnosis model oriented to imbalanced samples, and the bearing fault diagnosis method under variable speed operating conditions and imbalanced samples proposed in this invention, this embodiment conducts a comparative experiment based on a publicly available variable speed bearing dataset to verify the technical effectiveness of the scheme from four dimensions: diagnostic accuracy, imbalanced robustness, model lightweightness, and feature representation quality.
[0122] (I) Basic Information of the Dataset
[0123] The experiment used the KAIST time-varying speed bearing dataset, which was collected on a bearing life test bench and simulated four typical bearing operating states: healthy state, inner ring fault, outer ring fault, and ball fault. The bearing speed in the dataset dynamically changes with the operating process, and the vibration signal exhibits strong non-stationary modulation characteristics, which highly matches the bearing signal characteristics under variable speed conditions in industrial settings. This effectively verifies the method's adaptability to time-varying speed conditions.
[0124] The experiment used a non-overlapping sliding window to divide the continuous vibration signal of each state into time segments with a single sample length of 2048, resulting in 3750 samples for each state, for a total of 15000 samples. All samples were subjected to Z-score normalization preprocessing to eliminate the interference of amplitude differences on model training.
[0125] (ii) Uneven task settings
[0126] To simulate different levels of sample distribution imbalance in industrial settings, the sample size for each fault type was determined based on the healthy state sample size and the imbalance ratio was set accordingly. A total of 6 imbalance diagnosis tasks of different difficulty were set up, as shown in Table 1.
[0127] Table 1. Imbalanced Diagnostic Task Settings for the KAIST Dataset
[0128] Each task was randomly divided into a training set and a validation set in a 7:3 ratio. An additional 1000 class-balanced samples were independently selected as a fixed test set to uniformly evaluate the model's generalization performance. To reduce random errors caused by random initialization and data partitioning, each experiment was independently repeated 5 times, and the mean and standard deviation of the results were used as the final evaluation data.
[0129] (III) Comparison with baseline and evaluation indicators
[0130] 1. Baseline Comparison Method
[0131] Six representative lightweight fault diagnosis methods were selected as baselines for comparison, covering different technical approaches to ensure the comprehensiveness and fairness of the comparative experiments: MobileNetV2: A classic, lightweight pure CNN framework widely used in edge image and signal recognition tasks; Liconvformer: A lightweight hybrid architecture that combines convolution and Transformer, balancing local feature extraction and temporal modeling capabilities; MCSwin-T: A lightweight Transformer diagnostic model based on window self-attention; MDSupcon: An imbalance diagnosis method that employs multi-scale features and a supervised contrastive learning paradigm; TFN-STTF: A time-frequency fusion diagnostic model that explicitly embeds time-frequency transformation into a convolutional network and emphasizes physical interpretability.
[0132] All comparative methods use the same input data, preprocessing procedures, and training environment as the method of this invention, and the hyperparameters adopt the optimal configuration in the original literature of each method to ensure the fairness of the comparative experiments.
[0133] 2. Evaluation Index System
[0134] The experiment set evaluation indicators from two dimensions: diagnostic performance and deployment feasibility. Diagnostic performance metrics: Classification accuracy and macro-average F1 score are used. Accuracy reflects the overall recognition precision of the model; the macro-average F1 score is the arithmetic mean of the F1 scores for each category, which is not affected by differences in sample size, and can fairly measure the recognition performance of a few fault categories, adapting to performance evaluation in imbalanced scenarios.
[0135] Model complexity metrics: The number of parameters (unit: M) and floating-point operations (FLOPs) (unit: M) are used to measure the model’s storage and computational overhead, respectively, reflecting the difficulty of deploying the model at the edge.
[0136] (iv) Diagnostic performance and model complexity analysis
[0137] Table 2 shows the comparison results of the classification accuracy and model complexity parameters of each method on the six imbalanced tasks; the comparison results of the macro-average F1 scores of each method are shown in Table 2. Figure 5 As shown.
[0138] Table 2 Comparison of diagnostic accuracy and complexity of various models on the KAIST dataset
[0139] Overall, as the degree of task imbalance gradually increases, the diagnostic performance of all comparison methods declines to varying degrees, and the standard deviation of the results gradually increases. Among them, the diagnostic effect of the K5 task is the worst. Except for the method of this invention, the accuracy of the other methods generally falls in the range of 75% to 86%, with significant performance degradation and result fluctuation.
[0140] The IDB-MambaNet proposed in this invention achieved the highest and most stable diagnostic results across all tasks from K1 to K6, consistently maintaining an accuracy above 94% with fluctuations of only ±0.09 to ±0.39, demonstrating significantly superior robustness compared to comparative methods. More importantly, its performance advantage increases progressively with task difficulty: on balanced tasks K1 and K2, the accuracy is improved by approximately 1.1% to 1.3% compared to the second-best method; on medium-difficulty tasks K3 and K4, the improvement increases to 2.1% to 2.9%; and on the most difficult task K5, it improves by nearly 9.0% compared to the second-best method TFN-STTF. These results fully validate the joint training strategy of effective sample number-weighted cross-entropy and homogeneous weighted supervised contrastive loss proposed in this invention. This strategy effectively suppresses the majority class-dominated training bias, maintains the feature separability of a minority of fault categories, and maintains stable diagnostic performance even in highly challenging imbalanced scenarios.
[0141] From the perspective of model lightweighting and deployment efficiency, although Liconvformer has extremely low computational overhead (14.520 MFLOPs), its overall diagnostic performance is significantly lagging behind, with an accuracy gap of nearly 13 percentage points compared to the method of this invention on the K5 task. Furthermore, models with even higher computational costs, such as MCSwin-T, still fall short of the diagnostic accuracy and stability of the method of this invention. This indicates that the performance improvement of this invention does not simply rely on stacking model sizes, but rather stems from the targeted adaptation of the network structure to variable-speed conditions and imbalanced sample scenarios.
[0142] To more intuitively illustrate the overall balance between accuracy and overhead, a bubble comparison chart is plotted with parameter quantity and FLOPs as the horizontal and vertical axes, and the average accuracy of six tasks as the bubble size. Figure 6 As shown, according to the evaluation criterion that "the closer to the origin and the larger the bubble, the better the overall cost-effectiveness," IDB-MambaNet has the largest bubble, and its distance to the origin is second only to Liconvformer. This indicates that this method achieves more significant accuracy gains while maintaining lightweight parameters and computational scale, possessing the optimal performance-overhead balance and adapting to the deployment needs of industrial edge devices.
[0143] (v) Feature Space Visualization Analysis
[0144] To further explain the performance advantages of this invention from a feature perspective, the t-SNE dimensionality reduction algorithm is used to perform two-dimensional visualization of high-dimensional features. Taking the most challenging K6 task as an example, the feature space distribution of the method of this invention (IDB-MambaNet) is compared with that of MCSwin-T and TFN-STTF. The results are as follows: Figure 7 As shown.
[0145] from Figure 7 The visualization results show that all three methods can form a certain intra-class clustering trend, but all have varying degrees of inter-class mixing. Among them, the feature cluster structure extracted by IDB-MambaNet of this invention is the most compact, the inter-class spacing is clearer, and the number of cross-class mixing points is the fewest. In contrast, MCSwin-T shows obvious local overlap and boundary blurring between the outer ring fault and ball fault categories, and the overall feature distribution of TFN-STTF is more dispersed, with more prominent cross-class overlap.
[0146] This phenomenon, from the perspective of the geometric structure of the feature space, intuitively proves that the gated feature pyramid temporal feature extraction method proposed in this invention, combined with the homologous weighted supervised contrastive learning strategy, can still extract more discriminative fault features under complex conditions such as imbalanced samples and time-varying rotation speeds, effectively enhancing intra-class clustering and inter-class separability, and providing a solid feature foundation for high-precision diagnosis.
[0147] (vi) Experimental Conclusions
[0148] In summary, this invention achieves superior performance compared to existing methods in four dimensions: diagnostic accuracy, imbalance robustness, operational stability, and lightweight deployment capability. It utilizes a three-layer collaborative innovation approach: multi-scale gating feature extraction at the bottom layer, an imbalanced joint training strategy at the middle layer, and dual-branch multi-source information fusion at the top layer. This effectively addresses three major engineering challenges: non-stationary fault features under time-varying speed conditions, imbalanced sample category distribution, and limited computing power for edge deployment. It possesses high engineering application value and feasibility for implementation.
[0149] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A gated feature pyramid temporal feature extraction method for bearing fault diagnosis, comprising receiving a one-dimensional vibration temporal signal of bearing operation acquired by a vibration sensor, performing feature encoding processing on the vibration temporal signal, and outputting multi-scale temporal features for fault classification and identification, characterized in that, Includes the following steps: The vibration time series signal is input in parallel into four groups of depth-separable convolutional branches with different kernel sizes and hole rates to extract local time series features under different receptive fields. Channel attention adaptive recalibration is performed on each local time series feature, and then the features are concatenated along the channel dimension and fused by convolution to obtain the basic time series features. Three-level temporal downsampling is performed on the basic temporal features to form three-layer pyramid features with different resolutions; Mamba blocks are connected to each pyramid feature layer, and long-range temporal dependency modeling is performed on each level of feature to obtain the corresponding level of dependency-enhanced temporal features. A top-down gating fusion strategy is adopted for the three-layer dependency enhancement time series features. The low-level features are aligned to the high-level time scale. The gating weights generated by the high-level semantic features are used to modulate the low-level features step by step. Finally, the features of each level are mapped to a unified scale and then fused by mean fusion to output multi-scale time series features for bearing fault classification.
2. The method for extracting time-series features from a gated feature pyramid for bearing fault diagnosis according to claim 1, characterized in that, The kernel and dilation ratio combinations of the four depthwise separable convolutional branches are (3,1), (5,2), (9,3), and (15,4), respectively. The channel attention adopts the SE channel attention mechanism to adaptively recalibrate the feature responses of each channel and strengthen the feature channels related to fault impact. The number of channels of the pyramid features from the bottom layer to the top layer doubles and the time length is halved layer by layer. The shapes of the low, medium and high-level features corresponding to the first, second and third layers are (B,C,L), (B,2C,L / 2), and (B,4C,L / 4), respectively, where B is the batch size, C is the number of basic channels, and L is the time length of the basic temporal feature.
3. The method for extracting time-series features from a gated feature pyramid for bearing fault diagnosis according to claim 1, characterized in that, Gating fusion strategies specifically include: The first-level dependency-enhanced temporal features and the second-level dependency-enhanced temporal features are aligned to the time scale of the third-level dependency-enhanced temporal features through average pooling. The first gate weight is generated from the third-level dependency enhancement temporal features, and the aligned second-level dependency enhancement temporal features are then subjected to element-wise weighted modulation to obtain the modulated second-level features. The second gate weights are generated from the modulated second-level features, and the aligned first-level dependency enhancement temporal features are subjected to element-wise weighted modulation to obtain the modulated first-level features. The third-level dependent enhanced temporal features, the modulated second-level features, and the modulated first-level features are uniformly mapped to the same number of channels and time scale, and then mean fusion is performed to output multi-scale temporal features.
4. A training method for a variable speed bearing fault diagnosis model oriented towards imbalanced samples, which, based on a variable speed bearing vibration sample set with fault category labels constructed by vibration sensors, divides the sample set into a training set and a validation set, constructs a diagnostic network, and iteratively optimizes the network parameters through a loss function to generate a bearing fault diagnosis model that can be deployed in industrial monitoring equipment, characterized in that... The training steps include the following: The feature encoding unit of the diagnostic network uses a gated feature pyramid temporal feature extraction method for bearing fault diagnosis as described in any one of claims 1-3 to extract features from the input vibration temporal signal; Data augmentation is applied to each sample in the training set to generate an augmented view. The original signal of the sample is used as the original view. The original view and the corresponding augmented view constitute a pair of homologous positive samples. The original view is input into the online diagnostic network to obtain the original view embedding features, and the enhanced view is input into the EMA teacher network to obtain the enhanced view stable embedding features. A joint loss function is used to train the diagnostic network end-to-end: the classification branch uses a weighted cross-entropy loss based on the number of effective samples, and assigns differentiated class weights according to the number of training samples in each class to improve the loss gradient contribution of fault classes with fewer than a set threshold; the representation branch uses a homologous weighted supervised contrastive loss, which constructs a sample feature set based on the original view embedding features and the enhanced view stable embedding features, uses the feature embeddings of samples of the same class as positive sample pairs, and applies weighted reinforcement constraints to the cross-view positive sample pairs corresponding to the same sample to improve the intra-class clustering and inter-class separability of the feature space; After training convergence, the diagnostic network parameters are saved to obtain a fault diagnosis model that can be deployed on bearing condition monitoring equipment.
5. The training method for a variable speed bearing fault diagnosis model oriented towards sample imbalance as described in claim 4, characterized in that, In the homologous weighted supervised contrast loss, the weight of the cross-view positive sample pair consisting of the original view embedding features and the enhanced view stable embedding features corresponding to the same sample is greater than the weight of the positive sample pair consisting of different samples of the same kind.
6. A bearing fault diagnosis method under variable speed operating conditions and sample imbalance conditions, comprising: acquiring vibration time-series signals of the bearing during operation using dual-channel vibration sensors arranged at bearing measuring points; inputting the preprocessed signals into a fault diagnosis model for calculation; outputting bearing fault category results for equipment health status management; characterized in that... Includes the following steps: The vibration time series signal was preprocessed by slicing it into equal-length slices and normalizing it to obtain standardized dual-channel samples; The two signals of the standardized dual-channel sample are respectively input into two independent symmetric coding branches of the fault diagnosis model. Each coding branch adopts the gated feature pyramid temporal feature extraction method for bearing fault diagnosis as described in any one of claims 1-3, and outputs single-channel temporal features respectively. Two single-channel temporal features are input into a bidirectional cross-attention module. The single-channel temporal features of any coding branch are used as queries and the single-channel temporal features of the other coding branch are used as keys and values for bidirectional attention interaction. The resulting two-channel interactive temporal features are then output. The single-channel temporal features after two-way interaction are fused by adaptive gating to obtain joint features, which are then input into the Mamba block for global temporal dependency modeling to obtain global dependency-enhanced joint features. Attention pooling is performed on the global dependency enhancement joint features to obtain the global feature representation. The input to the classification head outputs the bearing fault category diagnosis result. The fault diagnosis model used to obtain the diagnosis result is trained using the sample imbalance-oriented variable speed bearing fault diagnosis model training method described in claim 4 or 5. The diagnostic results are output to the equipment operation and maintenance management unit to trigger corresponding health status prompts or warning actions.
7. The bearing fault diagnosis method under variable speed operating conditions and sample imbalance conditions according to claim 6, characterized in that, Adaptive gating fusion specifically refers to: The single-channel temporal features after two-way interaction are concatenated along the channel dimension, and after 1×1 convolution and batch normalization, the gate weights G are generated by the Sigmoid activation function. First, the gating weight G is multiplied element-wise with the temporal feature Fx after interaction with the first coding branch. Then, (1-G) is multiplied element-wise with the temporal feature Fy after interaction with the second coding branch. Finally, the results of the two element-wise multiplications are concatenated along the channel dimension to obtain the joint feature F.
8. The bearing fault diagnosis method under variable speed operating conditions and sample imbalance conditions according to claim 6, characterized in that, Bearing failures are categorized into four types: health condition, inner ring failure, outer ring failure, and ball failure.
9. A bearing fault diagnosis system under variable speed operating conditions and sample imbalance conditions, characterized in that, include: The vibration acquisition module includes a dual-channel vibration sensor arranged at the bearing measuring point to acquire two vibration signals during the bearing operation. The preprocessing module is used to slice and normalize the acquired vibration signals to obtain standardized samples. The diagnostic calculation module has a built-in fault diagnosis model trained by the training method for a variable speed bearing fault diagnosis model oriented to sample imbalance as described in claim 4 or 5. It is used to execute the bearing fault diagnosis method under variable speed working conditions and sample imbalance conditions as described in any one of claims 6-8 and generate bearing fault category results. The operation and maintenance output module is used to receive diagnostic results and output bearing health status prompts, or trigger corresponding fault warnings and operation and maintenance scheduling instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the gated feature pyramid temporal feature extraction method for bearing fault diagnosis according to any one of claims 1-3, or the training method for a variable speed bearing fault diagnosis model oriented to sample imbalance according to claim 4 or 5, or the bearing fault diagnosis method under variable speed operating conditions and sample imbalance conditions according to any one of claims 6-8.