A method and apparatus for motor fault diagnosis based on cross-sensor self-comparative learning
By employing a cross-sensor self-comparison learning method, multi-modal sensor data is used for motor fault diagnosis, which solves the problem of insufficient utilization of cross-sensor data in existing technologies. This enables efficient fault identification under conditions of scarce labeled data, improving the diagnostic accuracy and speed of heavy-duty locomotive motors.
Patent Information
- Application Number
- CN202611064378.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-17
- Publication Date
- 2026-11-17
AI Technical Summary
Existing intelligent fault diagnosis technologies struggle to effectively utilize cross-sensor data and achieve efficient motor fault diagnosis in scenarios with scarce labeled data, especially in heavy-duty locomotives. Current methods rely on human experience and a large amount of labeled data, making it difficult to accurately identify motor faults under complex operating conditions.
A cross-sensor self-comparative learning method is adopted. Data is collected by multimodal sensors, normalized and segmented by sliding window, and combined with data augmentation and envelope spectrum calculation to construct a DB-TMC encoder and a dual-channel interactive adaptive attention module for self-supervised comparative learning. This captures potential fault features in unlabeled data and realizes cross-sensor feature fusion and fault identification.
With limited labeled data, more accurate and robust motor fault diagnosis was achieved, improving diagnosis speed and accuracy. It can effectively identify various motor faults under complex working conditions, meeting the actual needs of heavy-duty locomotives.
Smart Images

