A cross-condition fault diagnosis method for bearings in hydraulic equipment based on CWT-CNN-LSTM adversarial domain adaptation

By employing the CWT-CNN-LSTM adversarial domain adaptation method, the problem of feature omission in cross-operating condition fault diagnosis of bearings in hydraulic equipment is solved, achieving high accuracy and robust fault diagnosis, which is applicable to online monitoring systems for hydraulic equipment.

CN123116087APending Publication Date: 2026-11-17HEBEI UNIV OF ENG +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611351973.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Traditional methods for diagnosing bearing faults in hydraulic equipment are susceptible to interference under various operating conditions, leading to missed fault features. Furthermore, the diagnostic accuracy of a single deep learning model drops sharply after training under fixed operating conditions, making it difficult to guarantee optimal diagnostic performance.

Method used

A CWT-CNN-LSTM-based adversarial domain adaptation method is adopted. Time-frequency features are extracted through continuous wavelet transform and three-channel RGB mapping technology. Combined with deep feature hybrid network and adversarial training, unsupervised adaptation is optimized to achieve accurate diagnosis of bearing faults in hydraulic equipment.

Benefits of technology

It achieves high accuracy (≥98.5%) in fault diagnosis across operating conditions, reduces tag acquisition costs (≥80%), is compatible with various types of rotating machinery, has strong deployment compatibility and robustness, and is suitable for water conservancy environments with low signal-to-noise ratio.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123116087A_ABST
    Figure CN123116087A_ABST
Patent Text Reader

Abstract

This invention relates to the field of condition monitoring and fault diagnosis technology for hydraulic engineering equipment, and discloses a cross-condition fault diagnosis method for hydraulic equipment bearings based on CWT-CNN-LSTM adversarial domain adaptation. The method includes: acquiring and preprocessing vibration signals of hydraulic equipment bearings under different operating conditions, converting the time-frequency amplitude matrix into a two-dimensional time-frequency graph; constructing a deep feature hybrid network, and training the deep feature hybrid network multiple times using the two-dimensional time-frequency graph; selecting the optimal state of the deep feature hybrid network through an early shutdown strategy based on the training results to establish a basic diagnostic model; and updating the parameters of the basic diagnostic model by performing adversarial training based on a pre-constructed single adversarial network architecture through a dual-objective collaborative optimization strategy to obtain a well-trained basic diagnostic model. This invention reduces the dependence on labeled data and the cost of on-site operation and maintenance, providing reliable technical support for the full life-cycle health monitoring of hydraulic equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of condition monitoring and fault diagnosis technology for hydraulic engineering equipment, and more specifically, to a cross-condition fault diagnosis method for bearings in hydraulic equipment based on CWT-CNN-LSTM adversarial domain adaptation. Background Technology

[0002] In recent years, with the large-scale advancement of water conservancy projects, the requirements for the reliability of water conservancy projects have been increasing, particularly in core tasks such as flood control and disaster reduction, optimized allocation of water resources, and clean power generation. Rotating machinery in water conservancy projects, such as bearings in gate opening and closing systems, pump unit bearings, and hydroelectric generator unit bearings, are core components ensuring the safe and stable operation of the project. Their operational status directly determines the timeliness of flood control scheduling, the stability of water resource supply, and the continuity of power generation and supply, serving as crucial support for maintaining the functionality of water conservancy projects. Accurate monitoring and fault diagnosis of bearing operating conditions are essential for ensuring the reliable operation of these core components and are of decisive significance to the overall operational safety of water conservancy projects.

[0003] Early bearing fault diagnosis relied heavily on manual inspections and offline testing, with a low adoption rate of automated monitoring systems. This directly resulted in a weak foundation for intelligent diagnostic research. This weak foundation means that many engineering sites still rely on simple threshold judgments or manual experience-based identification methods.

[0004] To address the shortcomings of traditional diagnostic methods, the rapid development of sensor and artificial intelligence technologies in recent years has provided new solutions for the diagnosis of hydraulic bearings, improving the automation and intelligence of the diagnostic process. However, the unique "cross-condition" characteristics of hydraulic equipment operation present new and significant challenges: on the one hand, water level fluctuations and flow regulation cause frequent changes in equipment load, while factors such as speed fluctuations and water flow impact noise cause bearing vibration signals to exhibit strong non-stationarity and multi-component coupling; on the other hand, the long-term continuous operation of hydraulic projects leads to signal transmission delays and the superposition of environmental interference. These intertwined factors significantly increase the difficulty of diagnosis and highlight the urgency of developing accurate diagnostic technologies adapted to cross-condition scenarios.

[0005] Faced with complex diagnostic needs across various operating conditions, the limitations of traditional diagnostic solutions are becoming increasingly apparent. Due to the high uncertainty of the dynamic process of hydraulic bearing operating systems, the significant nonlinear characteristics of vibration signals, and the complex coupling relationship between fault modes and operating conditions, traditional manual feature extraction methods are easily affected by interference, leading to missed fault features. Furthermore, a single deep learning model, after being trained under fixed operating conditions, experiences a sharp drop in diagnostic accuracy when faced with changes in operating conditions, making it difficult to guarantee optimal diagnostic performance.

[0006] There are currently no effective solutions to the problems in the relevant technologies. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a cross-condition fault diagnosis method for hydraulic equipment bearings based on CWT-CNN-LSTM adversarial domain adaptation. This method dynamically extracts the time-frequency features of vibration signals across operating conditions, aligns the domain distribution, and optimizes unsupervised adaptation, thereby achieving accurate fault diagnosis of hydraulic equipment bearings. This solves the problems of traditional manual feature extraction methods being susceptible to interference leading to missed fault features, and single deep learning models experiencing a sharp drop in diagnostic accuracy when faced with changing operating conditions after training under fixed conditions, making it difficult to guarantee optimal diagnostic performance.

[0008] To achieve the goal of accurately diagnosing bearing faults in hydraulic equipment by dynamically extracting the time-frequency characteristics, alignment domain distribution, and optimizing unsupervised adaptation of vibration signals across operating conditions, the specific technical solution adopted in this invention is as follows: A cross-condition fault diagnosis method for bearings in hydraulic equipment based on CWT-CNN-LSTM adversarial domain adaptation includes: The vibration signals of bearings of hydraulic equipment under different working conditions were acquired, and the acquired vibration signals of bearings of hydraulic equipment were preprocessed. The preprocessed bearing vibration signal is processed by continuous wavelet transform using mother wavelet to obtain the time-frequency amplitude matrix. Then, combined with three-channel RGB mapping technology, the time-frequency amplitude matrix is ​​transformed into a two-dimensional time-frequency graph to achieve efficient characterization of bearing fault features and model input adaptation. A deep feature hybrid network is constructed, and the deep feature hybrid network is trained in multiple rounds using a two-dimensional time-frequency graph. Based on the training results, the optimal state of the deep feature hybrid network is selected through an early stopping strategy to establish a basic diagnostic model. Based on a pre-built single adversarial network architecture, adversarial training is performed through a dual-objective collaborative optimization strategy to update the parameters of the basic diagnostic model and obtain a well-trained basic diagnostic model. By using a pseudo-label iterative optimization mechanism and combining the working condition identifiers of water conservancy monitoring data to divide the data, the trained basic diagnostic model is optimized to obtain the optimized diagnostic model. The optimized diagnostic model weights are converted to ONNX format to support inference deployment on different hardware platforms. Softmax probability normalization is performed on the optimized diagnostic model to obtain structured diagnostic results, thereby enabling fault diagnosis of bearings in hydraulic equipment across operating conditions. The overlap between the source domain samples and the target domain feature distribution is visualized by using PCA technology to reduce dimensionality. The comprehensive performance index is calculated and a confusion matrix heatmap is generated to verify the stability of the optimized diagnostic model.

[0009] Compared with existing technologies, this invention provides a cross-condition fault diagnosis method for bearings in hydraulic equipment based on CWT-CNN-LSTM adversarial domain adaptation, which has the following beneficial effects: (1) This invention preserves the transient features of the fault through CWT-RGB time-frequency representation, extracts spatial-temporal features through CNN-LSTM collaboration, and aligns the cross-condition distribution with adversarial domain adaptation. The target domain diagnosis accuracy reaches more than 98.5%, which is more than 25% higher than the model without domain adaptation, thus solving the core problem of poor generalization of traditional models across conditions.

