Pump Fault Detection Method Based on Data Slicing and Gated Dual Attention Neural Network
By employing data segmentation and gated dual-attention neural networks, the problems of high computational complexity and poor noise robustness in traditional methods are solved, achieving efficient and accurate pump fault detection, which is suitable for complex industrial environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-03
- Publication Date
- 2026-04-03
AI Technical Summary
Existing pump fault detection methods rely on feature engineering, which has limited adaptability. Furthermore, traditional attention methods suffer from high computational complexity and poor noise robustness in long sequence processing, making it difficult to accurately identify fault modes in complex industrial environments.
By employing data segmentation and gated dual-attention neural networks, long-sequence signals are decomposed into short segments through an overlapping slicing module. Combining local multi-head self-attention, gating mechanisms, and global cross-attention, multi-scale features are adaptively extracted and noise is suppressed to achieve end-to-end fault detection.
It significantly improves the accuracy and robustness of fault identification in complex noise environments, can efficiently capture local transient and global trend features, reduces computational complexity, and adapts to the non-stationarity and noise interference of industrial data.
Smart Images

Figure CN121614957B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault detection technology, specifically to a pump fault detection method based on data sharding and gated dual attention neural networks. Background Technology
[0002] Pumps are core components of industrial systems, and their failures can lead to production interruptions and safety accidents. Existing pump fault detection methods include those utilizing traditional machine learning, but these methods heavily rely on the quality of feature engineering, require domain expert knowledge, and have limited adaptability to noise and non-stationary signals. Other methods process the signal frequency domain, primarily relying on mathematical transformations and feature extraction of vibration signals to identify fault modes by analyzing the signal's behavior in different domains. However, this often involves processing time-frequency graphs, significantly increasing time complexity and losing some original features, thus reducing the accuracy of the detection.
[0003] Currently, deep learning technology can automatically learn feature representations from raw data, avoiding tedious feature engineering processes and showing great potential in the field of pump fault detection. Researchers have begun to use convolutional neural networks (CNNs) and recurrent neural networks (RNNs) to automatically learn features from raw vibration signals. However, standard CNNs often struggle to capture long-range dependencies, while RNNs suffer from the vanishing / exploding gradient problem when processing long sequences. Traditional attention methods have achieved significant success in processing sequential data by dynamically focusing on relevant parts of the input. However, existing vibration analysis attention methods typically employ single attention, face fatigue problems over long distances, and use fixed attention patterns, lacking adaptive feature weighting capabilities, which limits their ability to effectively suppress noise and highlight key fault features.
[0004] Therefore, developing a highly accurate pump fault detection method based on vibration signals has become an urgent need in this field. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a pump fault detection method based on data sharding and gated dual attention neural networks, aiming to reduce the computational complexity of long sequences, enhance feature extraction capabilities, and improve robustness in noisy environments.
[0006] This invention is achieved through the following technical solution:
[0007] A pump fault detection method based on data sharding and gated dual-attention neural network is provided, including the following steps:
[0008] S1. Collect vibration signal data of industrial pumps under different operating conditions, preprocess the signals, and divide them into training set, validation set and test set;
[0009] S2. The long sequence of vibration signals is divided into multiple overlapping segments by the overlapping slicing module in order to capture fault characteristics at different time scales.
[0010] S3. Input the fragment into the gated dual attention module for feature extraction. The gated dual attention module executes the following steps sequentially:
[0011] Local multi-head self-attention operation is used to extract local transient features within a fragment;
[0012] The gating mechanism operates by adaptively scaling local features at the channel level to enhance fault-related features and suppress noise.
[0013] Global cross-attention operation is used to model long-range dependencies between different segments and capture the global evolution pattern of faults;
[0014] S4. Input the global features output by the gated dual attention module into the classification module, map them to the probability distribution of fault categories, and complete the fault detection.
[0015] S5. Define the loss function and optimization strategy, and use the training set to train the model end-to-end.
[0016] S6. After the model training is completed, select the weights that perform best on the validation set and use an independent test set to evaluate the final fault detection performance of the model.
[0017] Furthermore, in step S2, the overlapping slicing module is implemented through a sliding window mechanism, given a sliding window length. and overlap rate , No. The starting position of each segment for: The total number of segments is , where N is the total length of the signal.
[0018] Furthermore, in step S3, the gating mechanism operation specifically includes:
[0019] Features of local multi-head self-attention output Average pooling is performed along the time dimension to obtain fragment-level global statistical features. ;
[0020] Will Input a two-layer bottleneck network and generate gated vectors. The formula is: , gate vector Through broadcasting mechanism and Element-wise multiplication is performed to achieve adaptive scaling of the features, resulting in gated features. .
[0021] Furthermore, the global cross-attention operation in step S3 specifically includes:
[0022] Features of each gated segment Average pooling is performed to obtain the representation vectors of each segment. And combine them into a fragment-level representation matrix. ;
[0023] Will Mapped to query matrices respectively Key matrix Sum matrix ;
[0024] Calculate global attention output ;
[0025] Will Mapping back to the original dimension and corresponding gated local features The features are added together and fused to obtain the final feature representation. .
[0026] Furthermore, in step S4, the classification module first performs global average pooling on the global features to obtain the feature vector. h Subsequently h After processing by a two-layer classifier containing a Dropout layer and a GELU activation function, the failure class probability is finally output through the Softmax function.
[0027] In step S5, the model is trained using the label-smoothed cross-entropy loss function, the formula of which is:
[0028] ;
[0029] Where M represents the total number of fault categories; For smoothing parameters, I This is an indicator function.
[0030] The beneficial effects of this invention are:
[0031] This invention cleverly solves several core pain points in existing technologies through a multi-layered and systematic architectural design. Its ingenuity is mainly reflected in the following three aspects:
[0032] 1. Architectural Innovation: Divide and Conquer Multi-Scale Feature Extraction Strategy
[0033] Traditional methods input the entire long vibration signal into the model at once, leading to model "input fatigue" and making it difficult to effectively capture fault characteristics exhibited at different time scales (such as high-frequency impacts and low-frequency trends), while also incurring high computational complexity. This invention introduces an overlapping slicing module to decompose long sequences into shorter segments. This is not simply data segmentation, but a divide-and-conquer strategy. It fundamentally changes the model's input paradigm, enabling subsequent attention mechanisms to more precisely focus on local and global features at different scales.
[0034] By setting a fixed window length L and overlap ratio r, this method ensures that:
[0035] Local fine-grained analysis: Within each short segment, local self-attention can efficiently and accurately capture transient fault impacts (such as bearing pitting).
[0036] Global correlation analysis: The overlapping parts between segments retain contextual information, laying the foundation for establishing inter-segment dependencies for subsequent global cross-attention, thereby enabling the identification of trending faults that require long-term observation, such as axis misalignment.
[0037] 2. Core Mechanism Innovation: Gated Dual Attention Mechanism Achieves Adaptability and Efficient Integration
[0038] Traditional single-attention mechanisms suffer from attention fatigue when processing long sequences and lack robustness to noise, making it difficult to highlight key fault features in complex industrial noise environments. This invention designs a gated dual-attention module, connecting and fusing three sub-modules: local attention, gated filtering, and global attention, forming a collaborative workflow of focusing, cleaning, and correlation. Local multi-head self-attention first extracts features within each segment, addressing the difficulty of CNNs in capturing long-range dependencies. Its principle is to calculate the correlation weights between time points within a segment, allowing the model to focus on the most important signal changes within that segment. The gating mechanism compresses and abstracts local features, generating a gate vector between 0 and 1 that acts as a feature filter. Through channel-by-channel scaling, it adaptively enhances fault-related feature channels while suppressing irrelevant or noisy channels, giving the model the ability to automatically adjust its tone in noisy environments and significantly improving feature robustness. The innovation of global cross-attention lies in its computational efficiency and information integration method. Traditional methods directly calculate the attention between all time points, resulting in a complexity of O(n log n). Long sequences are difficult to process. This invention innovatively first compresses each segment into a representation vector, and then at the segment level (…). K Calculate the attention using (multiple vectors), reducing the complexity to... This enables the model to efficiently model long-term dependencies between segments, capture the evolution patterns of faults, and finally fuse global and local information, achieving a unification of local details and global context.
[0039] 3. Detailed optimization and innovation: Customized training strategies for industrial scenarios
[0040] In the training phase, this invention employs targeted strategies such as label-smoothed cross-entropy loss and the AdamW optimizer. By introducing a smoothing parameter, the model's overconfidence in clean samples is mitigated, forcing the model to learn more robust features, which is particularly important for pump fault data with similar features and susceptible to noise. The AdamW optimizer decouples weight decay from gradient updates, enabling better control of model complexity, preventing overfitting, adapting to the non-stationarity of industrial data, and addressing issues such as class imbalance, high noise levels, and the tendency for models to overfit in industrial data.
[0041] In summary, this invention significantly improves the accuracy and robustness of identifying various pump faults in complex noise environments by introducing an overlapping slicing strategy and a gated dual attention mechanism. This method not only adaptively extracts multi-scale features of local transients and global trends from vibration signals, but also dynamically enhances fault-related features and suppresses noise interference through a learnable gating mechanism, achieving efficient and robust feature fusion. This method achieves excellent performance on a real vibration dataset of oilfield polymer injection pumps, surpassing many traditional machine learning and deep learning baseline models. This invention not only promotes the development of vibration-based intelligent fault diagnosis technology for industrial equipment, but also provides core technical support for unmanned inspection and predictive maintenance of key rotating equipment in industries such as petrochemicals and energy, helping to improve equipment operating safety, reduce unplanned downtime risks, and lower maintenance costs. Attached Figure Description
[0042] Figure 1 This is the overall flowchart of the present invention.
[0043] Figure 2 This is a schematic diagram of the overlapping slice module in this invention.
[0044] Figure 3 This is a schematic diagram of the local multi-head self-attention submodule in this invention.
[0045] Figure 4 This is a schematic diagram of the gating mechanism submodule in this invention.
[0046] Figure 5 This is a schematic diagram of the global cross-attention submodule in this invention. Detailed Implementation
[0047] To clearly illustrate the technical features of this solution, the following detailed implementation method will be used to explain the solution.
[0048] This embodiment is implemented in the fault diagnosis scenario of polymer injection pumps in oil fields. A pump fault detection method based on data sharding and gated dual attention neural network is presented, and the specific steps are as follows:
[0049] S1. Data Collection and Preprocessing
[0050] Data source: Triaxial accelerometers (ICP type, sampling frequency 12.8 kHz) are installed at key locations on the bearing housing and pump casing of the selected operating polymer injection pump to synchronously collect process parameters such as pump inlet and outlet pressure, motor current, and temperature.
[0051] Dataset: Collects vibration data for various working states and fault types, including normal state, shaft misalignment, cavitation, impeller imbalance, inner ring failure, etc. The data covers complex working conditions such as start-up and shutdown, different loads (60%, 80%, 100%, 120%), speed (800~1500 RPM) and ambient temperature (30~80°C).
[0052] Preprocessing: The original vibration signals were detrended, bandpass filtered (5Hz-5kHz), and amplitude normalized to eliminate baseline drift and power frequency interference. Finally, a dataset containing more than 5,000 samples was constructed and divided into training, validation, and test sets in a 7:2:1 ratio.
[0053] S2, Overlapping Slice Processing
[0054] An overlapping slicing module was constructed to divide a long sequence of vibration signals X with N data points into multiple overlapping short segments. Specifically, a sliding window mechanism was used, with the window length L=20 and the overlap rate r=0.4.
[0055] The starting position of the kth segment The calculation formula is:
[0056] ;
[0057] The total number of segments is:
[0058] .
[0059] This step decomposes the long sequence into short segments, allowing the model to simultaneously focus on capturing both the high-frequency impacts (within a local segment) caused by bearing wear and the low-frequency vibration trends (inter-segment relationships) caused by misalignment. The processing procedure can be found in [reference needed]. Figure 2 The diagram shows an overlapping slice module.
[0060] S3, Gated Dual Attention Feature Extraction
[0061] The sliced fragments are then fed into a gated dual attention module (G-Block) for core feature extraction. This module executes the following sub-steps sequentially:
[0062] Local multi-head self-attention processing:
[0063] For each segment Embedding is performed, and the relationships between time steps within a segment are calculated to capture local transient features (such as fault shocks).
[0064] Embedded formula:
[0065] ;
[0066] Where GELU represents the activation function, which allows features to have non-linear expressive power, and the output... Dimension becomes , This represents the weight matrix of the embedding layer; This represents the bias vector of the embedding layer.
[0067] Multi-head attention calculation:
[0068] ;
[0069] Where concat represents the concatenation function. The “output projection matrix” representing local multi-head attention is a learnable parameter (weight matrix) in this module. Its function is to integrate the results of multiple attention heads and output the final local attention features.
[0070] Each attention head is represented as follows:
[0071] ;
[0072] in Calculate the "similarity" (attention score) between each time step and other time steps; The scaling factor is used to avoid excessively high similarity values that could lead to extreme softmax results. Finally, it is multiplied by V (local value matrix): the features are weighted and summed using attention weights to obtain the local features that the head focuses on.
[0073] Local enhanced features are obtained through residual connections (adding the original features and attention output) and layer normalization. :
[0074] ;
[0075] ;
[0076] in This represents the normalized features, which retain the original information while incorporating local relationships extracted through attention. This represents a feedforward neural network, that is, for Perform nonlinear transformations to capture more complex nonlinear relationships. This represents the final local enhancement feature, which includes the original information, attention relationships, and non-linear patterns.
[0077] This step focuses on extracting fine features within the fragment; the principle behind it can be found in [reference needed]. Figure 3 The diagram shows a local multi-head self-attention submodule.
[0078] Gating mechanism handling:
[0079] Adaptive channel-level filtering of local features enhances fault-related features and suppresses noise.
[0080] Average pooling along the time dimension yields global statistical features. ;
[0081] ;
[0082] in Indicates taking the first All channel features at time t are transformed from L×D to 1×D after this transformation, with the length being... The sequence is compressed into a single vector.
[0083] Gating vectors are generated using a two-layer bottleneck network. :
[0084] ;
[0085] in , This means first compressing D dimensions to D / 4 dimensions, and then restoring them to D dimensions, in order to reduce computation and enhance feature abstraction; It is the bias vector of the first fully connected layer (defined by the weight matrix W1). It is the bias vector of the second fully connected layer (defined by the weight matrix W2).
[0086] Adaptive scaling of features:
[0087] ;
[0088] in This is to broadcast a gated vector of shape 1×D to L×D and Shape correspondence, This indicates element-wise multiplication. This mechanism performs "channel-level filtering" on local features—features of important channels are preserved or enhanced, while features of noisy channels are suppressed, allowing subsequent modules (global attention) to focus only on useful information.
[0089] This step uses learnable gating vectors to perform feature selection; its workflow can be found in [reference needed]. Figure 4 The diagram shows a submodule of the gating mechanism.
[0090] Global cross-attention processing:
[0091] Model long-range dependencies between different segments to capture the global evolution pattern of faults.
[0092] Extract fragment-level representations from each gated fragment. Combined into a matrix ,
[0093] ;
[0094] ;
[0095] in Let R represent the representation of the k-th segment, which has a dimension of 1×D. The k representations are concatenated into a matrix R.
[0096] Use the projection matrix W to... The mapping is Query, Key, and Value, where Then, the global attention is calculated using the Q, K, and V values described above.
[0097] ;
[0098] Finally, the global attention output is mapped back to the original dimension and added to the gated local features for fusion, resulting in the final fragment features. This submodule is able to capture the evolution patterns of faults over a long period of time.
[0099] ;
[0100] ;
[0101] In the first formula It is K× The global features are mapped back to K×D. The computational complexity of traditional self-attention is... (K is the number of segments, L is the length of a single segment), while global cross-attention reduces the complexity to [a certain value] by "compressing it into segment-level representations before computation". It can efficiently process long vibration sequence data (avoiding computational resource overload under long sequences).
[0102] This step efficiently establishes global relationships between fragments; its structure can be found by referring to [reference needed]. Figure 5 The diagram shows the global cross-attention submodule.
[0103] S4, Classification Output
[0104] The global features output by the gated dual attention module are input into the classification module and mapped to the probability distribution of fault categories.
[0105] Global average pooling is performed on the global features to obtain the feature vector. h :
[0106] ;
[0107] The core of vibration faults is the "mode itself" (such as the high-frequency impact of bearing failure), rather than the "time of mode occurrence"—global average pooling just achieves "time translation invariance," avoiding misjudgment by the model because the fault appears at the beginning or end of the signal.
[0108] h After processing by a two-layer classifier (containing Dropout and GELU activation functions), the output fault probability distribution is obtained. :
[0109] ;
[0110] ;
[0111] in This is the weight matrix of the first fully connected layer in the classifier, and its function is to weight the feature vector obtained after global average pooling. h Perform a linear transformation to map to the hidden layer dimension; Is with The corresponding bias vector is used in linear transformations. Add an offset to the model to enable it to learn more complex decision boundaries and enhance its fitting ability. This is the weight matrix of the second fully connected layer in the classifier. Its dimensions are [hidden layer dimension, number of fault categories]. Its function is to weight the feature vector after processing by the first fully connected layer and activation function. The linear transformation is performed to a dimension equal to the number of fault categories, in preparation for the subsequent Softmax function to calculate the score for each category; Is with The corresponding bias vector, whose dimension is [number of fault categories], adds a basic offset to each fault category on the result of the linear transformation, enabling the model to learn a more flexible discrimination boundary.
[0112] In the above formula This means that during training, 30% of the neurons are randomly disabled to prevent the model from relying on "specific features" (such as a certain noisy channel) and to force the learning of more robust fault features.
[0113] S5, Model Training
[0114] The model is trained end-to-end using the training set.
[0115] A label-smoothed cross-entropy loss function is used to mitigate the class imbalance problem:
[0116] ;
[0117] Where M=5 represents the total number of fault categories; To smooth parameters, the core of traditional cross-entropy loss is to make the model's predicted probability for the "true category" as close to 1 as possible and the predicted probability for the "non-true category" as close to 0 as possible. However, this design has two obvious problems in pump vibration fault diagnosis scenarios: First, the model is overconfident and has poor generalization ability. There are far more normal pump samples than fault samples (imbalanced data). Traditional cross-entropy will cause the model to "force the prediction of the probability of normal samples to be above 0.99", but in actual industrial applications, fault signals may be mixed with noise. Overconfidence of the model will lead to "direct misclassification of noisy fault samples as normal". Second, it cannot adapt to scenarios with "similar fault features". The vibration features of different pump faults (such as bearing wear, shaft misalignment) overlap (for example, they all contain low-frequency fluctuations). Traditional cross-entropy requires the model to classify "black and white", which will cause the model to ignore the similarity between categories, resulting in samples with ambiguous boundaries (such as early compound faults) being misclassified. Choosing a smoothing factor of 0.1 is equivalent to making the model "not only make the probability of the true category high, but also make the probability of the non-true category not too low".
[0118] The AdamW optimizer is used for parameter updates, and the update rules are as follows:
[0119] ;
[0120] in This represents the model parameters at step t. The learning rate controls the step size for parameter updates. and This indicates that Adam's "bias-corrected first and second moment estimates" are used to adaptively adjust the learning rate of different parameters, such as using a small step size for parameters that are updated frequently and a large step size for parameters that are updated less frequently. This represents the weight decay coefficient, which controls the size of the model parameters to avoid overfitting due to excessively large parameters.
[0121] S6. Model Evaluation and Application
[0122] After training, the model weights that perform best on the validation set are selected, and the final performance is evaluated using an independent test set. In practical applications, the preprocessed vibration signal is input into the trained model, which can automatically perform slicing, feature extraction, and classification, ultimately outputting the predicted fault category.
[0123] The classification module maps the learned global features to probabilities of 5 states (normal + 4 types of faults). The model is trained using label smoothed cross-entropy loss and the AdamW optimizer, and its accuracy on the validation set stabilizes after 100 epochs.
[0124] The trained model is packaged into an inference engine and integrated into the edge computing device on site.
[0125] To comprehensively evaluate the performance of this invention, ablation and control experiments were designed, using the same training, validation, and test sets for fair comparison. All experiments were repeated six times, and average performance metrics were reported, including accuracy, precision, recall, F1 score, and AUC-ROC value.
[0126] The ablation experiments aimed to verify the necessity and contribution of each core module in this invention. We constructed the following model variants for testing:
[0127] 1. GMSAN (Complete Model of This Invention): A complete architecture including overlapping slices, local attention, gating mechanism, and global attention.
[0128] 2. w / o Dual-attention: Remove local and global attention mechanisms, and only retain overlapping slices and gating mechanisms.
[0129] 3. w / o Local Attention: Removes the local self-attention submodule and uses only gating and local attention for feature extraction and classification.
[0130] 4. w / o Global Attention: Removes the global cross-attention submodule and uses only the gated local features for classification.
[0131] 5. w / o Gating Mechanism: Remove the gating mechanism submodule, and local attention features are directly input into global attention.
[0132] 6. w / o Segmentation Mechanism: Removes overlapping segmentation mechanism.
[0133] The results of the ablation experiment are shown in Table 1 below:
[0134] Table 1: Ablation Experiment Results (Mean ± Standard Deviation)
[0135]
[0136] Results analysis:
[0137] The role of multi-scale attention: Removing the dual-attention feature extraction module (without dual-attention) leads to the most significant performance drop, with an average F1 score reduction of 32.1%. This highlights the crucial role of establishing correlations between local and global features in improving fault detection accuracy. This module significantly enhances the model's fault identification capability by fully utilizing the feature information contained in the signal.
[0138] The Role of Local and Global Attention: Removing feature extraction modules based on local or global attention (without Local Attention and without Global Attention) reduced the F1 score by 17.7% and 13.2%, respectively. These results indicate that relying solely on either local or global attention is insufficient for effective fault detection. Some local features are often early signs of faults but are easily masked by background noise. Local attention mechanisms, through self-attention computation, enhance the representation of these weak signals. On the other hand, some fault-related features do not exist in isolation but exhibit specific evolutionary patterns over longer time series. Global attention mechanisms capture these temporal dependencies by calculating the correlation between vibrational features at different time intervals. Removing either module limits the model's receptive field, ultimately constraining its fault detection performance.
[0139] The effects of gating and overlapping segmentation mechanisms: Removing the gating mechanism (without gating) and the overlapping segmentation mechanism (without segmentation) reduced the F1 score by 8.2% and 5.4%, respectively. These results indicate that different fault types exhibit varying performance intensity across feature dimensions, and that noise distribution in real-world environments is time-varying. The gating mechanism dynamically adjusts the importance weights of features, enabling the model to adapt to changing operating conditions and noise levels. Simultaneously, the synergistic effect of the overlapping segmentation mechanism and the dual-attention feature extraction module is key to fully realizing the model's potential.
[0140] Comparative experiment:
[0141] This invention is compared with several mainstream fault diagnosis methods to verify its leading edge.
[0142] The results of the comparative experiment are shown in Table 2 below:
[0143] Table 2: Comparative Experiment Results (Mean ± Standard Deviation)
[0144]
[0145] Results analysis:
[0146] Compared with traditional machine learning, the methods based on handcrafted features and SVM have the lowest performance, which confirms the problem pointed out in the background that feature engineering relies on expert knowledge and has limited adaptability.
[0147] Compared with classic deep learning: 1D-CNN performs reasonably well in capturing local features, but struggles to model long-range dependencies; LSTM suffers from gradient problems and unstable performance when processing long sequences. This invention significantly outperforms both.
[0148] Compared to benchmark attention models, this invention outperforms the standard Transformer model. This indicates that simple single-scale self-attention cannot effectively handle the multi-scale characteristics of pump vibration signals, while the gated dual-attention mechanism of this invention, through a divide-and-conquer strategy, is better at extracting robust features from complex signals. The collaborative workflow of the overall architecture of this invention can be found in [reference needed]. Figure 1 The system block diagram shown is shown.
[0149] Noise robustness test
[0150] To verify the practicality of this invention in a high-noise environment, we added Gaussian white noise with different signal-to-noise ratios (SNR) to the vibration signals in the test set.
[0151] The results of the noise robustness test are shown in Table 3 below:
[0152] Table 3: Model accuracy at different signal-to-noise ratios
[0153]
[0154] Results analysis:
[0155] In typical industrial environments where the signal-to-noise ratio (SNR) is usually between 10 and 20 dB, the GMSAN model maintains excellent diagnostic accuracy. At an SNR of 20 dB, GMSAN's diagnostic accuracy significantly outperforms the comparative models MQCCAF and SC-MSCNN. Even under strong noise interference with an SNR as low as 5 dB, GMSAN maintains a diagnostic accuracy of 84.7%, a decrease of only 8.4 percentage points compared to a noise-free, clean signal scenario. In contrast, the performance degradation of the comparative models is more severe: MQCCAF's accuracy drops by 15.1 percentage points, and SC-MSCNN's by 17.5 percentage points. This excellent noise robustness makes GMSAN particularly suitable for deployment in harsh industrial environments where noise levels are difficult to predict.
[0156] Meanwhile, comparative experiments between GMSAN and its gated ablation version (without a gated module) fully demonstrate the indispensability of the gated module for the model's noise resistance. In clean signal scenarios, the gated mechanism improved model accuracy by 8.2 percentage points (from 84.9% to 93.1%). More importantly, the effect of the gated mechanism becomes increasingly significant as noise intensity increases. This trend indicates that the gated mechanism can dynamically adapt to noisy environments, selectively enhancing fault-related feature information while suppressing noise-dominated feature channels. The effectiveness of this mechanism increases with noise intensity, making it crucial in real-world applications where noise levels are variable and often unpredictable.
[0157] In summary, through systematic ablation experiments, comparative experiments, and robustness tests, the data fully demonstrate that the pump fault detection method based on data slicing and gated dual attention neural networks provided in this invention is significantly superior to existing mainstream methods in terms of accuracy, robustness, and adaptability to complex fault modes, fully verifying its technological advancement and industrial application value.
[0158] Application example:
[0159] Early diagnosis of bearing inner ring faults in oilfield polymer injection pumps based on GMSAN
[0160] This case study uses a 3SHS-10 polymer injection pump at an oilfield as a specific application example to demonstrate the entire implementation process of the technical solution of this invention. During routine monitoring, the pump's vibration value slightly increased, but did not trigger a traditional threshold alarm, requiring precise diagnosis using this method.
[0161] S1. Data Collection and Preprocessing
[0162] Data Acquisition: Vibration signals were continuously acquired for 10 seconds from an accelerometer (sampling frequency 12.8kHz) mounted vertically on the pump drive end bearing housing. Total signal length N=128,000 data points.
[0163] Preprocessing: The original signal is subjected to mean removal and normalization to ensure its amplitude range is between [-1, 1]. This signal is then used as the model input.
[0164] S2, Overlapping Slice Processing
[0165] Parameter settings: According to the preferred embodiment in the document, the sliding window length L=20 and the overlap rate r=0.4 are set.
[0166] Calculation process:
[0167] Sliding window step size: =20 × 0.6 = 12;
[0168] Total number of segments K : K = (128000-20) / 12 +1 = 10666 segments.
[0169] Result: The original signal, with a length of 128,000, was divided into 10,666 overlapping short segments, each containing 20 data points. This process was performed by... Figure 2 The overlapping slice module shown is now complete.
[0170] S3, Gated Dual Attention Feature Extraction
[0171] With the first segment S 1 Taking the processing of (including the first 20 data points) as an example:
[0172] Local multi-head self-attention:
[0173] Excerpt S 1 Through the embedding layer, the dimension is transformed from 20 to 20×64 (assuming the feature dimension). D =64), obtained .
[0174] After local attention calculation, the correlation between 20 time points within the segment is captured, and local enhancement features are output. The dimensions remain 20×64. This process is as follows: Figure 3 As shown.
[0175] Gating mechanism:
[0176] right Calculate the mean along the time dimension (20 points) to obtain the segment-level statistical characteristics. The dimensions are 20×64.
[0177] Through a two-layer bottleneck network ( W 1 , W 2 Generate gated vectors [0, 1] 64 .
[0178] Will Broadcast to 20x64, with Element-wise multiplication yields the gated features. This mechanism is as follows: Figure 4 As shown, it can enhance the feature channels associated with bearing failure.
[0179] Global cross-attention:
[0180] Repeat steps 1 and 2 for all 10666 segments to obtain the gated features for each segment. .
[0181] For each Average pooling is performed to obtain 10666 fragment representation vectors. Combined into a matrix .
[0182] Global attention is computed at the fragment level to establish dependencies between different fragments and capture the global evolution pattern of faults. The final output is a feature that integrates local and global information. The structure of this module is as follows: Figure 5 As shown.
[0183] S4. Categorized Output (Fault Diagnosis)
[0184] Global average pooling is performed on the global features to obtain the final feature vector. h .
[0185] h By classifier (e.g.) , Calculated by (5 being the number of fault categories).
[0186] The Softmax function outputs a probability distribution, for example: =[0.02, 0.01, 0.05, 0.90, 0.02], corresponding to [normal, shaft misalignment, cavitation, bearing inner ring failure, impeller imbalance], respectively. The model diagnoses this signal with a 90% probability of indicating a bearing inner ring failure.
[0187] S5, Model Training
[0188] The model used in this case study has been trained on a historical dataset containing various fault types. Training parameters: Label-smoothed cross-entropy loss. AdamW optimizer (initial learning rate 0.001, weight decay) The batch size was 32, and the training lasted for 100 epochs.
[0189] S6. On-site verification and results
[0190] Diagnostic result: The model outputs a high-confidence alarm for a bearing inner ring fault.
[0191] On-site inspection: On-site technicians stopped the machine for inspection based on the warning. After disassembly, they found slight pitting on the inner ring of the bearing, which was completely consistent with the diagnosis.
[0192] Because the fault was detected in time, it prevented further damage such as bearing jamming and journal wear, thus verifying the high accuracy and practical value of the invention in early fault diagnosis.
[0193] Of course, the above description is not limited to the examples above. Technical features not described in this invention can be implemented by or using existing technology, and will not be repeated here. The above embodiments and drawings are only used to illustrate the technical solutions of this invention and are not intended to limit this invention. This invention has been described in detail with reference to preferred embodiments. Those skilled in the art should understand that any changes, modifications, additions or substitutions made by those skilled in the art within the scope of this invention do not depart from the spirit of this invention and should also fall within the scope of protection of the claims of this invention.
Claims
1. A pump fault detection method based on data sharding and gated dual-attention neural network, characterized in that: Includes the following steps: S1. Collect vibration signal data of industrial pumps under different operating conditions, preprocess the signals, and divide them into training set, validation set and test set; S2. The long sequence of vibration signals is divided into multiple overlapping segments by the overlapping slicing module in order to capture fault characteristics at different time scales. S3. Input the fragment into the gated dual attention module for feature extraction. The gated dual attention module executes the following steps sequentially: Local multi-head self-attention operation is used to extract local transient features within a fragment; The gating mechanism operates by adaptively scaling local features at the channel level to enhance fault-related features and suppress noise. Global cross-attention operation is used to model long-range dependencies between different segments and capture the global evolution pattern of faults; Gated dual attention feature extraction: The sliced fragments are input into the gated dual attention module for core feature extraction; This module executes the following sub-steps sequentially: Local multi-head self-attention processing: for each segment Embedding is performed, and the relationships between time steps within a segment are calculated to capture local transient features; Embedded formula: Where GELU represents the activation function, allowing features to have non-linear expressive power, and the output... Dimension becomes , This represents the weight matrix of the embedding layer; Represents the bias vector of the embedding layer; multi-head attention calculation: Where concat represents the concatenation function, The output projection matrix representing local multi-head attention is a weight matrix in this module. Its function is to integrate the results of multiple attention heads and output the final local attention features. Each attention head is represented as follows: ;in Calculate the similarity between each time step and other time steps; To avoid excessively high similarity values leading to extreme softmax results, the scaling factor is multiplied by V. The features are then weighted and summed using attention weights to obtain the local features of interest. Local enhancement features are obtained through residual connections and layer normalization. : ; ; in This represents the normalized features, which retain the original information while incorporating local relationships extracted through attention. This represents a feedforward neural network, that is, for Perform nonlinear transformations to capture more complex nonlinear relationships. The final local enhancement features contain not only the original information, but also attention relationships and non-linear patterns. The gating mechanism operation specifically includes: Features of local multi-head self-attention output Average pooling is performed along the time dimension to obtain fragment-level global statistical features. ; Will Input a two-layer bottleneck network and generate gated vectors. The formula is: , gate vector Through broadcasting mechanism and Element-wise multiplication is performed to achieve adaptive scaling of the features, resulting in gated features. ;in , This means first compressing D dimensions to D / 4 dimensions, and then restoring them to D dimensions; It is the bias vector of the first fully connected layer. It is the bias vector of the second fully connected layer; The global cross-attention operation specifically includes: processing the features of each gated segment. Average pooling is performed to obtain the representation vectors of each segment. And combine them into a fragment-level representation matrix. ;Will Mapped to query matrices respectively Key matrix Sum matrix ; Calculate global attention output ;Will Mapping back to the original dimension and corresponding gated local features The features are added together and fused to obtain the final feature representation. ; S4. Input the global features output by the gated dual attention module into the classification module, map them to the probability distribution of fault categories, and complete the fault detection. S5. Define the loss function and optimization strategy, and use the training set to train the model end-to-end. S6. After the model training is completed, select the weights that perform best on the validation set and use an independent test set to evaluate the final fault detection performance of the model.
2. The pump fault detection method based on data sharding and gated dual attention neural network according to claim 1, characterized in that: In step S2, the overlapping slice module is implemented through a sliding window mechanism, given a sliding window length. and overlap rate , No. The starting position of each segment for: The total number of segments is , where N is the total length of the signal.
3. The pump fault detection method based on data sharding and gated dual attention neural network according to claim 1, characterized in that: In step S4, the classification module first performs global average pooling on the global features to obtain the feature vector. h Subsequently h After processing by a two-layer classifier containing a Dropout layer and a GELU activation function, the failure category probability is finally output through the Softmax function.
4. The pump fault detection method based on data sharding and gated dual attention neural network according to claim 1, characterized in that: In step S5, the model is trained using the label-smoothed cross-entropy loss function, the formula of which is: ; in M represents the total number of fault categories. For smoothing parameters, I This is an indicator function.
Citation Information
Patent Citations
Bearing fault diagnosis method and system based on cross-working-condition unbalanced data
CN117828350A
Bearing fault diagnosis method based on time-frequency enhancement CNN-Transformer
CN120086668A