Rotor structure fault diagnosis method and system based on lightweight zero sample correlation discrimination space adaptation

By employing a lightweight zero-sample correlation discriminant space adaptation method, utilizing task-independent data and a lightweight model structure, the problems of data distribution drift and label scarcity in rotor structure fault diagnosis are solved, achieving high-precision and low-complexity fault diagnosis, which is suitable for industrial edge equipment.

CN122020291APending Publication Date: 2026-05-12XIAN TPRI POWER PLANT INFORMATION TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAN TPRI POWER PLANT INFORMATION TECHNOLOGY CO LTD
Filing Date
2026-01-22
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing deep learning diagnostic methods face problems such as data distribution drift, scarce labels, and limited computing resources in rotor structure fault diagnosis, resulting in decreased diagnostic accuracy and difficulty in model deployment, especially in terms of insufficient generalization ability in cross-device and cross-operating condition applications.

Method used

A lightweight zero-shot correlation discriminative space adaptation method is adopted. Through a lightweight Vision Transformer feature extractor and a joint loss function, domain alignment is achieved using task-independent data, while task-related data maintains discriminability. A lightweight model structure is designed to achieve zero-shot transfer and efficient diagnosis.

Benefits of technology

It achieves high-precision fault diagnosis under unlabeled conditions in the target domain, reduces the number of model parameters and computational complexity, is suitable for real-time diagnosis of industrial edge devices, and improves the accuracy and engineering practicality of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122020291A_ABST
    Figure CN122020291A_ABST
Patent Text Reader

Abstract

The invention discloses a rotor structure fault diagnosis method and system based on lightweight zero sample correlation discrimination space adaptation, and belongs to the technical field of mechanical equipment state monitoring and fault diagnosis. According to the method, a zero sample correlation discrimination space adaptation mechanism and lightweight model design are introduced, domain alignment is achieved through task irrelevant data (normal samples), discrimination is kept through task correlation data (source domain fault samples), the feature extraction process is guided to generate feature vectors meeting multi-target optimization, and the multi-target optimization is achieved. Through the correlation enhancement and discriminative constraint game mechanism, the model can mine common fault modes hidden behind distribution differences, and zero sample cross-domain migration is realized; according to the method, the model parameter quantity and the calculation complexity are greatly reduced, the method is suitable for real-time diagnosis of industrial edge equipment, lightweight efficient deployment can be achieved, only source domain labels are needed, target domain label-free migration is achieved through task irrelevant / relevant separation, and real zero sample adaptation can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of mechanical equipment condition monitoring and fault diagnosis technology, specifically relating to a rotor structure fault diagnosis method and system based on lightweight zero-sample correlation discrimination space adaptation. Background Technology

[0002] With the rapid development of high-end equipment manufacturing, the rotor structure, as the most critical and vulnerable component in rotating machinery, directly determines the stability and service life of the entire mechanical system through its operational reliability. During actual service, rolling rotor structures endure complex alternating loads, impacts, and friction, making them highly susceptible to various failure modes, including inner ring failure, outer ring failure, ball bearing failure, and cage damage. Once a rotor structure fails, it can lead to anything from increased equipment vibration and reduced efficiency to cascading failures, shutdowns, and even major safety hazards, resulting in significant economic losses and production interruptions. Therefore, achieving early warning, accurate diagnosis, and remaining life prediction of rotor structure failures has become a core requirement and research hotspot in the field of intelligent operation and maintenance of mechanical equipment.