[0010] (2) The present invention is based on the pseudo-labeling strategy of "file name prefix-mode voting", which eliminates the need for manual labeling of the target domain, avoids the need for on-site equipment shutdown for testing in water conservancy, reduces the cost of label acquisition by more than 80%, and greatly improves the feasibility of engineering applications.

[0011] (3) This invention supports CPU / GPU dual-mode inference through the ONNX format model, with inference time ≤0.5ms. It can be directly integrated into the existing online monitoring system of water conservancy equipment, and is compatible with various rotating machinery such as gate hoists, water pumps, and generator sets, with strong deployment compatibility.

[0012] (4) This invention uses multi-dimensional visualization methods such as PCA dimensionality reduction, training curves, and confusion matrices to intuitively present the domain adaptation effect and model stability, providing clear performance evaluation basis for operation and maintenance personnel and reducing the threshold for technology implementation.

[0013] (5) This invention effectively suppresses complex noises such as water flow impact and electromagnetic interference by combining CWT time-frequency analysis with wavelet denoising technology. Even in harsh water conservancy environments with a signal-to-noise ratio as low as -10dB, the diagnostic accuracy remains ≥95%, and the robustness is significantly better than traditional time-domain and frequency-domain analysis methods. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a flowchart according to an embodiment of the present invention; Figure 2 This is a flowchart of deep feature hybrid network reuse and adversarial domain adaptation according to an embodiment of the present invention; Figure 3 This is a graph showing the training process of a deep feature mixing network according to an embodiment of the present invention. Figure 4 This is a confusion matrix heatmap according to an embodiment of the present invention; Figure 5 This is a category loss-domain loss curve diagram according to an embodiment of the present invention; Figure 6 This is a training accuracy-validation accuracy curve according to an embodiment of the present invention; Figure 7 This is a source domain PCA fault category colored scatter plot according to an embodiment of the present invention; Figure 8 This is a scatter plot of PCA fault categories in the target domain according to an embodiment of the present invention. Detailed Implementation

[0016] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention. The components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0017] According to an embodiment of the present invention, a method for cross-condition fault diagnosis of bearings in hydraulic equipment based on adversarial domain adaptation, using CWT-CNN-LSTM, is provided.

[0018] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, a method for cross-condition fault diagnosis of bearings in hydraulic equipment based on CWT-CNN-LSTM adversarial domain adaptation according to an embodiment of the present invention includes: Step S1: Obtain vibration signals of hydraulic equipment bearings under different working conditions, and preprocess the obtained vibration signals of hydraulic equipment bearings. Step S2: Use the mother wavelet to perform continuous wavelet transform (CWT) on the preprocessed bearing vibration signal to obtain the time-frequency amplitude matrix. Combined with the three-channel RGB mapping technology, the time-frequency amplitude matrix is ​​transformed into a two-dimensional time-frequency diagram to achieve efficient characterization of bearing fault features and model input adaptation. Step S3: Construct a deep feature hybrid network, and use a two-dimensional time-frequency graph to train the deep feature hybrid network in multiple rounds. Based on the training results, select the optimal state of the deep feature hybrid network through an early stopping strategy to establish a basic diagnostic model. Step S4: Based on the pre-built single adversarial network architecture, adversarial training is carried out through a dual-objective collaborative optimization strategy to update the parameters of the basic diagnostic model and obtain the trained basic diagnostic model. Step S5: Using a pseudo-label iterative optimization mechanism, combined with the working condition identifier of water conservancy monitoring data, the data is divided to optimize the trained basic diagnostic model and obtain the optimized diagnostic model. Step S6: Convert the optimized diagnostic model weights into ONNX format to support inference deployment on different hardware platforms, such as CPU / GPU, and perform Softmax probability normalization on the optimized diagnostic model to obtain structured diagnostic results, so as to realize fault diagnosis of bearings of water conservancy equipment across working conditions. Step S7: Visualize the overlap between the source domain samples and the target domain feature distribution using PCA technology to reduce dimensionality, calculate the comprehensive performance index and generate a confusion matrix heatmap to verify the stability of the optimized diagnostic model.

[0019] Specifically, this invention is specifically aimed at the cross-condition fault diagnosis of bearings in rotating machinery of water conservancy projects, such as gate hoists, water pumps, and generator sets. It is particularly suitable for harsh operating conditions with variable load, variable speed and complex hydrological interference, so as to achieve accurate identification and early warning of the above bearing faults.

[0020] This invention constructs a complete dataset containing source domain laboratory data and target domain field data through step S1 (vibration signal acquisition and preprocessing); converts one-dimensional vibration signals into three-channel time-frequency images rich in fault features through step S2 (CWT-RGB time-frequency image generation); establishes a basic diagnostic model with 100% source domain validation accuracy through step S3 (CNN-LSTM hybrid model construction and source domain training); effectively eliminates the distribution differences between laboratory data and field data through step S4 (adversarial domain adaptation module design); innovatively utilizes implicit knowledge in water conservancy data naming conventions to significantly improve the diagnostic accuracy of unlabeled field data through step S5 (target domain pseudo-label generation and model optimization); achieves the key transformation from algorithm to engineering application through step S6 (ONNX model inference deployment), supports CPU / GPU dual-mode operation, and meets the real-time diagnostic needs under different hardware environments; and completes the final step S7 (feature visualization and performance verification).

[0021] In this optional embodiment, the acquisition of bearing vibration signals of hydraulic equipment under different operating conditions and the preprocessing of the acquired bearing vibration signals include: acquiring bearing vibration signals under different operating conditions in real time using piezoelectric accelerometers pre-deployed on radial monitoring points of the bearing housing of the hydraulic equipment; using wavelet threshold denoising technology to eliminate water flow impact noise and electromagnetic radiation noise in the bearing vibration signals, simultaneously eliminating baseline drift in the bearing vibration signals, and combining notch filters and bandpass filters to remove power frequency interference and invalid frequency bands in the bearing vibration signals; using a band overlap segmentation strategy to perform sample division processing on the denoised bearing vibration signals, dividing the denoised bearing vibration signals into short samples, and removing abnormal samples through amplitude variation coefficient to form a regular sample set; and using the Z-score normalization mechanism to standardize the sample set to obtain standardized bearing vibration signals.

[0022] Specifically, a PCB352C33 piezoelectric accelerometer was used. This sensor was installed at the radial monitoring point of the bearing housing of the hydraulic equipment, possessing a sensitivity of 200mV / g and a measurement range of ±50g. The data acquisition instrument used was an SK2301, with a sampling frequency set to 12kHz, and data was stored in .mat format. Source domain dataset: Bearing dataset provided by Case Western Reserve University (CWRU), including drive-end vibration signals, covering normal conditions and 10 fault states for rolling elements, inner ring, and outer ring (damage diameters of 0.178mm, 0.356mm, and 0.533mm, respectively). Target domain dataset: Unlabeled vibration data of a centrifugal pump at a hydraulic engineering project site.

[0023] The preprocessing process revolves around signal quality optimization and model input adaptation design, specifically including the following three parts: (1) Detrending and denoising processing: Wavelet threshold denoising technology is used to suppress environmental noise such as water flow impact and electromagnetic radiation, and simultaneously eliminate signal baseline drift to improve the signal-to-noise ratio; for the target domain data, an additional combination of 50Hz notch filtering and 100-6000Hz bandpass filtering is used to remove power frequency interference and invalid frequency bands, laying the foundation for subsequent processing. (2) Sample segmentation: Based on the temporal integrity requirements of bearing fault impact signals, an overlapping segmentation strategy is used to process the original vibration signals. Specifically, according to the impact cycle characteristics of typical bearing faults (inner ring / outer ring / rolling element) of hydraulic equipment, the time step is set to 1024 (covering 1.5-2 bearing rotation cycles) and the overlap rate is 0.5 to ensure that each short sample contains a complete fault impact sequence. After segmentation, the sample is dimensionally verified, and abnormal samples with insufficient length or signal mutation are removed.

