Data generation method based on lightweight conditional diffusion model
By combining a lightweight conditional diffusion model with VAE, high-quality fault samples are generated, solving the problem of unbalanced bogie fault data and improving fault diagnosis accuracy and system reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN UNIV OF TECH
- Filing Date
- 2025-07-30
- Publication Date
- 2026-05-19
AI Technical Summary
Insufficient sample size of train bogie faults leads to unbalanced data distribution, affecting the accuracy of fault diagnosis and posing a safety hazard.
A data generation method based on a lightweight conditional diffusion model is adopted, which combines variational autoencoder (VAE) and diffusion model to generate high-quality fault samples through temporal decomposition and reconstruction. The low-dimensional space of VAE is optimized by contrastive loss to reduce computational overhead.
Generate fault data that conforms to the true sample distribution, improve fault diagnosis accuracy, enhance system monitoring reliability, and alleviate data imbalance problems.
Smart Images

Figure CN120873611B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data generation technology, specifically relating to a data generation method based on a lightweight conditional diffusion model. Background Technology
[0002] Fault diagnosis of train bogie systems helps improve train operation safety and extend system lifespan. However, due to the complexity of the train operating environment, the number of bogie fault samples is far less than that of normal samples, resulting in extreme data imbalance, affecting the accuracy of system fault diagnosis, and posing safety hazards. With the development of artificial intelligence (AI) and deep learning, generative AI technology has shown great potential in handling signal imbalance. However, bogie fault data is complex and variable, and traditional techniques struggle to generate data that conforms to the real sample distribution. Therefore, this invention proposes a data generation technique based on a lightweight conditional diffusion model. Leveraging the powerful generation capabilities of diffusion models, this invention combines a conditional diffusion model based on temporal decomposition and reconstruction to generate high-quality fault samples, improving the accuracy of system fault diagnosis. Furthermore, this invention utilizes the powerful feature extraction capabilities of variational autoencoders (VAEs) to map the diffusion process to a low-dimensional space, significantly reducing the computational overhead of the diffusion model and achieving lightweight diffusion. On this basis, this invention also incorporates contrastive loss into the VAE to optimize the low-dimensional space of the VAE and improve the quality of sample generation. Summary of the Invention
[0003] The purpose of this invention is to provide a data generation method based on a lightweight conditional diffusion model, which will contribute to the development of generative AI technology and provide theoretical support and decision-making basis for the development of train bogie fault diagnosis and intelligent operation and maintenance.
[0004] The technical solution adopted in this invention is a data generation method based on a lightweight conditional diffusion model, which is implemented according to the following steps:
[0005] Step 1: Select the set of train bogie fault signals that need data augmentation. ,right Preprocessing is performed to obtain canonical set ;
[0006] Step 2: Divide the canonical set For samples with a fixed window size , The encoder transforms it into a low-dimensional vector. , Converted into reconstructed data by the decoder ;
[0007] Step 3: Sample from Gaussian noise and denoise using a neural network to generate a sample that conforms to Gaussian noise. Data distribution diffusion generation vector ;
[0008] Step 4, Obtain Reconstructed samples , That is The Middle The generation signal of the fault type, thereby realizing the control Effective data generation and sample expansion.
[0009] The invention is further characterized in that,
[0010] Step 1 is implemented in the following steps:
[0011] Step 1.1: Select the set of train bogie fault signals that require data augmentation. ,in Indicates the first A subset of fault signals, Indicates the total number of fault types. Representing feature dimension, Indicates the signal length;
[0012] Step 1.2, given The matrix representation is as follows:
[0013] (1)
[0014] in, express In dimensions The signal sequence on, express In dimensions The first Each sampled signal value, , ;
[0015] Step 1.3, for Preprocessing is performed.
[0016] Step 1.3 is implemented in accordance with the following steps:
[0017] Step 1.3.1, Signal Segmentation: Segmentation for Subsequences, according to the maximizing partitioning function Optimize the set of split points for the target , Indicates the dividing point , The expression is shown in formula (2).
[0018] (2)
[0019] in, Represents the regularization parameter. It is a constant. Represent the empirical covariance, and define the set of subsequences. , Representing a subsequence Given The matrix representation is shown in formula (3).
[0020] (3)
[0021] in, , express The VI signal, for In dimensions The first One data value, , , express The total number of signals;
[0022] Step 1.3.2, Outlier Removal: Remove outliers according to the Three Sigma criterion. For outliers located outside the three sigma interval, extract those unaffected by the outliers. The three sigma interval is defined as follows: , The calculation formula is as follows:
[0023] (4)
[0024] Step 1.3.3, Normalize the data interval: Define a fixed mean Scaling In order to standardize The data range, where express The largest absolute value in the middle Data points, ultimately yielding canonical set .
[0025] Step 2 is implemented in the following steps:
[0026] Step 2.1, obtained from Step 1 canonical set Set a fixed window value ,segmentation for Non-overlapping labeled subsamples , express The first in Subsample, for Corresponding subsample labels;
[0027] Step 2.2, from Randomly selected Each sample constitutes a batch set. Random selection middle Each sample undergoes data transformation, including adding random noise, scaling, and permutation, to obtain positive sample pairs. At the same time, from Randomly select different labels Each sample pair is used as a negative sample pair. ;
[0028] Step 2.3: The variational autoencoder (VAE) is generated by the encoder. With decoder It consists of two parts, for the sample obtained in step 2.2 Data reconstruction is achieved in the variational autoencoder (VAE).
[0029] Step 2.3 is as follows:
[0030] Step 2.3.1, Feature Extraction: Through Extracting from multiple convolutional layers in the middle Feature representation ;
[0031] Step 2.3.2, Low-dimensional feature acquisition: Using a dual fully connected layer, low-dimensional features are acquired. low-dimensional mean With log variance ;
[0032] Step 2.3.3, Reparameterization Sampling: Utilizing reparameterization techniques, sampling is performed from the low-dimensional space of the VAE. Mid-sampling, obtaining low-dimensional vectors , The calculation formula is:
[0033] (5)
[0034] in, It is a random vector sampled from the standard normal distribution. Represents element-wise multiplication. , They represent The mean parameter and the root mean square parameter;
[0035] Step 2.3.4, Feature Decoding and Data Reconstruction: go through Feature decoding is performed using dual fully connected layers, and features are obtained through multiple convolutional layers. Reconstructed data .
[0036] Step 2 also includes the following steps:
[0037] Define the following loss function to optimize VAE performance:
[0038] (1) Reconstruction loss Used to measure reconstructed data Compared with the original sample The differences between them are shown in formula (6):
[0039] (6)
[0040] in, Mean square error, Indicates the input batch size of the VAE;
[0041] (2) KL loss Used for regularizing low-dimensional spaces Make low-dimensional vectors Approximately a standard normal distribution, as shown in formula (7):
[0042] (7)
[0043] (3) Comparison of losses Used to optimize embedding space Make positive samples Close to negative sample pairs Far away, as in formula (8):
[0044] (8)
[0045] in, It is a similarity measurement function;
[0046] Step 3 is implemented in the following steps:
[0047] Step 3.1, obtained from step 2.3 Low-dimensional vector representation ,make ,Towards Noise interference is gradually added, with a total of [number] noise interferences added. Next, conversion for , The calculation formula is as follows:
[0048] (9)
[0049] in, , For user-defined hyperparameters, when hour, ,express Approximate Gaussian distribution;
[0050] Step 3.2: From Gaussian noise samples Sampling and predicting time steps using the UNet denoising network of the diffusion model. Corresponding noise value ;
[0051] Step 3.3: Obtain the time step from Step 3.2. Corresponding noise value ,calculate Gaussian mean :
[0052] (11)
[0053] Step 3.4: Obtain the time step from Step 3.3. Corresponding Gaussian mean Calculate time steps The corresponding data distribution is shown in formula (12):
[0054] (12)
[0055] in, Indicates Gaussian variance;
[0056] Ultimately passing through the UNet network Step-by-step noise prediction yields results that conform to the original sample distribution. Diffusion generates low-dimensional vectors ;
[0057] Step 3.5: Define diffusion loss To optimize low-dimensional vectors and The distance is given by formula (13):
[0058] (13)
[0059] in, , For the true noise of the sample, This represents the prediction noise for the UNet network.
[0060] Step 3.2 is implemented according to the following steps:
[0061] Step 3.2.1, UNet downsampling layer: This is achieved through convolutional layers... Mapping to features , conversion time step and with Category tags Conditional features and To guide feature learning in the UNet network and extract features through multiple residual blocks. low-dimensional features Save using skip connections ;
[0062] Step 3.2.2, UNet decomposition and reconstruction of intermediate layers: Extracting intermediate layers through average pooling layers and max pooling layers respectively. Trend characteristics and peak characteristics As in formula (10):
[0063] (10)
[0064] splicing and Furthermore, a residual self-attention mechanism is introduced to capture local dynamic information, fusing the decomposition and reconstruction results with the self-attention results. ;
[0065] Step 3.2.3, UNet upsampling layer: Saved in the list of jump connections spliced as ,right Perform residual block feature transformation and reduce the number of channels through an upsampling layer;
[0066] Step 3.2.4, UNet output layer: Output after convolutional layer Predicted noise value .
[0067] Step 4 is implemented in the following steps:
[0068] The result obtained from step 3.5 is consistent with Data distribution diffusion generates low-dimensional vectors , obtain of Reconstructed Samples , That is The Middle The generation signal of the fault type, thereby realizing the control Effective data generation and sample expansion.
[0069] The beneficial effects of this invention are that, based on a lightweight conditional diffusion model, the data generation method aims to alleviate the problem of imbalanced data distribution caused by environmental factors. This invention utilizes a conditional diffusion model based on temporal decomposition and reconstruction to generate high-quality fault samples. To reduce the computational overhead of the diffusion model, this invention leverages the powerful feature extraction capabilities of VAEs to map the diffusion process to a low-dimensional space, thereby achieving lightweight diffusion. Furthermore, this invention incorporates contrastive loss into the VAE to optimize the low-dimensional space of the VAE and improve the quality of data generation. Attached Figure Description
[0070] Figure 1 This is a flowchart illustrating the overall process of the data generation technology based on the lightweight conditional diffusion model of this invention.
[0071] Figure 2 This is a framework diagram of the data generation technology based on the lightweight conditional diffusion model of this invention;
[0072] Figure 3 This is a comparison chart of principal component analysis (PCA) of a bogie bearing inner ring fault generated sample and its actual sample, based on the data generation technology of the present invention using a lightweight conditional diffusion model.
[0073] Figure 4 This is a comparison of the t-distribution random neighborhood embedding (TSNE) of a bogie bearing inner race fault generated sample and its real sample, based on the data generation technology of the present invention using a lightweight conditional diffusion model.
[0074] Figure 5 This is an example of the data generation technology based on the lightweight conditional diffusion model of the present invention, which is a kernel probability density overlap map of the generated sample of the inner ring fault of the bogie bearing and its real sample. Detailed Implementation
[0075] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0076] The present invention relates to a data generation method based on a lightweight conditional diffusion model, the flowchart of which is shown below. Figure 1 As shown in the diagram, the framework is as follows: Figure 2 As shown, please follow these steps:
[0077] Step 1: Select the set of train bogie fault signals that need data augmentation. (Including but not limited to bearing inner ring failure, motor short circuit, gearbox tooth root cracks, etc.), for Preprocessing is performed, including signal segmentation, outlier removal, and interval normalization, to obtain... canonical set ;
[0078] Step 1 is implemented in the following steps:
[0079] Step 1.1: Select the set of train bogie fault signals that require data augmentation. ,in Indicates the first Subsets of fault signals, such as bearing inner ring faults, gearbox tooth root cracks, and motor short circuits. Indicates the total number of fault types. Representing feature dimension, Indicates the signal length;
[0080] Step 1.2, given The matrix representation is as follows:
[0081] (1)
[0082] in, express In dimensions The signal sequence on, express In dimensions The first Each sampled signal value, , ;
[0083] Step 1.3, for Preprocessing is performed.
[0084] Step 1.3 is implemented in accordance with the following steps:
[0085] Step 1.3.1, Signal Segmentation: Segmentation for Subsequences, according to the maximizing partitioning function Optimize the set of split points for the target , Indicates the dividing point , The expression is shown in formula (2).
[0086] (2)
[0087] in, Represents the regularization parameter. It is a constant. Represent the empirical covariance, and define the set of subsequences. , Representing a subsequence Given The matrix representation is shown in formula (3).
[0088] (3)
[0089] in, , express The VI signal, for In dimensions The first One data value, , , express The total number of signals;
[0090] Step 1.3.2, Outlier Removal: Remove outliers according to the Three Sigma criterion. For outliers located outside the three sigma interval, extract those unaffected by the outliers. The three sigma interval is defined as follows: , The calculation formula is as follows:
[0091] (4)
[0092] Step 1.3.3, Normalize the data interval: Define a fixed mean Scaling In order to standardize The data range, where express The largest absolute value in the middle Data points, ultimately yielding canonical set .
[0093] Step 2: Divide the canonical set For samples with a fixed window size , The encoder transforms it into a low-dimensional vector. , Converted into reconstructed data by the decoder ;
[0094] Step 2 is implemented in the following steps:
[0095] Step 2.1, obtained from Step 1 canonical set Set a fixed window value ,segmentation for Non-overlapping labeled subsamples , express The first in Subsample, for Corresponding subsample labels;
[0096] Step 2.2, from Randomly selected Each sample constitutes a batch set. Random selection middle Each sample undergoes data transformation, including adding random noise, scaling, and permutation, to obtain positive sample pairs. At the same time, from Randomly select different labels Each sample pair is used as a negative sample pair. ;
[0097] Step 2.3: The variational autoencoder (VAE) is generated by the encoder. With decoder It consists of two parts, for the sample obtained in step 2.2 Data reconstruction is achieved in the variational autoencoder (VAE).
[0098] Step 2.3 is as follows:
[0099] Step 2.3.1, Feature Extraction: Through Extracting from multiple convolutional layers in the middle Feature representation ;
[0100] Step 2.3.2, Low-dimensional feature acquisition: Using a dual fully connected layer, low-dimensional features are acquired. low-dimensional mean With log variance ;
[0101] Step 2.3.3, Reparameterization Sampling: Utilizing reparameterization techniques, sampling is performed from the low-dimensional space of the VAE. Mid-sampling, obtaining low-dimensional vectors , The calculation formula is:
[0102] (5)
[0103] in, It is a random vector sampled from the standard normal distribution. Represents element-wise multiplication. , They represent The mean parameter and the root mean square parameter;
[0104] Step 2.3.4, Feature Decoding and Data Reconstruction: go through Feature decoding is performed using dual fully connected layers, and features are obtained through multiple convolutional layers. Reconstructed data .
[0105] Step 2 also includes the following steps:
[0106] Define the following loss function to optimize VAE performance:
[0107] (1) Reconstruction loss Used to measure reconstructed data Compared with the original sample The differences between them are shown in formula (6):
[0108] (6)
[0109] in, Mean square error, Indicates the input batch size of the VAE;
[0110] (2) KL loss Used for regularizing low-dimensional spaces Make low-dimensional vectors Approximately a standard normal distribution, as shown in formula (7):
[0111] (7)
[0112] (3) Comparison of losses Used to optimize embedding space Make positive samples Close to negative sample pairs Far away, as in formula (8):
[0113] (8)
[0114] in, It is a similarity measurement function;
[0115] Step 3: Sample from Gaussian noise and denoise using a neural network to generate a sample that conforms to Gaussian noise. Data distribution diffusion generation vector ;
[0116] Step 3 is implemented in the following steps:
[0117] Step 3.1, obtained from step 2.3 Low-dimensional vector representation ,make ,Towards Noise interference is gradually added, with a total of [number] noise interferences added. Next, conversion for , The calculation formula is as follows:
[0118] (9)
[0119] in, , For user-defined hyperparameters, when hour, ,express Approximate Gaussian distribution;
[0120] Step 3.2: From Gaussian noise samples Sampling and predicting time steps using the UNet denoising network of the diffusion model. Corresponding noise value ;
[0121] Step 3.3: Obtain the time step from Step 3.2. Corresponding noise value ,calculate Gaussian mean :
[0122] (11)
[0123] Step 3.4: Obtain the time step from Step 3.3. Corresponding Gaussian mean Calculate time steps The corresponding data distribution is shown in formula (12):
[0124] (12)
[0125] in, Indicates Gaussian variance;
[0126] Ultimately passing through the UNet network Step-by-step noise prediction yields results that conform to the original sample distribution. Diffusion generates low-dimensional vectors ;
[0127] Step 3.5: Define diffusion loss To optimize low-dimensional vectors and The distance is given by formula (13):
[0128] (13)
[0129] in, , For the true noise of the sample, This represents the prediction noise for the UNet network.
[0130] Step 3.2 is implemented according to the following steps:
[0131] Step 3.2.1, UNet downsampling layer: This is achieved through convolutional layers... Mapping to features , conversion time step and with Category tags Conditional features and To guide feature learning in the UNet network and extract features through multiple residual blocks. low-dimensional features Save using skip connections ;
[0132] Step 3.2.2, UNet decomposition and reconstruction of intermediate layers: Extracting intermediate layers through average pooling layers and max pooling layers respectively. Trend characteristics and peak characteristics As in formula (10):
[0133] (10)
[0134] splicing and Furthermore, a residual self-attention mechanism is introduced to capture local dynamic information, fusing the decomposition and reconstruction results with the self-attention results. ;
[0135] Step 3.2.3, UNet upsampling layer: Saved in the list of jump connections spliced as ,right Perform residual block feature transformation and reduce the number of channels through an upsampling layer;
[0136] Step 3.2.4, UNet output layer: Output after convolutional layer Predicted noise value .
[0137] Step 4, Obtain Reconstructed samples , That is The Middle The generation signal of the fault type, thereby realizing the control Effective data generation and sample expansion.
[0138] Step 4 is implemented in the following steps:
[0139] The result obtained from step 3.5 is consistent with Data distribution diffusion generates low-dimensional vectors , obtain of Reconstructed Samples , That is The Middle The generation signal of the fault type, thereby realizing the control Effective data generation and sample expansion.
[0140] Example 1
[0141] Due to the complexity of the train operating environment, the number of bogie fault samples is far less than the number of normal samples, resulting in an extreme imbalance in data distribution. This affects the monitoring accuracy of system faults and poses safety hazards. To improve train operation safety and extend the system's service life, it is necessary to adopt effective data generation methods to eliminate this imbalance. The main data generation process is as follows: First, select the set of train bogie fault signals that need data augmentation. (Including but not limited to bearing inner ring failure, motor short circuit, gearbox tooth root cracks, etc.), for Preprocessing is performed, including signal segmentation, outlier removal, and interval normalization, to obtain... canonical set Secondly, division For samples with a fixed window size , The encoder transforms it into a low-dimensional vector. , Converted into reconstructed data by the decoder Then, sample from Gaussian noise. And generate conformance through neural network Data distribution diffusion generation vector Finally, obtain Encoder reconstruction samples , That is The Middle The generation signal of the fault type, thereby realizing the control Effective data generation and sample expansion.
[0142] Example 2
[0143] The present invention relates to a data generation method based on a lightweight conditional diffusion model, the flowchart of which is shown below. Figure 1 As shown, please follow these steps:
[0144] Step 1: Select the set of train bogie fault signals that need data augmentation. (Including but not limited to bearing inner ring failure, motor short circuit, gearbox tooth root cracks, etc.), for Preprocessing is performed, including signal segmentation, outlier removal, and interval normalization, to obtain... canonical set ;
[0145] Step 1 is implemented in the following steps:
[0146] Step 1.1: Select the set of train bogie fault signals that require data augmentation. ,in Indicates the first Subsets of fault signals, such as bearing inner ring faults, gearbox tooth root cracks, and motor short circuits. Indicates the total number of fault types. Representing feature dimension, Indicates the signal length;
[0147] Step 1.2, given The matrix representation is as follows:
[0148] (1)
[0149] in, express In dimensions The signal sequence on, express In dimensions The first Each sampled signal value, , ;
[0150] Step 1.3, for Preprocessing is performed.
[0151] Step 2: Divide the canonical set For samples with a fixed window size , The encoder transforms it into a low-dimensional vector. , Converted into reconstructed data by the decoder ;
[0152] Step 3: Sample from Gaussian noise and denoise using a neural network to generate a sample that conforms to Gaussian noise. Data distribution diffusion generation vector ;
[0153] Step 4, Obtain Reconstructed samples , That is The Middle The generation signal of the fault type, thereby realizing the control Effective data generation and sample expansion.
[0154] Example 3
[0155] The present invention relates to a data generation method based on a lightweight conditional diffusion model, the flowchart of which is shown below. Figure 1 As shown, please follow these steps:
[0156] Step 1: Select the set of train bogie fault signals that need data augmentation. (Including but not limited to bearing inner ring failure, motor short circuit, gearbox tooth root cracks, etc.), for Preprocessing is performed, including signal segmentation, outlier removal, and interval normalization, to obtain... canonical set ;
[0157] Step 1 is implemented in the following steps:
[0158] Step 1.1: Select the set of train bogie fault signals that require data augmentation. ,in Indicates the first Subsets of fault signals, such as bearing inner ring faults, gearbox tooth root cracks, and motor short circuits. Indicates the total number of fault types. Representing feature dimension, Indicates the signal length;
[0159] Step 1.2, given The matrix representation is as follows:
[0160] (1)
[0161] in, express In dimensions The signal sequence on, express In dimensions The first Each sampled signal value, , ;
[0162] Step 1.3, for Preprocessing is performed.
[0163] Step 1.3 is implemented in accordance with the following steps:
[0164] Step 1.3.1, Signal Segmentation: Segmentation for Subsequences, according to the maximizing partitioning function Optimize the set of split points for the target , Indicates the dividing point , The expression is shown in formula (2).
[0165] (2)
[0166] in, Represents the regularization parameter. It is a constant. The empirical covariance defines the set of subsequences. , Representing a subsequence Given The matrix representation is shown in formula (3).
[0167] (3)
[0168] in, , express The VI signal, for In dimensions The first One data value, , , express The total number of signals;
[0169] Step 1.3.2, Outlier Removal: Remove outliers according to the Three Sigma criterion. For outliers located outside the three sigma interval, extract those unaffected by the outliers. The three sigma interval is defined as follows: , The calculation formula is as follows:
[0170] (4)
[0171] Step 1.3.3, Normalize the data interval: Define a fixed mean Scaling In order to standardize The data range, where express The largest absolute value in the middle Data points, ultimately yielding canonical set .
[0172] Step 2: Divide the canonical set For samples with a fixed window size , The encoder transforms it into a low-dimensional vector. , Converted into reconstructed data by the decoder ;
[0173] Step 3: Sample from Gaussian noise and denoise using a neural network to generate a sample that conforms to Gaussian noise. Data distribution diffusion generation vector ;
[0174] Step 4, Obtain Reconstructed samples , That is The Middle The generation signal of the fault type, thereby realizing the control Effective data generation and sample expansion.
[0175] Example 4
[0176] The present invention relates to a data generation method based on a lightweight conditional diffusion model, the flowchart of which is shown below. Figure 1 As shown, please follow these steps:
[0177] Step 1: Select the set of train bogie fault signals that need data augmentation. (Including but not limited to bearing inner ring failure, motor short circuit, gearbox tooth root cracks, etc.), for Preprocessing is performed, including signal segmentation, outlier removal, and interval normalization, to obtain... canonical set ;
[0178] Step 1 is implemented in the following steps:
[0179] Step 1.1: Select the set of train bogie fault signals that require data augmentation. ,in Indicates the first Subsets of fault signals, such as bearing inner ring faults, gearbox tooth root cracks, and motor short circuits. Indicates the total number of fault types. Representing feature dimension, Indicates the signal length;
[0180] Step 1.2, given The matrix representation is as follows:
[0181] (1)
[0182] in, express In dimensions The signal sequence on, express In dimensions The first Each sampled signal value, , ;
[0183] Step 1.3, for Preprocessing is performed.
[0184] Step 1.3 is implemented in accordance with the following steps:
[0185] Step 1.3.1, Signal Segmentation: Segmentation for Subsequences, according to the maximizing partitioning function Optimize the set of split points for the target , Indicates the dividing point , The expression is shown in formula (2).
[0186] (2)
[0187] in, Represents the regularization parameter. It is a constant. Represent the empirical covariance, and define the set of subsequences. , Representing a subsequence Given The matrix representation is shown in formula (3).
[0188] (3)
[0189] in, , express The VI signal, for In dimensions The first One data value, , , express The total number of signals;
[0190] Step 1.3.2, Outlier Removal: Remove outliers according to the Three Sigma criterion. For outliers located outside the three sigma interval, extract those unaffected by the outliers. The three sigma interval is defined as follows: , The calculation formula is as follows:
[0191] (4)
[0192] Step 1.3.3, Normalize the data interval: Define a fixed mean Scaling In order to standardize The data range, where express The largest absolute value in the middle Data points, ultimately yielding canonical set .
[0193] Step 2: Divide the canonical set For samples with a fixed window size , The encoder transforms it into a low-dimensional vector. , Converted into reconstructed data by the decoder ;
[0194] Step 2 is implemented in the following steps:
[0195] Step 2.1, obtained from Step 1 canonical set Set a fixed window value ,segmentation for Non-overlapping labeled subsamples , express The first in Subsample, for Corresponding subsample labels;
[0196] Step 2.2, from Randomly selected Each sample constitutes a batch set. Random selection middle Each sample undergoes data transformation, including adding random noise, scaling, and permutation, to obtain positive sample pairs. At the same time, from Randomly select different labels Each sample pair is used as a negative sample pair. ;
[0197] Step 2.3: The variational autoencoder (VAE) is generated by the encoder. With decoder It consists of two parts, for the sample obtained in step 2.2 Data reconstruction is achieved in the variational autoencoder (VAE).
[0198] Step 2.3 is as follows:
[0199] Step 2.3.1, Feature Extraction: Through Extracting from multiple convolutional layers in the middle Feature representation ;
[0200] Step 2.3.2, Low-dimensional feature acquisition: Using a dual fully connected layer, low-dimensional features are acquired. low-dimensional mean With log variance ;
[0201] Step 2.3.3, Reparameterization Sampling: Utilizing reparameterization techniques, sampling is performed from the low-dimensional space of the VAE. Mid-sampling, obtaining low-dimensional vectors , The calculation formula is:
[0202] (5)
[0203] in, It is a random vector sampled from the standard normal distribution. Represents element-wise multiplication. , They represent The mean parameter and the root mean square parameter;
[0204] Step 2.3.4, Feature Decoding and Data Reconstruction: go through Feature decoding is performed using dual fully connected layers, and features are obtained through multiple convolutional layers. Reconstructed data .
[0205] Step 3: Sample from Gaussian noise and denoise using a neural network to generate a sample that conforms to Gaussian noise. Data distribution diffusion generation vector ;
[0206] Step 4, Obtain Reconstructed samples , That is The Middle The generation signal of the fault type, thereby realizing the control Effective data generation and sample expansion.
[0207] Example 5
[0208] The present invention relates to a data generation method based on a lightweight conditional diffusion model, the flowchart of which is shown below. Figure 1 As shown, please follow these steps:
[0209] Step 1: Select the set of train bogie fault signals that need data augmentation. (Including but not limited to bearing inner ring failure, motor short circuit, gearbox tooth root cracks, etc.), for Preprocessing is performed, including signal segmentation, outlier removal, and interval normalization, to obtain... canonical set ;
[0210] Step 1 is implemented in the following steps:
[0211] Step 1.1: Select the set of train bogie fault signals that require data augmentation. ,in Indicates the first Subsets of fault signals, such as bearing inner ring faults, gearbox tooth root cracks, and motor short circuits. Indicates the total number of fault types. Representing feature dimension, Indicates the signal length;
[0212] Step 1.2, given The matrix representation is as follows:
[0213] (1)
[0214] in, express In dimensions The signal sequence on, express In dimensions The first Each sampled signal value, , ;
[0215] Step 1.3, for Preprocessing is performed.
[0216] Step 1.3 is implemented in accordance with the following steps:
[0217] Step 1.3.1, Signal Segmentation: Segmentation for Subsequences, according to the maximizing partitioning function Optimize the set of split points for the target , Indicates the dividing point , The expression is shown in formula (2).
[0218] (2)
[0219] in, Represents the regularization parameter. It is a constant. Represent the empirical covariance, and define the set of subsequences. , Representing a subsequence Given The matrix representation is shown in formula (3).
[0220] (3)
[0221] in, , express The VI signal, for In dimensions The first One data value, , , express The total number of signals;
[0222] Step 1.3.2, Outlier Removal: Remove outliers according to the Three Sigma criterion. For outliers located outside the three sigma interval, extract those unaffected by the outliers. The three sigma interval is defined as follows: , The calculation formula is as follows:
[0223] (4)
[0224] Step 1.3.3, Normalize the data interval: Define a fixed mean Scaling In order to standardize The data range, where express The largest absolute value in the middle Data points, ultimately yielding canonical set .
[0225] Step 2: Divide the canonical set For samples with a fixed window size , The encoder transforms it into a low-dimensional vector. , Converted into reconstructed data by the decoder ;
[0226] Step 2 is implemented in the following steps:
[0227] Step 2.1, obtained from Step 1 canonical set Set a fixed window value ,segmentation for Non-overlapping labeled subsamples , express The first in Subsample, for Corresponding subsample labels;
[0228] Step 2.2, from Randomly selected Each sample constitutes a batch set. Random selection middle Each sample undergoes data transformation, including adding random noise, scaling, and permutation, to obtain positive sample pairs. At the same time, from Randomly select different labels Each sample pair is used as a negative sample pair. ;
[0229] Step 2.3: The variational autoencoder (VAE) is generated by the encoder. With decoder It consists of two parts, for the sample obtained in step 2.2 Data reconstruction is achieved in the variational autoencoder (VAE).
[0230] Step 2.3 is as follows:
[0231] Step 2.3.1, Feature Extraction: Through Extracting from multiple convolutional layers in the middle Feature representation ;
[0232] Step 2.3.2, Low-dimensional feature acquisition: Using a dual fully connected layer, low-dimensional features are acquired. low-dimensional mean With log variance ;
[0233] Step 2.3.3, Reparameterization Sampling: Utilizing reparameterization techniques, sampling is performed from the low-dimensional space of the VAE. Mid-sampling, obtaining low-dimensional vectors , The calculation formula is:
[0234] (5)
[0235] in, It is a random vector sampled from the standard normal distribution. Represents element-wise multiplication. , They represent The mean parameter and the root mean square parameter;
[0236] Step 2.3.4, Feature Decoding and Data Reconstruction: go through Feature decoding is performed using dual fully connected layers, and features are obtained through multiple convolutional layers. Reconstructed data .
[0237] Step 2 also includes the following steps:
[0238] Define the following loss function to optimize VAE performance:
[0239] (1) Reconstruction loss Used to measure reconstructed data Compared with the original sample The differences between them are shown in formula (6):
[0240] (6)
[0241] in, Mean square error, Indicates the input batch size of the VAE;
[0242] (2) KL loss Used for regularizing low-dimensional spaces Make low-dimensional vectors Approximately a standard normal distribution, as shown in formula (7):
[0243] (7)
[0244] (3) Comparison of losses Used to optimize embedding space Make positive samples Close to negative sample pairs Far away, as in formula (8):
[0245] (8)
[0246] in, It is a similarity measurement function;
[0247] Step 3: Sample from Gaussian noise and denoise using a neural network to generate a sample that conforms to Gaussian noise. Data distribution diffusion generation vector ;
[0248] Step 4, Obtain Reconstructed samples , That is The Middle The generation signal of the fault type, thereby realizing the control Effective data generation and sample expansion.
[0249] Example 6
[0250] like Figure 3 , Figure 4 As shown, the fault samples generated using the method of this invention are highly similar to the real samples in terms of dimensionality reduction feature distribution. Meanwhile, as... Figure 5 As shown, the kernel probability density distributions of the fault samples generated by this invention and the real samples exhibit significant overlap. When using deep learning for tasks such as train fault monitoring and system reliability analysis, combining it with the signal generation method proposed in this invention can effectively solve the problem of scarce fault samples, thereby improving the accuracy of fault identification and enhancing the reliability of the monitoring system.
[0251] To verify the feasibility of this invention, it is further described in conjunction with the embodiments and accompanying drawings. The data selected in this study is the BJTU-RAO bogie dataset, which was obtained through a fault simulation experiment of the metro train bogie transmission system and contains multi-sensor data for 51 health states. This invention focuses on bearing inner ring faults. Gearbox tooth root crack fault and motor short circuit fault As an example, the effectiveness of this invention is explained. .
[0252] First of all, Perform data preprocessing according to the maximization partitioning function. Optimize the split points for the target and eliminate... Identify outlier points and calculate a fixed mean. To standardize The numerical range, thereby obtaining canonical set . segmentation Non-overlapping labeled subsamples Window value set to ,from Randomly selected Each sample constitutes a batch set. Random selection of Perform data transformations (including adding random noise, scaling, and permutation) on each sample to obtain positive sample pairs. At the same time, from Randomly select different labels Each sample pair is used as a negative sample pair. Sample generation for bearing inner ring faults. Its original sample Visualize, such as Figure 3 , Figure 4 As shown, and The dimensionality reduction visualizations of PCA and TSNE show a high degree of similarity. and Overlap analysis of kernel probability densities, such as Figure 5 As shown, the results indicate that and The overlap of the kernel probability density is as high as This indicates that the present invention can generate data that conforms to the original fault signal distribution, providing an innovative and effective solution for generative AI technology, which helps to improve the accuracy of train fault identification and enhance the reliability of bogie monitoring systems.
Claims
1. A data generation method based on a lightweight conditional diffusion model, characterized in that, The specific steps are as follows: Step 1: Select the set of train bogie fault signals that need data augmentation. Train bogie fault signal set Including bearing inner ring faults, motor short circuits, and gearbox tooth root cracks, the data selected for this study is the BJTU-RAO bogie dataset. Preprocessing is performed to obtain canonical set ; Step 2: Divide the canonical set For samples with a fixed window size , The encoder transforms it into a low-dimensional vector. , Converted into reconstructed data by the decoder ; Step 2 is implemented in the following steps: Step 2.1, obtained from Step 1 canonical set Set a fixed window value ,segmentation for Non-overlapping labeled subsamples , express The first in Subsample, for Corresponding subsample labels; Step 2.2, from Randomly selected Each sample constitutes a batch set. Random selection middle Each sample undergoes data transformation, including adding random noise, scaling, and permutation, to obtain positive sample pairs. At the same time, from Randomly select different labels Each sample pair is used as a negative sample pair. ; Step 2.3: The variational autoencoder (VAE) is generated by the encoder. With decoder It consists of two parts, for the sample obtained in step 2.2 Data reconstruction is achieved in a variational autoencoder (VAE). Step 3: Sample from Gaussian noise and denoise using a neural network to generate a sample that conforms to Gaussian noise. Data distribution diffusion generation vector ; Step 3 is implemented in the following steps: Step 3.1, obtained from step 2.3 Low-dimensional vector representation ,make ,Towards Noise interference is gradually added, with a total of [number] noise interferences added. Next, conversion for , The calculation formula is as follows: (9) in, , For user-defined hyperparameters, when hour, ,express Approximate Gaussian distribution; Step 3.2: From Gaussian noise samples Sampling and predicting time steps using the UNet denoising network of the diffusion model. Corresponding noise value ; Step 3.2 is implemented in the following steps: Step 3.2.1, UNet downsampling layer: This is achieved through convolutional layers... Mapping to features , conversion time step and with Category tags Conditional features and To guide feature learning in the UNet network and extract features through multiple residual blocks. low-dimensional features Save using skip connections ; Step 3.2.2, UNet decomposition and reconstruction of intermediate layers: Extracting intermediate layers through average pooling layers and max pooling layers respectively. Trend characteristics and peak characteristics As in formula (10): (10) splicing and Furthermore, a residual self-attention mechanism is introduced to capture local dynamic information, fusing the decomposition and reconstruction results with the self-attention results. ; Step 3.2.3, UNet upsampling layer: Saved in the list of jump connections spliced as ,right Perform residual block feature transformation and reduce the number of channels through an upsampling layer; Step 3.2.4, UNet output layer: Output after convolutional layer Predicted noise value ; Step 3.3: Obtain the time step from Step 3.
2. Corresponding noise value ,calculate Gaussian mean : (11) Step 3.4: Obtain the time step from Step 3.
3. Corresponding Gaussian mean Calculate time steps The corresponding data distribution is shown in formula (12): (12) in, Indicates Gaussian variance; Ultimately passing through the UNet network Step-by-step noise prediction yields results that conform to the original sample distribution. Diffusion generates low-dimensional vectors ; Step 3.5: Define diffusion loss To optimize low-dimensional vectors and The distance is given by formula (13): (13) in, , For the true noise of the sample, For the prediction noise of the UNet network; Step 4, Obtain Reconstructed samples , That is The Middle The generation signal of the fault type, thereby realizing the control Effective data generation and sample expansion.
2. The data generation method based on the lightweight conditional diffusion model according to claim 1, characterized in that, Step 1 is implemented in the following steps: Step 1.1: Select the set of train bogie fault signals that require data augmentation. ,in Indicates the first A subset of fault signals, Indicates the total number of fault types. Representing feature dimension, Indicates the signal length; Step 1.2, given The matrix representation is as follows: (1) in, express In dimensions The signal sequence on, express In dimensions The first Each sampled signal value, , ; Step 1.3, for Preprocessing is performed.
3. The data generation method based on the lightweight conditional diffusion model according to claim 2, characterized in that, Step 1.3 is implemented in the following steps: Step 1.3.1, Signal Segmentation: Segmentation for Subsequences, according to the maximizing partitioning function Optimize the set of split points for the target , Indicates the dividing point , The expression is as shown in formula (2): (2) in, Represents the regularization parameter. It is a constant. Represent the empirical covariance, and define the set of subsequences. , Representing a subsequence Given The matrix representation is shown in formula (3): (3) in, , express The VI signal, for In dimensions The first One data value, , , express The total number of signals; Step 1.3.2, Outlier Removal: Remove outliers according to the Three Sigma criterion. For outliers located outside the three sigma interval, the three sigma interval is defined as the interval without the influence of outliers. , The calculation formula is as follows: (4) Step 1.3.3, Normalize the data interval: Define a fixed mean Scaling In order to standardize The data range, where express The largest absolute value in the middle Data points, ultimately yielding canonical set .
4. The data generation method based on the lightweight conditional diffusion model according to claim 3, characterized in that, Step 2.3 is as follows: Step 2.3.1, Feature Extraction: Through Extracting from multiple convolutional layers in the middle Feature representation ; Step 2.3.2, Low-dimensional feature acquisition: Using a dual fully connected layer, low-dimensional features are acquired. low-dimensional mean With log variance ; Step 2.3.3, Reparameterization Sampling: Utilizing reparameterization techniques, sampling is performed from the low-dimensional space of the VAE. Mid-sampling, obtaining low-dimensional vectors , The calculation formula is: (5) in, It is a random vector sampled from the standard normal distribution. Represents element-wise multiplication. , They represent The mean parameter and the root mean square parameter; Step 2.3.4, Feature Decoding and Data Reconstruction: go through Feature decoding is performed using dual fully connected layers, and features are obtained through multiple convolutional layers. Reconstructed data .
5. The data generation method based on the lightweight conditional diffusion model according to claim 4, characterized in that, Step 2 also includes the following steps: Define the following loss function to optimize VAE performance: (1) Reconstruction loss Used to measure reconstructed data Compared with the original sample The differences between them are shown in formula (6): (6) in, Mean square error, Indicates the input batch size of the VAE; (2) KL loss Used for regularizing low-dimensional spaces Make low-dimensional vectors Approximately a standard normal distribution, as shown in formula (7): (7) (3) Comparison of losses Used to optimize embedding space Make positive samples Close to negative sample pairs Far away, as in formula (8): (8) in, This is a similarity measurement function.
6. The data generation method based on the lightweight conditional diffusion model according to claim 5, characterized in that, Step 4 is implemented in the following steps: The result obtained from step 3.5 is consistent with Data distribution diffusion generates low-dimensional vectors , obtain of Reconstructed Samples , That is The Middle The generation signal of the fault type, thereby realizing the control Effective data generation and sample expansion.