[0003] Currently, data-driven intelligent fault diagnosis technology has become the mainstream direction in this field. This technology primarily uses accelerometers mounted on bearing housings or casings to collect vibration signals, and then utilizes signal processing and machine learning algorithms to extract fault-sensitive features, achieving automatic fault type identification and classification. Early methods often employed time-domain statistical indicators (such as root mean square value and kurtosis), frequency-domain analysis (such as envelope demodulation), and time-frequency analysis (such as wavelet transform) combined with shallow classifiers (such as support vector machines and random forests) for diagnosis. With the rise of deep learning, models such as convolutional neural networks (CNN), long short-term memory networks (LSTM), and Vision Transformer (ViT) have been widely introduced, enabling end-to-end learning of hierarchical feature representations from raw vibration signals, significantly improving diagnostic accuracy. However, in practical industrial applications, existing deep learning diagnostic methods still face several major technical bottlenecks. First, the operating conditions of rotor structures (such as speed, load, ambient temperature, and lubrication status) are highly dynamic and varied, leading to significant differences in the statistical distribution of vibration signals between different time periods or between different individual rotor structures. This results in a domain shift between the source domain (laboratory or historical data) and the target domain (actual operating data). For example, a model trained under constant load will show a shift in fault characteristic frequencies when applied to variable load conditions, leading to a significant decrease in diagnostic accuracy. More seriously, different rotor structures exhibit even greater differences in vibration response characteristics due to variations in manufacturing tolerances, installation errors, service life, and wear levels. This makes it difficult to directly transfer models trained on one batch of rotor structures to another, severely restricting the cross-equipment and cross-condition generalization capabilities and engineering application value of diagnostic models. Second, in actual industrial settings, rotor structures are in a normal, healthy state most of the time, with a low probability of fault events (usually less than 1%), resulting in an extreme scarcity of precisely labeled fault samples available for supervised training. Meanwhile, obtaining fault labels requires professional personnel to label them through methods such as downtime disassembly, expert experience, or laboratory reproduction, which is costly, time-consuming, and difficult. For newly commissioned equipment or production lines without advanced diagnostic systems, it is almost impossible to obtain a sufficient quantity and diversity of labeled fault data, making it difficult for traditional supervised learning models to train reliable diagnostic capabilities, resulting in a "data hunger" problem. Traditional transfer learning methods, such as distribution matching techniques based on maximum mean difference (MMD), correlation alignment (CORAL), or adversarial domain adaptation (DANN), alleviate the domain drift problem to some extent. These methods achieve cross-domain model transfer by minimizing the statistical distance between the feature distributions of the source and target domains.However, they generally suffer from the following drawbacks: First, the overall distribution alignment strategy cannot distinguish between task-related features (sensitive components that truly reflect the fault mechanism) and task-irrelevant features (interference caused only by working conditions or individual differences), which can easily lead to feature discriminative degradation. Second, most methods still require partial labeling assistance from the target domain (semi-supervised), which cannot achieve true zero-sample adaptation. Third, the model structure is complex and the number of parameters is large, making it unsuitable for deployment in resource-constrained industrial edge devices.

[0004] Therefore, given the multiple challenges commonly encountered in rotor structure fault diagnosis, such as data distribution drift, extreme scarcity of labels, and limited computing resources, there is an urgent need in this field for a novel intelligent diagnostic method. This method should possess a lightweight architecture, zero-sample transfer capability, a relevant discrimination balancing mechanism, and efficient visualization support. It should be able to achieve high-precision and robust fault diagnosis under conditions of unlabeled target domains and limited computing resources, thereby promoting the large-scale application of intelligent operation and maintenance technology for rotor structures from the laboratory to industrial fields. Summary of the Invention

[0005] The purpose of this invention is to provide a rotor structure fault diagnosis method and system based on lightweight zero-sample correlation discriminant space adaptation, which solves the technical problems of data distribution drift caused by variations in operating conditions and individual differences in rolling rotor structures, as well as the decrease in diagnostic accuracy and the difficulty in model deployment caused by the extreme scarcity of target domain label data.

[0006] To achieve the above objectives, the present invention employs the following technical solution: This invention discloses a rotor structure fault diagnosis method based on lightweight zero-sample correlation discriminant space adaptation, comprising the following steps: S1: Collect vibration signals of the rotor structure in the source domain and the target domain, preprocess the vibration signals to obtain processed signals; use short-time Fourier transform to convert the processed signals into fixed-size images; divide the fixed-size images into source domain samples and target domain samples, label the source domain samples with fault types, and separate the target domain samples into task-independent data and task-related data; S2: Construct a lightweight zero-shot model; the lightweight zero-shot model includes a feature extractor, a classifier, and a loss component; wherein, the feature extractor is a lightweight ViT, which takes a fixed-size image as input and maps it to a low-dimensional feature vector through patch embedding, a lightweight attention mechanism, and a few-layer encoder; the classifier is a fully connected layer, which takes a low-dimensional feature vector as input and outputs a probability prediction distribution of the fault type; the loss component includes simplified canonical correlation analysis loss, alignment loss, and discriminant loss; S3: Design a joint loss function; train a lightweight zero-shot model. During training, dynamically segment the source domain samples into task-independent data and task-related data in each batch. Pair the task-independent data in the source domain with the task-independent data in the target domain using the joint loss function to calculate the loss, and obtain the trained model. S4: The real-time acquired rotor structure vibration signal is input into the trained model after the same preprocessing as in S1. The model outputs the fault type and confidence level, and generates the training loss curve, principal component analysis feature distribution map and confusion matrix to realize the interpretability analysis of the diagnostic results.