[0024] Denoising: Wavelet thresholding denoising technology was applied to eliminate water flow impact noise and electromagnetic interference. For the target domain data, an additional 50Hz notch filter (IIR Butterworth filter, order 8) and a 100-6000Hz bandpass filter were applied to remove power frequency interference. Sample segmentation: Sliding window segmentation was performed with a time step of 1024 and an overlap rate of 0.5, generating 233 samples for each fault type. Abnormal samples were removed using the signal amplitude variation coefficient (threshold 0.1), as shown in Table 1.

[0025] Table 1 Sample Segmentation Table

[0026] Target domain standardization: The original 32kHz signal was subjected to an 8th-order Butterworth low-pass filter with a cutoff frequency of 6kHz, and then resampled to 12kHz using a multiphase filter. Global statistics were calculated and Z-score normalization was performed. (3) Target domain specific optimization: For the characteristics of unlabeled data in the target domain, a standardization preprocessing procedure was performed: the vibration dataset was loaded from the target domain data storage path, and the original 32kHz high-frequency sampled signal was subjected to an 8th-order Butterworth anti-aliasing low-pass filter with a cutoff frequency of 6kHz, which effectively suppressed the high-frequency aliasing effect. Multiphase filter resampling technology was used to accurately resample the signal to a standard sampling rate of 12kHz to ensure the integrity of the signal spectrum; global Z-score normalization was used to constrain the signal amplitude to the [0,1] interval, and the normalization parameters were calculated and saved based on the global statistics of the target domain.

[0027] In this optional embodiment, the standardization of the sample set using the Z-score normalization mechanism to obtain a standardized bearing vibration signal includes: performing Butterworth anti-aliasing low-pass filtering on the bearing vibration signals in the sample set, reducing the bearing vibration signals to a preset standard sampling rate using multiphase filtering resampling technology, and calculating global statistical feature parameters; and using the Z-score normalization mechanism to standardize each resampled bearing vibration signal to obtain a standardized bearing vibration signal.

[0028] Specifically, all original signals in the target domain are collected, and the global statistical characteristic parameters are calculated as follows: Global mean: Global standard deviation: Global minimum value: Global maximum value: In the formula, This represents the global average. Indicates the global standard deviation; This represents the i-th original vibration signal sampling point; Indicates the minimum value; represents the maximum value; N represents the number of data points. To ensure data comparability and stability among different samples, a Z-score normalization method based on global statistics is adopted. For each resampled signal x, the normalization formula is as follows: In the formula, This represents the global average. The standard deviation is represented by x; x represents each resampled signal. This represents the normalized global statistics. This normalization process not only enhances the contrast of weak features but also effectively constrains the signal amplitude range, making it suitable for subsequent processing requirements.

[0029] In this optional embodiment, the step of using a mother wavelet to perform continuous wavelet transform processing on the preprocessed bearing vibration signal to obtain a time-frequency amplitude matrix, and combining it with three-channel RGB mapping technology to transform the time-frequency amplitude matrix into a two-dimensional time-frequency graph to achieve efficient characterization of bearing fault features and model input adaptation, includes: selecting a complex Morlet wavelet, i.e., cmor100-1, as the mother wavelet, the center frequency of which is optimized to match the bearing fault feature frequency range; using the mother wavelet to convert the preprocessed vibration signal into a time-frequency complex coefficient matrix and a physical frequency sequence through continuous wavelet transform, and calculating the corresponding time-frequency amplitude matrix based on the time-frequency complex coefficient matrix; and calculating the physical frequency... The sequence divides the time-frequency amplitude matrix into three independent channels based on its frequency band characteristics, and maps them to the red, green, and blue channels of an RGB image, respectively. Min-max normalization is then performed on each independent channel matrix to eliminate differences in amplitude dimensions. Bilinear interpolation is used to uniformly resample each independent channel matrix to a preset standard resolution (224×224). Finally, the normalized three-channel data are combined into a preset RGB image (224×224×3), converted to a preset 8-bit unsigned integer format, and stored in PNG format to generate a two-dimensional time-frequency graph, thus achieving efficient characterization of bearing fault features.

[0030] Specifically, cmor100-1 is selected as the mother wavelet, and the bearing fault characteristic frequency range is matched according to the optimized center frequency. The total number of scales is set to 128, and a scale sequence is generated through a specific formula to calculate the time-frequency complex coefficient matrix and the time-frequency amplitude matrix, thus preserving the time-frequency energy distribution characteristics of the signal.

[0031] The mother wavelet center frequency is optimized to match the bearing fault characteristic frequency range. The total number of scales is set to 128, and the scale sequence is generated using the following formula: ; In the formula, A scale sequence representing the center frequency of the mother wavelet; Indicates the wavelet center frequency; Represents a frequency sequence; This represents the total number of scales. Based on the sampling period T s =1 / 12000 seconds, the time-frequency complex coefficient matrix is ​​calculated. and corresponding physical frequency sequence Time-frequency amplitude matrix The time-frequency energy distribution characteristics of the preserved signal are obtained through calculation.

[0032] Based on physical frequency sequence The time-frequency amplitude matrix is ​​divided into three independent channels based on frequency band characteristics: Red Channel (R): Allocates low-frequency amplitude data from 500-2000Hz. This band corresponds to the basic impact characteristics of typical faults such as those affecting the inner and outer rings of bearings. Its energy distribution is stable and highly identifiable, serving as the core basis for fault type determination. Green Channel (G): Allocates mid-frequency amplitude data from 2000-4000Hz. This band corresponds to the second and third harmonic characteristics generated during fault development, and its amplitude changes can quantify the evolution of fault severity. Blue Channel (B): Allocates high-frequency amplitude data from 4000-6000Hz. This band corresponds to the transient impact characteristics of early faults such as micro-cracks in rolling elements. It has high-frequency attenuation characteristics, enabling accurate capture of early, weak faults.

[0033] Normalization is performed independently for each channel matrix: For the effective frequency band data within each channel, the minimum-maximum normalization formula is as follows: In the formula, This represents standardized data after min-max normalization. This represents the original data sequence within a certain channel; This represents the minimum value in the data of that channel. This indicates the maximum value in the data of that channel.

[0034] The 128×1024 three-channel time-frequency matrix was resampled to 224×224 resolution using bilinear interpolation. The normalized three-channel data was combined into a 224×224×3 RGB image and converted to 8-bit unsigned integer format. It was saved as a PNG image at 100 DPI resolution, preserving complete time-frequency feature information. This RGB time-frequency image fully preserves the temporal locality, frequency resolution, and energy distribution characteristics of the fault. Its three-channel structure encodes key information at different fault development stages, providing high-quality input with both physical meaning and discriminative ability for subsequent deep learning models. Continuous wavelet transform (CWT) is a method that simultaneously analyzes signals in the time and frequency domains. By using wavelet functions at different scales and locations to transform the signal, it obtains the local features of the signal at different frequencies and times, and is often used to process non-stationary signals. For any signal... The CWT expression is: ; In the formula, Indicates signal In scale and displacement Wavelet coefficients below; This represents the input time-domain signal; Indicates the scale parameter; Indicates the translation parameter; Indicates the normalization factor; The infinitesimal element representing the time variable; The wavelet basis functions are derived from the mother wavelet function. Displacement and expansion are generated, and the expressions are as follows: In the formula, This represents the scaling factor, which controls the size and position of the wavelet window in the frequency domain; This represents the shift factor, which controls the position of the wavelet window in the time domain.

[0035] The selection of the mother wavelet function is crucial for continuous wavelet transform. Commonly used mother wavelet functions include Haar, Meyer, Coiflet, and Morlet. Because the Morlet function possesses both high time and frequency resolution, it can accurately capture transient and periodic changes in signals, and its characteristics match the impact features generated by bearing defects, this study chooses the Morlet function for continuous wavelet transform. The functional expression of the Morlet wavelet is as follows: In the formula, Represents the mother wavelet function; Indicates dimensionless time; Represents dimensionless frequency; Indicates normalization; Represents the complex exponential modulation term; Represents the Gaussian window function; The base of the natural logarithm; It represents the imaginary unit.