Figure CN123115994A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of heavy-duty locomotive motor fault diagnosis technology, specifically to a motor fault diagnosis method and device based on cross-sensor self-comparison learning. Background Technology
[0002] As a critical drive component in heavy-haul locomotives, the electric motor endures multiple loads and stresses from complex operating conditions over extended periods. These include periodic impacts caused by vehicle vibration, torque fluctuations from steering movements, and transient impacts and axial forces resulting from track irregularities. Therefore, maintaining the motor's health is crucial for ensuring the safe and reliable operation of the locomotive. Under such complex conditions, motors may experience various failure modes, including winding insulation aging, bearing wear, rotor imbalance, overheating, inter-turn short circuits, and electrolytic corrosion. Once a motor fails, it directly affects the drive force output and system stability, potentially leading to locomotive instability or even accidents. Therefore, real-time fault monitoring and diagnosis of heavy-haul locomotive motors, enabling timely detection of potential problems and the implementation of effective measures, has become a key means of ensuring transportation safety and improving operational efficiency.
[0003] Early motor fault diagnosis relied on signal processing and machine learning methods. However, these methods depended on human experience and required large amounts of manually pre-processed labeled data for training. In recent years, with the rapid advancement of artificial intelligence, deep learning algorithms have been successfully applied to motor fault diagnosis, achieving significant research results. However, previous deep learning methods typically relied on single-sensor data for diagnosis, making it difficult to effectively utilize complementary features from multi-source data collected across sensors for efficient diagnosis. Furthermore, the training process heavily depended on labeled data to learn fault features; a lack of labeled data would hinder the model's ability to effectively learn feature representations. These factors pose serious challenges to the practical application of existing intelligent fault diagnosis technologies. Summary of the Invention
[0004] The purpose of this invention is to provide a motor fault diagnosis method and apparatus based on cross-sensor self-comparative learning, to solve the problem that existing intelligent diagnosis methods are unable to effectively utilize cross-sensor data and achieve efficient diagnosis in scenarios with scarce labeled data. To achieve the above objective, this invention adopts the following technical solution: According to one aspect of the present invention, a motor fault diagnosis method based on cross-sensor self-comparative learning is provided, comprising the following steps: Step 1: Simultaneously collect various health status data of the heavy-duty locomotive motor during operation using sensors of different modes, and normalize the health status data of different modes to obtain time-domain operation data of different health statuses. The health status data of different modes include current data and vibration data, all of which are in time-domain format. Step 2: Apply a sliding window to segment the time-domain health status data of various modalities to obtain multiple health status sample data. After the health status sample data is aggregated into a total sample, it is further divided into training set, fine-tuning set and test set. The fine-tuning set data is manually labeled, and the rest are unlabeled data. Step 3: Perform data augmentation and envelope spectrum calculation on the training sets under different modes to obtain the multimodal envelope spectrum signal of the augmented data; based on the training set data under different modes, perform two random data augmentations on each type of sensor signal. The results of the two augmentations under the same sensor are used for intra-sensor comparison, while the data from different sensors are used for inter-sensor comparison. Subsequently, calculate the envelope spectrum of the augmented data to effectively highlight the weak fault characteristics of non-stationary multimodal signals and reduce cross-modal interference. Step 4: Construct a cross-sensor self-contrast learning fault diagnosis model consisting of a DB-TMC encoder and a dual-channel interactive adaptive attention module. Based on the DB-TMC encoder, feature extraction is performed on the envelope spectrum signal to obtain enhanced view features for different envelope signals. Self-supervised contrastive learning is then performed on the enhanced view features both between and within sensors to capture the representational ability of potential fault features in unlabeled data. The designed DB-TMC encoder is used to extract features from each envelope spectrum signal and map them to a unified representation space. Subsequently, the features of the enhanced views from each sensor are sequentially input into the projection head and prediction head to form the positive pairs required for contrastive learning. During pre-training, consistency within and across sensors is simultaneously constrained, thereby making the representation more discriminative and transferable in multi-source scenarios. Step 5: Using the ability to learn the representation of potential fault features as the initialization for the fine-tuning stage, the dual-path interactive adaptive attention module is trained and fine-tuned using the fine-tuning set data to obtain stable and accurate fault feature representations. The fine-tuning set is labeled for training the linear classification head. Furthermore, the dual-path interactive adaptive attention module (DIAAM) constructed during the fine-tuning process dynamically weights and fuses the features from the two paths, further strengthening complementary information and suppressing redundancy, thereby more accurately learning fault feature representations from different sensors. Step 6: Input the test set as sample data into the trained cross-sensor self-comparison learning fault diagnosis model for optimization testing, identifying different health status types or fault types of heavy-duty locomotive motors. Input the test set into the trained CSSCL fault diagnosis model to identify different fault types. If the CSSCL fault diagnosis model can identify different fault types on the test set, it can be used to implement fault diagnosis of heavy-duty locomotive motors.
[0005] Optionally, in step 1, the normalization process for various state data includes the following steps: Normalizing various fault currents and vibration signals of the motor using a maximum-minimum normalization method, ensuring that the amplitude of the time-domain signal is distributed between 0 and 1, and that the maximum-minimum normalization method satisfies: (1) in, f n,z Representing the z The first of the columns n 1 eigenvalue, Represents the normalized eigenvalues. f z Indicates the first z All feature values of the column.
[0006] Optionally, the above scheme may involve applying a sliding window to segment the two different modalities of health status data to obtain multiple health status sample data, including the following steps: Step 201: Use a sliding window to segment the time-domain operating data of different health states to obtain sample data of each health state of the motor under different sensors; wherein, the width of the sliding window is set to 1024 and the sliding step size is 512; Step 202: After the data is segmented, 620 fault samples are taken from each health status sample data of each type of sensor to form an experimental dataset. The fault samples are randomly divided into training set, fine-tuning set and test set in a ratio of 25:1:5. Only the fine-tuning set is labeled, and the rest are unlabeled data. After data segmentation, 620 fault samples were selected from each health state of each sensor to form the experimental dataset. These fault samples were then randomly divided into training, fine-tuning, and test sets in a 25:1:5 ratio. Only the fine-tuning set data was labeled; the rest were unlabeled.
[0007] Alternatively, the above scheme may involve performing data augmentation and envelope spectrum calculation on the training sets under two different modalities to obtain the multimodal envelope spectrum signal of the augmented data, including the following steps: Step 301: Perform random data augmentation twice on the time-domain running data of different modalities in the training set to obtain multimodal time-domain augmented view signals. The results of the two augmentations are used for intra-sensor comparison, and the data from different sensors are used for inter-sensor comparison. Augmentation is performed on the time-domain running data using random augmentation strategies (including Cutout, Reversing, Gaussian SNRnoise, Scaling, and Shifting). The process is as follows: Assuming a given length of... N time domain signal X ( t The calculation formulas for each method are as follows: Cutout: (2); Reversing: (3); Gaussian SNR noise: (4); Scaling: (5); Shifting: (6); in, The mean is 0 and the standard deviation is noise, RMS ( X ) represents the root mean square value of the signal; mod indicates that cyclic shifting is used to handle issues exceeding the signal boundaries. The above five data augmentation methods are randomly combined and applied to time-domain data to obtain different signal augmentation views.
[0008] Step 302: Perform Hilbert transform on the time-domain enhanced view signals of the multimodal signals obtained from the two random data augmentations, and then perform envelope analysis on the transformed signals to obtain the envelope signal. Finally, perform Fast Fourier Transform (FFT) on the envelope signal to obtain the envelope spectrum signal. To highlight the weak fault characteristics of non-stationary multimodal signals and reduce cross-modal interference, an envelope spectrum analysis method is introduced. First, a Hilbert transform is used to generate the analysis signal, then the amplitude of the analysis signal is calculated to obtain the signal envelope. Finally, a Fast Fourier Transform is used to process the envelope to obtain the spectrum signal. This method can effectively highlight the weak fault characteristics of multi-sensor signals and reduce the differences between signals from different sensors. The specific implementation steps of this process are as follows: First, enhance the signal The process of performing a Hilbert-Thuss transform and calculating and analyzing the signal is described below: (7); (8); Where PV represents the Cauchy principal value integral. This represents the result of HT. This represents the calculated analysis signal. j It represents the imaginary unit.
[0009] Subsequently, the signal was calculated and analyzed. The amplitude is used to obtain the envelope of the signal. envelope To enhance the instantaneous envelope amplitude sequence of the time-domain signal at each time step, the process is calculated as follows: (9); Finally, by analyzing the envelope Perform an FFT to calculate its spectrum, the process is as follows: (10); N This represents the number of discrete sampling points participating in the Fast Fourier Transform; n Indicates the discrete sampling point number; t n Indicates the first n Each sampling time; f This represents the frequency variable or frequency index in the envelope spectrum. k This represents the discrete frequency point index, and the corresponding actual frequency is... f k Through the above series of calculations, the envelope spectrum of the signal can effectively separate the modulation frequency components containing key fault information, while suppressing multimodal noise and interference signals. Furthermore, by highlighting specific fault frequencies and their harmonic components, the identifiability of fault characteristics is significantly improved, thus providing a more reliable frequency domain analysis basis for fault diagnosis.
[0010] Alternatively, the above scheme may involve extracting features from the envelope spectrum signal using a DB-TMC encoder to obtain enhanced view features for different envelope signals, and then performing self-supervised comparative learning between and within sensors on these enhanced view features. A carefully designed DB-TMC encoder is used to extract features from each envelope spectrum signal and perform self-comparative learning to learn potential fault representations in unlabeled data. This includes the following steps: Step 401: The envelope spectrum signal is processed by a three-layer CNN of the DB-TMC encoder to extract local texture and compress the temporal sequence. The resulting local spectral feature map or local spectral feature sequence is then fused with features from a parallel Transformer network and a Bi-MDGU (Bi-MDGU) network to obtain enhanced view features for different modal sensors. This allows for the learning of comprehensive features from the global context. In this invention, after calculating the envelope spectrum of the signal, the new DB-TMC encoder is used to extract features from the envelope spectrum. The DB-TMC encoder's workflow is as follows: First, local texture is extracted and the temporal sequence is compressed using a three-layer CNN. Then, complementary modeling is achieved using a parallel Transformer and a Bi-MDGU. The former excels at global dependency and transharmonic mode capture, while the latter uses lightweight single-gate recursion to characterize the exponential decay and temporal directionality of the impulse component. Finally, the features extracted by the Transformer and Bi-MDGU are fused to obtain a more robust representation from multi-source nonlinear data. Step 402: The enhanced view features of each channel extracted by the DB-TMC encoder after two enhancements are input into the projection head and the prediction head. The projection head generates feature representations similar to those of the subsequent prediction head by mapping the features to a lower-dimensional space. The prediction head is used to further process the projected features, output predicted values, and calculate prediction errors. The input of the features extracted by the encoder to each channel is then fed into the projection head and the prediction head. The projection head generates feature representations similar to those of the subsequent prediction head by mapping the features to a lower-dimensional space, thereby helping the model find a suitable mapping in the feature space. The prediction head is used to further process the projected features, output predicted values, and calculate prediction errors to optimize the objective function and enhance the model's representational capabilities. The description of the input of the DB-TMC extracted features to the projection head and the prediction head is as follows: ; (11); in, Pro Indicates the projection head. Z This indicates the projection characteristics output by the projection head; Pre Indicates the prediction head, P This represents the predicted features output by the prediction head; Step 403: After passing through the projection head and prediction head, the different enhanced view features of the vibration signal are obtained respectively after passing through the projection head and prediction head. Z C1 , Z C2 , P C1 , P C2 Different enhanced view features of the current signal are obtained after passing through the projection head and the prediction head respectively. ZV1 , Z V2 , P V1 , P V2 This provides input for subsequent predefined proxy tasks, namely, the comparison between and within sensors in contrastive learning. Here, ZC1, ZC2, ZV1, and ZV2 are the projected features obtained from different modal augmented views through the projector head, and PC1, PC2, PV1, and PV2 are the predicted features obtained after further mapping of the corresponding projected features through the prediction head. C and V represent different sensor modal branches, and 1 and 2 represent two random augmented views. This can be further understood as follows: the subscripts C and V in the projected feature Z and predicted feature P are used to distinguish between two types of sensor modal branches. By convention, C represents the vibration mode and V represents the current mode. Then, ZC1 and ZC2 represent the projected features obtained from the two augmented views of the vibration mode through the projector head, and PC1 and PC2 represent the corresponding predicted features; ZV1 and ZV2 represent the projected features obtained from the two augmented views of the current mode through the projector head, and PV1 and PV2 represent the corresponding predicted features. The subscripts 1 and 2 of C and V represent the predicted features. This represents two enhanced views formed by augmenting the same modal signal with two different random data. These features are used for subsequent intra-sensor and cross-sensor contrastive learning. To this end, the model is constrained to learn consistent and complementary features in unlabeled data by calculating the similarity between the projected feature Z and the predicted feature P. Step 404: To evaluate the similarity between sample pairs, potential fault features in the unlabeled data are learned during this process, and cosine similarity is used to calculate the projection head. Z Output projection features and prediction head P The similarity between the output predicted features is calculated using the following formula: (12); in, express L 2 Norm; The losses within each sensor are calculated as follows: (13); (14); (15); in, stopgrad This indicates that updating the gradient of the current branch should be stopped. L intra This represents the sum of losses across multiple sensors. L C2C1 Representing projection features ZC2 With predictive features P C1 The similarity between them L C1C2 Representing projection features Z C1 With predictive features P C2 Similarity between them L V2V1 Representing projection features Z V2 With predictive features P V1 Similarity between them L V1V2 Representing projection features Z V1 With predictive features P V2 The similarity between them; Contrastive learning between sensors aims to uncover complementary information between different sensors. By narrowing the gap between feature representations from different sensors, the model can obtain more robust and consistent feature representations during cross-sensor learning. Step 405: By maximizing the similarity between different sensor views of the same signal and minimizing the similarity between enhanced view features of different modal sensors for different signals, the contrastive learning loss within and between sensors is calculated, thereby capturing shared features of different sensors. By maximizing the similarity between different sensor views of the same signal and minimizing the similarity between different sensor views of different signals, the discriminativeness of cross-sensor fault representation is effectively improved. In this process, the contrastive learning loss function between sensors plays a key role. By optimizing the loss function, the model can capture shared features of different sensors, further improving the fusion effect of multi-sensor data. The contrastive learning loss within each sensor is calculated as follows: (16); (17); (18); in, L inter This represents the sum of losses among multiple sensors, and the total loss function of the CSSCL fault diagnosis model during the entire pre-training process can be derived from the following formula: (19); in, This represents the weighting parameter.
[0011] Optionally, in step 5 of the above scheme, using the ability to represent potential fault features as the initialization of the fine-tuning stage, and training and fine-tuning the dual-path interactive adaptive attention module using labeled fine-tuning set data includes the following steps: Step 501: The representational ability of potential fault features is used as the initialization of the fine-tuning stage. Then, the multimodal labeled data in the fine-tuning set is applied to the fine-tuning stage to train the linear classification head and obtain a more accurate fault correspondence. The representation learned by the model using a large amount of unlabeled data for pre-training is biased, and the model is not effective when used directly for diagnosis. Therefore, the encoder weights are used as the initialization of the fine-tuning stage, and the labeled multimodal labeled data in the fine-tuning set is applied to the fine-tuning stage to train the linear classification head and obtain a more accurate fault correspondence. Step 502: During fine-tuning, the dual-channel interactive adaptive attention module (DIAAM) concatenates and linearly maps the input potential fault features to obtain cross-sensor query features Q, key features K, and value features V. To further efficiently fuse sensor signals from different modalities during fine-tuning, this paper designs a dual-channel interactive adaptive attention module (DIAAM) structure to extract complementary information between sensors. Unlike traditional attention mechanisms, the DIAAM uses a dual-channel parallel approach, simultaneously weighting and selecting between local and global features. Specifically, the DIAAM dynamically allocates attention weights between the two channels based on the characteristics of the input signal, effectively extracting discriminative cross-sensor information. This mechanism not only improves cross-sensor complementarity but also enhances the adaptability of feature selection, allowing the model to focus on more useful features and suppress noise and redundant information. In this way, the DIAAM provides more expressive features for subsequent feature fusion and fault classification tasks. Step 503: Calculate the attention weights between the query feature Q and the key features K and value features V, respectively, and then use these attention weights to weight the corresponding value features to obtain the two-way enhanced fusion features; the calculation process is described as follows: (20); in, W K , W V , W Q These are trainable parameters used to build simple linear layers; This represents the query feature vector representing cross-sensor fusion. Yc and Yv These represent the learning potential fault characteristics of the two modes, respectively; Step 504: Perform dot product matching, scaling, and classification calculations on the two enhanced fusion features to obtain the enhanced modality attention enhanced features after fusion. The calculation process is described as follows: (twenty one); (twenty two); Here, , This represents the modal attention enhancement features after enhanced fusion of the two types of sensors, specifically the output of the two sensors after calculation by the dual-path interactive adaptive attention module DIAAM. To mitigate excessively large scaling factors for dot products; Step 504: Concatenate and fuse the enhanced modal attention features to obtain the fused cross-sensor fault features. Then, perform fault state identification on the cross-sensor fault features through linear mapping and a Softmax classification function to obtain the fault prediction probability. Subsequently based on real labels With fault prediction probability Cross-entropy is calculated to obtain the cross-entropy classification loss, which is used to update the fault diagnosis network; the calculation process is described as follows: (twenty two); ;(twenty three); This represents the cross-sensor fault characteristics output by splicing and fusing two types of sensors, in order to achieve a stable and accurate feature representation. Represents the actual value. Indicates the predicted value; L cls express Cross-entropy classification loss rate; Optionally, in step 6, when inputting unlabeled samples from the test set into the trained cross-sensor self-comparison learning fault diagnosis model for optimization testing, if the cross-sensor self-comparison learning fault diagnosis model shows good fault diagnosis accuracy on the test set, it can be used to realize the fault diagnosis of heavy-duty locomotive motors.
[0012] Optionally, the fault diagnosis accuracy threshold is set to 95%. If the fault diagnosis accuracy of the cross-sensor self-contrast learning fault diagnosis model is greater than 95%, then the cross-sensor self-contrast learning fault diagnosis model is considered to have good fault diagnosis accuracy. To verify that the CSSCL fault diagnosis model can effectively identify the fault categories of heavy-duty locomotive motors, signals from the test set are input into the fine-tuned CSSCL fault diagnosis model. The CSSCL fault diagnosis model performs a series of processes on the input test signals, classifies different types of features, and outputs the diagnosis accuracy. If the MDTFS has a diagnosis accuracy greater than 95% on the test set, it is used for fault diagnosis of heavy-duty locomotive motors.
[0013] According to another aspect of the present invention, the present invention also proposes a fault diagnosis device for a heavy-duty locomotive motor based on a cross-sensor self-comparative learning algorithm, used in the aforementioned motor fault diagnosis method based on cross-sensor self-comparative learning. The fault diagnosis device includes a motor multimodal signal acquisition module, a signal preprocessing module, a signal transformation module, a model pre-training module, a model fine-tuning module, and a fault diagnosis module. The multimodal signal acquisition module, the signal preprocessing module, the signal transformation module, the model pre-training module, the model fine-tuning module, and the fault diagnosis module are electrically connected. The motor multimodal signal acquisition module is used to acquire the vibration signal and current signal of the motor; the motor multimodal signal acquisition module consists of a current sensor and an acceleration sensor installed inside and outside the motor; The signal preprocessing module is responsible for normalizing the obtained vibration signal and current signal, and then using a sliding window to segment the normalized data to obtain multiple sample data. The total sample set is then divided into a training set, a fine-tuning set, and a test set. Only the fine-tuning set is labeled, while the training set and the test set are labeled. The signal transformation module first performs two random data augmentations on the training set data to obtain two augmented representations of the signal. Then, it calculates the envelope spectrum of the augmented data and obtains the envelope spectrum representation of the augmented signal through a series of transformations. The model pre-training module inputs the enhanced envelope spectrum representation, after envelope spectrum transformation, into the model pre-training module for contrastive learning training, capturing the representational ability of potential fault features in unlabeled data. The model fine-tuning module labels a small set of fine-tuning data and performs a fine-tuning on the pre-trained model to correct biases and make the mapping relationship between fault features and categories more accurate. The envelope spectrum data is input into the pre-trained model. First, signal features are extracted using a DB-TMC encoder and input into the projection head and prediction head. According to a predefined agent task, contrastive learning within the sensor and contrastive learning between sensors are carried out, learning potential representations in unlabeled data during this process. The model fine-tuning module uses labeled fine-tuning set data to fine-tune the pre-trained model, correcting deviations and making the mapping relationship between fault features and categories more accurate. Furthermore, the dual-path interactive adaptive attention module DIAAM enhances cross-sensor complementarity and improves the adaptability of feature selection, allowing the model to focus on more useful features and suppress noise and redundant information. The fault diagnosis module inputs multimodal data from the test set into a finely tuned CSSCL fault diagnosis model based on cross-sensor self-comparison learning for diagnosis, thereby achieving efficient diagnosis of motor faults.
[0014] The CSSCL fault diagnosis model based on cross-sensor self-comparison learning includes model pre-training, fine-tuning and testing stages. In the pre-training calculation, a large amount of unlabeled data is used to learn the characteristics of various health states of the motor.
[0015] In summary, because the present invention adopts the above-described technical solution, the present invention has the following beneficial technical effects: (1) This invention uses cross-modal sensors to simultaneously monitor the motor's condition, thereby capturing multi-dimensional fault features and providing sufficient and comprehensive multi-source datasets for subsequent fault diagnosis.
[0016] (2) This invention constructs a new cross-sensor self-comparative learning method to comprehensively mine potential fault information between and within different sensors from a large number of unlabeled multi-source data samples, so as to achieve robust cross-sensor representation under limited labeled sample conditions; (3) In this invention, an envelope spectrum calculation method is proposed. The Hilbert transform is used to generate the analysis signal, then the amplitude of the analysis signal is calculated, and the envelope is processed by the fast Fourier transform. This method can effectively highlight the weak fault characteristics of multi-sensor signals and reduce the differences between signals from different sensors. (4) In this invention, a minimum attenuation gated unit (MDGU) was carefully designed. It was combined with Transformer and CNN to construct a new DB-TMC encoder for fully extracting envelope spectral features; (5) In this invention, a dual-path interactive adaptive attention module DIAAM is designed, which fully integrates complementary information from different sensors through interactive perception and adaptive weighting of two parallel attention paths; (6) The self-comparative learning intelligent fault diagnosis device for motors designed in this invention has significant advantages such as fast diagnosis speed, minimal required annotation data, and high diagnosis accuracy. It can meet the actual diagnostic application needs of motors and has broad application potential in other fields. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art 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.
[0018] Figure 1 This is a flowchart of the execution steps of a motor fault diagnosis method based on cross-sensor self-comparative learning according to the present invention.
[0019] Figure 2 This is a schematic diagram of the fault diagnosis process for heavy-duty locomotive motors based on a cross-sensor self-comparison learning algorithm according to the present invention.
[0020] Figure 3 This describes the workflow of the encoder DB-TMC of this invention.
[0021] Figure 4 This describes the working process of the dual-path interactive adaptive attention module DIAAM of the present invention.
[0022] Figure 5 This is a structural block diagram of the heavy-duty locomotive motor fault diagnosis device based on a cross-sensor self-comparison learning algorithm provided by the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, preferred embodiments will be listed below with reference to the accompanying drawings to provide a clear and complete description of the invention. However, it should be noted that the examples in the specification are preferred examples, not all examples. Furthermore, many details listed in the specification are merely to provide the reader with a deep understanding of the key issues of this invention; the invention can be implemented even without these specific details.
[0024] Please see Figure 1 and Figure 2 This invention provides a motor fault diagnosis method based on cross-sensor self-comparative learning, comprising the following steps: Step 1: Simultaneously collect health status data of two different modes of operation of the heavy-duty locomotive motor using two types of sensors of different modes, and normalize the health status data of the two different modes to obtain operating data of different health states. The health status data of the two different modes includes current data and vibration data, both of which are time-domain data. In this embodiment, the vibration signal and three-phase current signal of the motor under eight healthy operating states at different speeds are collected using different modal sensors on the heavy-duty locomotive motor experimental platform. The motor fault types corresponding to the eight motor operating states at different speeds are numbered, such as the eight motor fault types {bearing outer ring fault, imbalance fault, warping fault, static eccentricity fault, dynamic eccentricity fault, rotor bar breakage fault, winding fault, bearing rolling element fault} are numbered as {0,1,2,3,4,5,6,7} respectively. In this invention, the normalization processing of the health status data of the two different modes specifically includes the following steps: S101: The maximum-minimum normalization method is used to normalize various time-domain fault signals of the motor to obtain operating data of different health states, so that the amplitude of the time-domain fault signal is distributed between 0 and 1. The maximum-minimum normalization method satisfies: , (1); in, f n,z Representing the z The first of the columns n 1 eigenvalue, Represents the normalized eigenvalues. f z Indicates the first z All feature values of the column; Step 2: Apply a sliding window to segment the time-domain operating data of different health states obtained through normalization processing to obtain multiple sample data of each health state of the motor under different sensors. These sample data are then aggregated into a total sample and further divided into training, fine-tuning, and test sets. The specific steps for obtaining multiple sample data through sliding window segmentation are as follows: Step 201: Use a sliding window to segment the time-domain operation data of different health states to obtain sample data of the motor's health states under different sensors; wherein, the width of the sliding window is set to 1024 and the sliding step size is 512; Step 202: After the data is segmented, 620 fault samples are taken from each health status sample data of each type of sensor to form an experimental dataset. The fault samples are randomly divided into training set, fine-tuning set and test set in a ratio of 25:1:5. Only a small amount of fine-tuning set data is labeled, and the rest of the training set and test set are unlabeled data. Step 3: Perform data augmentation and envelope spectrum calculation on the training sets under two different modes to obtain the multimodal envelope spectrum signal of the augmented data; In the pre-training stage, perform data augmentation and envelope spectrum calculation on the input data. First, obtain the different channel representations of the data through data augmentation, and calculate the envelope spectrum of the signal to reduce cross-modal interference. Perform two random data augmentations on each type of sensor signal to obtain the augmented one-dimensional time-domain data. The results of the two augmentations under the same sensor are used for intra-sensor comparison, while the data from different sensors are used for inter-sensor comparison. Subsequently, calculate the envelope spectrum of the augmented data to effectively highlight the weak fault characteristics of the non-stationary multimodal signal and reduce cross-modal interference. The entire execution process of obtaining the multimodal envelope spectrum signal includes the following steps: Step 301: First, perform two random data augmentations on the time-domain running data of different modalities in the training dataset to obtain multimodal time-domain augmented view signals. The results of the two augmentations are used for intra-sensor comparison, and the data from different sensors are used for inter-sensor comparison. The proposed random augmentation strategy includes Cutout, Reversing, Gaussian SNR noise, Scaling, and Shifting data augmentation methods, where Cutout represents random occlusion; Reversing represents time reversal; Gaussian SNR noise represents Gaussian noise addition based on signal-to-noise ratio; Scaling represents amplitude scaling; and Shifting represents time-series translation or cyclic translation. Assuming the given length of the time-domain running data is... N time domain signal X ( t The calculation formulas for each method are as follows: Cutout: (2); Reversing: (3); Gaussian SNR noise: (4); Scaling: (5); Shifting: (6); in, The mean is 0 and the standard deviation is noise, RMS ( X) is the root mean square value of the signal, ω is 0.1 times the length of N, Unif means random sampling according to a uniform distribution; mod means using cyclic shift to handle problems that exceed the signal boundary. The above five data augmentation methods are randomly combined and applied to the time domain data to obtain different signal augmentation views. Step 302: To highlight the weak fault characteristics of non-stationary multimodal signals and reduce cross-modal interference, envelope spectrum analysis is introduced. First, Hilbert transform is used to generate the analysis signal. Then, the amplitude of the analysis signal is calculated to obtain the signal envelope, resulting in the spectrum signal. Processing the signal using this method can effectively highlight the weak fault characteristics of multi-sensor signals and reduce the differences between signals from different sensors. The specific implementation steps are as follows: First, enhance the signal The process of performing HT and calculating and analyzing the signal is described below: (7); (8); Where PV represents the Cauchy principal value integral. This represents the result of HT. This represents the calculated analysis signal. j Represents the imaginary unit; The enhanced one-dimensional time-domain data is transformed, and the resulting analyzed signal is a complex-valued signal composed of the enhanced time-domain signal and its Hilbert transform. The real part is the enhanced original time-domain signal, and the imaginary part is the Hilbert transform result of the enhanced time-domain signal. Finally, a Fast Fourier Transform is applied to process the envelope, and then the analyzed signal is calculated. The amplitude is used to obtain the envelope signal of the signal. The envelope signal The calculation process is as follows: (9); Finally, by analyzing the envelope Perform a Fast Fourier Transform (FFT) calculation to compute its spectrum, obtaining the envelope spectrum signal B( f The envelope spectrum signal B( f The calculation process satisfies: (10); Through the above series of calculations, the envelope spectrum of the obtained signal can effectively separate the modulation frequency components containing key fault information, while suppressing multimodal noise and interference signals. By highlighting specific fault frequencies and their harmonic components, after Hilbert transform, envelope extraction and fast Fourier transform, the frequency components caused by fault impact, amplitude modulation or periodic anomalies in the original time domain signal will show more obvious spectral peaks in the envelope spectrum, and their integer multiple frequencies will also show corresponding harmonic spectral peaks, which significantly improves the identifiability of fault features, thus providing a more reliable frequency domain analysis basis for fault diagnosis. Step 4: Construct a cross-sensor self-comparison learning (CSSCL) fault diagnosis model. This model consists of a DB-TMC encoder and a dual-channel interactive adaptive attention module. Based on the DB-TMC encoder, feature extraction is performed on the envelope spectrum signal to obtain enhanced view features for different envelope signals. Self-supervised comparative learning is then performed on these enhanced view features, both between and within sensors, to capture and learn the representational ability of potential faults in unlabeled data. The DB-TMC encoder is used to extract features from each envelope spectrum signal and perform self-comparison learning to learn the representation of potential faults in unlabeled data. Specifically, random enhancement and envelope spectrum transformation are first applied to the current signal and vibration signal, respectively. Then, the DB-TMC encoder is used to extract potential fault features from both types of sensor signals. Subsequently, intra-sensor and cross-sensor comparative losses are constructed using a projection head and a prediction head to complete the self-comparison pre-training under unlabeled data conditions. In the fine-tuning stage, the pre-trained DB-TMC encoder is used as the main feature extraction module, and DIAAM is introduced. The encoder performs interactive fusion of current and vibration characteristics, and finally outputs the motor's health status or fault category through a linear classification head. The encoder's operation process includes the following steps: Step 401: After calculating the envelope spectrum of the signal, feature extraction is performed on the envelope spectrum using a DB-TMC encoder. For example... Figure 3As shown, the DB-TMC encoder's workflow is as follows: First, the envelope spectrum signal is processed by a three-layer convolutional neural network (CNN) to extract local texture and compress the timing. Then, a parallel Transformer network and a Bidirectional Minimum-Decay Gating Unit (Bi-MDGU) are used for complementary modeling. MDGU stands for Minimum-Decay Gating Unit. The former is good at global dependency and cross-harmonic mode capture, while the latter uses a lightweight single-gate recursion to characterize the exponential decay and temporal directionality of the impact component. Finally, the features extracted by Transformer and Bi-MDGU are fused to obtain a more robust representation from multi-source nonlinear data. Transformer mainly consists of several stacked multi-head self-attention and feedforward networks, which can compensate for the shortcomings of CNN in expressing non-local relationships. After network spectrum calculation, the envelope spectrum amplitude sequence corresponding to each enhanced view is obtained. This data is used as the input of DB-TMC encoder. First, the envelope spectrum amplitude sequence is input to the CNN local feature extraction unit. The CNN local feature extraction unit extracts local spectral texture features and local peak change features between adjacent frequency points through convolutional layers. The intermediate feature distribution is normalized by Batch Normalization layer to stabilize the training process and reduce the difference in amplitude scale between different samples. After CNN processing, a local spectral feature map or local spectral feature sequence is obtained. Figure 3 The conv is the computation of CNN. Figure 3 The ×3 indicates that there are three such modules. The Bi-MDGU branch is used to model the impact attenuation law and bidirectional sequence dependence in the local spectral features, and outputs bidirectional time-series attenuation features or impact response features. This branch recursively models the feature sequence in both forward and reverse directions to characterize the attenuation trend and correlation of the fault impact component in the frequency domain or sequence features. Figure 3 The ×3 in the text represents three such modules; Step 402: The enhanced view features extracted by the DB-TMC from each channel are input into the projection head and the prediction head. The projection head generates a feature representation with similarity to the subsequent prediction head by mapping the features to a lower-dimensional space, thereby driving the model to find a suitable mapping in the feature space. The prediction head is used to further process the projected features, output predicted values and calculate prediction errors to optimize the target loss function, enhance the model's representational ability, extract the features after transformation of each envelope spectrum signal, and map them to a unified representation space. Subsequently, the extracted features of each sensor's enhanced view are sequentially input into the projection head and the prediction head to form the positive pairs required for contrastive learning. Constraints on intra-sensor and cross-sensor consistency are simultaneously imposed during pre-training, making the representation more discriminative and transferable in multi-source scenarios. The description of the input of features extracted by the DB-TMC encoder to the projection head and the prediction head is as follows: ; (11) in, Pro Indicates the projection head. Z This indicates the output of the projection head; Pre Indicates the prediction head, P This indicates the output of the prediction head; For the synchronously acquired current time-domain signal and vibration time-domain signal, two random data augmentations are performed respectively to obtain the first augmented current time-domain signal, the second augmented current time-domain signal, the first augmented vibration time-domain signal, and the second augmented vibration time-domain signal. After envelope spectrum transformation and feature extraction by the DB-TMC encoder, the above augmented time-domain signals are further used to obtain the corresponding projection features and prediction features, and a contrastive learning loss is constructed based on these features. The intra-sensor contrast refers to using two augmented views of the same sample obtained by two random augmentations as positive sample pairs within the same sensor mode for consistency constraints. For example, the first augmented current view and the second augmented current view constitute the intra-sensor contrast of the current sensor, and the first augmented vibration view and the second augmented vibration view constitute the intra-sensor contrast of the vibration sensor. Its function is to enable the model to extract stable and consistent fault features when facing changes such as random occlusion, noise disturbance, amplitude scaling, and time-series translation, thereby enhancing the robustness of the single sensor feature representation. Step 403: After passing through the projection head and prediction head, the different enhanced view features of the vibration signal are respectively obtained as projection features after passing through the projection head and prediction head. Z C1 , Z C2 and predictive features P C1 , P C2 Different enhanced view features of the current signal are obtained by passing through the projection head and the prediction head to obtain projection features respectively.Z V1 , Z V2 and predictive features P V1 , P V2 This provides input for subsequent predefined proxy tasks, namely, comparisons between and within sensors in contrastive learning. Each sensor signal undergoes two random data augmentations, thus each sensor corresponds to two augmented views. Each augmented view is input into the DB-TMC encoder to obtain potential fault features, which are then sequentially passed through the projection head and prediction head to obtain a projection feature. Z and a predictive feature P Therefore, each sensor corresponds to two augmented views, and each augmented view corresponds to one projected feature and one predicted feature. Thus, each sensor will obtain four feature representations, i.e., two... Z Features and two P Features, the two mentioned above Z Feature representation is used for subsequent intra-sensor contrast loss, two P Features are used to calculate the contrast loss between sensors; Step 404: To evaluate the similarity between sample pairs, latent features in the unlabeled data are learned during this process, and cosine similarity is used for calculation. Z and P The similarity between them is calculated using the following formula: (12); in, express L 2 Norm.
[0025] The losses within each sensor are calculated as follows: (13); (14); (15); in, stopgrad This indicates that updating the gradient of the current branch will be stopped. L C2C1 express Z C2 and P C1 Similarity between them L intra This represents the sum of losses across multiple sensors.
[0026] Contrastive learning between sensors aims to uncover complementary information among different sensors. By reducing the distance between feature representations from different sensors, the model can obtain more robust and consistent feature representations during cross-sensor learning. By maximizing the similarity between different sensor views of the same signal while minimizing the similarity between different sensor views of different signals, the discriminative power of cross-sensor fault representations is effectively improved. In this process, the contrastive learning loss function plays a crucial role. By optimizing the loss function, the model can capture shared features from different sensors, further improving the fusion effect of multi-sensor data. The loss function is calculated as follows: (16); (17); (18); in, L inter This represents the sum of losses among multiple sensors. Furthermore, the total loss function of the CSSCL fault diagnosis model during the entire pre-training process can be derived, calculated as follows: (19); in, This represents the weight parameters; by calculating the loss during the comparative training process, it can constrain the comparative learning in the projection and prediction processes to move in a better direction, thereby capturing the ability to represent potential faults in unlabeled data. Combination Figure 3 As shown, the DB-TMC encoder takes as input the envelope spectrum sequence corresponding to the augmented view features of each modality, and outputs the potential fault feature vector of that augmented view. Specifically, the envelope spectrum first passes through a convolutional layer to extract local spectral texture features and compress the sequence length; then the envelope spectrum amplitude sequence corresponding to each augmented view feature is input... CNN The local feature extraction unit extracts local spectral texture features and compresses the sequence length to obtain local spectral features; subsequently, these local spectral features are input into the Transformer branch and... Bi-MDGU Branches; Transformer Branches are used to extract global spectral dependence features and transharmonic correlation features. Bi-MDGU The branch is used to extract bidirectional temporal decay features and shock response features; finally, the features output by the two branches are fused to obtain the potential fault feature vector Y. After that, the potential fault features output by the DB-TMC encoder are first input into the projection head to obtain the projection features, and then input into the prediction head to obtain the prediction features, which are used for subsequent similarity calculation and loss function optimization. Figure 3 In h_t and h_{t-1} As Bi-MDGU Hidden state features generated during sequence modeling. h_t Indicates the first t The current hidden state corresponding to each frequency position or sequence position. h_ { t-1} represents the hidden state corresponding to the previous frequency position or the previous sequence position. Bi-MDGU uses the current input features x_t Compared to the previous hidden state h_ { t-1} Jointly calculate the current hidden state h_t This allows us to characterize the dependency between adjacent frequency positions in the envelope spectrum feature sequence and the decay changes of fault impact features. Step 5: The fine-tuning training phase includes the following steps, including applying the Dual-path Interactive Adaptive Attention Module (DIAAM module). The workflow of the DIAAM module is as follows: Figure 4 As shown, the entire fine-tuning process includes the following steps: Step 501: The representation learned by the pre-trained model using a large amount of unlabeled data is biased. Directly using the model for diagnosis is not effective. Therefore, the ability to learn the representation of potential faults (the parameter values or weights of the encoder) will be used as the initialization of the fine-tuning stage. Multimodal labeled data in the fine-tuning set will be applied to the fine-tuning stage to train the linear classification head in order to obtain a more accurate fault correspondence. Step 502: During fine-tuning, the dual-path interactive adaptive attention module concatenates and linearly maps the input potential fault features to obtain cross-sensor query features Q, key features K, and value features V. Then, it calculates the attention weights between query feature Q and the two types of modal key features K and V, respectively, and uses these attention weights to weight the corresponding value features, obtaining two-path enhanced fusion features. The two-path enhanced fusion features are then subjected to dot product matching, scaling, and classification calculations to obtain the enhanced fusion modal attention enhanced features. Finally, the enhanced fusion modal attention enhanced features are concatenated and fused to obtain the fused cross-sensor fault features. These fused cross-sensor fault features are then subjected to linear mapping and a Softmax classification function for fault state identification to obtain the fault prediction probability. Subsequently based on real labels With fault prediction probability Cross-entropy is calculated to obtain the cross-entropy classification loss, which is used to update the fault diagnosis network; the calculation process can be described as follows: (20) in, W K , W V , W Q These are trainable parameters used to build simple linear layers; This represents the query feature vector representing cross-sensor fusion. Yc and Yv These represent the learned potential fault features of the two modes (current mode feature vector and vibration mode feature vector), respectively. The modal attention enhancement features of the DIAAM module are then calculated using the following formula: (twenty one); (twenty two); Here, among them, , This represents the modal attention enhancement features after enhanced fusion of the two types of sensors. A scaling factor is used to mitigate excessively large dot product values, preventing unstable Softmax classification gradients caused by excessively large dot product values. This represents the cross-sensor fault characteristics output by splicing and fusing two types of sensors, in order to achieve stable and accurate feature representation, and the fused feature vector. The data is then fed into the classifier, and the cross-entropy classification loss is calculated to update the fault diagnosis network. This can be expressed as follows: (twenty three); This represents the cross-sensor fault characteristics output by splicing and fusing two types of sensors, where, This represents the true label (real value). This represents the probability of fault prediction (predicted value); L cls express Cross-entropy classification loss rate; To further efficiently fuse sensor signals from different modalities, a DIAAM module structure was designed to extract complementary information between sensors. Unlike traditional attention mechanisms, the DIAAM module uses a dual-path parallel approach, simultaneously weighting and selecting between local and global features. Specifically, the DIAAM module dynamically allocates attention weights between the two channels based on the characteristics of the input signal, thereby effectively extracting discriminative cross-sensor information. This mechanism not only improves cross-sensor complementarity but also enhances the adaptability of feature selection, allowing the model to focus on more useful features and suppress noise and redundant information. In this way, DIAAM provides more expressive features for subsequent feature fusion and fault classification tasks. Figure 3 As shown, Figure 3 The detailed workflow of the dual-path interactive adaptive attention module DIAAM of the present invention is as follows: The DIAAM module takes as input the fault latent features extracted by the DB-TMC encoder, which mainly include current mode feature vectors and vibration mode feature vectors. The DIAAM module comprises a query feature construction layer, a key feature mapping layer, a value feature mapping layer, a dual-path attention calculation layer, and a feature concatenation and fusion layer. First, the potential fault features of two different modes (current features and vibration features) are concatenated and linearly mapped to obtain the cross-sensor query feature Q. Simultaneously, linear mapping is performed on the current features and vibration features separately to obtain the corresponding key features K. The sum of features V; then the attention weights between the query features and the two types of modal key features are calculated respectively, and the corresponding value features are weighted using these weights to obtain current enhancement fusion features and vibration enhancement fusion features; finally, the two outputs are concatenated to obtain the fused cross-sensor fault features, which are then input into the classifier for fault state identification; in this invention, the query feature construction layer is used to construct cross-modal fusion query vectors. The current mode feature vector and the vibration mode feature vector are input into the query feature construction layer. The process is as follows: first, the current mode feature vector and the vibration mode feature vector are concatenated to obtain a joint feature representation containing electrical side information and mechanical side information. Then, a query feature vector is generated through a trainable linear mapping matrix; this query vector is not a feature from a single source, but a cross-sensor fusion query that simultaneously contains current mode and vibration mode information, used to determine which modal features are more important in the current sample; a feature mapping layer is constructed to linearly map the current mode feature vector and the vibration mode feature vector respectively to obtain current mode key features and vibration mode key features. The key features serve as attention matching objects, used to measure the correlation between cross-sensor query features and each modal feature. The value feature mapping layer performs linear transformations on the current modal feature vector and the vibration modal feature vector, respectively, to obtain the current modal value features and the vibration modal feature vector. The value features are used to carry the information of the final weighted output by the attention weights. That is, the weights obtained from the attention calculation will ultimately be applied to the value features, thereby filtering and enhancing effective fault features. The dual-path attention calculation layer includes a current attention path and a vibration attention path, and the two paths share the aforementioned cross-sensor fused query feature vector. However, the correlations are calculated with the current mode key features (key features K) and vibration mode key features (value features V) respectively, thus obtaining two sets of attention weights. In the current path, the cross-sensor query features are matched with the current mode key features through a dot product, and after scaling and a Softmax classifier (classification function), the current mode attention weights are obtained, which are then applied to the current mode value features (value features V) to obtain the enhanced current mode output features. In the vibration path, the cross-sensor query features are matched with the vibration mode key features (key features K) through a dot product, and after scaling and a Softmax classifier (classification function), the vibration mode attention weights are obtained, which are then applied to the current mode value features (value features V). Based on the vibration value feature (value feature V), the enhanced vibration mode output feature is obtained. The purpose of this dual-channel attention calculation is to allow the model to adaptively allocate attention weights according to the importance of current and vibration features in the current sample, enhancing effective features related to the fault state while suppressing noise and redundant features. The DIAAM module can dynamically allocate attention weights between the two channels according to the features of the input signal, thereby extracting discriminative cross-sensor information. The feature splicing and fusion layer splices the enhanced current mode feature and enhanced vibration mode feature obtained after dual-channel attention calculation to form the final fused cross-sensor fault feature (feature vector). This fused feature simultaneously retains electrical fault information from the current mode and mechanical shock and vibration response information from the vibration mode, and undergoes adaptive filtering and complementary enhancement through an attention mechanism. Subsequently, this fused feature is input into a Softmax classifier to calculate the fault category prediction result and the cross-entropy classification loss. L cls The fault diagnosis model was fine-tuned, and the cross-entropy classification loss was used to update the fault classification network. Step 6: In this invention, the test set is input as sample data into the trained cross-sensor self-comparison learning fault diagnosis model for optimization testing, identifying different health status types or fault types of the heavy-duty locomotive motor. During training and optimization based on the cross-sensor self-comparison learning fault diagnosis model, such as... Figure 2 As shown, Figure 2This is a flowchart of the fault diagnosis process for heavy-duty locomotive motors. First, a set of fault signals from the multimodal sensor of the motor is collected from the experimental platform, and the signals are processed according to the method described in step 2. Then, the training dataset is input into the model pre-training stage to mine potential fault feature representations in the unlabeled data. The fine-tuning dataset is then input into the model fine-tuning stage to adjust the mapping relationship between fault types and signals. To verify that the CSSCL fault diagnosis model can effectively identify fault categories in heavy-duty locomotive motors, signals from the test set are input into the fine-tuned CSSCL fault diagnosis model. The CSSCL fault diagnosis model performs a series of processing steps on the input test signals, classifies different types of features, and outputs the diagnostic accuracy. If the diagnostic accuracy of MDTFS on the test set is greater than 95%, it is used for fault diagnosis of heavy-duty locomotive motors.
[0027] Furthermore, such as Figure 5 As shown, this invention also proposes a fault diagnosis device for heavy-duty locomotive motors based on a cross-sensor self-comparative learning algorithm, see [link to relevant documentation]. Figure 5 It includes a multi-modal signal acquisition module 501, a signal preprocessing module 502, a signal transformation module 503, a model pretraining module 504, a model fine-tuning module 505, and a fault diagnosis module 506. The multi-modal signal acquisition module, the signal preprocessing module, the signal transformation module, the model pretraining module, the model fine-tuning module, and the fault diagnosis module are electrically connected. The motor multimodal signal acquisition module 501 is used to acquire the vibration signal and current signal of the motor. The motor multimodal signal acquisition module 501 consists of a current sensor and an acceleration sensor installed inside and outside the motor. The signal preprocessing module 502 is responsible for normalizing the acquired motor multimodal signals (vibration signal and current signal), and then using a sliding window to divide the normalized data into multiple sample data. The total sample set is then divided into a training set, a fine-tuning set, and a test set. Only the fine-tuning set data is labeled, while the training set and test set are unlabeled data. The signal transformation module 503 first performs two random data augmentations on the training set data to obtain two augmented representations of the signal. Then, the envelope spectrum of the augmented data is calculated, and through a series of transformations, the envelope spectrum representation of the augmented signal is obtained. The model pre-training module 504 inputs the enhanced envelope spectrum data into the pre-trained model for comparative learning training, capturing the ability to represent potential fault features in unlabeled data. Specifically, it uses a DB-TMC encoder to extract signal features and inputs them into the projection head and prediction head. According to a predefined agent task, it performs comparative learning within the sensor and comparative learning between sensors, learning potential fault representations in unlabeled data during this process. The DB-TMC encoder extracts potential fault feature vectors corresponding to each enhanced view. These feature vectors are not the original data, but fixed-dimensional deep feature representations obtained after CNN, Transformer branch, Bi-MDGU branch, and feature fusion, used to represent frequency domain fault information related to the motor's health status in current or vibration signals. The model fine-tuning module 505 uses labeled fine-tuning set data to fine-tune the pre-trained model, correcting deviations and making the mapping relationship between fault features and categories more accurate. Furthermore, the adoption of DIAAM enhances the complementarity across sensors and improves the adaptability of feature selection, enabling the model to focus on more useful features and suppress noise and redundant information. The fault diagnosis module 506 inputs multimodal sample data from the test set into the fine-tuned cross-sensor self-comparison learning diagnostic model CSSCL for diagnosis, thereby achieving efficient diagnosis of motor faults.
[0028] In this invention, to verify the effectiveness of the proposed motor fault diagnosis method, it is compared with other advanced learning methods, namely TFPred, TFDDCF, MSIFT, DCA-BiGRU, and CCLP. A set of examples containing motor fault data under eight different operating conditions is used for verification. Table 1 shows the results of each method under different performance indicators, where p represents the amount of fine-tuning data for each class of samples. Experiment A represents the operating condition at 1500 rpm, Experiment B represents the operating condition at 2100 rpm, and Experiment C represents the training set data at 1500 rpm, while the fine-tuning and test sets are at 2100 rpm.
[0029] Table 1. Diagnostic accuracy of each model under different operating conditions Table 1 shows the diagnostic accuracy and standard deviation of each model under the three experimental tasks, and the experiments were conducted with different amounts of labeled data. The table shows that the CSSCL fault diagnosis model outperforms the selected comparison models in multiple scenarios, especially when the labeled samples are extremely limited. TFPred and TFDDCF, as advanced self-supervised learning diagnostic methods, show lower performance than the CSSCL fault diagnosis model. The main reason is that these two models are based on single-source data, while the motor faults in the experiments include not only mechanical faults but also electrical faults. The models struggle to extract high-quality electrical fault features from the vibration data, leading to a decrease in overall diagnostic efficiency. Although MSIFT is a small-sample method based on multi-source data, it is difficult for the model to learn effective features during the training phase when the labeled data is insufficient. Furthermore, MSIFT cannot effectively learn potential fault features in unlabeled data through predefined proxy tasks. Although this model can learn some effective features from multi-source data, the scarcity of labeled data significantly affects its diagnostic performance. DCA-BiGRU, as a fault diagnosis method with very few labeled samples, experiences a sharp decline in diagnosis rate and extremely low accuracy. CCLP, a multi-source supervised diagnosis model, outperforms single-source supervised methods and other few-sample methods in most experimental scenarios, but still lags behind the CSSCL fault diagnosis model presented in this paper. The main reason is that CCLP cannot fully learn the common features from multiple data sources during pre-training, and its feature alignment method is relatively simplistic.
[0030] Furthermore, experiments were conducted on each model with varying amounts of labeled data on this case dataset. As the amount of labeled data increased (p increased from 3 to 20), the diagnostic accuracy of each model significantly improved. When there were only 3 labeled data points for each health state of the motor, only the CSSCL fault diagnosis model maintained a diagnostic accuracy of around 90%, while other comparative models performed poorly. Simultaneously, in the cross-operating condition scenario of Experiment C, although the training dataset differed from the fine-tuning dataset, the test results showed that the CSSCL fault diagnosis model maintained good performance across different domains without a significant decrease in accuracy. This demonstrates that the proposed CSSCL fault diagnosis model can mine effective fault representations through pre-training on a large number of unlabeled samples and can flexibly adapt to different operating environments of the diagnostic object. Furthermore, fine-tuning the pre-trained model with fewer labeled samples provides a pre-trained solution to address the challenges posed by cross-operating conditions.
[0031] In addition, three contrastive learning tasks were designed to verify the effectiveness of each contrastive learning strategy: pre-surrogate task 1 (contrastive learning within each sensor) and pre-surrogate task 2 (contrastive learning between sensors). During the experiment, the CSSCL fault diagnosis model maintained the same structure and parameters except for the predefined surrogate tasks.
[0032] The results of the ablation experiment are shown in Table 2. The model presented in this paper achieved the best diagnostic results, with diagnostic accuracies 9.71% and 7.91% higher than those of pre-proxy tasks 1 and 2, respectively. This result demonstrates that the pre-proxy task designed in this paper achieves joint constraints and trade-offs between the consistency of signals from the same sensor and the alignment between different sensors, thereby simultaneously learning robust invariant features and transferable cross-sensor representations during the pre-training phase.
[0033] Table 2. Diagnostic results of three contrastive learning methods Therefore, the pre-proxy task designed in the fault diagnosis model of this invention performs best under small sample fine-tuning; in contrast, although using only intra-sensor contrast (pre-proxy task 1) can enhance the visual perception of similar samples, Figure 1 While achieving consistency, this approach ignores the domain differences between sensors, leading to feature shifts during cross-source migration and unstable classification boundaries. Conversely, using only inter-sensor comparison (pre-proxy task 2) can reduce cross-source gaps to some extent, but lacks constraints on signal invariance, resulting in decreased discriminative power. The diagnostic model of this invention preliminarily verifies that the pre-proxy task in this paper, through joint optimization and balancing the intra-sensor and inter-sensor learning processes in the loss weights, enables the pre-trained feature representations to possess both robust consistency and effective cross-sensor alignment capabilities.
[0034] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. It should be noted that for those skilled in the art, any improvements, equivalent substitutions, and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A motor fault diagnosis method based on cross-sensor self-comparative learning, characterized in that, The motor fault diagnosis method includes the following steps: Step 1: Simultaneously collect various health status data of the heavy-duty locomotive motor during operation using sensors of different modes, and normalize the health status data of different modes to obtain time-domain operation data of different health statuses. The health status data of different modes include current data and vibration data, all of which are in time-domain format. Step 2: Apply a sliding window to segment the time-domain health status data of various modalities to obtain multiple health status sample data. After the health status sample data is aggregated into a total sample, it is further divided into training set, fine-tuning set and test set. The fine-tuning set is manually labeled, and the rest are unlabeled data. Step 3: Perform data augmentation and envelope spectrum calculation on the training sets under different modes to obtain the multimodal envelope spectrum signal of the augmented data; Step 4: Construct a cross-sensor self-comparative learning fault diagnosis model consisting of a DB-TMC encoder and a dual-channel interactive adaptive attention module. Based on the DB-TMC encoder, feature extraction is performed on the envelope spectrum signal to obtain enhanced view features of different envelope signals. Self-supervised comparative learning between and within sensors is carried out on the enhanced view features to capture the representation ability of potential fault features in unlabeled data. Step 5: Using the ability to represent potential fault features as the initialization of the fine-tuning stage, the dual-path interactive adaptive attention module is trained and fine-tuned in the fine-tuning focus to obtain stable and accurate fault feature representations. Step 6: Input the test set as sample data into the trained cross-sensor self-comparison learning fault diagnosis model for optimization testing, and identify different health status types or fault types of heavy-duty locomotive motors.
2. The motor fault diagnosis method based on cross-sensor self-comparative learning as described in claim 1, characterized in that, Step 2, which involves segmenting the two types of health status data using a sliding window to obtain multiple health status sample data, includes the following steps: Step 201: Use a sliding window to segment the time-domain operating data of different health states to obtain sample data of each health state of the motor under different sensors; wherein, the width of the sliding window is set to 1024 and the sliding step size is 512; Step 202: After the data is segmented, 620 fault samples are taken from each health status sample data of each type of sensor to form an experimental dataset. The fault samples are randomly divided into training set, fine-tuning set and test set in a ratio of 25:1:
5. Only the fine-tuning set is labeled, and the rest are unlabeled data.
3. The motor fault diagnosis method based on cross-sensor self-comparative learning as described in claim 1, characterized in that, The process of performing data augmentation and envelope spectrum calculation on training sets of two different modalities to obtain the multimodal envelope spectrum signal of the augmented data includes the following steps: Step 301: Perform random data augmentation twice on the time-domain running data of different modalities in the training set to obtain multimodal time-domain augmented view signals. The results of the two augmentations are used for intra-sensor comparison, and the data from different sensors are used for inter-sensor comparison. Step 302: Perform Hilbert transform on the time-domain enhanced view signals of the two random data augmentations, and perform envelope analysis on the transformed signals to obtain the envelope signal. Then, perform Fast Fourier Transform on the envelope signal to obtain the envelope spectrum signal.
4. The motor fault diagnosis method based on cross-sensor self-comparative learning as described in claim 1, characterized in that, Based on the DB-TMC encoder, feature extraction is performed on the envelope spectrum signal to obtain enhanced view features of different envelope signals. Then, self-supervised comparative learning between and within sensors is carried out on the enhanced view features. The specific steps include the following: Step 401: Extract local texture and compress the temporal sequence of the envelope spectrum signal through the three-layer CNN of the DB-TMC encoder. The local spectral feature map or local spectral feature sequence is then fused with the features of the parallel Transformer network and the Bi-MDGU bidirectional minimum attenuation gate unit to obtain the enhanced view features of different modal sensors, which can learn the comprehensive features of each data from the global context. Step 402: Input the enhanced view features of each channel after two enhancements extracted by the DB-TMC encoder into the projection head and the prediction head. The projection head generates the feature representation of the subsequent prediction head by mapping the features to a low-dimensional space. The prediction head is used to further process the projected features, output the predicted value and calculate the prediction error. The projection head and the prediction head are described as follows: ; (1) in, Pro Indicates the projection head. Z This indicates the projection characteristics output by the projection head; Pre Indicates the prediction head, P This represents the predicted features output by the prediction head; Step 403: The enhanced view features from the two enhancements by the different modal sensors are compared and learned by the projection head and the prediction head to obtain the projection features for each vibration mode. Z C1 Projection features Z C2 Predictive features P C1 and predictive features P C2 and projection features Z V1 Projection features Z V2 Predictive features P V1 and predictive features P V2 Different enhanced view features of the current signal are obtained after passing through the projection head and the prediction head respectively. Z V1 , Z V2 , P V1 , P V2 ; Step 404: To evaluate the similarity between sample pairs, potential fault features in the unlabeled data are learned during this process, and cosine similarity is used to calculate the projection head. Z Output projection features and prediction head P The similarity between the output predicted features is calculated using the following formula: (2); in, express L 2 Norm; Step 405: By maximizing the similarity between different sensor views of the same signal and minimizing the similarity between the enhanced view features of different modal sensors of different signals, the loss of contrastive learning within and between sensors is calculated, thereby capturing the shared features of different sensors. The contrastive learning loss calculation within each sensor satisfies the following: (3); (4); (5); in, stopgrad This indicates that updating the gradient of the current branch will be stopped. L C2C1 Representing projection features Z C2 With predictive features P C1 The similarity between them L C1C2 Representing projection features Z C1 With predictive features P C2 Similarity between them L V2V1 Representing projection features Z V2 With predictive features P V1 Similarity between them L V1V2 Representing projection features Z V1 With predictive features P V2 Similarity between them L intra This represents the sum of losses across multiple sensors; The comparison learning loss between sensors is calculated as follows: ,(6); ,(7); ,(8); in, L inter This represents the sum of losses across multiple sensors, and the total loss function for the entire pre-training process can be derived from it. L SUM The calculation formula is as follows: ,(9); in, This represents the weighting parameter.
5. The motor fault diagnosis method based on cross-sensor self-comparative learning as described in claim 1, characterized in that, Using the ability to represent potential fault features as the initialization for the fine-tuning stage, the fine-tuning set is used to train the dual-path interactive adaptive attention module. The fine-tuning process includes the following steps: Step 501: Use the representational ability of potential fault features as the initialization of the fine-tuning stage. Then, apply the multimodal data in the fine-tuning set to the fine-tuning stage to train the linear classification head in order to obtain a more accurate fault correspondence. Step 502: During the fine-tuning process, the dual-path interactive adaptive attention module concatenates and linearly maps the input potential fault features to obtain cross-sensor query features Q, key features K, and value features V; Step 503: Calculate the attention weights between the query feature Q and the key features K and value features V, respectively, and use these attention weights to weight the corresponding value features to obtain the two-way enhanced fusion features; The calculation process is described as follows: ; W K , W V , W Q These are trainable parameters. Represents the query feature vector for cross-sensor fusion; Yc and Yv These represent the learning potential fault characteristics of the two modes, respectively; Step 504: Perform dot product matching, scaling, and classification calculations on the two enhanced fusion features to obtain the enhanced modality attention enhanced features after fusion. The calculation process is described as follows: ; in, , This represents the modal attention enhancement features after enhanced fusion of the two types of sensors. To mitigate excessively large scaling factors for dot products; Step 505: Concatenate and fuse the enhanced modal attention features to obtain the fused cross-sensor fault features. Then, perform fault state identification on the cross-sensor fault features through linear mapping and a Softmax classification function to obtain the fault prediction probability. Subsequently based on real labels With fault prediction probability Cross-entropy is calculated to obtain the cross-entropy classification loss, which is used to update the fault diagnosis network; the calculation process is described as follows: ; ; This represents the cross-sensor fault characteristics output by splicing and fusing two types of sensors, where, Represents the actual value. Indicates the predicted value; L cls express Cross-entropy classification loss rate.
6. The motor fault diagnosis method based on cross-sensor self-comparative learning as described in claim 1, characterized in that: In step 6, when the test set is input as sample data into the trained cross-sensor self-comparison learning fault diagnosis model for optimization testing, if the cross-sensor self-comparison learning fault diagnosis model shows good fault diagnosis accuracy on the test set, it can be used to realize the fault diagnosis of the motor of heavy-duty locomotive.
7. The motor fault diagnosis method based on cross-sensor self-comparative learning according to claim 6, characterized in that: The threshold for fault diagnosis accuracy is set to 95%. If the fault diagnosis accuracy of the fault diagnosis model based on cross-sensor self-comparison learning is greater than 95%, then the fault diagnosis model based on cross-sensor self-comparison learning is considered to have good fault diagnosis accuracy.
8. A motor fault diagnosis device based on cross-sensor self-comparative learning, used in the motor fault diagnosis method based on cross-sensor self-comparative learning as described in any one of claims 1 to 7, characterized in that, The fault diagnosis device includes a motor multimodal signal acquisition module, a signal preprocessing module, a signal transformation module, a model pretraining module, a model fine-tuning module, and a fault diagnosis module. The multimodal signal acquisition module, the signal preprocessing module, the signal transformation module, the model pretraining module, the model fine-tuning module, and the fault diagnosis module are electrically connected. The motor multimodal signal acquisition module is used to acquire the vibration signal and current signal of the motor; the motor multimodal signal acquisition module consists of a current sensor and an acceleration sensor installed inside and outside the motor; The signal preprocessing module is responsible for normalizing the obtained vibration signal and current signal, and then using a sliding window to segment the normalized data to obtain multiple sample data. The total sample set is then divided into a training set, a fine-tuning set, and a test set, and only the fine-tuning set is labeled. The signal transformation module first performs two random data augmentations on the training set data to obtain two augmented representations of the signal. Then, it calculates the envelope spectrum of the augmented data to obtain the envelope spectrum representation of the augmented signal. The model pre-training module inputs the enhanced envelope spectrum representation into the model pre-training module after envelope spectrum transformation for comparative learning training, capturing the representational ability of potential fault features in unlabeled data; the model fine-tuning module uses fine-tuning set data to fine-tune the pre-trained model, correcting deviations and making the mapping relationship between fault features and categories more accurate. The fault diagnosis module performs optimized testing and diagnosis on unlabeled sample data in the test set to identify different health status types or fault types of heavy-duty locomotive motors.
9. A fault diagnosis device for heavy-duty locomotive motors based on cross-sensor self-comparative learning according to claim 8, characterized in that: The fault diagnosis model CSSCL based on cross-sensor self-comparison learning includes model pre-training, fine-tuning and testing stages. In the pre-training calculation, a large amount of unlabeled data is used to learn the representation of various health states of the motor.