[0007] Furthermore, in S1, the preprocessing includes denoising and normalization processes performed sequentially.

[0008] Further, in S1, the processed signal is denoted as: ; in, The original signal, The minimum value in the original signal. The maximum value in the original signal. It is a very small constant. The processed signal; The fixed-size image is denoted as: ; in, For window functions, In time-frequency representation, For time frame lead , For frequency index, For time series indexing, For signal length, For the first The signal value at each sampling point It is the imaginary unit.

[0009] Furthermore, in S1, the task-irrelevant data is normal data, and the task-related data is fault data, and there are no labels.

[0010] Further, in step 3, the joint loss function is:

[0011] in, , The total loss is the joint loss function. The cross-entropy loss of the classifier, To decouple gradients from the learning loss, invalid labels are ignored. For simplified CCA loss, For alignment loss, To determine the loss, ; The weights for the classification loss, Weights for gradient decoupling and comparative learning loss; These represent the weights of the loss function corresponding to canonical correlation analysis loss, the weights of the inter-domain feature alignment loss function, and the weights of the discriminative feature learning loss function, respectively.

[0012] Furthermore, in S3, the lightweight zero-shot model is trained using batch stochastic gradient descent. During the training process, each batch of source domain samples is dynamically segmented into task-independent data and task-related data. The loss is calculated by pairing the source domain samples with the target domain-independent data, and the parameters of the feature extractor and classifier are updated synchronously. The zero-shot domain adaptive learning paradigm enables the feature extractor to learn the domain-invariant fault feature representation. The zero-sample domain adaptive learning paradigm is as follows: Source domain:

[0013] Target domain: ; in, For the i-th source domain sample, For the corresponding fault category label, The total number of samples in the source domain. For the i-th target domain sample, For the corresponding fault category label, This represents the number of labeled target domain samples. The number of unlabeled target domain samples; The training process includes gradient pruning and learning rate scheduling to improve stability.

[0014] This invention also discloses a rotor structure fault diagnosis system based on lightweight zero-sample correlation discriminant space adaptation, comprising: The data acquisition and preprocessing module is used to acquire vibration signals of the rotor structure in the source and target domains, preprocess the vibration signals to obtain processed signals, convert the processed signals into fixed-size images using short-time Fourier transform, divide the fixed-size images into source domain samples and target domain samples, label the source domain samples with fault types, and separate the target domain samples into task-independent data and task-related data. The model building module is used to construct a lightweight zero-shot model. This model includes a feature extractor, a classifier, and a loss component. The feature extractor is a lightweight ViT model, which takes a fixed-size image as input and maps it to a low-dimensional feature vector through patch embedding, a lightweight attention mechanism, and a few-layer encoder. The classifier is a fully connected layer that takes the low-dimensional feature vector as input and outputs a probability prediction distribution of the fault type. The loss component includes simplified canonical correlation analysis loss, alignment loss, and discriminative loss. Model training module: Design a joint loss function; train a lightweight zero-shot model. During the training process, the source domain samples are dynamically segmented into task-independent data and task-dependent data in each batch. The task-independent data in the source domain and the task-independent data in the target domain are paired using the joint loss function to calculate the loss, and the trained model is obtained. Fault diagnosis module: It is used to input the real-time acquired rotor structure vibration signal into the trained model after the same preprocessing as S1. The model outputs the fault type and confidence level, and generates the training loss curve, principal component analysis feature distribution map and confusion matrix to realize the interpretability analysis of the diagnostic results.

