Few-sample fault diagnosis method of TFCD based on fusion time sequence characteristics
By using the TFCD method that integrates temporal features, and leveraging the Long Short-Term Memory Network and DDPM model to generate high-quality training samples, the problem of fault diagnosis under conditions of few samples is solved, and high-precision diagnosis in bearing fault diagnosis is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIDIAN UNIV
- Filing Date
- 2026-01-27
- Publication Date
- 2026-05-22
AI Technical Summary
Existing intelligent fault diagnosis technologies struggle to achieve high-precision diagnosis under conditions of few samples and multiple operating conditions. In particular, in bearing fault diagnosis, the quality and diversity of generated samples are difficult to guarantee, resulting in insufficient model generalization ability.
The TFCD method based on fusion of temporal features is adopted. By introducing a long short-term memory network to extract discriminative temporal features, these features are embedded as static conditional vectors into the DDPM model to generate training samples that conform to the target category, thereby improving the temporal coherence and physical rationality of the generated samples.
It significantly improves the physical rationality and temporal coherence of the generated samples, alleviates the data imbalance problem, and enhances the accuracy of fault diagnosis and the generalization ability of the model.
Smart Images

Figure CN122072686A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of fault diagnosis technology, specifically relating to a few-sample fault diagnosis method based on TFCD fusion temporal features. Background Technology
[0002] In rotating machinery systems, bearings, as core transmission components, directly impact the overall stability and lifespan of the equipment. However, in real industrial environments, bearing operating conditions are complex, frequent signal acquisition is often impractical, and faulty equipment is usually no longer operational, resulting in a severe shortage of available fault data. This makes it difficult for traditional deep learning methods to achieve efficient diagnosis due to data imbalance and small sample size issues. This data scarcity limits the model's generalization ability, easily leading to overfitting and decreased diagnostic accuracy. This challenge is further amplified by the difficulty in obtaining fault samples, especially in complex operating conditions such as wind turbines, gearboxes, and aerospace bearings. Therefore, researching how to train fault diagnosis models under small sample size conditions is of great significance for promoting the application of intelligent fault diagnosis in actual production and helping to improve production efficiency.
[0003] To address the challenge of small sample sizes, existing research mainly follows two technical paths: model-based methods and data-based methods. Model-based methods aim to extract deeper, more discriminative features from limited samples by improving model architecture or training paradigms. For example, strategies such as attention mechanisms, meta-learning, and transfer learning are introduced to enhance the model's feature extraction and adaptive capabilities. While these methods reduce dependence on data volume to some extent, their model designs are often more complex, and their generalization ability still faces severe challenges when dealing with new faults or operating conditions that differ significantly from the training data distribution. The other path, data-based methods, focuses on generating new and diverse pseudo-samples through data augmentation techniques, thereby expanding the training set size from the source.
[0004] In recent years, deep generative models, represented by Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs), have provided more powerful solutions for data augmentation. These models can learn the complex distribution of the original small sample data and generate similar new samples, thereby balancing the dataset and enriching sample diversity. Goodfellow et al. proposed GANs in 2014, which learn the data distribution through an adversarial game between the generator and the discriminator. In the field of fault diagnosis, variants of GANs have been widely studied to address the problem of data scarcity. For example, ELARABY et al. used conditional GANs to generate handwritten characters, demonstrating their effectiveness in low-sample tasks. In mechanical fault diagnosis, Shi et al. applied deep convolutional GANs to generate time-frequency maps of bearing vibration signals, effectively expanding the training set. However, GANs suffer from inherent problems during training, such as the discriminator and generator failing to converge synchronously and mode collapse (i.e., insufficient diversity of generated samples), leading to unstable training and difficulty in guaranteeing the quality and diversity of generated samples. The VAE proposed by Kingma et al. is a generative model based on variational inference. It learns the latent space distribution of data and samples from this distribution to decode and generate new samples. VAE training is stable, and its core is to maximize the lower bound of evidence (ELBO). WANG et al. used conditional VAE to generate vibration signals for specified fault types. WANG et al. proposed an adversarial variational encoder for bearing fault diagnosis, which combines the advantages of VAE and adversarial training to improve the edge sharpness of generated samples. However, due to its inherent ELBO optimization objective and assumptions about the prior distribution of the latent space, VAE tends to learn an overly smooth data distribution, resulting in generated samples that are often too average, lack detail, and exhibit a "fuzzy" phenomenon. This is especially true in detailed vibration time-frequency map generation tasks, which limits its practicality in fault diagnosis.
[0005] Denoising Diffusion Probabilistic Models (DDPM), as an emerging generative model, have demonstrated superior performance. Sohl-Dickstein et al. applied DDPM to image generation tasks; Lugmayr et al. used DDPM to repair partially masked images, achieving results superior to GANs and autoregressive models. Compared to GANs, DDPM is trained without adversarial challenges, resulting in better stability; compared to VAEs, its progressive generation mechanism produces samples with richer details. Therefore, DDPM has been introduced into the field of fault diagnosis, providing a new tool for small-sample problems. However, directly applying standard DDPM to the generation of bearing fault vibration signals still has shortcomings. Unconditional DDPM cannot generate specific fault samples in a targeted manner, while existing conditional DDPMs typically only use fault type labels as conditions. This discrete static condition makes it difficult to capture the temporal dynamic characteristics of vibration signals. Specifically, the model struggles to model long-range temporal dependencies, resulting in a lack of temporal coherence in the generated signals, failing to accurately reproduce the unique periodic impact patterns of the fault, thus affecting the physical rationality and application value of the generated samples.
[0006] In summary, existing intelligent fault diagnosis technologies are insufficient to meet the high-precision diagnosis requirements under the conditions of "few samples and multiple operating conditions" in industrial scenarios. Summary of the Invention
[0007] To address the aforementioned problems in the existing technology, this application provides a few-sample fault diagnosis method and system based on TFCD with fused temporal features. The technical problem to be solved by this application is achieved through the following technical solution: A few-shot fault diagnosis method based on fused temporal features of TFCD includes: S100: The status signal of the core component at the current time is collected from the transmission system in real time, and the status signal is preprocessed to obtain a preprocessed status signal. S200, the preprocessed state signal is input into the trained fault diagnosis model so that the fault diagnosis model can diagnose the core component and output whether the core component has failed and the type of failure when it has failed; wherein, the fault diagnosis model uses a trained TFCD model to generate multiple training samples, and then uses the training samples to train a preset fault diagnosis model; the TFCD model extracts discriminative temporal features by introducing a long short-term memory network and embeds them as static conditional vectors into the DDPM model to generate multiple training samples.
[0008] A few-shot fault diagnosis system based on TFCD fusion temporal features includes: The acquisition module is configured to acquire the status signal of the core component from the transmission system in real time at the current time, and preprocess the status signal to obtain a preprocessed status signal; The fault diagnosis module is configured to input the preprocessed state signal into a trained fault diagnosis model, so that the fault diagnosis model can diagnose the core component and output whether the core component has failed and the type of failure when it has failed. The fault diagnosis model is obtained by generating multiple training samples using a trained TFCD model, and then using the training samples to train a preset fault diagnosis model. The TFCD model extracts discriminative temporal features by introducing a Long Short-Term Memory network and embeds them as static conditional vectors into the DDPM model to generate multiple training samples.
[0009] Beneficial effects: 1. This application discloses a few-sample fault diagnosis method based on TFCD (Time-Series Feature-Fused Conversion) fusion. By inputting preprocessed state signals into a trained fault diagnosis model, the model can diagnose faults in the core components. The fault diagnosis model in this application is trained using multiple training samples generated from a trained TFCD model. The TFCD model extracts discriminative temporal features by introducing a Long Short-Term Memory (LSTM) network and embeds them as static conditional vectors into the DDMP (Discretionary-Distance-Modified Conversion) model. This allows the model to effectively capture long-range dependencies and dynamic pattern features in vibration signals, thus maintaining good temporal coherence in the generated samples while preserving the periodic impact patterns unique to faults, significantly improving the physical rationality of the generated samples. Therefore, this application can achieve accurate diagnosis under various operating conditions.
[0010] 2. This application effectively alleviates the data imbalance problem through high-quality sample generation. Under the condition of using only a small number of real samples, training with generated samples significantly improves the performance of the classification model. This demonstrates that the proposed method can provide a reliable data augmentation solution for fault diagnosis tasks in real-world industrial scenarios, and has significant practical value, especially in application scenarios where sample collection is difficult or fault cases are scarce.
[0011] The present application will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0012] Figure 1 This is a flowchart illustrating a few-sample fault diagnosis method based on TFCD fusion temporal features provided in this application; Figure 2 This is a schematic diagram of the TFCD structure provided in this application; Figure 3 This is a schematic diagram of the structure of the NF model provided in this application; Figure 4 This is a schematic diagram of the time-domain signal of a rolling bearing failure at 0hp provided in this application; Figure 5 This is the time-frequency diagram of rolling bearing failure at 0hp provided in this application; Figure 6 This is a schematic diagram comparing real samples and generated samples in the CWRU dataset provided in this application; Figure 7 This is a schematic diagram illustrating the different methods used in this application to generate sample quality; Figure 8 This is a comparison curve of the average autocorrelation function of real samples and generated samples under 10 fault categories provided in this application; Figure 9 This is a schematic diagram illustrating the overall coherence of the various labels. Detailed Implementation
[0013] The present application will be described in further detail below with reference to specific embodiments, but the implementation of the present application is not limited thereto.
[0014] like Figure 1 As shown, this application provides a few-sample fault diagnosis method based on TFCD fusion temporal features, including: S100: The status signal of the core component at the current time is collected from the transmission system in real time, and the status signal is preprocessed to obtain a preprocessed status signal. The core components include the gearbox and rolling bearings. This step can collect status signals when both are working together or when one is operating independently. In practice, the status signals collected are generally those when both are working together. These status signals include system parameters such as gear transmission system parameters, transmission ratio, and meshing frequency. For rolling bearings, the status signals can be local parameters such as fault frequency and film thickness ratio. When both are working together, the status signals are generally general parameters such as vibration signals and temperature.
[0015] This application can convert state signals, such as vibration signals, into time-frequency diagrams through continuous wavelet transform (CWT), and then input them into the model for fault diagnosis.
[0016] S200, the preprocessed state signal is input into the trained fault diagnosis model so that the fault diagnosis model can diagnose the core component and output whether the core component has failed and the type of failure when it has failed; wherein, the fault diagnosis model uses a trained TFCD (Temporal-Fusion Conditional Diffusion) model to generate multiple training samples, and then uses the training samples to train the preset fault diagnosis model; the TFCD model extracts discriminative temporal features by introducing a long short-term memory network and embeds them as static conditional vectors into the DDMP model to generate multiple training samples.
[0017] The fault diagnosis model adopts a 1DCNN model, which includes a 1D convolutional layer, an activation layer, a 1D pooling layer, a flattening layer, a fully connected layer, and an output layer connected in sequence.
[0018] This application can input the preprocessed state signal into the fault diagnosis model, so that it can extract multi-dimensional feature maps using multiple 1D convolutional layers, perform non-linear activation on the multi-dimensional feature maps, and then perform downsampling through 1D pooling layers to obtain pooled multi-dimensional features. The multi-dimensional features are then flattened using a flattening layer, and finally, the final diagnosis result is obtained through a fully connected layer and an output layer to determine whether the core components have failed and the type of failure when they have failed.
[0019] This application employs a temporal fusion conditional diffusion (TFCD) model, aiming to guide the model to generate time-frequency map samples that conform to the target category attributes and have high temporal coherence through the embedding of condition c. (Reference) Figure 2 As shown, the TFCD model of this application includes a Long Short-Term Memory (LSTM) network and a DDMP model. The LSM network is used to extract temporal features and generate temporal feature vectors using the NF (Normalizing Flows) model corresponding to the target category. These temporal feature vectors are then embedded as static conditional vectors into the DDMP model to guide it in generating training samples that conform to the target category. The DDMP model uses a U-Net as the noise prediction network, which includes an encoder and a decoder connected by skip connections. The noise prediction network projects the input fault labels of the target category and the temporal feature vectors onto a dimensional space that matches its internal feature map. The projected temporal feature vectors and the fault labels of the target category are then injected into each layer of the noise prediction network to generate a time-frequency map that conforms to the target category. This time-frequency map is then used as the training samples that conform to the target category.
[0020] The Denoising Diffusion Probabilistic Model (DDPM) is a generative model based on a Markov chain involving forward diffusion and inverse denoising processes. The core principle of the DDPM model is based on forward diffusion and inverse denoising. The forward diffusion process is a fixed Markov chain noise addition process, adding independent Gaussian noise to the data at each step, ultimately transforming the data into random noise conforming to a Gaussian distribution. The inverse denoising process progressively removes noise from a purely noisy image, ultimately generating a time-frequency map, i.e., the target image.
[0021] Assuming at time step The sample is Then, based on the samples from the previous time step have: (1); (2); In the formula: , and For the weights, where The value will decrease over time. express The noise scheduling variance of the time step increases over time. The increase is determined by the scheduler, which can be divided into linear schedulers and cosine schedulers; for Independent Gaussian noise is added at each time step. Therefore, in the forward diffusion process: (3); In the formula, This represents the stepwise posterior distribution of the forward diffusion process.
[0022] Since the DDMP model follows the Markov assumption, substituting equation (1) into the iteration yields: (4); in, This represents the directly noisy distribution of the forward process. For a variable, , Indicates the first The single-step signal retention coefficients of the step. Indicates the index of the time step. This represents an input image without any added noise. Represents the identity matrix.
[0023] When the total number of steps TWhen the value of t is sufficiently large, the DDMP model will transform the original samples into a random noise image that follows a Gaussian distribution; this is the forward diffusion process. In forward diffusion, as t increases, the final data distribution... It becomes an independent Gaussian distribution. The inverse denoising process recovers the original data from the Gaussian noise, that is, learns a parameterized posterior distribution. ,pass Samples before time step 1 were generated Initial posterior distribution satisfy The reverse denoising process is then defined as: (5); In the formula, the parameterized posterior distribution Defined as: (6); (7); (8); In the formula, For noise prediction networks in Noise distribution obtained at time step, These are the parameters of the noise prediction network. The main goal of training is to minimize... The difference between the actual noise distribution and the predicted noise distribution at time step, and the parameters obtained by final optimization, can be defined as follows: (9); The reverse denoising process starts from the noise The process of progressively predicting and removing noise is used to recover the... This application uses U-Net as the network prediction noise. , It is a condition.
[0024] Long Short-Term Memory (LSTM) networks are an improved form of Recurrent Neural Networks (RNNs) designed to selectively retain key information from previous states while filtering out irrelevant data. An LSTM unit consists of three core structures: a forget gate, an input gate, and an output gate. This indicates the cell state at the previous time step. This indicates the cell output from the previous time step; This represents the input at the current time step. and This represents the cell state and output at the current time step. During forward propagation, the forget gate determines how much information from the previous time step's cell state can be retained, calculated using the following formula: (10); In the formula, express The output of the time step forget gate It is the Sigmoid activation function. For the weight of the Forgotten Gate, This is the bias of the forget gate. The forget gate uses the Sigmoid function to map the input to the previous state as a value between 0 and 1 to determine whether the previous state is retained. 1 means fully retaining the state, and 0 means discarding it.
[0025] The current cell state is then determined by the input gate. How much of the current input can be retained? The input gate first passes through... Function to construct candidate vectors Then, the proportion of forgetting is selected using the Sigmoid function, calculated as follows: (11); In the formula, express The activation vector of the time-step input gate. Indicates the input gate activation function; and The weights and biases used when constructing candidate vectors; and Here, represents the weights and biases of the input gates, where 'i' denotes the input gate, a unique identifier for a gated unit in an LSTM network. Finally, the output gate determines the current state of the unit. How much can be transmitted to the output? The calculation formula is: (12); In the formula, This represents the current state of the cell. and These are the output gate weights and biases; the output at the current time step. Current state go through The output of the function and the Sigmoid layer The result after multiplication.
[0026] Normalizing Flows (NF) are a class of generative models that aim to transform complex target distributions through a series of invertible and computationally efficient transformations of the Jacobian determinant. Mapped to a simple basic distribution The core of the NF model lies in the Change of Variables Formula. Assume there is an invertible mapping. The basic distribution can be Mapped to target distribution ,Right now The probability density function of the target distribution. It can be calculated using the following formula: (13); in, It is the probability density function of the target distribution; It is the value of the basic distribution after the inverse transformation; This represents the Jacobian determinant, used to adjust density scaling.
[0027] For log-likelihood (training objective): (14); in, It is the logarithmic density of the target distribution; It is the logarithmic density of the basic distribution after the inverse transformation; The absolute value of the Jacobian determinant of the inverse transformation.
[0028] The NF model constructs complex transformation functions by stacking K simple invertible transformations. intermediate variables , , The complete log-likelihood from the basic distribution to the target distribution can be expressed as: (15); in, It is the logarithmic density of the basic distribution after the final inverse transformation. It is the sum of the absolute logarithms of the Jacobian determinants of all layers. The goal of training an NF model is to maximize the log-likelihood of the data samples.
[0029] probability density function of the basic distribution For standard normal distribution: (16); in, It is the probability density function of the basic distribution. It is a standardized constant. It is a Gaussian kernel.
[0030] refer to Figure 3 This application employs Masked Autoregressive Flow (MAF) as the reversible transformation. The basic structure. MAF is an autoregressive model with a transformation function. It must meet the following form: (17); Where d represents the dimension index in the target vector x and the basis vector z. and These are neural networks used to calculate scale and translation. These networks depend only on the first few bits of the input vector. Each dimension ensures autoregressivity through a masking mechanism.
[0031] Due to the autoregressive nature of the MAF transform, its Jacobian matrix is a lower triangular matrix, which makes calculating its determinant efficient. The absolute logarithm of the Jacobian determinant is simplified to the sum of the diagonal elements, i.e., the summation of the network outputs across all scales: (18); In this case, the logarithm of the Jacobian determinant depends only on the scaling network. The sum of the outputs allows MAF to efficiently maximize the log-likelihood during training. The training loss is the negative log-likelihood average: (19); Where N is the number of samples, and j is the sample index. It is the sum of the log-likelihoods of all samples.
[0032] In this application, the normalized flow model does not directly model the original input data, but rather models the distribution of the temporal feature vectors obtained through the feature extractor. Therefore, within the theoretical framework of the NF model, this application replaces the original target variable x with this feature vector. The NF model maximizes the training data. Training with negative log-likelihood: (20); Since the inverse transform of MAF is autoregressive, the sampling process is sequential. This application first starts from the fundamental distribution... The sample z is then passed through the inverse transform of each MAF layer in sequence. Obtaining temporal feature vectors .
[0033] In one specific embodiment of this application, the process of the TFCD model generating multiple training samples includes: a1, for each input vibration signal, adds independent Gaussian noise to obtain a vibration signal carrying noise and uses a long short-term memory network to extract the temporal feature vector of the vibration signal; This application's LSTM feature extractor processes each signal sample (vibration signal) and outputs the last hidden state vector. As a temporal feature vector, the specific process is as follows: (twenty one); in, It is the input vibration signal. It condenses the long-term and short-term dependence characteristics of vibration signals. This represents the processing procedure of the Long Short-Term Memory (LSTM) network.
[0034] b1. The temporal feature vector is inversely transformed using the NF model to obtain a regenerated temporal feature vector. To effectively capture the temporal characteristic distribution of vibration signals, a normalizing flow (NF) model is introduced to apply the hidden state vector extracted by LSTM. This module performs category-specific distribution modeling and generation. The NF model generates complex target distributions from simple basis distributions through a series of invertible transformations, achieving accurate density estimation and efficient sampling. The core of this module lies in independently training an NF model for each fault category, capturing category-specific temporal feature patterns, avoiding cross-class confusion, and thus providing high-quality static feature conditional embeddings for TFCD.
[0035] The NF model is constructed by stacking five MAF layers. The internal structure of the NF model allows for efficient forward sampling and inverse density calculation. The basis distribution is a standard multidimensional normal N(0, I). Each MAF layer is implemented using an affine transformation. (twenty two); in, and These are the scaling and translation functions, parameterized by the multilayer perceptron; the mask is an alternating binary mask pattern to ensure autoregressive dependency. Indicates the first The output variable after scale translation transformation, This indicates the transformation was performed in autoregressive order. Hidden variables.
[0036] Jacobian determinant simplifies to: (twenty three); In the formula, Indicates the dimension of the data. Let represent the determinant of the transformed Jacobian matrix. It represents the natural logarithm.
[0037] Training is performed independently for each category, with the goal of maximizing The log-likelihood. The loss function is the negative log-likelihood average: (twenty four); In the formula, Indicates the number of samples. The t-th laminar transformation yields the th... j The latent variable representation of each training sample, where K represents the total number of layers in the normalized flow model. This represents the latent space probability density after K layers of normalized flow transformation.
[0038] c1, the regenerated time-series feature vector is used as the static condition vector, and the static condition vector, the vibration signal carrying noise, and the fault label of the corresponding target category are input into the noise prediction network in the TFCD model so as to perform forward diffusion and reverse denoising to obtain multiple time-frequency maps that conform to the fault category; This application generates new temporal features from a trained NF model. As a condition for DDPM, select the fault label y of the fault category, load the corresponding NF model, and calculate from the base distribution. A set of latent variables was sampled. Through the inverse transform of NF, Mapping back to the feature space yields the generated temporal feature vectors. The time series feature vector Injecting UNet into DDPM as a static conditional vector embedding improves the temporal consistency of generated images.
[0039] The TFCD model uses a conditional U-Net as the noise prediction network. The core backbone of the U-Net architecture, with its symmetrical encoder-decoder paths and cross-layer skip connections, can efficiently capture multi-scale spatial features of time-frequency maps. In the inverse denoising process of TFCD, the input to U-Net, besides noisy samples... and time step Beyond positional encoding, the key lies in incorporating condition c to achieve precise semantic control over the generation process. Condition c aims to provide static semantic information, including the fault category label y and high-quality temporal feature vectors generated through the NF model. .Should It is a high-dimensional condensed representation of the inherent regularity and state of the original time-domain signal, serving as prior semantic information to guide the generation task. To effectively apply conditional information to the DDPM model, the fault label y and the temporal feature vector are first... The conditional vectors are encoded and uniformly projected into a dimensional space that matches the internal feature maps of U-Net. Subsequently, these conditional vectors are injected into various layers of U-Net through adaptive normalization layers. This cross-space, cross-channel adaptive adjustment mechanism ensures that feature information can effectively guide noise prediction, enabling the generated time-frequency map to possess high accuracy and temporal consistency in target category attributes at the macroscopic level.
[0040] d1, using the multiple time-frequency images as training samples for the target category that the vibration signal conforms to.
[0041] To illustrate the specific process of generating training samples in this application, the generation process is divided into four stages, which include: (1) Data preprocessing stage: Under single-condition working conditions, the original vibration signal data length for various faults is uniformly set to 120,000 sampling points. Data preprocessing adopts a sliding window strategy: the window size is set to 1024 sampling points, and the sequence is truncated with a step size of 512 points. Subsequently, each one-dimensional signal segment is transformed into a 128×128 pixel three-dimensional time-frequency image through wavelet transform to realize the visualization of time-frequency characteristics. This application selects the complex Morlet wavelet basis cmor100-1, with 1024 data points as the sample length, and transforms the one-dimensional time-domain vibration signal into a 128×128 RGB three-channel time-frequency image through continuous wavelet transform.
[0042] Dataset partitioning phase: The processed time-frequency image samples are divided into training and test sets to support model training and evaluation. The partitioning strategy is as follows: For normal states, 50 samples are selected as the training set and 6 samples as the test set; for fault states, 10 samples are selected as the training set and 18 samples as the test set for each label.
[0043] (2) Normalized Flow Model Training and Temporal Feature Generation Stage: First, an NF model is trained based on the training set data to learn the temporal feature distribution of each fault category. An LSTM network is then used to extract hidden state vectors from the original vibration signal. As the temporal features of the signal, and an NF model is trained independently for each fault category, the model is constructed. The specific category distribution. After training, during the sample generation phase, new temporal feature vectors are sampled from the corresponding NF model for the target fault category. This serves as a static conditional embedding for the subsequent diffusion model generation process.
[0044] (3) Diffusion Model Training and Sample Generation. The improved diffusion model is trained and generated by combining conditional information. The training set samples are processed using the TFCD architecture, fusing time step embeddings, label embeddings, and temporal feature vectors. The number of diffusion steps T is set to 1000, and a linear scheme is used for noise scheduling. The training learning rate is set to 0.0001, and the number of iterations is set to 6000. Eight 128×128 RGB time-frequency map samples are generated for each label.
[0045] (4) Use evaluation metrics such as FID, LPIPS, and MMD to assess the quality of generated samples during the stage: FID (Fixed Image ID) assesses the quality and diversity of generated images by comparing the distribution differences between generated and real samples in the Inception V3 feature space. A lower FID value indicates that the feature distributions of the generated and real samples are closer. LPIPS (Perceptually Perceived Differences) calculates the perceptual differences between generated and real samples based on the VGG network; a lower LPIPS value indicates that the two sets of images are visually more similar. During evaluation, the minimum number of samples is truncated to ensure consistent batch size. MMD (Mean Mobility Difference) calculates the mean embedding distance between generated and real samples using the RBF kernel function, assessing the statistical diversity of the samples. A lower MMD value indicates that the distribution characteristics of the generated samples are closer to those of the real samples.
[0046] In one specific embodiment of this application, the training process of the TFCD model includes: a2, obtain historical fault data and corresponding fault tags, and preprocess the historical fault data to obtain initial samples; b2, input each initial sample into the trained Long Short Memory network to obtain the temporal feature vector of a single initial sample; c2, using the trained NF model to generate temporal feature vectors that match the target category of the initial samples, and using them as static conditional vectors; d2, at the current time step, selects sampled noise from the noise space; e2, the static condition vector, the initial sample, and the sampling noise of the current time step are input into the U-Net in the DDPM model, so that it undergoes forward diffusion and reverse denoising to obtain multiple time-frequency map samples that conform to the fault category of the initial sample; The objective of training the TFCD model is to minimize the simplified noise prediction loss, i.e., to predict noise. Compared with actual injected noise The difference lies in the fact that, in each training batch, the model randomly and uniformly samples time steps t, feeding the original data according to the forward diffusion process. Adding noise to obtain noisy samples Subsequently, Encoded time steps The condition c is input into U-Net. Through the gradient backpropagation mechanism, the network parameters are continuously optimized, enabling it to accurately learn the conditional backtransition probability. The sample generation process is a conditional inverse iterative sampling process. It first uses the NF model to generate temporal feature vectors for the target class. This serves as a priori condition guiding the generation task. Subsequently, the model generates pure Gaussian noise. Initially, the denoising operation is performed iteratively over T time steps. Throughout the inverse process, the noisy network is predicted. Always using label y and temporal features This serves as a joint condition for precise guidance. Finally, after T time steps of gradual recovery, the model outputs high-quality synthetic time-frequency map samples with specific fault categories and temporal characteristics. .
[0047] f2, calculate the loss function based on the multiple time-frequency map samples and the corresponding initial samples, and adjust the internal parameters of the TFCD model according to the loss function; g2, repeatedly select the initial sample, and repeat the process from b to f until the training is completed, to obtain the trained TFCD model.
[0048] In one specific embodiment of this application, the few-sample fault diagnosis method based on fused temporal features of TFCD further includes: The multiple time-frequency image samples were evaluated using FID, LPIPS, and MMD evaluation metrics to obtain the evaluation results.
[0049] In one specific embodiment of this application, training a preset fault diagnosis model using the training samples includes: a3, collect data signals of core components within a predetermined time period before the current time, and preprocess the data signals to obtain preprocessed data signals; b3, The preprocessed data signal is input into the trained TFCD to perform sample augmentation to obtain multiple time-frequency map samples corresponding to each data signal; c3, the time-frequency graph samples and the corresponding data signals are both used as training samples; c4. The training samples are used to train a preset fault diagnosis model to obtain the trained fault diagnosis model.
[0050] Secondly, this application provides a few-sample fault diagnosis system based on TFCD fusion temporal features, comprising: The acquisition module is configured to acquire the status signal of the core component from the transmission system in real time at the current time, and preprocess the status signal to obtain a preprocessed status signal; The fault diagnosis module is configured to input the preprocessed state signal into a trained fault diagnosis model, so that the fault diagnosis model can diagnose the core component and output whether the core component has failed and the type of failure when it has failed. The fault diagnosis model is obtained by generating multiple training samples using a trained TFCD model, and then using the training samples to train a preset fault diagnosis model. The TFCD model extracts discriminative temporal features by introducing a Long Short-Term Memory network and embeds them as static conditional vectors into the DDMP model to generate multiple training samples.
[0051] To verify the effectiveness of this application, the publicly released rolling bearing dataset is used as the research basis. This dataset includes operational data of normal bearings, as well as data on drive-end bearing failures and fan-end bearing failures. Each dataset has two different sampling frequencies: 12kHz and 48kHz. The rolling bearing model used in this dataset is SKF6205. The experimental environment is based on the PyTorch framework using Python 3.10, with a Linux operating system. The hardware environment consists of one NVIDIA GeForce RTX 3090 graphics card with 24GB of video memory and CUDA version 12.4. Table 1 shows the gearbox fault diagnosis performance indicators: Table 1 CWRU Bearing Fault and Operating Condition Information
[0052] This application selects data from a 12kHz sampling frequency at the drive end for in-depth analysis and research. The data includes four states: Normal, Inner Ring Fault (IR), Outer Ring Fault (OR), and Rolling Element Fault (B). The bearing states are divided into 10 state labels, including one normal state and nine fault states, with labels ranging from 0 to 9. Noise reduction is performed on the 10 original signals in Table 1, and then continuous wavelet transform is used to extract and convert the 10 signal sets into time-frequency diagrams, as shown below. Figure 4 As shown. A test set of 168 samples was constructed, with the number of samples for each of the 10 states as follows: 6 samples for normal operating condition (0) and 18 samples for each of the fault conditions (1~9). An original training set of 100 samples was constructed, with 10 samples for each of the 10 states.
[0053] In traditional time-frequency waveform diagrams, fault features are often not significant. For example, the short-time Fourier transform is limited by a fixed time-frequency resolution and uses a uniform window width for all frequencies, making it difficult to simultaneously optimize the analysis of low-frequency and high-frequency signals. In contrast, the continuous wavelet transform, through a series of scaling and shifting wavelet basis functions, can adaptively capture the features of signals at different frequencies. Therefore, this application uses the continuous wavelet transform to improve the analysis effect. Taking the CRWU dataset as an example, during preprocessing, data at 12kHz from the drive end is selected. Three different fault locations and three different damage sizes at 0hp are selected for preprocessing, totaling nine types of fault vibration signals. The continuous wavelet transform is used to convert the time-domain information into a time-frequency diagram, and the results are as follows. Figure 5 As shown. The generated time-frequency diagrams of various faults in this application are compared with real samples, for example... Figure 6 As shown in Table 2, the quality evaluation index values for real samples and generated samples are listed below: Table 2 Quality evaluation index values of real samples and generated samples
[0054] Table 2 shows that the average FID score of the generated samples compared to the real samples is 41.1708, the average LPIPS score is 0.1732, and the average MMD score is 0.0798. The lower the score, the closer the distribution of the generated samples is to the distribution of the original samples. Therefore, Table 2 indicates that the generated samples have high quality and can be used as an augmented dataset to address the small sample problem.
[0055] To quantitatively assess the relevance and diversity of the generated images, evaluation metrics such as FID and MMD were used to assess the quality of samples generated by different methods. The average values of FID and MMD were calculated, and the evaluation results are listed in Table 3.
[0056] Table 3 Sample quality generated by different methods
[0057] As can be seen from Table 3, the samples generated by the method of this application have lower scores for FID and MMD compared to other models. The average score for FID is 49.89 and the average score for MMD is 0.145. This indicates that the improved diffusion model has a better ability to learn the sample distribution and generates higher quality samples compared to other methods.
[0058] To further verify the quality of the samples generated by the proposed method, this application uses the autocorrelation function (ACF) graph to quantify the similarity between the generated samples and the real samples in terms of time-domain autocorrelation, and intuitively demonstrates the temporal coherence of the generated samples. Figure 7The ACF comparison results for some categories are shown. As can be observed from the figure, the ACF curves of the generated samples are highly consistent with those of the real samples in terms of the main peak positions and decay trends, indicating that the time-frequency diagrams generated by the proposed method maintain a high degree of similarity to the original vibration signals in terms of temporal continuity.
[0059] Figure 8 The image shows a comparison of the mean autocorrelation function (ACF) curves of real and generated samples under 10 fault categories. The solid blue line represents the mean ACF of real samples, and the dashed red line represents the mean ACF of generated samples. Figure 8 It can be seen that the two curves highly overlap within the first 30 lags (lag=0~30), especially at lag=0, where the normalized value is close to 1.0, and significant sharp peaks appear at the fault characteristic period positions, indicating that the generated sample accurately reproduces the periodic impact structure of the real signal. In addition, the ACF decay rate of the generated sample is almost consistent with that of the real sample, and the envelope curve declines smoothly without abnormal oscillations or excessively rapid decay, further verifying the model's effective modeling of long-range signal correlation.
[0060] To achieve more accurate numerical comparisons, this application defines the average autocorrelation function difference (ACF_diff), which calculates the deviation of two ACF curves over the first 65 lag points based on the mean squared error (MSE). As shown in Table 4: Table 4. Deviation of the two ACF curves at the first 65 lag points.
[0061] As can be seen from Table 4, the average ACF_diff of the proposed method in this application is 0.0058 across 10 categories. Compared with the average of 0.0233 for DDPM without temporal conditions, the proposed method achieves a significant decrease in xxx, indicating that the generated samples are highly consistent with the real samples in terms of physical statistical characteristics such as impact period, energy decay and wave texture, and have achieved a physical-level faithful generation level.
[0062] To scientifically evaluate the fidelity of the generated samples in terms of temporal dynamic characteristics, this application introduces three quantitative indicators: Decay Similarity, Impact Consistency, and Overall Coherence. These indicators aim to systematically analyze the performance of the generated vibration signals in terms of temporal autocorrelation decay patterns, fault impact mode retention, and the rationality of the global temporal structure. Experimental data show that TFCD significantly outperforms DDPM in both Decay Similarity and Impact Consistency.
[0063] Overall coherence, as a comprehensive index of decay similarity and impact consistency, is used to evaluate the rationality and naturalness of the generated samples in the global temporal structure. The calculation results are shown in Table 5.
[0064] Table 5 Overall Coherence Analysis
[0065] from Figure 9 The results show that the average Overall Coherence achieved by the TFCD method is significantly higher than that of DDPM. This further demonstrates that the conditional generation mechanism, which integrates temporal features, can significantly improve the overall coherence of samples in the temporal domain, ensuring that the generated signals not only maintain consistency in local impact patterns but also possess higher physical reliability during global dynamic evolution. This provides more representative augmented data for subsequent fault diagnosis tasks.
[0066] To evaluate the effectiveness of the proposed method in scenarios with few samples, this application designed incremental data augmentation experiments: based on 40 real samples for each type of fault, 20, 40, 60, and 80 generated samples were introduced respectively to construct four training sets of different sizes for classifier training. The experimental results are shown in Table 6: Table 6 Recall Rate and F1 Score
[0067] Table 6 shows that the diagnostic performance of all models steadily improves with the increase in the number of generated samples. Among them, the classification model trained on samples generated by TFCD consistently outperforms the CNN model trained only on original samples and the classification model trained on samples generated by DDPM in both recall and precision, further validating the advantages of TFCD-generated samples in feature representation and distribution realism. This result confirms that this application can effectively expand training data, alleviate overfitting and undergeneralization problems caused by sample scarcity, and has substantial significance for improving the accuracy and robustness of fault diagnosis under conditions of few samples.
[0068] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of this application and should not be construed as limiting the specific implementation of this application to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of this application, and all such modifications or substitutions should be considered within the scope of protection of this application.
Claims
1. A few-sample fault diagnosis method based on TFCD fusion temporal features, characterized in that, include: S100: The status signal of the core component at the current time is collected from the transmission system in real time, and the status signal is preprocessed to obtain a preprocessed status signal. S200, the preprocessed state signal is input into the trained fault diagnosis model so that the fault diagnosis model can diagnose the core component and output whether the core component has failed and the type of failure when it has failed; wherein, the fault diagnosis model uses a trained TFCD model to generate multiple training samples, and then uses the training samples to train a preset fault diagnosis model; the TFCD model extracts discriminative temporal features by introducing a long short-term memory network and embeds them as static conditional vectors into the DDMP model to generate multiple training samples.
2. The few-sample fault diagnosis method based on TFCD fusion temporal features according to claim 1, characterized in that, The TFCD model includes a Long Short-Term Memory (LSTM) network and a DDMP model. The LSTM network is used to extract temporal features and generate temporal feature vectors using the NF model corresponding to the target category. The temporal feature vectors are then embedded into the DDMP model as static conditional vectors to guide the DDMP model in generating training samples that conform to the target category.
3. The few-sample fault diagnosis method based on TFCD fusion temporal features according to claim 2, characterized in that, The DDMP model uses U-Net as the noise prediction network, which includes an encoder and a decoder connected by skip connections. The noise prediction network projects the input target category fault labels and temporal feature vectors onto a dimensional space that matches its internal feature map. The projected temporal feature vectors and target category fault labels are then injected into each layer of the noise prediction network to generate a time-frequency map that matches the target category. This time-frequency map is then used as a training sample that matches the target category.
4. The few-sample fault diagnosis method based on TFCD fusion temporal features according to claim 3, characterized in that, The process by which the TFCD model generates multiple training samples includes: a1, for each input vibration signal, adds independent Gaussian noise to obtain a vibration signal carrying noise and uses a long short-term memory network to extract the temporal feature vector of the vibration signal; b1. The temporal feature vector is inversely transformed using the NF model to obtain a regenerated temporal feature vector. c1, the regenerated time-series feature vector is used as the static condition vector, and the static condition vector, the vibration signal carrying noise, and the fault label of the corresponding target category are input into the noise prediction network in the TFCD model so as to perform forward diffusion and reverse denoising to obtain multiple time-frequency maps that conform to the fault category; d1, using the multiple time-frequency images as training samples for the target category that the vibration signal conforms to.
5. The few-sample fault diagnosis method based on TFCD fusion temporal features according to claim 3, characterized in that, The training process for the TFCD model includes: a2, obtain historical fault data and corresponding fault tags, and preprocess the historical fault data to obtain initial samples; b2, input each initial sample into the trained Long Short Memory network to obtain the temporal feature vector of a single initial sample; c2, using the trained NF model to generate temporal feature vectors that match the target category of the initial samples, and using them as static conditional vectors; d2, at the current time step, selects sampled noise from the noise space; e2, the static condition vector, the initial sample, and the sampling noise of the current time step are input into the U-Net in the DDPM model, so that it undergoes forward diffusion and reverse denoising to obtain multiple time-frequency map samples that conform to the fault category of the initial sample; f2, calculate the loss function based on the multiple time-frequency map samples and the corresponding initial samples, and adjust the internal parameters of the TFCD model according to the loss function; g2, repeatedly select the initial sample, and repeat the process from b to f until the training is completed, to obtain the trained TFCD model.
6. The few-sample fault diagnosis method based on fused temporal features of TFCD according to claim 5, characterized in that, Following d, the few-sample fault diagnosis method based on fused temporal features of TFCD further includes: The multiple time-frequency image samples were evaluated using FID, LPIPS, and MMD evaluation metrics to obtain the evaluation results.
7. The few-sample fault diagnosis method based on TFCD fusion temporal features according to claim 1, characterized in that, The process of training a pre-defined fault diagnosis model using the training samples includes: a3, collect data signals of core components within a predetermined time period before the current time, and preprocess the data signals to obtain preprocessed data signals; b3, The preprocessed data signal is input into the trained TFCD to perform sample augmentation to obtain multiple time-frequency map samples corresponding to each data signal; c3, the time-frequency graph samples and the corresponding data signals are both used as training samples; c4. The training samples are used to train a preset fault diagnosis model to obtain the trained fault diagnosis model.
8. The few-sample fault diagnosis method based on TFCD fusion temporal features according to claim 1, characterized in that, The fault diagnosis model adopts a 1DCNN model, which includes a 1D convolutional layer, an activation layer, a 1D pooling layer, a flattening layer, a fully connected layer, and an output layer connected in sequence.
9. The few-sample fault diagnosis method based on TFCD fusion temporal features according to claim 8, characterized in that, S200 includes: The preprocessed state signal is input into the fault diagnosis model, which uses multiple 1D convolutional layers to extract feature maps of multiple dimensions. The feature maps of multiple dimensions are then activated nonlinearly using activation layers, and then downsampled through 1D pooling layers to obtain pooled multidimensional features. The multidimensional features are then flattened using flattening layers, and finally, the final diagnosis result is obtained through fully connected layers and output layers to determine whether the core components have failed and the type of failure when they have failed.
10. A few-sample fault diagnosis system based on TFCD fusion temporal features, characterized in that, include: The acquisition module is configured to acquire the status signal of the core component from the transmission system in real time at the current time, and preprocess the status signal to obtain a preprocessed status signal; The fault diagnosis module is configured to input the preprocessed state signal into a trained fault diagnosis model, so that the fault diagnosis model can diagnose the core component and output whether the core component has failed and the type of failure when it has failed. The fault diagnosis model is obtained by generating multiple training samples using a trained TFCD model, and then using the training samples to train a preset fault diagnosis model. The TFCD model extracts discriminative temporal features by introducing a Long Short-Term Memory network and embeds them as static conditional vectors into the DDMP model to generate multiple training samples.