Heavy truck traction motor fault diagnosis federated learning method based on cross-scale visual mixer
The federated learning method for fault diagnosis of heavy-duty truck traction motors using a cross-scale visual mixer solves the problems of insufficient fault diagnosis capability and inconsistent data distribution of traditional models under complex working conditions. It achieves high-accuracy fault diagnosis and privacy protection, and is suitable for intelligent operation and maintenance of heavy-duty trucks.
Patent Information
- Application Number
- CN202511899757.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-03-06
AI Technical Summary
Traditional heavy-duty truck traction motor fault diagnosis models based on convolutional neural networks have limited capabilities in handling complex time-frequency structures, making it difficult to adapt to high-noise and strong-disturbance operating conditions. Furthermore, the non-independent and identically distributed data distribution across multiple sites leads to model training bias, and data privacy and security requirements make it difficult to achieve centralized training across sites.
A federated learning method for fault diagnosis of heavy-duty truck traction motors is adopted, which integrates time-domain and frequency-domain information through a cross-scale vision mixer and a bidirectional cross-view attention mechanism. It combines spectral sensitivity scoring and weighted aggregation strategy to generate a global fault diagnosis model.
It achieves in-depth capture and fine extraction of vibration fault characteristics of heavy truck traction motors, improves the fault diagnosis accuracy in non-independent and co-distributed scenarios, has privacy protection capabilities, and meets the high reliability requirements of intelligent operation and maintenance of heavy trucks.
Smart Images

