A hydraulic pump fault identification method combining time-frequency masking and sequence modeling
By combining time-frequency masking and sequence modeling, the problems of long-range time-series dependence and noise interference in hydraulic pump vibration signal processing by traditional methods are solved, and efficient identification and stable classification of hydraulic pump faults are achieved.
Patent Information
- Application Number
- CN202611614248.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-19
- Publication Date
- 2026-11-17
AI Technical Summary
Traditional methods are difficult to effectively handle the long-term time-series dependence and noise interference of hydraulic pump vibration signals, and lack an adaptive enhancement mechanism for fault characteristics, making it impossible to accurately identify the fault state of hydraulic pumps.
By combining time-frequency masking and sequence modeling, multi-channel input features are constructed, time-frequency mapping and enhancement are performed, high-level time-frequency features are extracted using a two-dimensional convolutional encoder, and intelligent identification of hydraulic pump faults is achieved through state-space sequence modeling and multi-view pooling feature fusion.
It improves the accuracy and robustness of hydraulic pump fault identification, effectively extracts multi-scale temporal features under complex working conditions, and enhances the sensitivity to fault state discrimination and the stability of classification results.
Smart Images

Figure CN123116031A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial equipment condition monitoring and deep learning fault identification technology, specifically involving a hydraulic pump fault identification method that combines time-frequency masking and sequence modeling. Background Technology
[0002] As the core power component of a hydraulic system, the hydraulic pump's operating status directly affects the reliability and efficiency of the entire system. In modern industrial production, hydraulic pumps are widely used in machine tools, construction machinery, aerospace, shipbuilding, and many other fields. Their health monitoring and fault diagnosis are crucial for ensuring safe equipment operation and preventing major accidents. During operation, vibration responses collected from different directions often characterize the pump's operating status as multi-channel one-dimensional time-series signals. These vibration signals contain rich equipment condition information and can effectively reflect the wear, fatigue, cracks, and other degradation characteristics of the pump's internal components.
[0003] Due to factors such as load fluctuations, background interference, complex structural transmission paths, and vibration coupling of multiple components, the characteristic information corresponding to different fault states often presents a complex form with weak features, non-stationarity, and local modulation. The vibration signals of the hydraulic pump in both directions include both the original amplitude response information and the dynamic change information between adjacent sampling points. If only the original signal is used, it is difficult to fully characterize the subtle differences in the state change process; if an explicit time-frequency representation is lacking, some fault modes with short-time modulation or frequency band energy transfer characteristics are difficult to separate effectively. Traditional methods rely only on a single time-domain statistic or single-scale feature, which is difficult to reliably achieve fault differentiation, especially when the fault features are comparable to the background noise energy, making it difficult to guarantee the identification accuracy.
[0004] With the development of deep learning technology, convolutional neural networks have been widely used in the field of fault diagnosis. However, although existing convolutional neural networks can automatically learn local features, when processing industrial vibration sequences with obvious long-term dependencies, simply relying on local convolution operations can easily ignore the correlation structure across time frames, resulting in insufficient understanding of the temporal patterns of fault evolution. On the other hand, directly modeling the original long sequence is easily affected by factors such as noise, amplitude scale differences, and unclear local transient structures, resulting in insufficient ability of the model to extract effective fault features. In addition, existing feature extraction methods lack adaptive identification and enhancement mechanisms for fault-related time-frequency regions, making it difficult to specifically highlight key feature components closely related to the fault state.
[0005] Based on this, the present invention proposes a hydraulic pump fault identification method that combines time-frequency masking and sequence modeling to solve the problems existing in the prior art. Summary of the Invention
[0006] To address the aforementioned technical problems, this invention provides a hydraulic pump fault identification method that combines time-frequency masking and sequence modeling. This method solves the problems that traditional convolutional networks struggle to model long-range temporal dependencies of vibration sequences, long-sequence modeling is susceptible to noise amplitude interference, and existing time-frequency methods lack an adaptive enhancement mechanism for fault features, making it impossible to integrate the amplitude and dynamic change information of hydraulic pump vibration.
[0007] To achieve the above objectives, the present invention provides the following technical solution: A hydraulic pump fault identification method combining time-frequency masking and sequence modeling includes the following steps: Step 1: Obtain vibration time series samples of the hydraulic pump, and perform length uniformization processing on the vibration time series samples to construct multi-channel input features; Step 2: Perform multi-channel time-frequency mapping and time-frequency masking enhancement on the multi-channel input features respectively to obtain the enhanced multi-channel time-frequency representation; Step 3: Input the enhanced time-frequency representation into a two-dimensional convolutional encoder to extract high-level time-frequency features, and aggregate them along the frequency dimension to obtain a time-series feature sequence; Step 4: Input the time-series feature sequence into the state-space sequence modeling module to extract the long-range time-dependent features from the hydraulic pump vibration signal; Step 5: Input the temporal features processed in Step 4 into the multi-view pooling feature fusion module, and perform attention pooling, global average pooling and global max pooling in parallel to mine and discriminate features from multiple perspectives and complete feature fusion. Step 6: Input the fused features into the classification head for model training and output the hydraulic pump status recognition result.
[0008] In a preferred embodiment, in step 1, during the construction of multi-channel input features, differential features are first constructed for the dual-channel vibration signal, and then the original dual-channel signal and the differential dual-channel signal are spliced together in the channel dimension to form a four-channel input feature. The four-channel input features are then standardized based on the mean and standard deviation of each channel obtained from the training samples.
[0009] In a preferred embodiment, step 1, the process of constructing differential features for the dual-channel vibration signal, includes: Assume the dual-channel vibration signal with uniform length is Its corresponding difference feature is: ; in, This indicates that the dual-channel status monitoring signal after length unification is in the [number]th [section]. The signal vector at each sampling time; Indicates the index of discrete sampling time; This represents the dual-channel signal vector at the previous sampling time. This represents the two-channel differential characteristics between adjacent sampling times; Based on this, the original dual-channel signal and the differential dual-channel signal are spliced together in the channel dimension through the channel splicing module to form a four-channel input feature; Finally, the four-channel input features are standardized.
[0010] In a preferred embodiment, step 2, when performing multi-channel time-frequency mapping on the multi-channel input features, includes: First, the standardized four-channel input features are organized into a shape of... tensor; in, , The unified time length; Subsequently, multi-channel STFT, amplitude taking, and logarithmic mapping are performed sequentially for each channel to obtain the logarithmic amplitude time-frequency representation for each channel, which is then combined into a multi-channel time-frequency representation; After taking the amplitude of the complex time spectrum, logarithmic compression is then performed to form a multi-channel logarithmic amplitude time-frequency diagram.
[0011] In a preferred embodiment, step 2, which involves performing time-frequency masking enhancement on the multi-channel logarithmic magnitude time-frequency map, includes: First, two layers of two-dimensional convolutional units are used sequentially to extract features from the input time-frequency map. Normalization and SiLU nonlinear activation functions are set after each convolutional unit. Then, let the time-frequency masking network be used to process the input time-frequency graph. The output is mapped to The mask tensor obtained after mapping by the Sigmoid function for: ; in, c This represents the channel index, corresponding to a specific channel in the four-channel input feature. k Index representing the frequency dimension; m Index representing the time dimension; The Sigmoid activation function is used to obtain a mask tensor with values between 0 and 1, which can be used as a weighting coefficient to modulate the original time-frequency diagram. The mask tensor and the input time-frequency graph are subjected to element-wise weighted modulation through the time-frequency mask enhancement module to obtain the enhanced multi-channel time-frequency representation.
[0012] In a preferred embodiment, in step 3, the two-dimensional convolutional encoder includes two convolutional front-ends and multiple two-dimensional convolutional blocks with residual connections. The convolutional front end consists of two 2D convolutional layers: the first layer increases the number of input channels from 4 to 24, and the second layer keeps the number of channels unchanged at 24. The residual convolutional block includes: Residual convolution block 1 increases the number of channels from 24 to 48 and performs downsampling within the block; Residual convolution block 2 increases the number of channels from 48 to 96, and also includes downsampling; Residual convolution block 3, keeping 96 channels unchanged, does not change the feature map resolution.
[0013] In a preferred embodiment, in step 4, the state space sequence modeling module includes three cascaded Mamba sequence modeling units; each Mamba sequence modeling unit includes a normalization layer, a state space mapping unit Mamba module, a Dropout layer, and a residual connection.
[0014] In a preferred embodiment, in step 5, the multi-view pooling feature fusion module includes three parallel feature extraction branches: attention pooling branch, global average pooling branch, and global max pooling branch.
[0015] In a preferred embodiment, step 5, when the multi-view pooling feature fusion module is working, includes: In the attention pooling branch, the attention score for each time frame is first calculated through a linear layer. s i : ; in, Indicates the first i Sequence modeling outputs features for each time frame; These represent the learnable weight parameters and biases, respectively. Then, the scoring value is obtained through the Softmax function. Convert to attention weights to obtain their attention weights. for: ; Make the sum of the attention weights for all time frames equal to 1; in, The value calculated by the attention scoring network represents the first... The score value for each time frame; Indicates the first Attention scoring for each time frame; Indicates the index of the current time frame; Indicates the summation index; Based on attention weights, the features of each time frame are weighted and summed to obtain the attention aggregated features: ; in, This represents the aggregated features obtained from attention pooling; Indicates the first Sequence modeling outputs features for each time frame; Indicates the time frame index; The global average pooling branch averages the features across all time frames along the time dimension to obtain the global average pooled features. and global max pooling features The three features are then concatenated along the feature dimension to form a fused feature: ; Subsequently, the fused features are input into the classification head, and after linear mapping, layer normalization, SiLU activation, and output layer processing, the hydraulic pump state category prediction results are obtained.
[0016] In a preferred embodiment, in step 6, during the model training phase, cross-entropy loss is used as the main loss function, and a mask smoothing regularization term is introduced. The total loss function is then obtained. L for: ; in, Represents the classification loss term; This represents a mask smoothing regularization term; This represents the smoothing constraint weight.
[0017] Compared with existing technologies, this invention provides a hydraulic pump fault identification method that combines time-frequency masking and sequence modeling, which has the following advantages: This method constructs a differential channel on the basis of the original dual-channel vibration signal to form a four-channel input feature, thereby realizing the synchronous representation of bidirectional vibration information. At the same time, the original dual-channel vibration signal retains the absolute vibration amplitude information, while the constructed differential feature captures the vibration change trend and transient fluctuation information. The two complement each other to enhance the completeness of feature expression and improve the sensitivity of state discrimination.
[0018] This method combines explicit time-frequency mapping with learnable time-frequency masks to achieve adaptive enhancement of fault-related time-frequency regions. At the same time, the time-frequency mask network automatically generates mask weights with values between 0 and 1 by learning, giving higher weights to time-frequency regions related to fault states for enhancement and lower weights to background interference regions for suppression, effectively reducing the interference of irrelevant background components on feature extraction.
[0019] This method combines two-dimensional convolutional coding with state-space sequence modeling to achieve both the capture of local time-frequency textures and the representation of long-range temporal dependencies. Meanwhile, the two-dimensional convolutional encoder extracts high-level time-frequency features layer by layer through multi-level residual convolutional blocks, while the state-space sequence modeling module models long-range dependencies across time frames through cascaded Mamba units. The two work together to achieve complete extraction of multi-scale temporal features, thereby improving the feature representation capability under complex working conditions.
[0020] This method achieves multi-perspective feature fusion of fault states through a fusion mechanism of attention pooling, global average pooling, and global max pooling. At the same time, attention pooling adaptively allocates time frame weights according to the data-driven approach, global average pooling retains overall statistical information, and global max pooling retains extreme feature responses. The fusion of the three comprehensively characterizes fault state features from different statistical perspectives, improving the stability and robustness of the classification results.
[0021] This method is applicable to the intelligent identification of normal and various fault states of hydraulic pumps, including normal state, slipper fault, cylinder block fault, plunger fault and distributor plate fault, and can provide an effective technical means for hydraulic pump condition monitoring and fault diagnosis; it is also applicable to industrial equipment condition monitoring and intelligent diagnosis application scenarios under complex working conditions.
[0022] This solves the problems that traditional convolutional networks have difficulty modeling long-range temporal dependencies of vibration sequences, long sequence modeling is easily affected by noise amplitude, and existing time-frequency methods lack an adaptive enhancement mechanism for fault features, making it impossible to integrate the amplitude and dynamic change information of hydraulic pump vibration. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the overall network architecture of the hydraulic pump fault identification method of the present invention.
[0024] Figure 2 This is a flowchart of the input preprocessing and feature construction process for the present invention.
[0025] Figure 3 This is a flowchart of the multi-channel time-frequency mapping and time-frequency mask generation process of the present invention.
[0026] Figure 4 This is a schematic diagram of the two-dimensional convolutional encoder structure of the present invention.
[0027] Figure 5 This is a schematic diagram of the state space sequence modeling module of the present invention.
[0028] Figure 6 This is a schematic diagram of the attention pooling and classification head structure of the present invention.
[0029] Figure 7 This is a schematic diagram of the training loss curve for the hydraulic pump fault identification method of the present invention.
[0030] Figure 8 This is a schematic diagram of the counting confusion matrix of the hydraulic pump fault identification method of the present invention.
[0031] Figure 9 This is a schematic diagram of the normalized confusion matrix of the hydraulic pump fault identification method of the present invention. Detailed Implementation
[0032] 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.
[0033] As per the instruction manual Figure 1 -Appendix Figure 9 As shown, this embodiment of the invention provides a hydraulic pump fault identification method combining time-frequency masking and sequence modeling. Its overall network structure includes an input and preprocessing stage, a time-frequency mapping and enhancement stage, a CNN encoder, a Mamba sequence modeling module, a multi-view pooling feature fusion module, and a classification head. This method processes the bidirectional vibration signal of the hydraulic pump in an end-to-end manner, ultimately outputting five categories of hydraulic pump state identification results, including normal state, slipper fault, cylinder block fault, plunger fault, and distributor plate fault. Its specific steps include: Step 1: Obtain vibration time-series samples of the hydraulic pump, and perform length uniformization processing on the vibration time-series samples to construct multi-channel input features; specifically including: Step 1.1: First, obtain vibration time-series samples of the hydraulic pump from two directions using the raw vibration data input module; specifically: Step 1.1.1: Install vibration sensors in the X and Y directions perpendicular to each other on the hydraulic pump to obtain multi-dimensional vibration response signals and obtain bidirectional vibration samples of the hydraulic pump to be processed; Step 1.1.2: Organize each bidirectional vibration sample into a two-dimensional time-series matrix including two columns of channel data, where the two columns correspond to the vibration response in the two directions respectively; Step 1.1.3: For samples where the channel dimension and time dimension are not arranged in a consistent manner, the dimension unification alignment module is used to adjust them into a unified data arrangement so that the samples satisfy the matrix structure of "number of time points × number of channels".
[0034] Step 1.2: Subsequently, the samples are processed for length uniformity using the interpolation resampling module; Vibration samples from different collection periods or under different operating conditions often have different sampling lengths. In order to eliminate the impact of the length difference between samples on the consistency of subsequent network input, this embodiment adopts a linear interpolation resampling method to uniformly map samples of different lengths to a preset target length of 3072 sampling points.
[0035] The setting of this target length takes into account the characteristic period of the hydraulic pump vibration signal, computational efficiency, and the standardization requirements of the model input, ensuring that samples of different lengths have a unified representation in the temporal dimension.
[0036] Step 1.3: After unifying the lengths, a dual-channel differential feature construction module is used to extract differential features from the two vibration signals to enhance the characterization of vibration change trends and transient fluctuation information; specifically: Step 1.3.1: Assume the dual-channel vibration signal after unifying the length is... Its corresponding difference feature can be expressed as: (1); in, This indicates that the dual-channel status monitoring signal after length unification is in the [number]th [section]. The signal vector at each sampling time; Indicates the index of discrete sampling time; This represents the dual-channel signal vector at the previous sampling time. It represents the dual-channel differential characteristics between adjacent sampling times, used to characterize the transient changes and dynamic fluctuations of the state monitoring signal.
[0037] The introduction of differential features enhances the ability to characterize vibration change trends and transient fluctuation information, and can capture dynamic change patterns that are difficult to observe directly in the original signal.
[0038] Step 1.3.2: Based on this, the original dual-channel signal and the differential dual-channel signal are spliced together in the channel dimension using a channel splicing module to form a four-channel input feature, thus simultaneously preserving the original vibration response information and vibration change information. The four-channel input feature can be expressed as: (2); in, Indicates the first The multi-channel input features are constructed at each sampling time. This represents the original dual-channel status monitoring signal; Indicates the corresponding two-channel differential feature; symbol This indicates that splicing is performed in the channel dimension. Since the original signal is two-channel and the differential feature is also two-channel, the spliced signal forms a four-channel input feature.
[0039] The original dual-channel vibration signal retains the absolute vibration amplitude information, while the constructed differential features capture the vibration change trend and transient fluctuation information. The two complement each other and enhance the completeness of the feature expression.
[0040] Step 1.3.3: Finally, the four-channel input features are standardized using the global standardization module; specifically: Each channel obtained from training sample statistics c mean with standard deviation The four-channel input features are standardized to reduce the differences in dimensions and amplitude scales between different channels, thereby improving the stability of network training. The standardization process can be expressed as: (3); in, Represents the standardized version of the first... Each channel at time The output characteristics; Indicates the first Each channel at time Input features, and These represent the mean and standard deviation of the corresponding channel in the training samples, respectively. The tiny constant introduced to prevent the denominator from being zero is set to 1 × 10. -8 .
[0041] This standardization process is performed based on the mean and standard deviation of each channel obtained from the training samples. It can effectively reduce the differences in dimensions and amplitude scales between different channels, thereby improving the stability and convergence speed of network training.
[0042] Step 2: Perform multi-channel time-frequency mapping and time-frequency masking enhancement on the multi-channel input features respectively to obtain the enhanced multi-channel time-frequency representation; specifically including: Step 2.1: Perform multi-channel time-frequency mapping on the multi-channel input features respectively; specifically: Step 2.1.1: Organize the standardized four-channel input features into a shape of... In this embodiment, the tensor of... ; For the unified time length, =3072.
[0043] Step 2.1.2: Subsequently, multi-channel STFT, amplitude taking, and logarithmic mapping are sequentially performed on each channel to obtain the logarithmic amplitude time-frequency representation for each channel, which is then combined into a multi-channel time-frequency representation. Specifically: Let the first The discrete input signals of each channel are Then its short-time Fourier transform result It can be represented as: (4); in, Indicates the first The first channel in the The first time frame, the first The short-time Fourier transform results at each frequency index; Indicates the input channel index; Indicates the first The first channel in the Discrete input signal at each sampling point; Indicates the index of the sampling points within the window; Indicates the window function; Indicates frame shift; Indicates the number of points in the Fourier transform; Indicates frequency index; Indicates the time frame index; Represents the imaginary unit; This represents an exponential function.
[0044] In this embodiment, a Hanning window is used to reduce spectral leakage and frame shift. H The value is set to 32, and N, the number of Fourier transform points, is set to 128. The frequency resolution of the short-time Fourier transform is determined by the number of Fourier transform points, while the time resolution is determined by the frame shift. The two need to be weighed and selected based on the characteristics of the vibration signal.
[0045] Step 2.1.3: After taking the amplitude of the complex time-frequency spectrum, logarithmic compression is then performed to reduce the difference between strong and weak energy levels and enhance the distinguishability of weak fault-related time-frequency components, thereby forming a multi-channel logarithmic amplitude time-frequency plot. Its expression is: (5); in, Indicates the first The first channel in the The first time frame, the first The logarithmic magnitude at each frequency index represents the time-frequency representation; This represents the result of the complex short-time Fourier transform at the corresponding position; Represents the amplitude of the spectrum when it is a complex number; Represents the natural logarithm function; constant This is used to ensure the numerical stability of logarithmic operations and to avoid calculation anomalies when the amplitude is zero.
[0046] The stability of numerical calculations is ensured by adding a constant 1 before taking the logarithm. Logarithmic compression can effectively compress the dynamic range of the signal, making weak feature components more prominent visually and analytically, which facilitates the subsequent identification and enhancement of fault-related regions by the network.
[0047] Step 2.2: Perform time-frequency masking enhancement on the multi-channel logarithmic amplitude time-frequency plot to obtain the enhanced multi-channel time-frequency representation; specifically: Step 2.2.1: The time-frequency masking network learns importance weights at different channels, time frames, and frequency positions to adaptively enhance the time-frequency regions related to the fault state and suppress background interference regions. The time-frequency masking network includes two two-dimensional convolutional layers, a pointwise convolutional mapping layer, and a sigmoid activation function. During operation... First, two layers of two-dimensional convolutional units are used sequentially to extract features from the input time-frequency map. Normalization and SiLU nonlinear activation functions are set after each convolutional unit.
[0048] The SiLU activation function is expressed as: ; in, This represents the eigenvalues of the input SiLU activation function; This represents the Sigmoid function, used to map input features to... Within the range; This represents the output feature value after activation; Compared to the ReLU function, it has a smoother gradient and better convergence properties.
[0049] Then, let the time-frequency masking network be used to process the input time-frequency graph. The output is mapped to The mask tensor obtained after mapping by the Sigmoid function is... It can be represented as: (6); in, Indicates the first The first channel in the The frequency index, the first Time-frequency mask weights generated at each time frame; This represents the time-frequency plot of the multi-channel logarithmic magnitude of the input. The mapping function representing the time-frequency masking network; This represents the Sigmoid activation function, used to map mask weights to... to between; This represents the channel index, corresponding to a specific channel in the four-channel input feature. Indicates frequency index; Indicates the index of the time dimension.
[0050] In this embodiment, the number of hidden channels of both the two-dimensional convolutional unit 1 and the two-dimensional convolutional unit 2 is set to 32, and the kernel size is 3×3, so as to extract time-frequency features in the local neighborhood.
[0051] Step 2.2.2: To achieve adaptive enhancement while preserving the original time-frequency energy information, the mask tensor and the input time-frequency map are element-wise weighted and modulated through the time-frequency mask enhancement module to obtain the enhanced time-frequency representation. The enhanced time-frequency representation is as follows: (7); in, This represents the enhanced time-frequency representation; This represents the time-frequency plot of the logarithmic magnitude before enhancement. This represents the mask weights generated by the time-frequency masking network; This represents the residual enhancement weight term, used to highlight fault-related regions while preserving the original time-frequency energy.
[0052] This allows the time-frequency regions related to hydraulic pump fault states to be highlighted, while background regions unrelated to the fault are suppressed. The time-frequency masking network automatically adjusts its parameters through backpropagation learning, enabling the generated mask to adaptively focus on the characteristic frequency bands and time intervals corresponding to various fault states.
[0053] Step 3: Input the enhanced time-frequency representation into a two-dimensional convolutional encoder to extract high-level time-frequency features, and aggregate them along the frequency dimension to obtain a temporal feature sequence; specifically including: Step 3.1: The encoder first extracts basic local texture features through two convolutional front-ends: the first convolutional front-end performs a convolution operation, increasing the number of channels from 4 to 24; the second convolutional front-end performs a convolution operation, maintaining the number of channels at 24. Each convolutional front-end uses a 3×3 convolutional kernel with a stride of 1, and is equipped with a batch normalization layer and a ReLU activation function. This convolutional front-end design can gradually increase the number of feature channels while maintaining spatial resolution, extracting multi-scale local texture information.
[0054] Step 3.2: Subsequently, higher-level time-frequency representations are extracted step-by-step through three 2D convolutional blocks with residual connections. Residual convolutional block 1 includes a downsampling operation, increasing the number of channels from 24 to 48, and uses a 2×2 downsampling stride to expand the receptive field and compress the time-frequency feature size. Residual convolutional block 2 also includes a downsampling operation, increasing the number of channels from 48 to 96. Residual convolutional block 3 maintains 96 channels and does not include a downsampling operation to further refine the feature representation. Each residual convolutional block uses a residual connection structure, where the main branch output is added to the input channel by channel to facilitate gradient propagation and training stability. Each residual convolutional block contains two 3×3 convolutional layers, a batch normalization layer, a ReLU activation function, and an optional Dropout layer.
[0055] Step 3.3: After convolutional encoding, an adaptive average pooling layer along the frequency dimension is used to compress the two-dimensional time-frequency features into a one-dimensional temporal feature sequence. This pooling operation averages along the frequency dimension, compressing the original two-dimensional time-frequency feature map (number of time frames × number of frequencies × number of channels) into a one-dimensional temporal feature sequence (number of time frames × number of channels). Subsequently, a 1×1 convolutional projection layer maps it to a unified feature dimension to meet the input requirements of the subsequent sequence modeling module. The projected temporal feature dimension is set to 128, ensuring sufficient feature representation while controlling computational complexity.
[0056] Step 4: Input the time-series feature sequence into the state-space sequence modeling module to extract long-range time-dependent features from the hydraulic pump vibration signal; specifically including: The state-space sequence modeling module consists of three cascaded Mamba sequence modeling units. During operation, the input sequence is first normalized using a LayerNorm layer to stabilize the data distribution within the network. Then, the three cascaded Mamba sequence modeling units sequentially extract temporal features and model long-range dependencies. Each Mamba sequence modeling unit includes a normalization layer, a state-space mapping unit (Mamba module), a Dropout layer, and residual connections.
[0057] In this embodiment, the Mamba module is a sequence modeling method based on a state-space model. By introducing a selection mechanism and a hardware-aware algorithm, it can model long sequence dependencies in linear time complexity. Compared to the traditional Transformer attention mechanism, Mamba has higher computational efficiency and lower memory usage when processing long sequences. The model dimension d_model of the Mamba sequence modeling module is set to 128, the state space dimension is set to 16, and the Dropout ratio is set to 0.1. After concatenation processing, the output features are normalized globally using LayerNorm to output enhanced temporal features with long-range temporal dependency representation capabilities.
[0058] The design of the state-space sequence modeling stage enables the network to model long-range dependencies across time frames while preserving local time-frequency enhancement results. Fault features in hydraulic pump vibration signals often exhibit complex dependency patterns in the time dimension, such as the slow accumulation of initial fault features, periodic fluctuations during fault development, and state transitions between different fault stages. By explicitly modeling these long-range temporal dependencies through the Mamba sequence modeling module, the network can more accurately capture the dynamic process of fault evolution, thereby improving the accuracy and robustness of fault identification.
[0059] Step 5: Input the temporal features processed in Step 4 into the multi-view pooling feature fusion module, and perform attention pooling, global average pooling, and global max pooling in parallel to mine discriminative features from multiple perspectives and complete feature fusion; specifically including: Step 5.1: The multi-view pooling feature fusion module includes three parallel feature extraction branches: attention pooling, global average pooling, and global max pooling. During operation: In the attention pooling branch, the attention score for each time frame is first calculated through a linear layer. s i : ; in, For the first i Sequence modeling outputs features for each time frame; These are the learnable weight parameters and biases.
[0060] Step 5.2: Then, the scoring value is calculated using the Softmax function. Converted to attention weights, let's say we get the th sequence after sequence modeling. Each time frame feature is The attention weights are represented as follows: (8); in, Indicates the first Attention weights corresponding to each time frame; Indicates the first Attention scoring for each time frame; Indicates the first Attention scoring for each time frame; Indicates the index of the current time frame; Indicates the summation index; the summation range covers all. One time frame; This represents the total number of time frames output by the state-space sequence modeling module. This formula allows the sum of the attention weights for all time frames to be equal to 1.
[0061] Step 5.3: Based on the attention weights, perform a weighted summation of the features from each time frame to obtain the attention-aggregated features: (9).
[0062] in, This represents the aggregated features obtained from attention pooling; Indicates the first Attention weights for each time frame; Indicates the first Sequence modeling outputs features for each time frame; This represents the time frame index. The formula represents a weighted summation of features across all time frames based on their importance weights.
[0063] Attention pooling can adaptively focus on temporal segments that are more important for fault classification and automatically learn the relative importance of different time frames.
[0064] The global average pooling feature is represented as: ; The global max pooling feature is represented as: ; The maximum value operation involves taking the maximum value for each feature dimension.
[0065] The global average pooling branch averages the features across all time frames along the time dimension to obtain the global average pooled features. and global max pooling features The three features are then concatenated along the feature dimension to form a fused feature: (10); Subsequently, the fused features are input into the classification head, and after linear mapping, layer normalization, SiLU activation, and output layer processing, the hydraulic pump state category prediction results are obtained.
[0066] In this embodiment, the number of output categories is set to 5, corresponding to normal state, slipper fault, cylinder block fault, plunger fault, and distributor plate fault, respectively.
[0067] Since the features extracted by the three pooling methods are all 128-dimensional, the fused feature dimension is 384-dimensional. This multi-view feature fusion mechanism can combine the advantages of different pooling methods, comprehensively characterize the fault state features of hydraulic pumps, and improve the stability and robustness of classification results.
[0068] The fused features are then processed sequentially through a fully connected layer, a LayerNorm layer, and a SiLU activation layer, and finally output as a 5-dimensional classification probability through an output layer. The number of output categories is set to 5, corresponding to normal state, slipper fault, cylinder block fault, plunger fault, and distributor plate fault, respectively.
[0069] The hidden layer dimension of the fully connected layer is set to 256, and after LayerNorm normalization and SiLU activation, it is mapped to a 5-dimensional output space. The output layer uses the Softmax function to transform logits into probability distributions for each category to achieve multi-class classification.
[0070] Step 6: Input the fused features into the classification head for model training and output the hydraulic pump status recognition result. Specifically, this includes: During the model training phase, cross-entropy loss is used as the main loss function to supervise the class prediction results; simultaneously, to constrain the continuity of the time-frequency mask in both the time and frequency dimensions, a mask smoothing regularization term is introduced. The total loss function can be expressed as: (11); in, Represents the classification loss term; This represents a mask smoothing regularization term; This represents the smoothing constraint weight.
[0071] The classification loss term uses cross-entropy loss, which can be expressed as: ; in, Indicates the number of samples in a mini-batch; Indicates the number of hydraulic pump status categories; Indicates the first The sample at the th The actual labels in each category are encoded using one-hot encoding; The model predicts the first... The sample belongs to the first The probability of each category.
[0072] The mask smoothing regularization term can be expressed as: ; in, Indicates the number of channels; Indicates the number of frequency units; Indicates the number of time frames; Indicates the first The first channel in the The frequency index and the first The mask weights at each time frame. This regularization term constrains adjacent changes in the mask in both the frequency and time dimensions, making the mask distribution smoother and avoiding excessive abrupt changes.
[0073] In this embodiment, the mask smoothing constraint weight is set to The training optimizer uses AdamW, and the learning rate is set to... The weight decay coefficient is set to The training iterations were set to 30, and the batch size to 8. The AdamW optimizer effectively prevents overfitting by decoupling weight decay. An adaptive learning rate decay strategy is introduced during training: if the validation loss fails to improve for 5 consecutive iterations, the learning rate is reduced by 50%. An early stopping mechanism is implemented: if the validation loss fails to improve for 10 consecutive iterations, training is terminated and the optimal model parameters are saved. A gradient pruning strategy is applied, limiting the maximum value of the gradient norm to within 1.0 to prevent gradient explosion.
[0074] During model training, labeled training samples are divided into multiple mini-batches. For each mini-batch, the loss function and gradient are calculated, and the network parameters are updated using the AdamW optimizer. Each gradient calculation and parameter update after one batch of samples is called an iteration step; each complete traversal of all training samples is called a training epoch. During training, the training and validation sets are used alternately to evaluate model performance and monitor for overfitting and underfitting.
[0075] Step 7: Result Output and Effect Verification; specifically including: After model training is complete, the test sample is input into the trained network model, which then outputs the corresponding state category and its probability distribution. The model inference process is the same as the forward propagation process during training, but gradient calculation and parameter updates are not performed. For each input sample, the network outputs a 5-dimensional probability vector, representing the predicted probability of the sample belonging to each category. Finally, the category with the highest probability is selected as the prediction result.
[0076] This embodiment validates its effectiveness on a hydraulic pump failure dataset, which includes 62 samples covering 5 categories of hydraulic pump states: Category 0 is the normal state with 13 samples, Category 1 is the slipper failure with 12 samples, Category 2 is the cylinder block failure with 12 samples, Category 3 is the plunger failure with 13 samples, and Category 4 is the distributor plate failure with 12 samples.
[0077] Experimental results show that the method of the present invention achieved 100% classification accuracy on the test set, and the diagonal values of the normalized confusion matrix for each category were all 1.00, indicating that the model has excellent identification ability for each type of fault.
[0078] From the training curve Figure 7 As can be seen, both the training loss curve and the validation loss curve rapidly decrease from approximately 1.7 and approach 0 after about 15 epochs, indicating that the model converges quickly and there is no obvious overfitting. The synchronous decreasing trend of the training loss and validation loss demonstrates that the network has good generalization ability and can effectively learn fault feature representations applicable to unseen samples.
[0079] Regarding model interpretability, the method of this invention supports outputting intermediate visualization results, including original vibration waveforms in two directions, differential channel waveforms, input time-frequency plots, learned mask plots, mask-enhanced time-frequency plots, and category probability plots. These visualization results help engineers understand the model's decision-making basis and verify whether the time-frequency enhancement regions learned by the network conform to domain knowledge, thereby enhancing the model's credibility and acceptability in practical applications.
[0080] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A hydraulic pump fault identification method combining time-frequency masking and sequence modeling, characterized in that, Includes the following steps: Step 1: Obtain vibration time series samples of the hydraulic pump, and perform length uniformization processing on the vibration time series samples to construct multi-channel input features; Step 2: Perform multi-channel time-frequency mapping and time-frequency masking enhancement on the multi-channel input features respectively to obtain the enhanced multi-channel time-frequency representation; Step 3: Input the enhanced time-frequency representation into a two-dimensional convolutional encoder to extract high-level time-frequency features, and aggregate them along the frequency dimension to obtain a time-series feature sequence; Step 4: Input the time-series feature sequence into the state-space sequence modeling module to extract the long-range time-dependent features from the hydraulic pump vibration signal; Step 5: Input the temporal features processed in Step 4 into the multi-view pooling feature fusion module, and perform attention pooling, global average pooling and global max pooling in parallel to mine and discriminate features from multiple perspectives and complete feature fusion. Step 6: Input the fused features into the classification head for model training and output the hydraulic pump status recognition result.
2. The hydraulic pump fault identification method combining time-frequency masking and sequence modeling according to claim 1, characterized in that, In step 1, during the construction of multi-channel input features, differential features are first constructed for the dual-channel vibration signal. Then, the original dual-channel signal and the differential dual-channel signal are spliced together in the channel dimension to form a four-channel input feature. The four-channel input feature is then standardized based on the mean and standard deviation of each channel obtained from the training samples.
3. The hydraulic pump fault identification method combining time-frequency masking and sequence modeling according to claim 2, characterized in that, Step 1, the process of constructing differential features for the dual-channel vibration signal includes: Assume the dual-channel vibration signal with uniform length is Its corresponding difference feature is: ; in, This indicates that the dual-channel status monitoring signal after length unification is in the [number]th [section]. The signal vector at each sampling time; Indicates the index of discrete sampling time; This represents the dual-channel signal vector at the previous sampling time. This represents the two-channel differential characteristics between adjacent sampling times; Based on this, the original dual-channel signal and the differential dual-channel signal are spliced together in the channel dimension through the channel splicing module to form a four-channel input feature; Finally, the four-channel input features are standardized.
4. The hydraulic pump fault identification method combining time-frequency masking and sequence modeling according to claim 3, characterized in that, Step 2, when performing multi-channel time-frequency mapping on the multi-channel input features, includes: First, the standardized four-channel input features are organized into a shape of... tensor; in, , The unified time length; Subsequently, multi-channel STFT, amplitude taking, and logarithmic mapping are performed sequentially for each channel to obtain the logarithmic amplitude time-frequency representation for each channel, which is then combined into a multi-channel time-frequency representation; After taking the amplitude of the complex time spectrum, logarithmic compression is then performed to form a multi-channel logarithmic amplitude time-frequency diagram.
5. The hydraulic pump fault identification method combining time-frequency masking and sequence modeling according to claim 4, characterized in that, Step 2, when performing time-frequency masking enhancement on the multi-channel logarithmic magnitude time-frequency map, includes: First, two layers of two-dimensional convolutional units are used sequentially to extract features from the input time-frequency map. Normalization and SiLU nonlinear activation functions are set after each convolutional unit. Then, let the time-frequency masking network be used to process the input time-frequency graph. The output is mapped to The mask tensor obtained after mapping by the Sigmoid function for: ; in, c This represents the channel index, corresponding to a specific channel in the four-channel input feature. k Index representing the frequency dimension; m Index representing the time dimension; The Sigmoid activation function is used to obtain a mask tensor with values between 0 and 1, which can be used as a weighting coefficient to modulate the original time-frequency diagram. The mask tensor and the input time-frequency graph are subjected to element-wise weighted modulation through the time-frequency mask enhancement module to obtain the enhanced multi-channel time-frequency representation.
6. The hydraulic pump fault identification method combining time-frequency masking and sequence modeling according to claim 4, characterized in that, In step 3, the two-dimensional convolutional encoder includes two convolutional front-ends and multiple two-dimensional convolutional blocks with residual connections; The convolutional front end consists of two 2D convolutional layers: the first layer increases the number of input channels from 4 to 24, and the second layer keeps the number of channels unchanged at 24. The residual convolutional block includes: Residual convolution block 1 increases the number of channels from 24 to 48 and performs downsampling within the block; Residual convolution block 2 increases the number of channels from 48 to 96, and also includes downsampling; Residual convolution block 3, keeping 96 channels unchanged, does not change the feature map resolution.
7. The hydraulic pump fault identification method combining time-frequency masking and sequence modeling according to claim 1, characterized in that, In step 4, the state space sequence modeling module includes three cascaded Mamba sequence modeling units; each Mamba sequence modeling unit includes a normalization layer, a state space mapping unit Mamba module, a Dropout layer, and residual connections.
8. The hydraulic pump fault identification method combining time-frequency masking and sequence modeling according to claim 1, characterized in that, In step 5, the multi-view pooling feature fusion module includes three parallel feature extraction branches: attention pooling branch, global average pooling branch, and global max pooling branch.
9. A hydraulic pump fault identification method combining time-frequency masking and sequence modeling according to claim 8, characterized in that, In step 5, the multi-view pooling feature fusion module, during its operation, includes: In the attention pooling branch, the attention score for each time frame is first calculated through a linear layer. s i : ; in, Indicates the first i Sequence modeling outputs features for each time frame; These represent the learnable weight parameters and biases, respectively. Then, the scoring value is obtained through the Softmax function. Convert to attention weights to obtain their attention weights. for: ; Make the sum of the attention weights for all time frames equal to 1; in, The value calculated by the attention scoring network represents the first... The score value for each time frame; Indicates the first Attention scoring for each time frame; Indicates the index of the current time frame; Indicates the summation index; Based on attention weights, the features of each time frame are weighted and summed to obtain the attention aggregated features: ; in, This represents the aggregated features obtained from attention pooling; Indicates the first Sequence modeling outputs features for each time frame; Indicates the time frame index; The global average pooling branch averages the features across all time frames along the time dimension to obtain the global average pooled features. and global max pooling features The three features are then concatenated along the feature dimension to form a fused feature: ; Subsequently, the fused features are input into the classification head, and after linear mapping, layer normalization, SiLU activation, and output layer processing, the hydraulic pump state category prediction results are obtained.
10. A hydraulic pump fault identification method combining time-frequency masking and sequence modeling according to claim 9, characterized in that, In step 6, during the model training phase, cross-entropy loss is used as the main loss function, and a mask smoothing regularization term is introduced. The total loss function is then obtained. L for: ; in, Represents the classification loss term; This represents a mask smoothing regularization term; This represents the smoothing constraint weight.