[0015] Compared with the prior art, the present invention has the following beneficial effects: This invention discloses a rotor structure fault diagnosis method based on lightweight zero-shot correlation discriminant space adaptation. This method introduces a zero-shot correlation discriminant space adaptation mechanism and lightweight model design. It achieves domain alignment using task-independent data (normal samples) and maintains discriminability using task-related data (source domain fault samples), guiding the feature extraction process to generate feature vectors that satisfy multi-objective optimization. This results in: 1) highly accurate source domain fault classification; 2) highly consistent distribution of task-independent features between the source and target domains; and 3) compact intra-class and inter-class separation of task-related features. Through this game-theoretic mechanism of correlation enhancement and discriminant constraint, the model can uncover common fault patterns hidden behind distribution differences, achieving zero-shot cross-domain transfer. This method significantly reduces the number of model parameters and computational complexity, making it suitable for real-time diagnosis of industrial edge devices. It enables lightweight and efficient deployment, requiring only source domain labels and utilizing task-independent / relevant separation to achieve label-free target domain transfer, thus achieving true zero-shot adaptation.

[0016] Furthermore, this method simplifies loss design while ensuring domain invariance and discriminability, avoiding the feature passivation problem of traditional methods; it also provides visualization of multi-dimensional diagnostic results, improving engineers' trust and decision-making efficiency, eliminating the need for complex manual feature engineering, and directly learning robust features from the original vibration signal, thus possessing strong engineering practical value. Attached Figure Description

[0017] Figure 1The flowchart shows a rotor structure fault diagnosis method based on lightweight zero-sample correlation discriminant space adaptation. Figure 2 This is a schematic diagram of the structure of the lightweight Vision Transformer feature extractor, classifier, and simplified zero-shot model constructed in this invention. Figure 3 This diagram illustrates how the joint loss function changes with the number of training iterations during model training, serving to demonstrate the model's convergence process. Wherein: a-total training loss map; b-classification loss map; c-CCA loss map; d-alignment loss map; e-discrimination loss map; f-the above loss integration map, used to illustrate the model's convergence process; Figure 4 This is a fault diagnosis confusion matrix diagram of the method in Embodiment 1 of the present invention on the target rotor vibration data test set; Figure 5 This is a fault diagnosis feature distribution map of the method in Embodiment 1 of the present invention on the target rotor vibration data test set. Detailed Implementation

[0018] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0020] This invention discloses a rotor structure fault diagnosis method based on lightweight zero-shot correlation discriminant space adaptation. This method forces the model to learn fault feature representations that simultaneously possess domain invariance and high discriminativeness through a lightweight Vision Transformer feature extractor, a task-independent / relevant data separation strategy, and a multi-objective simplified correlation discriminant loss function, achieving truly zero-shot cross-domain high-precision diagnosis. Furthermore, the method comprehensively optimizes computational efficiency and memory usage in preprocessing, model structure, and training processes, making it suitable for edge computing devices in industrial settings.

[0021] like Figure 1 As shown, the method specifically includes the following steps: Step 1: Data Acquisition and Lightweight Preprocessing Vibration signals of the rotor structure in the source and target domains are acquired, denoised, normalized, and then converted into fixed-size images using Short-Time Fourier Transform (STFT) to reduce computational complexity; denoted as... ,in For window functions, It uses time-frequency representation. The number of samples per class is limited. The source domain is labeled with fault type, and the target domain separates task-irrelevant (normal, unlabeled) and task-related (faulty, unlabeled) data. Step 2: Build a lightweight zero-shot model The construction of the lightweight zero-shot model includes a feature extractor, a classifier, and a loss component; 1) Feature extractor: Lightweight ViT, the input image is mapped into a low-dimensional feature vector through patch embedding, a lightweight attention mechanism and a few-layer encoder; 2) Classifier: Fully connected layer, outputting the probability prediction distribution of fault types; 3) Loss components: Simplified CCA (projected MSE), alignment (direct MSE), and discriminative loss (class center distance ratio). Step 3: Design the joint loss function The joint loss function is: ; in, , The cross-entropy loss of the classifier (ignoring invalid labels). For simplified CCA loss, For alignment loss, To determine the loss, Classification loss It is calculated only on task-related data in the source domain, while other losses are adapted to the domain among task-independent data, and discriminativeness is enhanced on task-related data; Step 4: Model Training Batch stochastic gradient descent dynamically splits the source domain data into irrelevant / relevant parts in each batch, and pairs data irrelevant to the target domain to calculate the loss; gradient clipping, cosine annealing learning rate scheduling, and batch size adaptive processing are introduced to ensure stable and efficient training; Step 5: Fault Diagnosis and Visual Analysis Real-time signals are input into the model after undergoing the same preprocessing, and the model outputs the fault type and confidence level; it also generates training loss curves, PCA feature distribution maps, and confusion matrices to improve the interpretability of the diagnosis.