Figure CN121615013A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of heavy-duty truck traction motor fault diagnosis technology, and particularly relates to a federated learning method for heavy-duty truck traction motor fault diagnosis based on a cross-scale vision mixer. Background Technology
[0002] As the heavy-duty truck industry accelerates its development towards electrification and intelligence, the traction motor, as a core power component, directly affects the stable operation and service life of the entire vehicle due to its operational safety and reliability. Under complex operating conditions such as long-term high load, high vibration, and high temperature differences, the stator, rotor, and electromagnetic structure of the traction motor are prone to potential faults such as wear, eccentricity, and insulation aging. Timely and accurate identification of fault types and evolution trends is of great significance for ensuring the safe operation of the entire vehicle, reducing maintenance costs, and improving transportation efficiency. However, traditional end-to-end diagnostic models based on convolutional neural networks have limited capabilities in handling complex time-frequency structures and are difficult to adapt to operating conditions such as high noise and strong disturbances.
[0003] Furthermore, the industry commonly employs a multi-site operation and maintenance model, resulting in significant differences in the number of fault samples between different vehicles and operation and maintenance centers, and the data distribution exhibits a highly non-independent and identically distributed characteristic. Simultaneously, the raw motor data involves vehicle status and enterprise operational information, posing high data privacy and security requirements, making centralized training across different sites difficult. Therefore, traditional fault diagnosis systems relying on single-site data modeling struggle to obtain diagnostic models with generalization capabilities. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention proposes a federated learning method for fault diagnosis of heavy-duty truck traction motors based on a cross-scale visual mixer. This invention can effectively solve problems in existing technologies such as insufficient extraction of time-frequency features, limited ability of models to represent multi-scale vibration modes, bias in federated training caused by non-independent and identically distributed data, and the inability to effectively utilize differences in sample size and feature quality.
[0005] To achieve the above objectives, this invention provides a federated learning method for fault diagnosis of heavy-duty truck traction motors based on a cross-scale vision mixer, comprising: The original vibration signal of the heavy truck traction motor is collected, and the time-domain spectrum is obtained based on the original vibration signal; Based on the time-domain spectrogram, features are extracted using a cross-scale time-frequency feature extraction network to obtain multi-scale time-frequency features. The cross-scale time-frequency feature extraction network consists of a convolutional module, a cross-scale time-frequency feature fusion module, and a multi-scale fusion head. The cross-scale time-frequency feature fusion module is used to fuse time-domain and frequency-domain information based on the multi-scale time-frequency features through a bidirectional cross-view attention mechanism to obtain fused features. Spectral domain sensitivity scores are calculated based on the fusion characteristics described by each client. A global fault diagnosis model is obtained by weighting and aggregating the model parameters of each client based on the spectral sensitivity score and the number of local samples, and the global fault diagnosis model is used to diagnose faults in heavy truck traction motors.
[0006] Optionally, obtaining the time-domain spectrum based on the original vibration signal includes: The original vibration signal is segmented according to a preset window length and repetition rate to obtain the segmented signal; A short-time Fourier transform is performed on the segmented signal, and the transformed complex spectrum amplitude values are dynamically compressed, linearly normalized, and resampled by bilinear interpolation to generate the time-domain spectrum.
[0007] Optionally, the cross-scale time-frequency feature fusion module includes: a depthwise separable convolutional unit, a multi-resolution spectral fusion unit, and a lightweight feedforward unit, and employs layer normalization and residual connection for each unit; The depthwise separable convolutional unit is used to extract local feature information from multi-scale time-frequency features; The multi-resolution spectral fusion unit is used to capture time-frequency features at different resolutions based on the local feature information, and to fuse the time-frequency features to obtain fused features. The lightweight feedforward unit is used to perform nonlinear transformation and dimensional adaptive adjustment on the fused features.
[0008] Optionally, based on the multi-scale time-frequency features, the time-domain and frequency-domain information is fused through a bidirectional cross-view attention mechanism to obtain the fused features, including: Based on the multi-scale time-frequency features, a two-dimensional feature map is obtained; The two-dimensional feature map is rearranged into a time series feature along the time perspective and into a frequency series feature along the frequency perspective. Self-attention computation is performed on the time series features and frequency series features respectively to obtain time-view attention features and frequency-view attention features; By fusing temporal and frequency-based attention features element-wise through cross-view gating and superimposing a two-dimensional relative position bias, bidirectional cross-view enhanced features are generated. The fusion features are obtained based on the bidirectional cross-view enhancement features.
[0009] Optionally, obtaining the fused features based on the bidirectional cross-view enhancement features includes: Based on the bidirectional cross-view enhancement features, the output features are fused using a multi-scale fusion head; Linear projection and activation are performed on the fused features, and attention weights for each stage of the features are calculated. The stage features are weighted and summed according to the attention weights to obtain the fused features.
[0010] Optionally, a global fault diagnosis model is obtained by weighted aggregation of the model parameters of each client based on the spectral domain sensitivity score and the number of local samples, including: The number of local samples and the spectral sensitivity score for each client were normalized to their maximum values. The normalized local sample size and spectral sensitivity score are linearly fused at a fixed ratio to generate an unnormalized importance score; The unnormalized importance scores are normalized using a softmax function with a temperature coefficient to obtain the aggregation coefficient for each client. The global fault diagnosis model is generated by weighting the model parameters of each client according to the aggregation coefficient.
[0011] Optionally, training the global fault diagnosis model includes: The original vibration signal is preprocessed, and the preprocessed time-spectrum graph is distributed to multiple clients according to the Dirichlet distribution to simulate the heterogeneous distribution of data from multiple sites. Each client performs model training locally and reports parameters. The server performs the weighted aggregation and iterates until the preset communication rounds or the verification index converges, and outputs the final global fault diagnosis model.
[0012] Compared with the prior art, the present invention has the following advantages and technical effects: (1) This invention proposes a cross-scale time-frequency fine extraction network and a cross-scale time-frequency feature fusion network to achieve deep-level capture and fine extraction of fault features in the short-time Fourier transform spectrum of heavy truck traction motor vibration.
[0013] (2) The present invention can achieve adaptive weighting of quality and quantity in the update of non-independent and identically distributed client models through a spectrum sensitivity weighted aggregation strategy.
[0014] (3) This invention provides a federated learning diagnostic method based on a cross-scale time-frequency feature fusion network and a spectrum sensitivity weighted aggregation strategy, which improves the accuracy of fault diagnosis in non-independent and identically distributed scenarios.
[0015] (4) The federated learning framework for fault diagnosis of heavy truck traction motor based on cross-scale vision mixer designed in this invention has significant advantages such as strong time-frequency fusion capability, lightweight and efficient model, and superior privacy protection capability. It meets the needs of heavy truck electric drive system for highly reliable and robust fault diagnosis technology in scenarios such as intelligent operation and maintenance decision-making and online health assessment. At the same time, it also has broad application potential in other fields. Attached Figure Description
[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of a federated learning method for fault diagnosis of heavy-duty truck traction motors based on a cross-scale visual mixer, according to an embodiment of the present invention. Figure 2 This is a schematic diagram of a cross-scale feature extraction network according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the confusion matrix of each network under single-machine conditions in an embodiment of the present invention, wherein (a) is a schematic diagram of the confusion matrix of the method described in this embodiment, (b) is a schematic diagram of the confusion matrix of the CNN network, (c) is a schematic diagram of the confusion matrix of the ViT network, and (d) is a schematic diagram of the confusion matrix of the EfficientViM model. Figure 4 This is a schematic diagram comparing the accuracy of various networks under single-machine conditions according to an embodiment of the present invention; Figure 5 These are schematic diagrams of each network t-SNE under single-machine conditions in an embodiment of the present invention. (a) is a schematic diagram of the method described in this embodiment, (b) is a schematic diagram of a CNN network, (c) is a schematic diagram of a ViT network, and (d) is a schematic diagram of an EfficientViM model. Figure 6 This is a schematic diagram of the confusion matrix of the cross-scale time-frequency feature fusion network under various federated aggregation strategies in the embodiments of the present invention, wherein (a) is a schematic diagram of the confusion matrix of the federated spectrum, (b) is a schematic diagram of the confusion matrix of the federated averaging method, (c) is a schematic diagram of the confusion matrix of the federated proximal method, and (d) is a schematic diagram of the confusion matrix of the federated normalization method. Figure 7 These are schematic diagrams of the cross-scale time-frequency feature fusion network t-SNE under various federated aggregation strategies in embodiments of the present invention, wherein (a) is a schematic diagram of the federated spectrum, (b) is a schematic diagram of the federated averaging method, (c) is a schematic diagram of the federated proximal method, and (d) is a schematic diagram of the federated normalization method. Detailed Implementation
[0017] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0018] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0019] This embodiment proposes a federated learning method for fault diagnosis of heavy-duty truck traction motors based on a cross-scale visual mixer, such as... Figure 1 As shown, it specifically includes: The original vibration signal of the heavy truck traction motor is collected, and the time-domain spectrum is obtained based on the original vibration signal; Based on the time-domain spectrogram, features are extracted using a cross-scale time-frequency feature extraction network to obtain multi-scale time-frequency features. The cross-scale time-frequency feature extraction network consists of a convolutional module, a cross-scale time-frequency feature fusion module, and a multi-scale fusion head. The cross-scale time-frequency feature fusion module is used to fuse time-domain and frequency-domain information based on the multi-scale time-frequency features through a bidirectional cross-view attention mechanism to obtain fused features. The spectral sensitivity score is calculated based on the fusion features described by each client. These fusion features include three dimensions: number of channels, time duration, and frequency duration. The spectral sensitivity score is obtained by weighted fusion of data from these three dimensions. A global fault diagnosis model is obtained by weighting and aggregating the model parameters of each client based on the spectral sensitivity score and the number of local samples, and the global fault diagnosis model is used to diagnose faults in heavy truck traction motors.
[0020] Specifically, the following steps are included: Step 1: Collect triaxial vibration acceleration data of the heavy truck traction motor during operation, and divide the original time domain signal according to the preset window length and overlap rate. Map the signal into a complex spectrum through short-time Fourier transform. Step 2: Construct a cross-scale time-frequency fine extraction network. Using the grayscale time-frequency spectrum generated in Step 1 as input, the initial downsampling and channel dimension enhancement are completed through convolution operations in the Stem layer. At the same time, a lightweight dynamic channel gating is introduced to dynamically allocate weights to the feature channels, thereby improving the accuracy of feature extraction. Step 3: Embed a bidirectional cross-perspective attention mechanism in the cross-scale time-frequency feature fusion network, rearrange the two-dimensional feature map into feature sequences along the time domain perspective and the frequency perspective respectively, and then perform weighted fusion of the attention features of the two perspectives through a cross-perspective gating fusion strategy to improve the inter-class separability of fault features. Step 4: Introduce a spectrum sensitivity weighted aggregation strategy to quantify the fault discrimination strength of the local model on time-frequency features, and perform a weighted average of the model parameters of each client according to the weights to dynamically balance the contribution of sample quantity and feature discrimination quality. Step 5: Construct a Dirichlet non-independent identically distributed experimental scenario based on actual operating condition vibration data, distribute the preprocessed time spectrum diagram to multiple clients, simulate the heterogeneous data distribution of multiple sites in actual operation and maintenance, and conduct comparative experiments.
[0021] This embodiment first uses a short-time Fourier transform to map the original vibration signal into a time-spectrum graph, preserving both time-domain patterns and frequency-domain features. Secondly, a cross-scale time-frequency feature fusion network is constructed. A multi-resolution spectral fusion Transformer enhances the detail capture and global representation capabilities of multi-scale features, while lightweight dynamic channel gating suppresses irrelevant features and strengthens important channels. Then, a bidirectional cross-view attention mechanism is introduced to further fuse time-domain and frequency-domain information, improving feature separability. Finally, a spectral sensitivity-weighted aggregation strategy is introduced, dynamically adjusting the aggregation weights based on the client sample size and spectral sensitivity to improve the global model performance under non-independent and identically distributed conditions. Finally, the effectiveness of fault diagnosis is verified in a Dirichlet non-independent and identically distributed scenario constructed from actual heavy-duty truck traction motor data.
[0022] Further, obtaining the time-domain spectrum based on the original vibration signal includes: The original vibration signal is segmented according to a preset window length and repetition rate to obtain the segmented signal; A short-time Fourier transform is performed on the segmented signal, and the transformed complex spectrum amplitude values are dynamically compressed, linearly normalized, and resampled by bilinear interpolation to generate the time-domain spectrum.
[0023] Specifically, in step 1, triaxial vibration acceleration data of the heavy truck traction motor during operation are collected, and the original time-domain signal is segmented according to a preset window length and overlap rate. The signal is then mapped into a complex spectrum through short-time Fourier transform, including the following steps: Step 1.1: Collect triaxial vibration acceleration data of the heavy truck traction motor during operation; Step 1.2: Divide each time-domain signal into overlapping sliding segments using a sliding window, apply a Hanning window to each segment, perform a short-time Fourier transform on the segmented signal segments, take the amplitude value of the complex spectrum and compress the dynamic range, then linearly normalize the result and resample it into a grayscale image using bilinear interpolation.
[0024] Furthermore, the cross-scale time-frequency feature fusion module includes: a depthwise separable convolutional unit, a multi-resolution spectral fusion unit, and a lightweight feedforward unit, and employs layer normalization and residual connection for each unit; The depthwise separable convolutional unit is used to extract local feature information from multi-scale time-frequency features; The multi-resolution spectral fusion unit is used to capture time-frequency features at different resolutions based on the local feature information, and to fuse the time-frequency features to obtain fused features. The lightweight feedforward unit is used to perform nonlinear transformation and dimensional adaptive adjustment on the fused features.
[0025] Specifically, local feature information is extracted from multi-scale time-frequency features. While reducing the computational complexity and number of parameters of the model, local time-frequency correlation features are preserved, providing a basic local representation for subsequent multi-scale feature fusion. Layer normalization and residual connections are used to ensure the stability of feature transfer. The multi-resolution spectral fusion unit is used to capture time-frequency features at different resolutions. It achieves dynamic channel selection through a lightweight gating mechanism, enhances the ability to capture multi-scale feature details and global characterization of key fault diagnosis features, suppresses irrelevant redundant features, and improves the fusion efficiency and accuracy of cross-scale features. The lightweight feedforward unit is used to perform nonlinear transformation and dimensional adaptive adjustment on the fused features. Through the lightweight structure of "channel expansion - depthwise convolution - activation - linear back projection", it enhances the feature representation capability while controlling the model complexity. Combined with residual connections, it ensures smooth gradient propagation and further optimizes feature quality to improve the inter-class separability of fault features.
[0026] More specifically, in step 2, a cross-scale time-frequency feature fusion network is constructed, including the following steps: Step 2.1: Perform initial downsampling and channel dimension enhancement using convolution operations through the Stem layer; Step 2.2: Input the data into the three-stage cross-scale time-frequency feature fusion network. The cross-scale time-frequency feature fusion network includes depthwise separable convolution, multi-resolution spectral fusion Transformer, and lightweight feedforward. Layer normalization and residual connections are used in each sub-layer to ensure training stability. Step 2.3: Apply lightweight gating to the multi-path parameters in the multi-resolution spectral fusion Transformer to achieve dynamic channel selection, as shown in the following equation: ; ; in, Indicates global average pooling, B represents batch size, and C represents the number of channels. Indicates the length of the time dimension. and Represents a linear mapping. This indicates a lightweight version of Sigmoid. g Indicates channel weight; Step 2.4: Lightweight feedforward adopts a structure of "channel expansion - one-dimensional depthwise convolution - activation - linear back projection + residual", as shown in the following equation: ; in, Represents the input feature tensor. The linear projection matrix representing channel extension. DWConv represents the activation function, and DWConv represents deep separable convolution. Represents the back projection linear matrix; Step 2.5: Perform downsampling at the end of each stage using Patch Merging; no further downsampling is performed in the third stage.
[0027] Furthermore, based on the aforementioned multi-scale time-frequency features, time-domain and frequency-domain information is fused through a bidirectional cross-view attention mechanism to obtain fused features, including: Based on the multi-scale time-frequency features, a two-dimensional feature map is obtained; The two-dimensional feature map is rearranged into a time series feature along the time perspective and into a frequency series feature along the frequency perspective. Self-attention computation is performed on the time series features and frequency series features respectively to obtain time-view attention features and frequency-view attention features; By fusing temporal and frequency-based attention features element-wise through cross-view gating and superimposing a two-dimensional relative position bias, bidirectional cross-view enhanced features are generated. The fusion features are obtained based on the bidirectional cross-view enhancement features.
[0028] Furthermore, based on the bidirectional cross-view enhancement features, obtaining the fusion features includes: Based on the bidirectional cross-view enhancement features, the output features are fused using a multi-scale fusion head; Linear projection and activation are performed on the fused features, and attention weights for each stage of the features are calculated. The stage features are weighted and summed according to the attention weights to obtain the fused features.
[0029] Specifically, in step 3, a bidirectional cross-view attention mechanism is embedded to rearrange the two-dimensional feature map into feature sequences along the temporal and frequency domain perspectives, respectively. Then, the attention features from the two perspectives are weighted and fused using a cross-view gating fusion strategy, including the following steps: Step 3.1: Rearrange the two-dimensional feature map into a sequence along the time and frequency perspectives, as shown in the following equation: Where B represents the batch size, F represents the number of frequency resolutions, T represents the number of time steps, and C represents the number of channels; Step 3.2: Perform self-attention calculations for both viewpoints, as shown in the following formula: in, The input sequence feature tensor represents the time perspective. The input sequence feature tensor represents the frequency perspective. Represents the query matrix. Represents the key matrix, , These are the projection matrices for time and frequency perspectives, respectively. Step 3.3: Employ a cross-view gating method to fuse multiple attention features element-wise and superimpose residuals, as shown in the following equation: Here, ⊙ represents element-wise multiplication. It is a linear mapping; B is generated by two-dimensional relative position bias and broadcast to the sequence length. The final output FCVA is superimposed with the input residual.
[0030] Step 3.4: Finally, the final multi-scale fusion features are obtained through the multi-scale fusion head: in, This represents the softmax activation function. It represents the Hadamardi (or Hadama) stack.
[0031] Furthermore, the global fault diagnosis model is obtained by weighting and aggregating the model parameters of each client based on the spectral domain sensitivity score and the number of local samples, including: The number of local samples and the spectral sensitivity score for each client were normalized to their maximum values. The normalized local sample size and spectral sensitivity score are linearly fused at a fixed ratio to generate an unnormalized importance score; The unnormalized importance scores are normalized using a softmax function with a temperature coefficient to obtain the aggregation coefficient for each client. The global fault diagnosis model is generated by weighting the model parameters of each client according to the aggregation coefficient.
[0032] Specifically, step 4 involves introducing a spectrum sensitivity weighted aggregation strategy to quantify the fault detection strength of the local model in time-frequency features, and then performing a weighted average of the model parameters for each client based on the weights. This includes the following steps: Step 4.1: Normalize the maximum value of the sample size and spectral sensitivity score for each client, as shown in the following formula: Where, n k s represents the number of local samples for the k-th client.k This represents the spectral sensitivity score for the k-th client; Step 4.2: Obtain the unnormalized importance score by linear fusion at a fixed ratio, as shown in the following formula: in, This represents the importance score of the k-th client. , These represent the sample size and sensitivity score after normalization of the maximum value, respectively. Indicates linear fusion weights; Step 4.3: Normalization is performed using temperature-controlled softmax, and the local model parameters are weighted and averaged based on the obtained coefficients to generate the global model. ; Where β is the temperature coefficient. This represents the local model parameters obtained by the k-th client after the t-th round of federated training.
[0033] Furthermore, training the global fault diagnosis model includes: The original vibration signal is preprocessed, and the preprocessed time-spectrum graph is distributed to multiple clients according to the Dirichlet distribution to simulate the heterogeneous distribution of data from multiple sites. Each client performs model training locally and reports parameters. The server performs the weighted aggregation and iterates until the preset communication rounds or the verification index converges, and outputs the final global fault diagnosis model.
[0034] Specifically, in step 5, a Dirichlet non-independent and identically distributed experimental scenario is constructed based on actual operating condition vibration data. The preprocessed time-spectrum map is distributed to multiple clients to simulate the heterogeneous data distribution across multiple sites in actual operation and maintenance, and experiments are conducted. This includes the following steps: Step 5.1: The server builds and initializes the cross-scale time-frequency feature fusion network, sets the communication rounds and local training hyperparameters, generates the initial global weights, and waits for each client to be ready. Step 5.2: Each client acquires triaxial vibration signals, completes segmentation and normalization, and performs STFT on each segment to obtain grayscale spectrum, forming training and verification batches; Step 5.3: The server distributes the current global weights and training configuration to all clients, starting this round of federated training; Step 5.4: The client completes forward and backward updates using the internal spectrogram as input: multi-scale fusion and classification are performed sequentially through Stem, three-segment cross-scale time-frequency feature fusion network block and multi-scale fusion head, and the parameters are updated according to the preset local epoch to obtain the local weights for this round. Step 5.5: The client calculates the number of local samples n. k With spectral sensitivity score s k The updated local model parameters are reported together, and the original data is not transmitted outside. Step 5.6: The server processes n respectively. k With s k Maximum value normalization is performed, and importance scores are obtained by linear fusion at a fixed ratio. The aggregation coefficient α of each client is then obtained through temperature-controlled softmax. k ; Step 5.7: The server, based on α k The model parameters of each client are weighted and averaged to generate a new global model, which is then broadcast to all clients for the next round of training. Step 5.8: Terminate the iteration when the preset number of communication rounds is reached or the verification index no longer improves, save and output the best global model for testing and visualization analysis.
[0035] Furthermore, Figure 2 This is a schematic diagram of the cross-scale time-frequency feature extraction network of this invention. Modeling follows the sequence of Stem – three-stage cross-scale time-frequency feature fusion network block – multi-scale fusion head. The multi-resolution spectral fusion Transformer is the core sub-module, which, within the module, collaborates with channel gating, time-frequency self-attention, cross-view interaction, and lightweight feedforward to complete representation learning. Let the input spectrum be... (C0=1). Stem uses a 3×3 convolution with stride=2 to perform the initial downsampling and channel upsampling, changing the input from 64×64×1 to 32×32×64.
[0036] The following is a further explanation with reference to specific embodiments: The vibration data of the heavy-duty truck traction motor used in this embodiment comes from a motor fault diagnosis test bench built in the laboratory. The vibration signals are collected by an HWT605 attitude sensor (RS-232 interface) manufactured by Shenzhen Weite Intelligent Technology Co., Ltd. This sensor is fixedly installed near the end of the traction motor housing to acquire triaxial vibration acceleration data during motor operation. The HWT605 sensor transmits the vibration acceleration signals in three orthogonal directions to the host computer in real time via a serial communication interface for recording and storage. When collecting vibration signals, the sensor wiring must avoid the moving areas of the motor and transmission components; the signal line length is set to 3m, and the sampling frequency is set to 200Hz.
[0037] In the preprocessing stage, each time-domain signal is first segmented using a 512-point window and a 256-point overlap sliding segment, and a Hanning window is applied to each segment. A short-time Fourier transform is performed on the segmented signal segments, and the amplitude values of the complex spectrum are extracted and transformed to compress the dynamic range. The results are then linearly normalized and resampled into 64×64 grayscale images via bilinear interpolation, which are used as input to the deep network. The overall preprocessing workflow preserves time-frequency information while significantly reducing the computational load of subsequent networks. Five typical operating conditions were collected and processed, with 200 samples extracted from each condition, totaling 1000 spectra. The sample distribution is shown in Table 1.
[0038] Table 1 Depend on Figure 3 As shown in (a)-(d), under the centralized setting, the cross-scale time-frequency feature fusion network achieved a test set accuracy of 99.5%, with only one misclassification; the convolutional neural network achieved 99.0%, with the main misclassifications concentrated between C3 and C0, and C4 and C3; the efficient visual Mamba network achieved 98.0%, with a small number of misclassifications between C3 and C4, as well as between C0 and C3, and between C2 and C3; and the ViT network achieved 95.0%, with more concentrated and larger misclassifications. Overall, the easily confused categories are mainly C3 / C4, whose spectral feature distributions are quite similar; the cross-scale time-frequency feature fusion network has the fewest misclassifications on this pair of categories, indicating that its cross-scale time-frequency modeling and channel selection mechanism improves the inter-class separability.
[0039] Figure 4 This is a schematic diagram comparing the accuracy of each network under single-machine conditions in this embodiment of the invention. Experimental results show that the mean ± standard deviation of the accuracy of the four models are: 99.5% ± 0.5% (cross-scale time-frequency feature fusion network), 99.0% ± 0.5% (convolutional neural network), 98.0% ± 1.0% (efficient visual Mamba), and 95.0% ± 1.0% (ViT). This indicates that compared with other models, the cross-scale time-frequency feature fusion network is superior in both average performance and dispersion.
[0040] Figure 5 (a)-(d) are schematic diagrams of t-SNE of each network under single-machine conditions in the embodiments of the present invention. The five clusters of the cross-scale time-frequency feature fusion network exhibit a distribution with small intra-class dispersion and large inter-class spacing; the convolutional neural network has good overall separation but has sporadic outliers; the efficient visual Mamba shows projection closeness and local overlap in the C3 / C4 direction; the clusters of ViT are the most dispersed. This indicates that the representation of the cross-scale time-frequency feature fusion network is more discriminative, especially able to better distinguish categories with similar spectral feature distributions.
[0041] Figure 6(a)-(d) are schematic diagrams of the confusion matrix of the cross-scale time-frequency feature fusion network under various federated aggregation strategies in the embodiments of the present invention. Under the Non-IID client partitioning, the test set accuracy of the federated spectrum is 99%. Except for a few C0 samples that are misclassified as C3, other categories generally maintain high recall and high precision, showing that it can maintain class balance under heterogeneous distribution. The accuracy of the federated averaging method is 83.5%. A large area of misclassification occurs in row C3 (dispersed to C0, C2, C3, C4). The recall of C3 is significantly low, reflecting that under non-independent distribution, the average update weighted by sample size cannot suppress client bias. The federated proximal method is only 41.5%, and the prediction is obviously biased towards a single category, showing the phenomenon of "class collapse". This indicates that the global proximal regularization is insufficient to correct the distribution drift under this setting and is prone to over-constraining local updates. The federated normalization method is 76.5%, which is an improvement over the federated averaging method, but C3 and C4 still have systematic misclassification.
[0042] like Figure 7 As shown in (a)-(d), under the federated spectrum, different categories exhibit a tight and non-overlapping cluster structure in two-dimensional space; however, under the federated average method, the federated proximal method, and the federated normalization method, the boundaries between clusters show more or less mixing and outliers, especially the federated proximal method, which can hardly form a clear category distinction.
[0043] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A cross-scale visual mixer-based heavy truck traction motor fault diagnosis federated learning method, characterized in that, The method comprises the following steps: Collecting the original vibration signal of a heavy truck traction motor, and obtaining a time-frequency spectrum based on the original vibration signal; Based on the time-frequency spectrum, a cross-scale time-frequency feature extraction network is used to extract features and obtain multi-scale time-frequency features, wherein the cross-scale time-frequency feature extraction network is composed of a convolution module, a cross-scale time-frequency feature fusion module and a multi-scale fusion head in sequence, the cross-scale time-frequency feature fusion module is used to fuse time domain and frequency domain information based on the multi-scale time-frequency features through a bidirectional cross-view attention mechanism to obtain fusion features; According to the fusion features of each client, a spectral domain sensitivity score is calculated; Based on the spectral domain sensitivity score and the local sample quantity, the model parameters of each client are weighted and aggregated to obtain a global fault diagnosis model, and the global fault diagnosis model is used for fault diagnosis of the heavy truck traction motor.
2. The cross-scale visual mixer-based federated learning method for heavy truck traction motor fault diagnosis according to claim 1, wherein, According to the original vibration signal, a time-frequency spectrum is obtained, which comprises the following steps: The original vibration signal is divided according to a preset window length and a repetition rate to obtain a divided signal; Short-time Fourier transform is performed on the divided signal segment, the complex spectrum amplitude value after transformation is compressed in dynamic range, linearly normalized and bilinearly interpolated and resampled to generate the time-frequency spectrum.
3. The cross-scale visual mixer-based federated learning method for heavy truck traction motor fault diagnosis according to claim 1, wherein, The cross-scale time-frequency feature fusion module comprises a depth separable convolution unit, a multi-resolution spectrum fusion unit and a lightweight feedforward unit, and layer normalization and residual connection are used to connect each unit; The depth separable convolution unit is used to extract local feature information in the multi-scale time-frequency features; The multi-resolution spectrum fusion unit is used to capture time-frequency features at different resolutions based on the local feature information, fuse the time-frequency features to obtain fusion features; The lightweight feedforward unit is used for nonlinear transformation and dimension adaptive adjustment of the fusion features.
4. The cross-scale visual mixer-based federated learning method for heavy truck traction motor fault diagnosis according to claim 1, characterized in that, Based on the multi-scale time-frequency features, time domain and frequency domain information are fused through a bidirectional cross-view attention mechanism to obtain fusion features, which comprises the following steps: According to the multi-scale time-frequency features, a two-dimensional feature map is obtained; The two-dimensional feature map is rearranged as a time sequence feature along the time view and as a frequency sequence feature along the frequency view; Self-attention calculation is performed on the time sequence feature and the frequency sequence feature respectively to obtain time view attention features and frequency view attention features; The time view attention features and the frequency view attention features are element-wise fused through cross-view gating and a two-dimensional relative position bias is superimposed to generate bidirectional cross-view enhanced features; The fusion features are obtained based on the bidirectional cross-view enhanced features.
5. The cross-scale visual mixer based federated learning method for heavy truck traction motor fault diagnosis according to claim 4, characterized in that, According to the bidirectional cross-view enhanced features, the fusion features are obtained by fusing the output features through a multi-scale fusion head; Linear projection and activation are performed on the fused features to calculate the attention weights of the stage features; The stage features are weighted and summed according to the attention weights to obtain the fusion features. Based on the spectral domain sensitivity score and the local sample quantity, the model parameters of each client are weighted and aggregated to obtain a global fault diagnosis model, which comprises the following steps:
6. The cross-scale visual mixer based federated learning method for heavy truck traction motor fault diagnosis according to claim 1, wherein, The local sample quantity and the spectral domain sensitivity score of each client are respectively normalized by the maximum value; Linearly fusing the normalized local sample quantity and the spectral domain sensitivity score in a fixed ratio to generate an unnormalized importance score; Normalizing the unnormalized importance score through a softmax function with a temperature coefficient to obtain an aggregation coefficient of each client; According to the aggregation coefficient, performing weighted average on the model parameters of each client to generate the global fault diagnosis model.
7. The cross-scale visual mixer based federated learning method for heavy truck traction motor fault diagnosis according to claim 6, characterized in that, Training the global fault diagnosis model includes: Preprocessing the original vibration signal, and assigning the preprocessed time-frequency spectrum to multiple clients according to Dirichlet distribution to simulate a multi-site data distribution heterogeneous condition; each client performs local model training and reports parameters, the server end performs the weighted aggregation, and iteration is performed until a preset communication round or a verification index converges, and finally the global fault diagnosis model is output.