[0036] In this optional embodiment, the construction of a deep feature hybrid network, the multi-round training of the deep feature hybrid network using a two-dimensional time-frequency image, and the selection of the optimal state of the deep feature hybrid network based on the training results through an early stopping strategy to establish a basic diagnostic model include: constructing a deep feature hybrid network containing a convolutional neural network (CNN) and a long short-term memory network (LSTM); wherein the CNN is responsible for extracting the spatial texture features of the fault from the time-frequency image, and the LSTM captures the temporal dependence of the spatial texture features in the time dimension; during training, the difference between the prediction of the deep feature hybrid network and the real fault category label is quantified by combining the cross-entropy loss function with the two-dimensional time-frequency image, and the Adam optimizer is used to perform backpropagation and iterative update of the network parameters; after each round of training, the performance of the deep feature hybrid network is evaluated using a reserved validation set. When the validation set loss does not show a significant decrease for a preset number of consecutive rounds, the early stopping strategy is triggered to automatically terminate the training, and the model weights that perform best on the validation set throughout the entire training cycle are saved, finally obtaining the basic diagnostic model.

[0037] Specifically, a deep feature hybrid network combining CNN feature extraction and LSTM temporal processing is constructed based on a modular design paradigm. The source domain fault is accurately represented through spatiotemporal feature collaborative modeling. Simultaneously, the source domain labeled data is pre-trained to solidify the model performance. The specific scheme is as follows: The architecture consists of a CNN module and an LSTM module, as shown in Table 2. The former is responsible for extracting the spatial texture features of the fault in the time-frequency map, while the latter captures the temporal dependency of the feature sequence. The two are seamlessly connected and adapted to the spatial-temporal binary attributes of the time-frequency map.

[0038] Table 2 Technical Parameters of Core Modules

[0039] By employing the cross-entropy loss function and the Adam optimizer, combined with an early stopping strategy, efficient fault classification performance is achieved while ensuring the model's generalization ability. The model achieves 100% accuracy on the source domain validation set, laying the foundation for cross-condition domain adaptation.

[0040] In this optional embodiment, the step of quantifying the difference between the deep feature hybrid network prediction and the actual fault category label by combining the cross-entropy loss function with the two-dimensional time-frequency graph during training, and using the Adam optimizer to perform backpropagation and iterative update of network parameters includes: dividing the labeled two-dimensional time-frequency graph data into training and validation sets using stratified sampling at a preset ratio (8:2); performing random horizontal flipping, vertical flipping, and color jittering transformations on the two-dimensional time-frequency graph data in the training set to expand sample diversity and improve model generalization ability; and performing standardization processing on all input two-dimensional time-frequency graph samples, applying a preset mean (0.5, 0.5, 0.5) and a preset standard deviation (0.5, ... A normalization transformation of 0.5, 0.5, 0.5) maps pixel values ​​to a preset range of [-1, 1] to suit the input requirements of the deep feature hybrid network. The difference between the prediction and the actual fault category label of the deep feature hybrid network is quantified by combining the cross-entropy loss function with the two-dimensional time-frequency graph. The deep feature hybrid network is guided to focus on learning the fault feature discrimination boundary by minimizing the KL divergence between the predicted distribution and the actual distribution. The Adam optimizer is used to perform backpropagation and iterative update of network parameters. Gradient clipping (threshold 1.0) is used to prevent gradient explosion. The training set is traversed in batch mode in each round to complete loss calculation, backpropagation and parameter update, driving the deep feature hybrid network to converge to the optimal solution.

[0041] Specifically, such as Figure 2As shown, based on pre-training with source domain labeled data, an initial model is provided for cross-operating condition domain adaptation. The process is as follows: a) Dataset partitioning and loading: In the data preprocessing stage, this invention implements a strict dataset partitioning and efficient loading strategy: First, the source domain labeled data is randomly partitioned in an 8:2 ratio, and stratified sampling is used to ensure a balanced distribution of various bearing fault samples in the training and validation sets; during training, data augmentation techniques are applied, including random horizontal flipping, vertical flipping, and color dithering transformation, to effectively expand sample diversity and improve model generalization ability; data loading adopts a batch size of 32, enabling 4 working threads to process data I / O operations in parallel, and activating the memory locking (pin_memory) mechanism to significantly accelerate GPU data transmission efficiency; finally, all input samples are standardized by applying a normalization transformation of mean (0.5, 0.5, 0.5) and standard deviation (0.5, 0.5, 0.5) to map pixel values ​​to the [-1, 1] interval, perfectly adapting to the input requirements of the CNN-LSTM hybrid model and laying a data foundation for subsequent feature extraction. b. Optimization Strategy and Loss Function: This invention uses the cross-entropy loss function to calculate the classification error. This loss function effectively guides the model to focus on learning the fault feature discrimination boundary by minimizing the KL divergence between the predicted and true distributions. The optimization process uses the Adam optimizer with an initial learning rate of 1×10⁻⁶. -5 Weight decay coefficient 1×10 -5 Momentum parameters =0.9, =0.999, and gradient clipping (threshold 1.0) is applied to prevent gradient explosion; the training strategy is set to 30 epochs, with each epoch fully traversing the training dataset, using mini-batch stochastic gradient descent, and immediately performing backpropagation and parameter updates after calculating the loss for each batch of data to ensure efficient model convergence to the optimal solution. c. Model Validation and Storage: This invention implements a strict model validation mechanism. After each training epoch, a 20% validation dataset is used to evaluate the model's generalization ability, calculating comprehensive performance indicators such as validation set classification accuracy, confusion matrix, and F1 score for each class; an early stopping strategy is implemented, terminating training when the validation loss shows no improvement for 5 consecutive epochs, and using the model weight with the highest validation accuracy as the best model, rather than the final epoch model. The validation process undergoes fine-grained analysis, including generating a normalized confusion matrix heatmap to identify easily confused fault types, calculating the independent accuracy for each class, monitoring the training-validation performance gap, and dynamically adjusting the regularization strength. After validation, the optimal CNN-LSTM hybrid model was saved as a complete file named vgg_lstm_model.pt, and the validation results and training metadata were archived to ensure reproducibility. This validation mechanism confirmed that the pre-trained model achieved 100% average accuracy on the source domain validation set. This not only verified the model's ability to capture the essential characteristics of bearing faults but also provided a precise performance benchmark and optimization direction for subsequent cross-operating domain adaptation, significantly improving the robustness and adaptability of the hydraulic machinery bearing fault diagnosis system. Loss function: The classification error was calculated using the cross-entropy loss function, mathematically expressed as: In the formula, Indicates batch size; Indicates the number of categories (10); Indicates the sample in category The true label (0 or 1); This represents the probability value predicted by the deep feature hybrid network.

[0042] This loss function drives model parameter optimization to establish clear and robust boundary criteria for bearing fault feature discrimination by accurately measuring the difference between the predicted probability distribution and the true label distribution. For example... Figure 3 As shown, performance metrics are calculated as follows: classification accuracy, confusion matrix, and F1 score for each class on the validation set. like Figure 6 As shown, the formula for classification accuracy is as follows: In the formula, Indicates classification accuracy; This represents the total number of samples in the validation set; This indicates the category predicted by the deep feature mixing network; Indicates the true label; This represents an indicator function, also known as a "characteristic function". It takes the value 1 when the condition within the parentheses is true, and 0 otherwise. If... If the prediction is correct, then .like If the prediction is wrong, then Category-level evaluation: Precision, Recall, and F1 Score. The formula for Precision is as follows: In the formula, Indicates the first The accuracy of the model in predicting each category is a measure of the accuracy of the model's predictions for each category. How many of the samples truly belong to that class? A true positive is defined as a signal correctly predicted by a deep feature mixing network. The number of samples for each category; A false positive refers to a situation where a deep feature mixing network incorrectly predicts a class as a positive. However, this only includes the number of samples that do not actually belong to that category. The formula for recall is as follows: In the formula, Indicates the first Recall rate for each category, measuring the actual number of categories a user belongs to. How many of the samples were successfully identified by the model? A true positive is defined as a signal correctly predicted by a deep feature mixing network. The number of samples for each category; A false negative refers to a condition where a substance actually belongs to a category. However, this represents the number of samples that are incorrectly predicted as other classes by deep feature mixing networks. The formula for the F1 score is as follows: In the formula, Indicates the first The F1 score for each category is the harmonic mean of precision and recall, used to comprehensively evaluate classification performance. Indicates the first The accuracy of the model in predicting each category is a measure of the accuracy of the model's predictions for each category. How many of the samples truly belong to that class? Indicates the first Recall rate for each category, measuring the actual number of categories a user belongs to. The model successfully identified a significant portion of the samples. This training process effectively fused the spatial features and temporal evolution characteristics of time-frequency images using a CNN-LSTM hybrid architecture, achieving 100% classification accuracy on source domain data. The deep feature fusion network parameters were fully optimized, and the feature extraction layer captured robust representations of bearing faults, laying a solid foundation for subsequent domain adaptation to unlabeled target domain data. It demonstrated good knowledge transfer capabilities across various operating conditions, reducing reliance on labeled target domain data.