[0022] Preferably, the data collected in step 1 includes vibration time-series signals of the source domain rotor structure and the target domain rotor structure under various operating conditions, and the original signals are denoised and normalized, denoised as follows: ;in, The original signal, The minimum value in the original signal. The maximum value in the original signal. It is a very small constant. The processed signal is then converted into a fixed-size image using a Short-Time Fourier Transform (STFT) to reduce computational load. This image is denoted as... ,in, For window functions, In time-frequency representation, For time frame indexing, For frequency index, For time series indexing, For signal length, For the first The signal value at each sampling point The unit is imaginary; source domain samples need to be labeled with fault type, target domain samples are separated into task-independent (normal data) and task-related (fault data, unlabeled), and the maximum number of samples in each class is limited to optimize memory usage.

[0023] Preferably, in step 2, the feature extractor consists of a lightweight Vision Transformer, including patch embedding, a lightweight attention mechanism, and a few-layer encoder. Its function is to map the input rotor structure vibration signal image into a low-dimensional feature vector. , recorded as ,in Represents the feature mapping function. For trainable parameters (such as attention weights), the design aims to reduce the number of parameters to suit low-resource environments; the lightweight attention mechanism of the Vision Transformer is denoted as... ; in ; For querying the matrix, The key matrix, For value matrices, For the number of attention heads, Let represent the learnable linear transformation matrix of the i-th attention head. This indicates the output linear transformation matrix. This indicates a splicing operation. Represents the self-attention computation function; Its function is to transform feature vectors As input, output the probability prediction distribution of the fault type. , recorded as ,in Represents the classification function, whose parameters By minimizing the classification loss on source domain samples Optimize to ensure the discriminative power of the learned features for fault categories; This includes simplified CCA loss, alignment loss, and discriminant loss. CCA loss calculates the mean squared error (MSE) after projecting the matrix to minimize the difference in features unrelated to the source and target domains. Alignment loss directly calculates the feature MSE. Discriminant loss calculates the ratio of intra-class distance to inter-class distance based on class centers to improve discriminative power. The component handles inconsistent batch sizes to ensure stable computation. The simplified typical correlation analysis loss function is:

[0024] in, , Let be the projection matrix. , Features of the source and target domains For the sample size, This represents the L2 norm.

[0025] The inter-domain feature alignment loss function is:

[0026] in, , Features of the source and target domains For the sample size, Represents the L2 norm; The discriminative feature learning loss is:

[0027] in, This represents the total number of fault categories. For the current fault category index, For different Other category indexes, category Sample characteristics, For category Feature center, For category Feature center, This represents the L2 norm.

