Convolution-Transform hybrid network fault diagnosis method based on working condition coding and feature alignment
By using a convolutional-Transformer hybrid network that combines operating condition encoding and feature alignment, the problem of degraded fault diagnosis performance of rotating machinery under different operating conditions is solved, achieving stable and robust fault identification under complex conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-03-13
AI Technical Summary
Existing fault diagnosis models for rotating machinery suffer from feature distribution drift when operating conditions such as rotational speed and load change, leading to a decline in diagnostic performance. They lack explicit operating condition information modeling and feature alignment strategies, making it difficult to maintain stability and robustness under complex conditions.
The working condition information is explicitly encoded by a working condition encoder, and a working condition feature alignment module is combined with a convolutional-transformer hybrid network to integrate local steady-state feature extraction and global modeling capabilities. The working condition feature alignment module is designed to reduce the impact of working condition drift and achieve consistency in feature distribution.
The accuracy of fault diagnosis and the generalization ability of the model were improved under multiple speed and load conditions. The problem of decreased diagnostic performance across operating conditions was solved, and the stability and practicality of the model were enhanced.
Smart Images

Figure CN121659009A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent detection technology for mechanical equipment, and in particular to a fault diagnosis method based on a convolutional-Transformer hybrid network using working condition coding and feature alignment, for fault identification of rotating machinery under complex working conditions such as multiple speeds and multiple loads. Background Technology
[0002] Rotating machinery is widely used in industrial equipment, and its operating status is significantly affected by changes in operating conditions such as speed, load, and temperature. In actual industrial scenarios, vibration signals collected from equipment such as bearings, gearboxes, and motors often exhibit obvious operating condition dependence, meaning that the signal patterns of the same fault differ under different operating conditions, which reduces the generalization ability of diagnostic models outside of training conditions.
[0003] Existing research largely relies on convolutional neural networks or Transformer models for end-to-end fault identification, but these models typically assume that the training and testing data operate under the same conditions. When rotational speed or load changes, the feature distribution shifts, leading to a significant degrade in model performance. Furthermore, existing cross-condition methods primarily depend on manual feature standardization or simple data augmentation, lacking explicit modeling of operating condition information and feature alignment strategies.
[0004] Therefore, there is an urgent need for a fault diagnosis method that can explicitly encode operating condition information and solve the distribution shift caused by operating condition migration through feature alignment mechanism, so as to improve the stability and robustness of rotating machinery under complex conditions. Summary of the Invention
[0005] Existing mechanical equipment fault diagnosis methods largely rely on deep learning models to automatically extract and classify features from vibration signals, acoustic signals, or multimodal monitoring data. However, in engineering applications, the operating status of equipment typically changes continuously with variations in speed, load, temperature, and other operating conditions. The data distribution under different operating conditions varies significantly, leading to a marked decline in the diagnostic performance of deep learning models when the training and testing conditions differ—a typical "cross-condition performance degradation" problem. Traditional convolutional neural networks can only extract local temporal features and lack the ability to effectively model feature drift caused by changes in operating conditions. While Transformers have the advantage of modeling long-sequence dependencies, they also struggle to maintain feature space consistency when faced with different operating condition distributions. Furthermore, existing methods generally lack mechanisms to explicitly integrate operating condition information into the model, making it difficult for the model to perceive differences in operating conditions and thus limiting its generalization ability. Therefore, maintaining stable and reliable fault diagnosis performance under complex operating conditions such as multiple speeds and loads is a key technical challenge in current research on cross-condition intelligent diagnosis.
[0006] To address the aforementioned problems, this invention proposes a fault diagnosis method based on a convolutional-Transformer hybrid network using operating condition encoding and feature alignment. This method explicitly introduces an operating condition encoder into the model structure to vectorize the operating conditions and designs an operating condition feature alignment module to reduce the inconsistency of feature distribution under different operating conditions. At the feature extraction level, this invention integrates the local steady-state feature extraction capability of convolutional neural networks with the global modeling capability of Transformers, enabling the model to obtain both refined local diagnostic features and capture temporal dependencies, thereby improving the stability of feature representation across operating conditions. Through an integrated process of operating condition encoding, feature extraction fusion, feature alignment, and classification decision-making, this invention achieves robust fault diagnosis in complex operating condition scenarios.
[0007] The method steps of the present invention include the following:
[0008] Step 1: Acquisition and encoding of operating parameters: Collect operating condition information such as speed and load during equipment operation, and convert it into low-dimensional trainable embedding vectors through a designed operating condition encoder, so that the model can explicitly perceive differences in operating conditions.
[0009] Step 2: Feature extraction of the convolutional-transformer fusion network: Local steady-state features are extracted using convolutional neural networks, such as local impacts or periodic components of bearings or gears; then the convolutional output is fed into the Transformer module, which models long-term dependencies on global features through a self-attention mechanism, enabling the model to obtain more discriminative multi-scale temporal features.
[0010] Step 3: Operating Condition Feature Alignment: To address the issue of inconsistent feature distribution under different operating conditions, an operating condition feature alignment module is designed. This module uses MMD (Maximum Mean Difference), CORAL (Correlation Alignment), or adaptive normalization methods to align the distribution of features under different operating conditions, thereby reducing the impact of operating condition drift on classification decisions.
[0011] Step 4: Feature Fusion and Classification: The working condition encoding vector is fused with the aligned deep features and input into the classifier to output the fault category, thereby achieving stable intelligent fault diagnosis under cross-working conditions.
[0012] The main innovations of this invention are reflected in the following aspects:
[0013] 1. A working condition encoder is proposed to explicitly encode working condition information such as speed and load into embedded vectors, enabling the model to actively perceive differences in working conditions rather than passively adapting to changes in data distribution.
[0014] 2. Design a working condition feature alignment module, which uses methods such as MMD, CORAL, or adaptive normalization to achieve consistency in the distribution of different working condition features, effectively reducing the phenomenon of working condition drift.
[0015] 3. A convolution-transformer fusion structure is proposed, which combines the local modeling ability of CNN with the global correlation modeling ability of Transformer, making feature representation more comprehensive and robust.
[0016] 4. Construct a cross-condition fault diagnosis process architecture that is suitable for engineering scenarios with multiple speeds and load variations, thereby improving the industrial deployability and practical stability of the model.
[0017] Through the above technical solution, the present invention can maintain a high fault identification accuracy under different working conditions, and the model generalization ability is significantly better than the traditional deep learning diagnostic method based on a single feature extraction structure. It effectively solves the problem of performance degradation in existing cross-working-condition diagnostics and has important engineering application value. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the overall process of the method of the present invention.
[0019] Figure 2 This is a structural diagram of the feature extraction module of a convolutional neural network.
[0020] Figure 3 This is a structural diagram of the Transformer feature extraction module.
[0021] Figure 4 This is a schematic diagram of the working condition feature alignment module.
[0022] Figure 5 Loss / accuracy curve during training.
[0023] Figure 6 A bar chart comparing diagnostic accuracy under different operating conditions. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be noted that those skilled in the art can modify or substitute the technical details in these embodiments without departing from the spirit and scope of this invention, and such modifications or substitutions should all be considered within the scope of protection of this invention.
[0025] Example 1: Overall Method Flow
[0026] This embodiment provides a fault diagnosis method based on a convolutional-Transformer hybrid network using operating condition encoding and feature alignment. This method aims to address the problems of poor generalization ability and severe feature distribution shift in single-model systems under varying operating conditions such as rotational speed and load on rotating machinery.
[0027] The overall process of this method includes the following steps:
[0028] Step 1: Construct a multi-condition vibration signal dataset and label the signals with corresponding condition labels.
[0029] Step 2: Preprocess the acquired vibration signals (including noise reduction, normalization, and sample slicing).
[0030] Step 3: Construct a hybrid diagnostic network containing three parallel or serial processing branches:
[0031] (1) Local feature extraction branch based on one-dimensional convolutional neural network;
[0032] (2) Global feature modeling branch based on Transformer;
[0033] (3) Operating condition coding branch based on operating condition parameters.
[0034] Step 4: Introduce a feature alignment module, which uses the working condition encoding vector to guide the distribution alignment of convolutional features and Transformer features in the feature space, eliminating the domain offset caused by working condition differences.
[0035] Step 5: Perform multi-feature fusion of the aligned local features, global features, and working condition codes.
[0036] Step 6: Use the fusion features to perform classification reasoning and output the final fault diagnosis result.
[0037] Example 2: Details of Data Acquisition and Preprocessing
[0038] This step involves processing the model's input, specifically including:
[0039] Step 1: Signal Acquisition: Use an accelerometer to acquire vibration signals of the rotating machinery under different combinations of operating conditions. Operating variables include, but are not limited to, speed, load, and temperature. For example, set the speed range to 1000 rpm to 3000 rpm and the load level to 0 HP to 3 HP. Set the sampling frequency to 12 kHz or 20 kHz to cover the fault characteristic frequency band.
[0040] Step 2: Data Slicing: The continuous long vibration signal is divided into a fixed-length sample sequence using a sliding window technique. The window length L can be set to 1024 or 2048 points, and the overlap rate can be set to 50%.
[0041] Step 3: Standardization: To eliminate amplitude differences, Z-score standardization is performed on each sample, i.e. ,in The sample mean. The standard deviation is denoted as .
[0042] Step 4: Vectorization of operating condition labels: Record the operating condition parameters corresponding to each sample to form an operating condition label vector. .
[0043] Example 3: Working Condition Encoder and Feature Alignment Mechanism
[0044] This embodiment describes how to use operating condition information to enhance the robustness of the model.
[0045] 1. Operating condition encoder
[0046] The input is the operating condition parameter C. The operating condition encoder consists of a multi-layer sensing mechanism.
[0047] If the input is a discrete category, an Embedding layer is used to map it into a dense vector.
[0048] If the input is a continuous variable, normalize it first and then input it into the multilayer perceptron.
[0049] Output: Obtain the working condition embedding vector containing physical working condition semantics. .
[0050] 2. Feature Alignment Module
[0051] To ensure the model's generalization ability under different operating conditions, this module utilizes... right and Apply distribution constraints or transformations.
[0052] This embodiment preferably uses maximum mean difference regularization as the alignment strategy:
[0053] During the training phase, data pairs are constructed between the source and target domains.
[0054] Calculate the distance loss of the features in Hilbert space:
[0055]
[0056] In addition, combat training under specific working conditions can be introduced: utilizing As a supervisory signal for the domain discriminator, the feature extractor is forced to learn deconditioning common fault features.
[0057] Output: Feature representation optimized by alignment constraints .
[0058] Example 4: Feature Fusion and Model Training
[0059] 1. Multi-feature fusion
[0060] The outputs of the three modules are fused to construct a comprehensive feature vector. .
[0061] The fusion formula can be expressed as:
[0062]
[0063] Where Concat represents a chain operation. These are learnable weighting coefficients or gating mechanisms used to adjust the influence of operating condition information on the final decision.
[0064] 2. Classifiers and Loss Functions
[0065] Classifier: Feature Fusion The input is fed into a fully connected layer, and the output is the probability distribution of fault categories.
[0066] Joint loss function: The training objective of the model is composed of both classification loss and alignment loss.
[0067]
[0068] in, Cross-entropy classification loss, For feature alignment loss, To balance the hyperparameters.
[0069] Example 5: Application Scenarios and Deployment
[0070] The trained model of this invention can be deployed on edge computing gateways or cloud servers in industrial settings.
[0071] Specific application steps:
[0072] Step 1: Real-time acquisition of vibration data stream from the equipment;
[0073] Step 2: Read the current operating parameters of the device;
[0074] Step 3: Input the data stream into the preprocessing module and input the running parameters into the operating condition encoder;
[0075] Step 4: The model performs forward inference and outputs the current device health status in real time;
[0076] Step 5: When the probability of failure exceeds the threshold, trigger the alarm system.
[0077] This method is particularly suitable for monitoring rotating machinery with frequent fluctuations in operating conditions, such as wind turbines, high-speed train axle box bearings, and CNC machine tool spindles.
Claims
1. A fault diagnosis method based on a convolutional-Transformer hybrid network using operational condition encoding and feature alignment, characterized in that, Includes the following steps: Step 1: Multi-condition vibration data acquisition and condition label construction; Step 2: Extract local time-domain or frequency-domain features based on convolutional neural networks; Step 3: Extract global dependency features based on the Transformer module; Step 4: Generate a working condition embedding vector through the working condition encoder, and align the feature distribution with the feature joint input working condition feature alignment module; Step 5: The fault type is output by the fusion feature classifier to achieve fault diagnosis under cross-operating conditions.
2. The method according to claim 1, characterized in that, The operating condition label includes speed, load, temperature, power supply current, or any combination thereof.
3. The method according to claim 1, characterized in that, The convolutional neural network employs 1D-CNN, depthwise separable convolution, or residual convolution structures to extract local steady-state features.
4. The method according to claim 1, characterized in that, The Transformer module includes a multi-head self-attention layer and a feedforward network layer, used to model long sequence dependencies.
5. The method according to claim 1, characterized in that, The operating condition encoder generates operating condition embedding vectors through lookup tables, fully connected layers, or embedding matrices.
6. The method according to claim 1, characterized in that, The working condition feature alignment module achieves cross-working condition feature distribution alignment through maximum mean difference loss, correlation alignment loss, or adaptive normalization.
7. The method according to claim 1, characterized in that, Convolutional features and Transformer features are combined in concatenation, weighted fusion, or adaptive fusion modes.