[0043] In this optional embodiment, the step of performing adversarial training based on a pre-built single adversarial network architecture and updating the parameters of the basic diagnostic model through a dual-objective collaborative optimization strategy to obtain a trained basic diagnostic model includes: again using a convolutional neural network (CNN) as a feature extractor, and constructing a single adversarial network architecture containing a gradient inversion layer (GRL) and a domain classifier based on the feature extractor. The gradient inversion layer is used to invert the gradient during backpropagation, and the domain classifier is a lightweight fully connected network used to distinguish the feature source (source domain or target domain). During training, the class loss is calculated based on the labeled data from the source domain to ensure that the deep feature mixing network retains its characteristics. The system features: obstacle classification capability; domain adversarial loss calculated jointly from source and target domain data to drive feature distribution alignment; adversarial mechanism through gradient inversion layer, where feature extractor is trained to maximize the discrimination error of domain classifier, while domain classifier is trained to minimize this error, forming an adversarial game; calculation of class loss and backpropagation to update deep feature mixing network parameters; calculation of domain adversarial loss and backpropagation to update domain classifier parameters; monitoring of source domain validation set classification accuracy, where if the accuracy improvement does not reach a preset threshold (e.g., 0.5%) in multiple consecutive training rounds, an early stopping strategy is triggered to terminate training and save the current optimal basic diagnostic model weights, resulting in a well-trained basic diagnostic model.

[0044] Specifically, to improve the core technical aspects of the model's cross-condition generalization performance, following the CNN feature extraction module completed in the above steps, a single adversarial network architecture of feature extractor-domain classifier-gradient inversion unit (GRL) is constructed. The source-target domain distribution offset is eliminated by adaptive alignment of inter-domain feature distribution, and an innovative pseudo-label iterative optimization mechanism is introduced, as shown in Table 3.

[0045] Table 3 Technical Parameters of Core Components

[0046] By constructing a single adversarial architecture including a feature extractor, a domain classifier, and a gradient inversion unit (GRL), the alignment of feature distributions across domains is achieved, thereby improving the generalization performance across different operating conditions. A dual-objective collaborative optimization strategy of class loss and domain loss is adopted, with parameter collaborative updates achieved through a step-by-step backpropagation mechanism: 1) Loss function design: Class loss (class_loss): Calculates the cross-entropy loss based on labeled samples from the source domain, constraining the model to retain the fault category discrimination ability; Domain loss (domain_loss): Calculates the domain classification cross-entropy loss for samples from the source and target domains respectively, taking the average of the two class losses as the final domain loss, driving the adaptive alignment of feature distributions between domains. Class loss (class_loss) calculation: For labeled samples from the source domain, the formula for constraining the deep feature hybrid network to retain the fault category discrimination ability using the cross-entropy loss function is as follows: In the formula, Indicates the ability to distinguish fault categories; Indicates that the source domain sample i belongs to category The true label (one-hot encoded), This represents the class probability predicted by a deep feature mixing network. This indicates the total number of fault categories (10 categories). This represents the number of samples in the source domain batch. This loss is calculated using only source domain data to ensure that fault classification capability does not degrade during domain adaptation.

[0047] Domain classification loss calculation: The source domain sample label is 0, and the target domain sample label is 1. The formulas for calculating the domain classification cross-entropy loss for the source domain sample and the target domain sample are as follows: ; In the formula, and Let represent the domain classification cross-entropy loss of the source domain samples and the domain classification cross-entropy loss of the target domain samples, respectively. Indicates the number of samples in the target domain batch; and These represent the probabilities that a source domain sample is classified as a source domain sample and a target domain sample is classified as a target domain sample, respectively.

[0048] The formula for the final domain loss, which is the average of the two, is as follows: In the formula, Indicates the final domain loss; and These represent the domain classification cross-entropy loss for the source domain samples and the domain classification cross-entropy loss for the target domain samples, respectively. 2) Optimizer configuration: Class optimizer: used to optimize the parameters of the "CNN feature extraction module + LSTM time-series processing module", using the Adam optimizer with an initial learning rate of 1e-5 and a weight decay coefficient of 1e-5; Domain optimizer: used only to optimize the parameters of the domain classifier, using the Adam optimizer with an initial learning rate of 1e-4 and a weight decay coefficient of 1e-5. 3) Training execution logic: such as... Figure 5 As shown, a strategy of loading source and target domain datasets in parallel is adopted. When data in either dataset is exhausted, the loading process of that dataset is automatically reinitialized to ensure the continuity of the training process. In the forward propagation phase, source domain samples output both class prediction results and domain prediction results simultaneously, while target domain samples output only the domain prediction result. In the backpropagation phase, a staged parameter update strategy is adopted: first, the class classification loss (class_loss) is calculated and backpropagated to update the parameters of the CNN feature extraction module + LSTM time series processing module; then, the domain classification loss (domain_loss) is calculated and backpropagated to update the parameters of the domain classifier.

[0049] When calculating the gradient of the domain classification loss, a gradient reversal layer is introduced: During forward propagation, the formula for the GRL identity mapping is: During backpropagation, GRL multiplies the gradient by The formula is: In the formula, This indicates adjustable hyperparameters. Represents the regularization term. Indicates input variables, Represents the loss function. This represents the partial derivative of the regularization term with respect to the input. This represents the partial derivative of the loss function with respect to the input.

[0050] This mechanism implements adversarial training: the domain classifier attempts to accurately distinguish between the source and target domains, while the feature extraction module is trained to generate domain-invariant features, making it difficult for the domain classifier to distinguish the sample source. The phased optimization strategy is as follows: Phase 1: Fix the domain classifier parameters, updating only the feature extraction module and the class classifier via `class_loss`. Phase 2: Fix the feature extraction module parameters, updating the domain classifier via `domain_loss`. These two phases alternate, forming a mini-maximum game, ultimately causing the feature extractor to generate feature representations that are beneficial for class classification but useless for domain classification.

[0051] The formula for optimizing the objective function is as follows: In the formula, This represents minimizing the feature extractor G and the classifier C. This indicates maximizing the domain classifier. Represents the category classification loss. Representation domain classification loss, This represents hyperparameters. This loss calculation and parameter update mechanism effectively achieves domain adaptation, enabling the model to learn knowledge from the source domain and transfer it to the unlabeled target domain while maintaining high classification accuracy for the target domain data. 4) Early stopping mechanism: An early stopping mechanism based on quantization standards is used, with the source domain validation set classification accuracy as the core monitoring indicator. The training process is automatically terminated through precise threshold determination. Specifically, a significant improvement is defined as the validation accuracy in the current round being at least 0.5 percentage points higher than the historical best accuracy (Δaccuracy ≥ 0.5%). When the model fails to reach this improvement threshold in three consecutive training rounds, the system automatically terminates the training process. During training, the current model weights are saved as the optimal model only when the validation accuracy reaches a new historical high. This mechanism is implemented by maintaining an early stopping counter: the counter increments by 1 whenever the validation accuracy improvement is less than 0.5%, and triggers early stopping when it reaches 3; if the accuracy improvement exceeds 0.3% compared to the previous round, the counter decrements by 1 to tolerate reasonable fluctuations during training. This design not only effectively prevents model overfitting and significantly improves the generalization performance of the domain-adaptive model in the target domain, but also avoids unnecessary computational resource consumption, ensuring that the training process achieves an optimal balance between performance and efficiency. Experimental results show that, compared with a fixed-round training strategy, this early stopping mechanism reduces training time by an average of 37.6% while maintaining classification performance.