[0028] Preferably, in step 4, model training employs batch stochastic gradient descent. In each batch, the source domain data is split into task-independent and task-dependent parts. Loss is calculated by pairing data independent of the target domain with the target domain data, and the parameters of the feature extractor and classifier are updated synchronously. A zero-shot domain adaptation learning paradigm enables the feature extractor to learn domain-invariant fault feature representations. Zero-shot domain adaptation learning paradigm: Source domain: ; Target domain: ; in, For the i-th source domain sample, For the corresponding fault category label, The total number of samples in the source domain. For the i-th target domain sample, For the corresponding fault category label, This represents the number of labeled target domain samples. This represents the number of unlabeled target domain samples. The training process includes gradient clipping and learning rate scheduling to improve stability. Example 1 A rotor structure fault diagnosis method based on lightweight zero-sample correlation discriminant space adaptation includes the following steps: Data Source: This embodiment uses vibration signal data published by the Bearing Data Center of Case Western Reserve University (CWRU) as the simulation data source to verify the effectiveness of the invention. Data under different operating conditions (different loads, such as 0HP, 1HP, 2HP, 3HP) are considered as data domains from different bearings; Step 1: Data Preprocessing Flow: Signal segmentation: The continuous vibration signal is segmented using a fixed-length window (default 512 data points) to construct fixed-length samples; Normalization: Select the normalization method through the parameter --normalization, such as "0-1" normalization to linearly scale the data to the [0,1] interval, or "mean-std" to perform Z-score standardization to eliminate the influence of units; Frequency domain transformation (optional): The time domain signal is converted into a spectrum image (default size 64x64) by using short time four-dimensional transform (STFT) to highlight fault characteristic frequencies, such as rotor structure defect frequencies (BPFO, BPFI, BSF, FTF). Dataset partitioning: All source domain data is labeled and used for training; the target domain data is separated into a task-independent set (normal samples) and a task-related set (faulty samples, unlabeled), with the maximum number of samples per class limited (default 50) to optimize memory usage. The `EfficientBearingDataset` class is used for loading and preprocessing. Step 2: Construction of the zero-shot correlation discriminant space adaptation model: The model in this embodiment is as follows: Figure 2 As shown, it consists of a lightweight Vision Transformer feature extractor, a classifier, and a loss component, implemented using the PyTorch framework; 1) Feature Extractor (LightweightViT class): Inputting an STFT image, it converts the image into a sequence through patch embedding (patch_size=8), class tokens, and position embedding; employing a lightweight attention mechanism (num_heads=4) and a few-layer encoder (num_layers=4), it outputs a 64-dimensional embedded feature vector. ; 2) Classifier: A two-layer fully connected network (64→32→num_classes, default 4 classes: normal, ball fault, inner circle fault, outer circle fault), outputting probability distribution. ; 3) Loss components: Simplify CCA loss (projected MSE), alignment loss (direct MSE), and discriminant loss (class center distance ratio); handle batch inconsistencies to ensure calculation only on valid labels; 3) Loss components: Simplify CCA loss (projected MSE), alignment loss (direct MSE), and discriminant loss (class center distance ratio); handle batch inconsistencies to ensure calculation only on valid labels; Step 3: Joint Loss Function and Training Mechanism The joint loss function of the model is as follows: ; in, ; Cross-entropy, only source domain task-related data, ignoring the -1 label; MSE after projection source / target-independent features; Directly irrelevant feature MSE; : Intra-class / inter-class distance ratio of task-related features; Mechanism: Zero-sample data aligns the domain with irrelevant data, while relevant data improves discrimination. Step 4: Model Training Process Using the train_lightweight_zsgda function: Adam optimization (lr=1e-3), cosine annealing scheduling, 30 epochs; splitting the source domain into irrelevant / relevant categories in each batch (batch_size=16), pairing them with those irrelevant to the target; gradient clipping (max_norm=1.0), visualization of cumulative loss; Device and Data Loading: Check GPU availability and load the pre-processed source and target domain data loaders. Model initialization: Instantiate the feature extractor, classifier and loss component and move them to the computing device (GPU / CPU). Feature extractor settings: The Adam optimizer is used. Notably, a low learning rate (0.5 * args.lr) is set for the feature extractor to stabilize the adversarial training process; Batch training loop: a) In each iteration, one batch of data is retrieved from both the source domain and the target domain data loader; b) Concatenate the data from the two batches and generate corresponding field labels; c) Forward propagation: Data passes sequentially through the feature extractor, fault classifier, and neighborhood discriminator; d) Loss Calculation: Calculate the total loss according to the aforementioned formula; e) Backpropagation and parameter update: Call `loss.backward()` and `optimizer.step()`. The gradient inversion layer automatically takes effect at this time, enabling adversarial updates to the feature extractor; Validation and model selection: After each training epoch, evaluate the model performance on the target domain validation set and save the model with the highest accuracy. Step 5: Fault Diagnosis and Visualization Diagnosis: After training, the saved optimal model is used to diagnose the real-time vibration signal of the target wind turbine. The `tester` function is called, and the preprocessed data is input; the model then outputs the fault type prediction result. Training process visualization: The `visualize_training` function is used to plot training process curves, including: Diagnosis: The predict function outputs predictions and features; Visualization: `plot_training_history` plots the loss curve; `simple_visualization` reduces the feature distribution using PCA; `plot_confusion_matrix_with_fix` generates the confusion matrix, supporting actual class adjustment. Performance Verification: In the cross-load fault diagnosis task of the CWRU dataset in this embodiment, load 3HP is set as the source domain and load 2HP as the target domain. After training for 30 epochs, the method of this invention achieves an average fault diagnosis accuracy of over 95% on the target domain test set, which is significantly higher than the traditional deep learning method without domain adaptation (direct transfer) (accuracy of about 70%), effectively verifying the superiority of this invention in solving the data distribution drift problem. Figure 3 The training loss curve effectively illustrates the model's convergence. Figure 4 To obfuscate the matrix diagram, it is shown that the model correctly identifies all four types of faults in the data. Figure 5 The principal component analysis feature distribution plot shows that the model can identify four clustering trends in the sample data.

