Transform-based motor stator current time-frequency fusion feature enhancement diagnosis method
By using time-frequency feature fusion and a lightweight Transformer encoder, the problems of insufficient feature extraction and high computational complexity in motor stator current signal diagnosis are solved, achieving high-precision, real-time fault diagnosis, which is suitable for resource-constrained industrial equipment.
Patent Information
- Application Number
- CN202511283562.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2026-01-30
AI Technical Summary
Traditional methods for fault diagnosis of motor stator current signals suffer from problems such as insufficient feature extraction, heterogeneity of time and frequency features, high complexity of long sequence dependency modeling, large computational resource requirements, and instability of industrial small sample training, making it difficult to achieve high-precision real-time diagnosis.
We employ deep fusion of time-frequency features and adaptive attention compression techniques to construct a lightweight Transformer encoder. Combined with dynamic gradient pruning and transfer learning enhancement training strategies, we achieve end-to-end fault diagnosis.
It significantly improves diagnostic accuracy and generalization performance, reduces false alarm rate, meets the real-time response requirements of industrial sites, and enables efficient deployment of the model on resource-constrained devices. The inference speed is increased by more than 5 times, and the diagnostic accuracy reaches 98.5%.
Smart Images

Figure CN121434945A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mechanical fault diagnosis, and particularly relates to a motor stator current time-frequency fusion feature enhancement diagnosis method based on a Transformer. BACKGROUND
[0002] As the core equipment of energy conversion, the accuracy of motor state monitoring is directly related to the reliability and energy efficiency of the production system. The fault diagnosis technology based on stator current signal has become an important direction of industrial predictive maintenance due to its dual advantages of non-invasive sensing and direct decoding of electromagnetic state. However, the traditional time-domain analysis method has limited ability to capture millisecond-level transient fault features in the current signal, and has a high misjudgment rate under complex working conditions such as variable speed and variable load, making it difficult to effectively identify early weak faults.
[0003] The current mainstream deep learning architecture also has certain limitations in industrial applications: the convolutional neural network (CNN) is limited by local perception characteristics and is difficult to model the cross-cycle long-range association in the current signal; the recurrent neural network (RNN) model has limited learning ability for long-range dependencies due to the gradient disappearance problem. The Transformer relies on the self-attention mechanism to model the global dependencies between all elements in the sequence, and the training speed is significantly higher than that of RNN. However, the traditional Transformer has high quadratic computational complexity and a parameter quantity of millions, making it difficult to meet the strict requirements of real-time response in industrial sites.
[0004] In summary, the existing technology has the following technical problems: 1. Insufficient feature extraction and heterogeneity: traditional time-domain analysis methods have limited ability to capture millisecond-level transient fault features in the current signal, and there is spatial heterogeneity between time-domain features and frequency-domain features, resulting in broken physical associations and high misjudgment rates under complex working conditions such as variable speed and variable load.
[0005] 2. Conflict between long sequence dependency modeling and computational complexity: CNN is difficult to model the cross-cycle long-range association in the current signal, and RNN models have limited learning ability for long-range dependencies and slow training. While the traditional Transformer model can model globally, its quadratic computational complexity and large parameter quantity (often millions) make it difficult to meet the strict requirements of real-time response in industrial sites.
[0006] 3. Problem of unstable small sample training in industry: In industrial actual scenarios, the fault sample data available for training is often limited, and traditional training methods are prone to overfitting or gradient anomalies on a small number of samples, making it difficult for the model to converge stably and maintain high precision.
[0007] 4. The problem of resource limitation in embedded deployment: High-precision diagnostic models usually have huge computational load and memory occupation, making it difficult to achieve efficient deployment and real-time response on edge computing devices with no GPU, low computing power, and limited storage (such as ARM Cortex-M series processors). SUMMARY
[0008] The purpose of the present application is to provide a Transformer-based motor stator current time-frequency fusion feature enhancement diagnosis method to solve the problem of fault feature fragmentation, long-range dependency modeling complexity, and high computing power requirement under variable working conditions, and to realize high-precision real-time diagnosis in industrial field.
[0009] The present application adopts time-frequency feature deep fusion and adaptive attention compression technology to construct an end-to-end motor fault diagnosis architecture. The specific technical scheme includes the following steps: S1: Constructing a motor stator current signal preprocessing system; S2: Constructing a time-frequency dual-channel feature tensor; S3: Designing a lightweight time-frequency fusion single-layer Transformer encoder; S4: Establishing a dynamic gradient clipping training mechanism; S5: Realizing end-to-end fault diagnosis; S6: Constructing a transfer enhancement training strategy.
[0010] Further, step S1 is specifically: Collecting three-phase stator current signals during motor operation , which are converted into static coordinate system by Clark transformation. Perform sliding window segmentation on , and the window length is According to the number of motor pole pairs and the fundamental frequency , the adaptive determination is as follows:
[0011] Normalize each window signal:
[0012] Where is the mean of the window signal, is the standard deviation.
[0013] Further, step S2 is specifically: Extract time and frequency domain features for each signal window in parallel. The normalized signal is directly used as the time domain feature vector ; the frequency domain channel extracts the frequency spectrum feature through windowed FFT:
[0014] = , . Concatenate and along the feature dimension to obtain the time-frequency fusion tensor .
[0015] Further, step S3 is specifically: Use the learnable position encoding matrix to add to the input features after linear projection:
[0016] The multi-head attention compression module introduces a head dimension compression factor in the standard multi-head attention mechanism :
[0017] Wherein , h is the number of attention heads. This can reduce the computational complexity by about 70%.
[0018] The feedforward network adopts a bottleneck structure:
[0019] Wherein , , .
[0020] Further, step S4 is specifically: Adaptive gradient clipping is used to enhance the stability of small sample training:
[0021] Threshold is updated according to the exponential moving average of the historical gradient norm:
[0022] Smooth coefficient , effectively preventing gradient explosion.
[0023] Further, step S5 is specifically: The encoder output is sent to the classifier after global average pooling:
[0024]
[0025] Wherein, the classification layer weight , C is the number of fault categories.
[0026] When the maximum fault probability At this time, an alarm is triggered and the fault type and confidence are output.
[0027] Further, the step S6 is specifically: To improve the generalization ability of the model under variable working conditions, random phase shift and amplitude scaling are applied to the spectral features:
[0028]
[0029] Compared with the prior art, the application has the following technical effects: 1. The problem of insufficient feature extraction and heterogeneity is solved, and the diagnostic accuracy is significantly improved: by constructing a time-frequency dual-channel feature tensor, the time-domain waveform and the spectral amplitude are directly spliced, a physical information equivalent mapping between time domain and frequency domain is established, and the signal decoupling distortion caused by feature space heterogeneity is eliminated. This enhances the representation ability of fault information, significantly reduces the false positive rate in variable working condition tests, and improves the diagnostic accuracy and generalization performance.
[0030] 2. The contradiction between long sequence dependence and algorithm demand is solved, and efficient global modeling is realized: by designing a lightweight single-layer Transformer encoder, a multi-head attention head dimension compression factor (γ=0.25) and a feedforward network bottleneck structure are innovatively introduced, which greatly reduces the calculation amount and model parameter amount by 70% while retaining the global modeling advantage of self-attention mechanism. The model can effectively capture the long-distance dependence relationship in the current signal, and also meets the requirements of low algorithm, high real-time performance of industrial embedded platform, and the inference speed is improved by more than 5 times.
[0031] 3. The problem of unstable small sample training is solved, and the robustness of the model is ensured: by establishing a dynamic gradient clipping training mechanism, the clipping threshold is adaptively adjusted according to the exponential moving average of the historical gradient norm, effectively preventing the gradient explosion problem that easily occurs under small sample training conditions, ensuring the stable convergence of the training process, and making the model also obtain excellent diagnostic performance on the data of hundreds of samples.
[0032] 4. The bottleneck of model embedded deployment is solved, and lightweight landing is realized: through a complete set of embedded optimization scheme (including hierarchical weight quantization, computation graph optimization, operator fusion, etc.), the model weight is compressed to INT8 / UINT8 format, and the calculation process is reconstructed to reduce memory access overhead. The model volume and memory occupancy are greatly compressed, which enables it to run efficiently on resource-constrained edge devices, meets the short-time response requirements of GPU-free devices, and provides a feasible technical path for intelligent operation and maintenance in industrial sites. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required to be used in the prior art description and embodiments will be briefly introduced.
[0034] Figure 1 The main flowchart of the present application.
[0035] Figure 2 The detailed flowchart of the present application.
[0036] Figure 3 The schematic diagram of the time-frequency fusion construction method of the present application.
[0037] Figure 4 The schematic diagram of the single-layer Transformer encoder model construction of the present application. DETAILED DESCRIPTION
[0038] As Figures 1-4 shown, a Transformer-based motor stator current time-frequency fusion feature enhancement diagnosis method comprises the following steps: S1: Constructing a motor stator current signal preprocessing system Collecting three-phase stator current signals in the motor running process , which are converted into static coordinate system by Clarke transformation . Perform sliding window segmentation on , and the window length is According to the number of motor pole pairs and the fundamental frequency , the window length is adaptively determined as:
[0039] Perform normalization processing on each window signal:
[0040] Wherein is the mean value of the signal in the window, is the standard deviation.
[0041] S2: Constructing a time-frequency dual-channel feature tensor Extract time-domain and frequency-domain features for each signal window in parallel. The normalized signal is directly used as the time-domain feature vector ; the frequency-domain channel extracts the frequency spectrum feature through windowed FFT:
[0042] = , . and Concatenate along the feature dimension to obtain the time-frequency fusion tensor .
[0043] S3: Design lightweight time-frequency fusion single-layer Transformer encoder Use a learnable position encoding matrix , and add it to the input features after linear projection:
[0044] The multi-head attention compression module introduces a head dimension compression factor in the standard multi-head attention mechanism :
[0045] where , h is the number of attention heads. This can reduce the computational complexity by about 70%.
[0046] The feedforward network adopts a bottleneck structure:
[0047] where , , .
[0048] S4: Establish a dynamic gradient clipping training mechanism Adaptive gradient clipping is used to enhance the stability of small sample training:
[0049] Threshold Update according to the exponential moving average of the historical gradient norm:
[0050] Smoothing coefficient , effectively preventing gradient explosion.
[0051] S5: Realize end-to-end fault diagnosis The encoder output is sent to the classifier after global average pooling:
[0052]
[0053] where the classification layer weight , C is the number of fault categories.
[0054] When the maximum fault probability , trigger the alarm and output the fault type and confidence.
[0055] S6: Construct a transfer-enhanced training strategy To improve the generalization ability of the model under variable working conditions, random phase shift and amplitude scaling are applied to the spectral features:
[0056]
[0057] Model verification uses the confusion deviation index (CDI) to evaluate robustness:
[0058] Wherein represents the probability that the true class i is misjudged as j, and C is the total number of fault classes. When implementing, the following conditions need to be met: verification is carried out on the test set containing variable working condition data; when CDI > 0.95, it is determined that the model has engineering deployment conditions; and the index overcomes the sensitivity of traditional accuracy to data distribution imbalance.
[0059] Industrial field tests show that the present application has significant advantages in feature fusion, computational efficiency, small sample training and engineering deployment: 1. Feature fusion effectiveness: direct splicing of time domain waveform and spectral amplitude eliminates the physical correlation break caused by feature space heterogeneity, and the false alarm rate is significantly reduced in variable working condition test; 2. Breakthrough in computational efficiency: attention head dimension compression technology realizes order of magnitude compression of model parameters, and the inference speed on embedded platform is improved by more than 5 times; 3. Small sample adaptability: dynamic gradient clipping mechanism ensures stable convergence of hundred-sample-level training, and maintains high-precision diagnosis capability; 4. Engineering deployment advantage: embedded optimization scheme realizes significant compression of memory occupation, meeting the short-time response demand of GPU-free devices.
[0060] The present application has been verified by experiment, and on the mechanical fault comprehensive test bench of SQ company in the United States, the accuracy of 98.5% is achieved on the single bearing fault data set of the driving end.
[0061] The time-frequency fusion feature enhancement diagnosis method based on Transformer proposed in the present application shows significant performance improvement in experimental verification. On the measured data set containing various fault types, the method achieves an average diagnosis accuracy of more than 98.5%, which is 5-10 percentage points higher than traditional CNN / RNN methods, effectively solving the problem of insufficient feature extraction and heterogeneity under variable working conditions. By introducing a lightweight Transformer structure, the model parameter quantity is reduced to the order of ten thousand, and the computational overhead in the training and inference process is reduced by about 70%, and the inference speed is more than 5 times that of the traditional Transformer method under the same experimental environment.
[0062] In the training phase, after adopting the dynamic gradient clipping mechanism, the model has significantly enhanced convergence stability on the 100-sample-level training set, with a training success rate increased by more than 30%, effectively alleviating the overfitting and gradient anomaly problems under the small sample condition. In addition, combined with the random spectrum enhancement strategy, the model's generalization ability in cross-condition testing is further improved, with the confusion bias index (CDI) stabilized above 0.95, indicating that it has superior robustness and reliability.
[0063] The experimental results show that the method not only has outstanding advantages in feature fusion, long sequence modeling and training stability, but also can realize efficient and accurate fault diagnosis in typical industrial computing environment, providing a reliable technical path for intelligent monitoring of motor state.
[0064] The above describes only the preferred specific embodiments of the present application. It should be noted that the present application is not limited to the above specific embodiments, and any simple modification, equivalent change and modification of the above embodiments according to the technical essence of the present application within the scope of the technical solutions of the present application should be included in the protection scope of the technical solutions of the present application.
Claims
1. A method of diagnosing a motor stator current based on a Transformer time-frequency fusion feature enhancement, characterized in that, The method comprises the following steps: S1: Collecting motor stator current signals and preprocessing, including Clark transformation, sliding window segmentation and normalization; S2: Extracting time domain features and frequency domain features in parallel, and splicing into a time-frequency fusion tensor; S3: Input the fusion tensor into a lightweight single-layer Transformer encoder, which adopts head dimension compression technology and a bottleneck feedforward network; S4: In the training process, a dynamic gradient clipping mechanism is adopted to enhance the stability of small sample training; S5: Realize end-to-end fault diagnosis through global average pooling and classifier; S6: Adopting spectrum enhancement strategy to improve the generalization ability of the model under variable working conditions.
2. The method of claim 1, wherein, The frequency domain feature is extracted by windowed FFT, and the window function is The window function is Hamming window, and the frequency domain feature vector is 0 to The frequency band is 0 to 8 kHz.
3. The method of claim 1, wherein, The Transformer encoder adopts learnable position encoding and introduces a head dimension compression factor γ=0.25 to reduce computational complexity.
4. The method of claim 1, wherein, The dynamic gradient clipping mechanism updates the gradient clipping threshold by an exponential moving average, and the smoothing coefficient .
Citation Information
Cited By
Non-intrusive air conditioner load decomposition method and storage medium
CN121859065A