[0052] In this optional embodiment, the step of using a pseudo-label iterative optimization mechanism to divide data based on the working condition identifiers of water conservancy monitoring data and optimize the trained basic diagnostic model to obtain the optimized diagnostic model includes: using the trained basic diagnostic model to infer the two-dimensional time-frequency graph to obtain preliminary prediction results; classifying the preliminary prediction results into different working condition groups according to the working condition identifiers implicit in the prefixes of the water conservancy monitoring data file names, and determining the final label through confidence-weighted voting to generate high-confidence samples; screening high-confidence samples and source domain data to construct a mixed training set, and fine-tuning and optimizing the trained basic diagnostic model by combining course learning strategies, failure mode consistency verification (prefix similarity > 0.85), and KL divergence adaptive threshold adjustment to obtain the optimized diagnostic model.

[0053] Specifically, this invention embeds a pseudo-label iterative optimization mechanism based on water conservancy characteristic perception during the domain adaptation training process, overcoming the limitation of traditional domain adaptation methods in insufficient utilization of unlabeled target domain data. 1. Operating Condition Grouping Constraints: Deeply mining the naming conventions of water conservancy monitoring data, samples with the same filename prefix are grouped into the same operating condition group, fully utilizing the prior knowledge of consistent fault categories among samples in the same operating condition group from the water conservancy industry data collection standards. 2. Dynamic Confidence Threshold: Calculating the standard deviation of the predicted probability distribution of samples within a group, and adaptively setting a group-specific threshold to apply stricter screening criteria to highly consistent groups. 3. Cross-Group Semantic Verification: For semantically similar operating condition groups (defined by filename prefix edit distance ≤ 2), label consistency verification is performed. When the inconsistency rate exceeds 25%, a group re-division mechanism is automatically triggered to ensure the consistency of the physical meaning of the pseudo-labels.

[0054] This invention, targeting the monitoring scenario of hydraulic machinery, innovatively uncovers the implicit knowledge within industry data acquisition standards: the naming of time-frequency image files at hydraulic sites follows the prefix-timestamp-serial number standard, where the prefix encodes key information such as equipment ID, operating conditions, and potential fault modes. The prefix grouping-weighted mode voting strategy leverages the inherent patterns in hydraulic data to provide a novel approach to solving the label noise problem in unsupervised domain adaptation, overcoming the limitations of existing technologies that rely solely on predicted probability thresholds. The core algorithm comprises three steps: intelligent grouping by filename prefix, implementing dynamic grouping by calculating the cosine similarity of feature vectors within each group (threshold 0.75) to avoid the impact of operating condition drift; secondly, introducing a confidence-weighted voting mechanism based on the predicted probability distribution entropy value... Calculate sample weights Generate unified pseudo-labels within the group; finally, perform cross-group consistency verification, and check the label consistency of similar prefix groups with edit distance ≤ 2.

[0055] The formula for sample confidence is as follows: In the formula, Confidence represents the degree of certainty with which the basic diagnostic model predicts the outcome of a sample. This indicates that the highest probability value is selected among all fault categories, representing the model's most likely prediction. To select the second-highest probability value among all fault categories, representing the second most likely prediction, and indicating the degree of certainty of the basic diagnostic model's prediction for the i-th sample, the difference between the highest and second-highest probabilities is calculated, rather than simply considering the highest probability value. A larger difference indicates a more certain prediction by the basic diagnostic model. The formula for sample weights is as follows: In the formula, This represents the weight, which determines the influence of a sample in the prefix grouping vote; The Shannon entropy measures the uncertainty of the predicted distribution. The formula for the dynamic label smoothing coefficient is as follows: In the formula, `epsilon` represents the epsilon (label smoothing coefficient), controlling the smoothness of pseudo-labels from a one-hot distribution to a uniform distribution. `1-group_confidence` represents the uncertainty measure; a larger value indicates greater disagreement within the group. The formula for the adaptive threshold is as follows: In the formula, threshold represents the pseudo-label screening threshold, which determines whether a sample is included in the training; 0.6 represents the basic threshold, which ensures the minimum quality standard; 0.2 represents the adjustment range, which controls the range of threshold variation; exp represents the exponential function, which provides nonlinear mapping; KL_divergence represents the Kullback-Leibler divergence, which quantifies the difference in feature distribution between the source domain (laboratory data) and the target domain (field data).

[0056] In this optional embodiment, the step of converting the optimized diagnostic model weights to ONNX format to support inference deployment on different hardware platforms, and performing Softmax probability normalization on the optimized diagnostic model to obtain structured diagnostic results, thereby realizing fault diagnosis of bearings in hydraulic equipment across operating conditions, includes: converting the optimized diagnostic model weights to ONNX format to obtain a standardized model file; loading the standardized model file through the inference engine and adapting it to different hardware platforms; performing denoising, continuous wavelet transform, RGB mapping, and standardization processing on the real-time acquired vibration signal to form a two-dimensional time-frequency diagram and converting it into an input tensor in [1,3,224,224] format; performing forward propagation inference on the input tensor through the optimized diagnostic model and recording the processing time to obtain the original classification result; performing Softmax probability normalization processing on the original classification result, extracting the fault category and confidence level corresponding to the highest probability in the original classification result, and obtaining the structured diagnostic result.

[0057] Specifically, the optimized diagnostic model weights from step S5 are loaded and converted to ONNX format; the interface specifications for input and output nodes are clearly defined to ensure model compatibility across different inference engines; the converted model is saved to a specified path to provide standardized model files for subsequent deployment. The real-time inference core execution process includes four standardized steps: 1) Loading the ONNX model through the inference engine, supporting CPU / GPU dual-mode operation, suitable for different hardware environments; 2) Real-time vibration signal preprocessing, reproducing step S1's denoising of the real-time vibration signal, step S2's CWT time-frequency map generation, RGB mapping and standardization (mean 0.5, standard deviation 0.5) and size adaptation (224×224), converting it into an input tensor in [1,3,224,224] input format (batch=1); 3) Starting the optimized diagnostic model inference and recording the processing time, outputting the 10-dimensional original classification result; 4) Converting the original output to a probability distribution using Softmax, generating fault category-confidence structured diagnostic information and outputting it.

[0058] In this optional embodiment, the step of using PCA to visualize the overlap between the source domain samples and target domain feature distributions, calculating the comprehensive performance index, and generating a confusion matrix heatmap to verify the stability of the optimized diagnostic model includes: performing forward propagation on the source domain samples and target domain samples respectively using the optimized diagnostic model to extract global features from the feature extractor (CNN); using PCA to perform dimensionality reduction on the extracted global features, and comparing and coloring the dimensionality reduction results according to fault category and filename prefix to generate a comparison scatter plot; plotting the loss versus accuracy change curves based on historical data recorded during the training process; and combining the comparison scatter plot and the loss versus accuracy change curves to calculate the comprehensive performance index and generate a confusion matrix heatmap to verify the stability of the optimized diagnostic model.

[0059] Specifically, a global feature extraction method optimized for water conservancy scenarios is adopted to extract 512-dimensional global feature vectors from the CNN feature extraction module outputting samples from the source domain validation set and the target domain. The specific implementation involves: obtaining a 512×7×7 dimensional feature map from the 13th convolutional layer of the VGG-16 architecture; applying global average pooling (GAP) to compress the spatial dimension to generate initial feature vectors; and using L2 normalization to ensure comparability between features. The feature extraction process is performed in evaluation mode, disabling the random behavior of Dropout and BatchNorm, and using a batch size of 32 for forward propagation. The PCA dimensionality reduction visualization includes: performing principal component analysis on the source domain features to reduce the dimensionality to two-dimensional space, coloring the scatter plots by fault category, and verifying the clustering effect of the source domain features; such as... Figure 4 As shown, as Figure 7As shown, principal component analysis (PCA) was performed on the 512-dimensional feature matrix of the source domain to reduce the dimensionality to two-dimensional space, and a scatter plot was drawn according to the fault category. Different colors represent different fault types, as shown in Table 4.