[0029] The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.

Claims

1. A rotor structure fault diagnosis method based on lightweight zero-sample correlation discriminant space adaptation, characterized in that, Includes the following steps: S1: Collect vibration signals of the rotor structure in the source and target domains, preprocess the vibration signals to obtain processed signals, and use short-time Fourier transform to convert the processed signals into fixed-size images; The fixed-size image is divided into source domain samples and target domain samples. The source domain samples are labeled with fault types, and the target domain samples are separated into task-independent data and task-related data. S2: Construct a lightweight zero-shot model; the lightweight zero-shot model includes a feature extractor, a classifier, and a loss component; wherein, the feature extractor is a lightweight ViT, which takes a fixed-size image as input and maps it to a low-dimensional feature vector through patch embedding, a lightweight attention mechanism, and a few-layer encoder; the classifier is a fully connected layer, which takes a low-dimensional feature vector as input and outputs a probability prediction distribution of the fault type; the loss component includes simplified canonical correlation analysis loss, alignment loss, and discriminant loss; S3: Design a joint loss function; train a lightweight zero-shot model. During training, dynamically segment the source domain samples into task-independent data and task-related data in each batch. Pair the task-independent data in the source domain with the task-independent data in the target domain using the joint loss function to calculate the loss, and obtain the trained model. S4: The real-time acquired rotor structure vibration signal is input into the trained model after the same preprocessing as in S1. The model outputs the fault type and confidence level, and generates the training loss curve, principal component analysis feature distribution map and confusion matrix to realize the interpretability analysis of the diagnostic results.

2. The rotor structure fault diagnosis method based on lightweight zero-sample correlation discriminant space adaptation according to claim 1, characterized in that, In S1, the preprocessing includes denoising and normalization processes performed sequentially. The processed signal is denoted as: ; in, The original signal, The minimum value in the original signal. The maximum value in the original signal. It is a very small constant. The processed signal; The fixed-size image is denoted as: ; in, For window functions, In time-frequency representation, For time frame lead , For frequency index, For time series indexing, For signal length, For the first The signal value at each sampling point It is the imaginary unit.

3. The rotor structure fault diagnosis method based on lightweight zero-sample correlation discriminant space adaptation according to claim 2, characterized in that, In S1, the task-irrelevant data is normal data, and the task-related data is fault data, and there are no labels.

4. The rotor structure fault diagnosis method based on lightweight zero-sample correlation discriminant space adaptation according to claim 3, characterized in that, In S2, the low-dimensional feature vector is denoted as ,and ;in, This indicates a fixed-size input image. Represents the feature mapping function. These are trainable parameters; The lightweight attention mechanism is the Vision Transformer lightweight attention mechanism, denoted as: ; in ,in, For querying the matrix, The key matrix, For value matrices, For the number of attention heads, Let represent the learnable linear transformation matrix of the i-th attention head. This indicates the output linear transformation matrix. This indicates a splicing operation. This represents the self-attention calculation function.

5. The rotor structure fault diagnosis method based on lightweight zero-sample correlation discriminant space adaptation according to claim 4, characterized in that, In S2, the probability prediction distribution of the obstacle type is denoted as... , ; in Represents the classification function, whose parameters By minimizing the classification loss on source domain samples Optimize to ensure the learnable features are discriminative for fault categories.