[0060] Table 4 Color Fault Types Table

[0061] from Figure 7 It is evident that each fault category forms a clear cluster in the two-dimensional space composed of principal component 1 (direction of maximum variance) and principal component 2 (direction of second-largest variance), with good inter-class separation, indicating that the source domain features have good discriminative power. The within-class variance was calculated. =1.83, inter-class variance =3.47, with an inter-class separation greater than 1.9, validating the effectiveness of the source domain features. PCA dimensionality reduction was performed on the target domain features, and the features were colored by filename prefixes. The degree of overlap in the target domain feature distribution visually demonstrates the domain adaptation effect. For example... Figure 8 As shown, the same PCA transformation (using source domain PCA parameters) was performed on the 512-dimensional feature matrix of the target domain, and a scatter plot was drawn by coloring according to the filename prefix. In the figure, the dark blue square (A) represents the monitoring data of device A, and the light pink square (B) represents the monitoring data of device B. From Figure 8 It is evident that there is a significant distribution difference between A and B: the samples in group A are mainly concentrated in the negative value region (-10 to 10) of principal component 1, while the samples in group B are distributed in the positive value region (0 to 20) of principal component 1, and also show different distribution trends in the direction of principal component 2. This indicates that before domain adaptation, there are significant inter-device differences in the target domain samples, which may stem from differences in manufacturing processes, installation precision, or operating environments of different devices.

[0062] After domain adaptation training, the feature distributions of A and B gradually converge to the source domain feature space, and the overlap of the two classes of samples increases from the initial 0.42 to 0.89. In particular, the A group samples migrate from the original distribution center (-5,-1) to near (0,0), and the B group samples migrate from the original distribution center (15,2) to near (5,1), significantly reducing the distribution gap between the two groups and visually demonstrating the domain adaptation effect. This result verifies that the adversarial domain adaptation mechanism proposed in this invention can effectively eliminate the distribution shift between the source and target domains, achieving cross-device general fault diagnosis capabilities. The visualization of the training process includes: plotting the curves of class loss and domain loss as a function of training rounds to analyze the balance relationship between the two types of losses; plotting the training accuracy and validation accuracy curves to verify the convergence stability and generalization ability of the model. Through the above visualization methods, scientific data support and decision-making basis are provided for the engineering application of the technical solution.

[0063] According to another embodiment of the present invention, a cross-condition fault diagnosis system for bearings in hydraulic equipment based on CWT-CNN-LSTM adversarial domain adaptation is also provided. The system includes: The signal acquisition and preprocessing module is used to acquire vibration signals of bearings of hydraulic equipment under different working conditions and to preprocess the acquired vibration signals of bearings of hydraulic equipment. The time-frequency graph generation module is used to perform continuous wavelet transform (CWT) processing on the preprocessed bearing vibration signal using the mother wavelet to obtain the time-frequency amplitude matrix. Combined with three-channel RGB mapping technology, the time-frequency amplitude matrix is ​​transformed into a two-dimensional time-frequency graph to achieve efficient characterization of bearing fault features and model input adaptation. The network construction and training module is used to construct a deep feature hybrid network, and to train the deep feature hybrid network in multiple rounds using a two-dimensional time-frequency graph. Based on the training results, the optimal state of the deep feature hybrid network is selected through an early stopping strategy to establish a basic diagnostic model. The model training module is used to perform adversarial training based on a pre-built single adversarial network architecture through a dual-objective collaborative optimization strategy, update the parameters of the basic diagnostic model, and obtain a trained basic diagnostic model. The model optimization module is used to optimize the trained basic diagnostic model by using a pseudo-label iterative optimization mechanism, combining the working condition identifier of water conservancy monitoring data to divide the data, and obtaining the optimized diagnostic model. The weight conversion module is used to convert the optimized diagnostic model weights into ONNX format, supporting inference deployment on different hardware platforms, such as CPU / GPU, and performing Softmax probability normalization on the optimized diagnostic model to obtain structured diagnostic results, so as to realize fault diagnosis of bearings of hydraulic equipment across working conditions. The data visualization module is used to visualize the overlap between the feature distributions of the source domain samples and the target domain through PCA technology, calculate the comprehensive performance index, and generate a confusion matrix heatmap to verify the stability of the optimized diagnostic model.

[0064] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for cross-condition fault diagnosis of bearings in hydraulic equipment based on CWT-CNN-LSTM adversarial domain adaptation, characterized in that, include: The vibration signals of bearings of hydraulic equipment under different working conditions were acquired, and the acquired vibration signals of bearings of hydraulic equipment were preprocessed. The preprocessed bearing vibration signal is processed by continuous wavelet transform using mother wavelet to obtain the time-frequency amplitude matrix. Then, combined with three-channel RGB mapping technology, the time-frequency amplitude matrix is ​​transformed into a two-dimensional time-frequency graph to achieve efficient characterization of bearing fault features and model input adaptation. A deep feature hybrid network is constructed, and the deep feature hybrid network is trained in multiple rounds using a two-dimensional time-frequency graph. Based on the training results, the optimal state of the deep feature hybrid network is selected through an early stopping strategy to establish a basic diagnostic model. Based on a pre-built single adversarial network architecture, adversarial training is performed through a dual-objective collaborative optimization strategy to update the parameters of the basic diagnostic model and obtain a well-trained basic diagnostic model. By using a pseudo-label iterative optimization mechanism and combining the working condition identifiers of water conservancy monitoring data to divide the data, the trained basic diagnostic model is optimized to obtain the optimized diagnostic model. The optimized diagnostic model weights are converted to ONNX format to support inference deployment on different hardware platforms. Softmax probability normalization is performed on the optimized diagnostic model to obtain structured diagnostic results, thereby enabling fault diagnosis of bearings in hydraulic equipment across operating conditions. The overlap between the source domain samples and the target domain feature distribution is visualized by using PCA technology to reduce dimensionality. The comprehensive performance index is calculated and a confusion matrix heatmap is generated to verify the stability of the optimized diagnostic model.

2. The method according to claim 1, wherein, The process of acquiring vibration signals of hydraulic equipment bearings under different operating conditions and preprocessing the acquired vibration signals includes: By pre-installing piezoelectric acceleration sensors at radial monitoring points on bearing seats of hydraulic equipment, bearing vibration signals under different working conditions are collected in real time. Wavelet threshold denoising technology is used to eliminate water flow impact noise and electromagnetic radiation noise in bearing vibration signals, simultaneously eliminating baseline drift in bearing vibration signals, and combining notch filters and bandpass filters to remove power frequency interference and invalid frequency bands in bearing vibration signals. The bearing vibration signal after denoising is divided into short samples using an overlapping segmentation strategy. Abnormal samples are then removed by using the amplitude variation coefficient to form a regular sample set. The sample set was standardized using the Z-score normalization mechanism to obtain standardized bearing vibration signals.

3. The method according to claim 2, wherein, The standardization of the sample set using the Z-score normalization mechanism to obtain the standardized bearing vibration signal includes: The bearing vibration signals in the sample set are subjected to Butterworth anti-aliasing low-pass filtering, and the bearing vibration signals are reduced to a preset standard sampling rate by multiphase filtering resampling technology. Global statistical characteristic parameters are then calculated. The Z-score normalization mechanism is used to standardize each resampled bearing vibration signal to obtain a standardized bearing vibration signal.

4. The water conservancy equipment bearing cross-condition fault diagnosis method based on CWT-CNN-LSTM anti-domain adaptation according to claim 1, characterized in that, The process of using mother wavelet to perform continuous wavelet transform on the preprocessed bearing vibration signal to obtain a time-frequency amplitude matrix, and then combining it with three-channel RGB mapping technology to transform the time-frequency amplitude matrix into a two-dimensional time-frequency graph, in order to achieve efficient characterization of bearing fault features and model input adaptation, includes: The complex Morlet wavelet is selected as the mother wavelet, and the center frequency of the mother wavelet is optimized to match the bearing fault characteristic frequency range. The preprocessed vibration signal is converted into a time-frequency complex coefficient matrix and a physical frequency sequence by using the mother wavelet through continuous wavelet transform, and the corresponding time-frequency amplitude matrix is ​​calculated based on the time-frequency complex coefficient matrix. Based on the physical frequency sequence, the time-frequency amplitude matrix is ​​divided into three independent channels according to the frequency band characteristics, and mapped to the red, green and blue channels of the RGB image respectively. Each independent channel matrix after division is subjected to min-max normalization to eliminate differences in amplitude dimensions. Each independent channel matrix is ​​uniformly resampled to a standard resolution of a preset specification using bilinear interpolation. Finally, the normalized three-channel data is combined into an RGB image of a preset specification, converted into an unsigned integer format of a preset specification, and stored in PNG format to generate a two-dimensional time-frequency graph, so as to achieve efficient characterization of bearing fault features.

5. The method according to claim 1, wherein, The process of constructing a deep feature hybrid network, training it multiple times using a two-dimensional time-frequency graph, and selecting the optimal state of the deep feature hybrid network based on the training results using an early stopping strategy to establish a basic diagnostic model includes: A deep feature hybrid network comprising a convolutional neural network and a long short-term memory network is constructed; wherein the convolutional neural network is responsible for extracting spatial texture features of faults from time-frequency images, and the long short-term memory network captures the temporal dependence of the spatial texture features in the time dimension; During training, the difference between the predictions of the deep feature hybrid network and the actual fault category labels is quantified by combining the cross-entropy loss function with the two-dimensional time-frequency graph, and the Adam optimizer is used to perform backpropagation and iterative update of network parameters. After each training round, the performance of the deep feature hybrid network is evaluated using a reserved validation set. When the validation set loss does not decrease significantly for a preset number of rounds, an early stopping strategy is triggered to automatically terminate the training and save the model weights that performed best on the validation set throughout the entire training cycle, thus obtaining the basic diagnostic model.

6. The water conservancy equipment bearing cross-condition fault diagnosis method based on CWT-CNN-LSTM anti-domain adaptation according to claim 5, characterized in that, During training, the difference between the deep feature hybrid network prediction and the true fault category label is quantified by combining the cross-entropy loss function with a two-dimensional time-frequency graph. The Adam optimizer is then used to perform backpropagation and iterative updates of the network parameters. The labeled two-dimensional time-frequency graph data is divided into training and validation sets by using stratified sampling technology. Random horizontal flipping, vertical flipping and color jitter transformation are applied to the two-dimensional time-frequency graph data in the training set to expand the sample diversity and improve the model's generalization ability. Standardization processing is performed on all input two-dimensional time-frequency map samples. A normalization transformation with preset mean and preset standard deviation is applied to map pixel values ​​to preset intervals to adapt to the input requirements of deep feature hybrid networks. By combining the cross-entropy loss function with a two-dimensional time-frequency graph, the difference between the prediction and the actual fault category label of the deep feature hybrid network is quantified, and the deep feature hybrid network is guided to focus on learning the fault feature discrimination boundary by minimizing the KL divergence between the predicted distribution and the actual distribution. The Adam optimizer is used to perform backpropagation and iterative updates of network parameters. Gradient clipping is used to prevent gradient explosion. In each round, the training set is traversed in batch mode to complete loss calculation, backpropagation and parameter updates, driving the deep feature hybrid network to converge to the optimal solution.

7. A method for cross-condition fault diagnosis of bearings in hydraulic equipment based on CWT-CNN-LSTM adversarial domain adaptation as described in claim 5, characterized in that, The pre-built single-adversarial network architecture is used for adversarial training through a dual-objective collaborative optimization strategy to update the parameters of the basic diagnostic model, resulting in a well-trained basic diagnostic model including: Convolutional neural networks are used again as feature extractors, and a single adversarial network architecture containing a gradient inversion layer and a domain classifier is constructed based on the feature extractor. The gradient inversion layer is used to invert the gradient during backpropagation, and the domain classifier is a lightweight fully connected network used to determine the source of features. During training, the class loss is calculated based on the labeled data from the source domain to ensure that the deep feature hybrid network retains its fault classification ability; the domain adversarial loss is calculated based on the data from both the source and target domains to drive feature distribution alignment. Through the adversarial mechanism of the gradient inversion layer, the feature extractor is trained to maximize the discrimination error of the domain classifier, while the domain classifier is trained to minimize the error, thus forming an adversarial game. Calculate the class loss and backpropagate to update the parameters of the deep feature fusion network; Calculate the domain adversarial loss and backpropagate it to update the domain classifier parameters; The system monitors the classification accuracy of the source domain validation set. If the accuracy improvement does not reach the preset threshold in multiple consecutive training rounds, an early stopping strategy is triggered to terminate the training and save the current optimal weights of the basic diagnostic model, thus obtaining the trained basic diagnostic model.

8. The method for cross-condition fault diagnosis of bearings in hydraulic equipment based on CWT-CNN-LSTM adversarial domain adaptation as described in claim 1, characterized in that, The method of using pseudo-label iterative optimization, combined with the working condition identification of water conservancy monitoring data for data segmentation, optimizes the trained basic diagnostic model, resulting in an optimized diagnostic model including: The trained basic diagnostic model is used to infer the two-dimensional time-frequency graph to obtain preliminary prediction results; Based on the working condition identifier implied in the file name prefix of the water conservancy monitoring data, the preliminary prediction results are classified into different working condition groups, and the final label is determined by confidence-weighted voting to generate high-confidence samples. A mixed training set was constructed by selecting high-confidence samples and source domain data. The trained basic diagnostic model was then fine-tuned and optimized by combining course learning strategies, failure mode consistency verification, and KL divergence adaptive threshold adjustment to obtain the optimized diagnostic model.

9. The method according to claim 1, wherein the method is a CWT-CNN-LSTM based anti-domain adaptation bearing fault diagnosis method for water conservancy equipment across working conditions. The process involves converting the optimized diagnostic model weights to ONNX format to support inference deployment on different hardware platforms, and performing Softmax probability normalization on the optimized diagnostic model to obtain structured diagnostic results. This enables fault diagnosis of bearings in hydraulic equipment across operating conditions. The optimized diagnostic model weights are converted to ONNX format to obtain a standardized model file. Load standardized model files through the inference engine and adapt them to different hardware platforms; The real-time acquired vibration signal is denoised, subjected to continuous wavelet transform, RGB mapping and normalization, and converted into a two-dimensional time-frequency graph and then into an input tensor in the format of [1,3,224,224]. The optimized diagnostic model performs forward propagation inference on the input tensor and records the processing time to obtain the original classification result. The original classification results are subjected to Softmax probability normalization, and the fault category and confidence level corresponding to the highest probability in the original classification results are extracted to obtain the structured diagnosis results.

10. The method according to claim 1, wherein the method is based on CWT-CNN-LSTM adversarial domain adaptation for bearing fault diagnosis of water conservancy equipment across working conditions. The process of using PCA to reduce the dimensionality and visualize the overlap between the source domain samples and the target domain feature distributions, calculating the comprehensive performance index, and generating a confusion matrix heatmap to verify the stability of the optimized diagnostic model includes: The optimized diagnostic model performs forward propagation on source domain samples and target domain samples respectively, and extracts global features from the feature extractor. The extracted global features are reduced in dimensionality using PCA technology, and the dimensionality reduction results are compared and colored according to fault category and file name prefix to generate a comparison scatter plot. Based on historical data recorded during the training process, plot the curves showing the changes in loss and accuracy. By combining the scatter plot and the curves showing the changes in loss and accuracy, a comprehensive performance index is calculated and a confusion matrix heatmap is generated to verify the stability of the optimized diagnostic model.