6. The rotor structure fault diagnosis method based on lightweight zero-sample correlation discriminant space adaptation according to claim 5, characterized in that, In S2, the simplified canonical correlation analysis loss in the loss component calculates the mean squared error after projection matrix to minimize the difference between source and target domain features (MSE). The alignment loss directly calculates the feature MSE. The discriminant loss calculates the ratio of intra-class distance to inter-class distance based on class center to improve discriminability. The component handles the problem of inconsistent batch size to ensure stable calculation.

7. The rotor structure fault diagnosis method based on lightweight zero-sample correlation discriminant space adaptation according to claim 6, characterized in that, The loss function corresponding to the simplified canonical correlation analysis loss is: ; in, , Let be the projection matrix. , Features of source and target domains , For sample size , Represents the L2 norm; The inter-domain feature alignment loss function is: ; in, , Features of source and target domains , For sample size , Represents the L2 norm; The discriminative feature learning loss function is: ; in, This represents the total number of fault categories. For the current fault category index, For different Other category indexes, For category Sample characteristics, For category Feature center, For category Feature center, This represents the L2 norm.

8. The rotor structure fault diagnosis method based on lightweight zero-sample correlation discriminant space adaptation according to claim 7, characterized in that, In S3, the joint loss function is: in, , The total loss is the joint loss function. The cross-entropy loss of the classifier, To decouple gradients from the learning loss, invalid labels are ignored. For simplified CCA loss, For alignment loss, To determine the loss, ; The weights for the classification loss, Weights for gradient decoupling and comparative learning loss; These represent the weights of the loss function corresponding to canonical correlation analysis loss, the weights of the inter-domain feature alignment loss function, and the weights of the discriminative feature learning loss function, respectively.

9. The rotor structure fault diagnosis method based on lightweight zero-sample correlation discriminant space adaptation according to claim 7, characterized in that, In S3, the lightweight zero-shot model is trained using batch stochastic gradient descent. During the training process, each batch of source domain samples is dynamically segmented into task-independent data and task-related data. The loss is calculated by pairing the source domain samples with the target domain-independent data and updating the parameters of the feature extractor and classifier synchronously. The zero-shot domain adaptive learning paradigm enables the feature extractor to learn the domain-invariant fault feature representation. The zero-sample domain adaptive learning paradigm is as follows: Source region: Target domain: ; in, For the i-th source domain sample, For the corresponding fault category label, The total number of samples in the source domain. For the i-th target domain sample, For the corresponding fault category label, This represents the number of labeled target domain samples. The number of unlabeled target domain samples; The training process includes gradient pruning and learning rate scheduling to improve stability.

10. A rotor structure fault diagnosis system based on lightweight zero-sample correlation discriminant space adaptation, characterized in that, include: Data acquisition and preprocessing module: used to acquire vibration signals of the rotor structure in the source domain and target domain, preprocess the vibration signals, and obtain the processed signals; The processed signal is converted into a fixed-size image using short-time Fourier transform; The fixed-size image is divided into source domain samples and target domain samples. The source domain samples are labeled with fault types, and the target domain samples are separated into task-independent data and task-related data. The model building module is used to construct a lightweight zero-shot model. This model includes a feature extractor, a classifier, and a loss component. The feature extractor is a lightweight ViT model, which takes a fixed-size image as input and maps it to a low-dimensional feature vector through patch embedding, a lightweight attention mechanism, and a few-layer encoder. The classifier is a fully connected layer that takes the low-dimensional feature vector as input and outputs a probability prediction distribution of the fault type. The loss component includes simplified canonical correlation analysis loss, alignment loss, and discriminative loss. Model training module: Design a joint loss function; train a lightweight zero-shot model. During the training process, the source domain samples are dynamically segmented into task-independent data and task-dependent data in each batch. The task-independent data in the source domain and the task-independent data in the target domain are paired using the joint loss function to calculate the loss, and the trained model is obtained. Fault diagnosis module: It is used to input the real-time acquired rotor structure vibration signal into the trained model after the same preprocessing as S1. The model outputs the fault type and confidence level, and generates the training loss curve, principal component analysis feature distribution map and confusion matrix to realize the interpretability analysis of the diagnostic results.