A fault diagnosis method and device based on a two-step guided sample generation strategy
Patent Information
- Application Number
- CN202610419911.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-01
- Publication Date
- 2026-08-18
AI Technical Summary
因此,调压阀故障样本的表现形式受到故障模式、马赫数的交联耦合影响,这种交联耦合影响给故障样本生成带来了一定难度,且故障样本的分布受到故障类别与工况的交联耦合影响,一般的生成模型难以对这种交联耦合影响进行准确的建模,从而导致生成样本质量不高
Smart Images

Figure CN122595067A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of fault diagnosis technology, and in particular to a fault diagnosis method based on a two-step guided sample generation strategy. Background Technology
[0002] Wind tunnel pressure regulating valves are high-reliability devices. During long-term operation, they mostly operate in normal conditions and rarely fail. Therefore, there are many normal samples and few fault samples, resulting in a sample imbalance. This scarcity of fault samples hinders accurate diagnosis of pressure regulating valve faults. Furthermore, pressure regulating valves are primarily subjected to impact and cyclic loads from flowing air during wind tunnel operation. The magnitude of the load on the valve is characterized by the air velocity, i.e., the Mach number. Even within the same fault mode, fault samples at different Mach numbers exhibit certain differences. Therefore, the manifestation of pressure regulating valve fault samples is influenced by the cross-coupling of fault mode and Mach number. This cross-coupling makes fault sample generation challenging, and the distribution of fault samples is also affected by the cross-coupling of fault category and operating condition. General generation models struggle to accurately model this cross-coupling effect, leading to low-quality generated samples.
[0003] Variational autoencoders (VAEs), as probabilistic generative models, possess strong distribution learning and sample generation capabilities. However, traditional VAEs can only handle the generation of one type of data, making them unsuitable for complex scenarios with multiple failure modes and operating conditions. They also cannot meet the need for expanding fault samples in high-reliability equipment under imbalanced conditions, thus failing to effectively improve the accuracy of fault diagnosis. Therefore, an effective method is urgently needed to address these issues. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a fault diagnosis method based on a two-step guided sample generation strategy. One or more embodiments of this specification also relate to a fault diagnosis apparatus, a computing device, a computer-readable storage medium, and a computer program based on a two-step guided sample generation strategy, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, a fault diagnosis method based on a two-step guided sample generation strategy is provided, comprising: Vibration sample data of the wind tunnel pressure regulating valve under different fault modes are obtained, and a fault mode label and a Mach number label are added to each vibration sample data. The fault modes include normal, secondary seal leakage, valve stem wear, and valve disc jamming. When the amount of data of the target vibration sample data under the target fault mode is insufficient, a VAE-TSGS sample generation model is built, wherein the VAE-TSGS sample generation model includes an encoder network and a decoder network. The target vibration sample data and the fault mode label of the target vibration sample data are input into the encoder network for processing to generate latent variables related to the target fault mode. Random noise is sampled from the true distribution of the latent variables, and the random noise and the Mach number label of the target vibration sample data are input into the decoder network for processing to generate reconstructed sample data of the target fault mode. A fault diagnosis model is built, and the vibration sample data and the reconstructed sample data are input into the fault diagnosis model for training. The fault diagnosis model is used to diagnose the faults in the wind tunnel pressure regulating valve.
[0006] Optionally, acquiring vibration sample data of the wind tunnel pressure regulating valve under different fault modes includes: For different failure modes, vibration sample data of the wind tunnel pressure regulating valve at different Mach numbers were collected.
[0007] Optionally, the construction of the VAE-TSGS sample generation model includes: A VAE-TSGS sample generation model to be trained is constructed, wherein the VAE-TSGS sample generation model to be trained includes an encoder network to be trained and a decoder network to be trained. The vibration sample data and the fault mode labels are input into the encoder network to be trained for encoding processing to generate initial latent variables related to the fault mode labels, as shown in the following formula: in, They represent the initial hidden variables respectively. The mean and standard deviation of the normal distribution are determined by the encoder. Vibration sample data and failure mode labels Process and generate; It is a standard normally distributed random vector; This represents element-wise multiplication; The initial latent variables and the Mach number labels are input into the decoder network to be trained for decoding processing to generate reconstructed data similar to the vibration sample data; The loss value is calculated based on the vibration sample data and the reconstructed data, and the model parameters of the VAE-TSGS sample generation model to be trained are iteratively optimized based on the loss value to generate the trained VAE-TSGS sample generation model.
[0008] Optionally, the loss function of the VAE-TSGS sample generation model to be trained is as follows: in, For the reconstruction loss term of the model, The KL divergence loss term for the model is shown in the following equation: Where x represents the vibration sample data, To reconstruct the data; the distribution of the latent variables generated by the encoder is as follows: The true distribution of the latent variables is .
[0009] Optionally, after generating the reconstructed sample data of the target failure mode, the method further includes: The vibration sample data and the reconstructed sample data are reduced to a two-dimensional space by using the t-distributed random neighborhood embedding algorithm. Based on the spatial coordinates of the vibration sample data and the reconstructed sample data in the two-dimensional space, calculate the Euclidean distance similarity and the maximum mean difference between the vibration sample data and the reconstructed sample data; Based on the calculation results of the Euclidean distance similarity and the maximum mean difference, a consistency evaluation result is generated between the vibration sample data and the reconstructed sample data.
[0010] Optionally, the Euclidean distance similarity between the vibration sample data and the reconstructed sample data is calculated using the following expression: Where EUD represents the mean Euclidean distance, and EUS represents the Euclidean distance similarity; Represents vibration sample data. This represents the reconstructed sample data; n is the total number of vibration sample data, m is the total number of reconstructed sample data; d represents the feature dimension of the vibration sample data and the reconstructed sample data; This represents the feature value of the i-th vibration sample data in the p-th dimension; Let represent the feature value of the j-th reconstructed sample data in the p-th dimension.
[0011] Optionally, after generating the reconstructed sample data of the target failure mode, the method further includes: The similarity evaluation result between the vibration sample data and the reconstructed sample data is determined by the following expression: in, , , Represents the number of combinations. Represents the kernel function; , For any two distinct vibration sample data; , For any two distinct reconstructed sample data.
[0012] According to a second aspect of the embodiments of this specification, a fault diagnosis device based on a two-step guided sample generation strategy is provided, comprising: The acquisition module is configured to acquire vibration sample data of the wind tunnel pressure regulating valve under different fault modes, and add a fault mode label and a Mach number label to each vibration sample data. The fault modes include normal, secondary seal leakage, valve stem wear, and valve disc jamming. The module is configured to build a VAE-TSGS sample generation model when the amount of data of the target vibration sample data under the determined target fault mode does not meet the conditions. The VAE-TSGS sample generation model includes an encoder network and a decoder network. The generation module is configured to input the target vibration sample data and the fault mode label of the target vibration sample data into the encoder network for processing, and generate latent variables related to the target fault mode. The sampling module is configured to sample random noise from the true distribution of the latent variables, and input the random noise and the Mach number label of the target vibration sample data into the decoder network for processing to generate reconstructed sample data of the target fault mode. The training module is configured to build a fault diagnosis model and input the vibration sample data and the reconstructed sample data into the fault diagnosis model for training. The fault diagnosis model is used to diagnose faults in the wind tunnel pressure regulating valve.
[0013] According to a third aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement any of the steps of the fault diagnosis method based on the two-step guided sample generation strategy.
[0014] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of any of the fault diagnosis methods based on a two-step guided sample generation strategy described above.
[0015] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the fault diagnosis method based on the two-step guided sample generation strategy described above.
[0016] This specification describes an embodiment that acquires vibration sample data of a wind tunnel pressure regulating valve under different fault modes, and adds a fault mode label and a Mach number label to each vibration sample data. The fault modes include normal, secondary seal leakage, valve stem wear, and valve disc jamming. When the amount of target vibration sample data under a determined fault mode is insufficient, a VAE-TSGS sample generation model is constructed. This model includes an encoder network and a decoder network. The target vibration sample data and its fault mode labels are input into the encoder network for processing to generate latent variables related to the target fault mode. Random noise is sampled from the true distribution of the latent variables, and this random noise, along with the Mach number label of the target vibration sample data, is input into the decoder network for processing to generate reconstructed sample data of the target fault mode. A fault diagnosis model is then constructed, and the vibration sample data and reconstructed sample data are input into the fault diagnosis model for training. This fault diagnosis model is used to diagnose faults in the wind tunnel pressure regulating valve. The above methods help the model learn the individual effects of fault categories and operating conditions on fault samples, thereby achieving high-quality generation of fault samples under different fault modes and operating conditions. In addition, this processing method can decouple fault mode and operating condition information, generate high-quality fault samples, and thus enhance the fault diagnosis performance under unbalanced conditions. It can meet the need for expanding the fault samples of high-reliability equipment under unbalanced conditions, which is conducive to improving the accuracy of fault diagnosis. Attached Figure Description
[0017] Figure 1 This is a flowchart of a fault diagnosis method based on a two-step guided sample generation strategy provided in one embodiment of this specification; Figure 2 This is a flowchart illustrating the processing procedure of a fault diagnosis method based on a two-step guided sample generation strategy, as provided in one embodiment of this specification. Figure 3 This is a generated sample spectrum diagram under fault mode F1 and Mach number 0.5 provided in one embodiment of this specification; Figure 4This is a generated sample spectrum diagram under fault mode F1 and Mach number 0.9 provided in one embodiment of this specification; Figure 5 This is a generated sample spectrum diagram under fault mode F1 and Mach number 1.5 provided in one embodiment of this specification; Figure 6 This is a generated sample spectrum diagram under fault mode F1 and Mach number 4.0 provided in one embodiment of this specification; Figure 7 This is a generated sample spectrum diagram under fault mode F2 and Mach number 0.5 provided in one embodiment of this specification; Figure 8 This is a generated sample spectrum diagram under fault mode F2 and Mach number 0.9 provided in one embodiment of this specification; Figure 9 This is a generated sample spectrum diagram under fault mode F2 and Mach number 1.5 provided in one embodiment of this specification; Figure 10 This is a generated sample spectrum diagram under fault mode F2 and Mach number 4.0 provided in one embodiment of this specification; Figure 11 This is a generated sample spectrum diagram under fault mode F3 and Mach number 1.74 provided in one embodiment of this specification; Figure 12 This is a dimensionality reduction visualization of the generated sample provided in one embodiment of this specification; Figure 13 This is a comparative test diagnostic result diagram provided in one embodiment of this specification; Figure 14 This is a schematic diagram of the structure of a fault diagnosis device based on a two-step guided sample generation strategy provided in one embodiment of this specification; Figure 15 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0018] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0019] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0020] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0021] This specification presents a fault diagnosis method based on a two-step guided sample generation strategy, addressing the fault diagnosis problem of pressure regulating valves under unbalanced conditions. Utilizing the powerful data distribution learning capability of variational autoencoders, a fault sample augmentation generation model under unbalanced conditions (VAE-TSGS sample generation model) is constructed with the assistance of a two-step guided strategy. During the training process of the generation model, the two-step guided strategy decouples category and operating condition information. Sample features are obtained by sampling in the feature space, and a decoder decodes these features into fault samples. Finally, existing samples and generated samples are used to enhance fault diagnosis.
[0022] This specification provides a fault diagnosis method based on a two-step guided sample generation strategy. It also relates to a fault diagnosis device based on the two-step guided sample generation strategy, a computing device, a computer-readable storage medium, and a computer program, which will be described in detail in the following embodiments.
[0023] Figure 1 A flowchart of a fault diagnosis method based on a two-step guided sample generation strategy according to an embodiment of this specification is shown, which specifically includes the following steps.
[0024] Step 102: Obtain vibration sample data of the wind tunnel pressure regulating valve under different fault modes, and add a fault mode label and a Mach number label to each vibration sample data. The fault modes include normal, secondary seal leakage, valve stem wear, and valve disc jamming.
[0025] In one optional implementation, acquiring vibration sample data of the wind tunnel pressure regulating valve under different failure modes includes: For different failure modes, vibration sample data of the wind tunnel pressure regulating valve at different Mach numbers were collected.
[0026] Specifically, vibration data of the wind tunnel pressure regulating valve under different fault modes were collected, and the middle 50% of the stable data was used as the vibration sample data. The collected fault modes included normal, secondary seal leakage, valve stem wear, and valve disc jamming. Vibration data at several Mach numbers were collected under each fault mode. Then, the vibration sample data was slide-divided into original samples of length 1024, and each sample x was labeled with two dimensions: the fault mode label and the fault mode label. Mach number labels .
[0027] After adding labels to the vibration sample data, the true imbalance state of the sample data can be preserved, that is, the number of normal samples is much greater than the number of faulty samples, so as to construct an imbalance generation task, and then start the execution process of subsequent steps based on this task.
[0028] Step 104: If the amount of data of the target vibration sample data under the target fault mode does not meet the conditions, build a VAE-TSGS sample generation model, wherein the VAE-TSGS sample generation model includes an encoder network and a decoder network.
[0029] In one optional implementation, the construction of the VAE-TSGS sample generation model includes: A VAE-TSGS sample generation model to be trained is constructed, wherein the VAE-TSGS sample generation model to be trained includes an encoder network to be trained and a decoder network to be trained. The vibration sample data and the fault mode labels are input into the encoder network to be trained for encoding processing to generate initial latent variables related to the fault mode labels, as shown in the following formula: in, They represent the initial hidden variables respectively. The mean and standard deviation of the normal distribution are determined by the encoder. Vibration sample data and failure mode labels Process and generate; It is a standard normally distributed random vector; This represents element-wise multiplication; The initial latent variables and the Mach number labels are input into the decoder network to be trained for decoding processing to generate reconstructed data similar to the vibration sample data; The loss value is calculated based on the vibration sample data and the reconstructed data, and the model parameters of the VAE-TSGS sample generation model to be trained are iteratively optimized based on the loss value to generate the trained VAE-TSGS sample generation model.
[0030] Furthermore, the loss function of the VAE-TSGS sample generation model to be trained is as follows: in, For the reconstruction loss term of the model, The KL divergence loss term for the model is shown in the following equation: Where x represents the vibration sample data, To reconstruct the data; the distribution of the latent variables generated by the encoder is as follows: The true distribution of the latent variables is .
[0031] Specifically, the VAE-TSGS sample generation model is a variational autoencoder based on a two-step guided generation strategy (VAE-TSGS).
[0032] The constructed VAE-TSGS sample generation model to be trained includes an encoder network to be trained and a decoder network to be trained; wherein, the encoder network to be trained... Composed of convolutional layers, fully connected layers, batch normalization layers, and the LeakyReLU activation function, the encoder network's Layer 1 is responsible for converting fault mode labels into embedding vectors, which are then input into the next layer along with the vibration sample data. Layers 2 to 12 are responsible for extracting categorical features from the vibration sample data. Layers 13 and 14 are responsible for generating the mean vector and standard deviation vector, respectively. The mean vector and standard deviation vector are transformed into sample feature values, i.e., latent variables, through a reparameterization operation.
[0033] Decoder network to be trained Composed of deconvolutional layers, fully connected layers, and the LeakyReLU activation function, this decoder network's Layer 1 is responsible for converting Mach number labels into embedding vectors and inputting them into the next layer along with sample feature values; Layer 2 is responsible for normalizing the shape of the input data; Layers 3 to 13 are responsible for gradually restoring the sample feature values to the original samples (vibration sample data); and Layer 14 is responsible for outputting the final reconstructed sample data.
[0034] Based on this, after building the VAE-TSGS sample generation model to be trained, the vibration sample data is first... With Fault Mode Label The input is processed into the encoder network to be trained, using fault mode labels. The first step of guidance enables the encoder network to generate initial latent variables related to the fault modes. As shown in the following formula: in, They represent the initial hidden variables respectively. The mean and standard deviation of the normal distribution are determined by the encoder. Vibration sample data and failure mode labels Process and generate; It is a standard normally distributed random vector; This indicates element-wise multiplication.
[0035] Then the initial hidden variables With Mach number label Input to the decoder network to be trained Decoding is performed in the process, using Mach number tags. The second step involves guiding the decoder network to generate vibration sample data. Similar reconstructed data As shown in the following formula: In addition, a loss function for the VAE-TSGS sample generation model needs to be designed.
[0036] First, to ensure the reconstruction of data Vibration sample data The similarity between them is assessed by using the mean squared error as the reconstruction loss term of the model. As shown in the following formula: In addition, assuming different failure modes Initial hidden variables under They follow different normal distributions (true distributions). And assume initial hidden variables Follows a normal distribution To ensure the encoder Initial hidden variables generated Distribution Approximates the true distribution KL divergence is used as the KL divergence loss term in the model. As shown in the following formula: The KL divergence loss term can be simplified to: The total loss of the VAE-TSGS sample generation model is the weighted sum of the two loss terms mentioned above, as shown in the following formula: in, This is a constant hyperparameter designed to reduce the gradient of the KL divergence loss term and prevent the model from focusing excessively on reducing the KL divergence loss term. And ignore the reconstruction loss term This ultimately leads to data distortion during reconstruction.
[0037] In addition, model parameters need to be set, such as setting the batch size to 32, the number of training iterations to 300, using Adam as the optimizer, setting the learning rate to 1e-4, and adjusting the weight parameters. The loss function is set to 0.95. Then, based on the above loss function, the loss value between the vibration sample data and the reconstructed data is calculated. Based on the loss value and the above model parameters, the VAE-TSGS sample generation model to be trained is iteratively optimized to generate the trained VAE-TSGS sample generation model, so that it can accurately fit the real data.
[0038] Step 106: Input the target vibration sample data and the fault mode label of the target vibration sample data into the encoder network for processing to generate latent variables related to the target fault mode.
[0039] Specifically, after training the VAE-TSGS sample generation model as described above, this model can be used to generate samples to balance the dataset. Specifically, if the amount of vibration sample data under a certain fault mode is significantly less than the amount of vibration sample data under any other fault mode, this fault mode is identified as the target fault mode, and the vibration sample data under this target fault mode is identified as the target vibration sample data. The target vibration sample data and its fault mode label can then be input into the encoder network of the VAE-TSGS sample generation model for processing, generating latent variables related to the target fault mode.
[0040] Step 108: Sample random noise from the true distribution of the latent variables, and input the random noise and the Mach number label of the target vibration sample data into the decoder network for processing to generate reconstructed sample data of the target fault mode.
[0041] Specifically, after the encoder network outputs latent variables related to the target fault mode, the true distribution of the corresponding latent variables is then analyzed. Medium sampling to obtain random noise Then label the Mach number of the target vibration sample data. With random noise The input is processed in the decoder network of the VAE-TSGS sample generation model to obtain reconstructed sample data of the target fault mode output by the decoder network. The formula for this process is as follows: In one optional implementation, after generating the reconstructed sample data of the target failure mode, the method further includes: The vibration sample data and the reconstructed sample data are reduced to a two-dimensional space by using the t-distributed random neighborhood embedding algorithm. Based on the spatial coordinates of the vibration sample data and the reconstructed sample data in the two-dimensional space, calculate the Euclidean distance similarity and the maximum mean difference between the vibration sample data and the reconstructed sample data; Based on the calculation results of the Euclidean distance similarity and the maximum mean difference, a consistency evaluation result is generated between the vibration sample data and the reconstructed sample data.
[0042] Furthermore, the Euclidean distance similarity between the vibration sample data and the reconstructed sample data is calculated using the following expression: Where EUD represents the mean Euclidean distance, and EUS represents the Euclidean distance similarity; Represents vibration sample data. This represents the reconstructed sample data; n is the total number of vibration sample data, m is the total number of reconstructed sample data; d represents the feature dimension of the vibration sample data and the reconstructed sample data; This represents the feature value of the i-th vibration sample data in the p-th dimension; Let represent the feature value of the j-th reconstructed sample data in the p-th dimension.
[0043] In addition, after generating the reconstructed sample data of the target failure mode, the method further includes: The similarity evaluation result between the vibration sample data and the reconstructed sample data is determined by the following expression: in, , , Represents the number of combinations. Represents the kernel function; , For any two distinct vibration sample data; , For any two distinct reconstructed sample data.
[0044] Specifically, after generating reconstructed sample data under the target fault mode, the vibration sample data (real samples) and the reconstructed sample data (generated samples) can be compared. The waveform and spectrum diagrams provide an intuitive visualization of the similarity between the generated samples and the real samples.
[0045] In addition, the t-distributed stochastic neighbor embedding (t-SNE) algorithm can be used to reduce the dimensionality of real samples and generated samples to a two-dimensional space and visualize it in the form of a scatter plot. Then, based on the real data and the spatial coordinates of the generated samples in this two-dimensional space, the Euclidean distance similarity (EUS) and maximum mean difference (MMD) between real samples and generated samples are calculated. The consistency and similarity between generated samples and real samples are evaluated by the two indicators of Euclidean distance similarity and maximum mean difference.
[0046] In the embodiments of this specification, the real sample set With generating sample sets The average Euclidean distance between them is: Real sample set With generating sample sets The EUS between them is inversely related to the average Euclidean distance, as shown in the following formula: Where EUD represents the mean Euclidean distance, and EUS represents the Euclidean distance similarity; Represents the real sample set, This represents the generated sample set; n is the total number of real samples, m is the total number of generated samples; d represents the feature dimensions of the real samples and the generated samples. This represents the feature value of the i-th real sample in the p-th dimension; EUS represents the feature value of the j-th generated sample in the p-th dimension; the larger the EUS, the higher the consistency between the two sample sets.
[0047] Furthermore, the sample similarity is transformed into a real sample set using the following formula. With generating sample sets Similarities between them: in, , , Represents the number of combinations. Represents the kernel function; , For any two distinct real samples; , Let MMD be any two distinct generated samples; the smaller the MMD, the higher the similarity between the two sample sets.
[0048] If the consistency and similarity between the real sample set and the generated sample set are satisfied based on the aforementioned Euclidean distance similarity (EUS) and maximum mean difference (MMD) values, then the generated sample set... They are incorporated into the real sample set to form an enhanced fault sample set.
[0049] Step 110: Build a fault diagnosis model and input the vibration sample data and the reconstructed sample data into the fault diagnosis model for training. The fault diagnosis model is used to diagnose the faults in the wind tunnel pressure regulating valve.
[0050] Specifically, once an enhanced fault sample set is formed, it can be used to train a fault diagnosis model and verify its performance improvement on a real test set.
[0051] Specifically, you can first select a fault diagnosis model and set training parameters.
[0052] In practical applications, the fault diagnosis model can be implemented using a fully connected network, consisting of three fully connected layers. Each layer has 512, 128, and 4 neurons respectively, with the last layer's four neurons representing four different fault modes. During training, the cross-entropy function is chosen as the loss function, Adam is used as the optimizer, the learning rate is 1e-4, the batch size is 32, and the training epochs are 100.
[0053] In addition, comparative experiments can be set up to test the trained fault diagnosis model using a test set and output the fault diagnosis accuracy.
[0054] The fault diagnosis method based on a two-step guided sample generation strategy provided in this specification uses a two-step guided strategy to decouple category and operating condition information. During the sample generation process, sample features are obtained by sampling in the feature space, and the features are decoded into fault samples using a decoder. Finally, the existing samples and generated samples are used to enhance fault diagnosis under imbalanced conditions. This processing method can improve fault diagnosis accuracy under the condition of scarce fault samples. Moreover, this method is applicable to scenarios with multiple operating conditions and multiple fault modes, has strong adaptability to the complex motion environment of high reliability equipment, and has good practicality and generalization.
[0055] This specification describes an embodiment that acquires vibration sample data of a wind tunnel pressure regulating valve under different fault modes, and adds a fault mode label and a Mach number label to each vibration sample data. The fault modes include normal, secondary seal leakage, valve stem wear, and valve disc jamming. When the amount of target vibration sample data under a determined fault mode is insufficient, a VAE-TSGS sample generation model is constructed. This model includes an encoder network and a decoder network. The target vibration sample data and its fault mode labels are input into the encoder network for processing to generate latent variables related to the target fault mode. Random noise is sampled from the true distribution of the latent variables, and this random noise, along with the Mach number label of the target vibration sample data, is input into the decoder network for processing to generate reconstructed sample data of the target fault mode. A fault diagnosis model is then constructed, and the vibration sample data and reconstructed sample data are input into the fault diagnosis model for training. This fault diagnosis model is used to diagnose faults in the wind tunnel pressure regulating valve. The above methods help the model learn the individual effects of fault categories and operating conditions on fault samples, thereby achieving high-quality generation of fault samples under different fault modes and operating conditions. In addition, this processing method can decouple fault mode and operating condition information, generate high-quality fault samples, and thus enhance the fault diagnosis performance under unbalanced conditions. It can meet the need for expanding the fault samples of high-reliability equipment under unbalanced conditions, which is conducive to improving the accuracy of fault diagnosis.
[0056] Figure 2 The present specification shows a flowchart of a fault diagnosis method based on a two-step guided sample generation strategy according to an embodiment of this specification, which specifically includes the following steps.
[0057] Step 202: Obtain real operating data of the wind tunnel pressure regulating valve.
[0058] Step 204: Data preprocessing.
[0059] Step 206: Build the VAE-TSGS sample generation model.
[0060] Step 208: Sample generation.
[0061] Step 210: Generate sample analysis and quality assessment.
[0062] Step 212: Fault diagnosis.
[0063] The dataset used in the embodiments of this specification is a real dataset of a wind tunnel pressure regulating valve. This dataset is obtained by collecting vibration data from the valve body of a pressure regulating valve. The acquisition equipment includes the pressure regulating valve, vibration sensor, data acquisition card, and supporting acquisition software. The acquisition program is started when the wind tunnel begins blowing air and stops when the blowing ends. The middle 50% of the stable signal is taken as the dataset, and a fault mode label and a Mach number label are added to each vibration sample data. The acquired fault modes include normal, secondary seal leakage, valve stem wear, and valve disc jamming. Vibration data at several Mach numbers are collected under each fault mode, as shown in Table 1. The sampling frequency is 20 kHz.
[0064] Table 1: Detailed Information on Pressure Regulating Valve Dataset In the embodiments of this specification, the above dataset is slide-divided into original samples of length 1024, and these original samples are used to construct multiple fault sample generation tasks with imbalance ratios. The number of fault samples in each generation task is shown in Table 2. Along generation task A to task D, the imbalance ratio of fault samples increases from small to large, indicating that the sample generation task increases from relatively easy to relatively difficult.
[0065] Table 2: Task Information for Imbalanced Datasets This specification uses Task B as an example. A VAE-TSGS model is trained using minority class fault samples. Then, the trained model is used to sample minority class samples in the feature space to obtain sample features, which are then decoded into generated samples using a decoder. One generated sample is randomly selected, and its time-domain waveform and Fourier transform spectrum are visualized and compared with the corresponding real sample. Figures 3-11 As shown, time-domain waveform analysis and frequency spectrum analysis reveal that the fault samples generated by the VAE-TSGS model exhibit high similarity to real fault samples in both the time and frequency domains. Fault samples under different fault modes and Mach numbers display different forms and frequency components. The VAE-TSGS model can learn the cross-linking effect of fault modes and Mach numbers on samples based on existing minority class samples, and accurately generate generated samples similar to real samples. This indicates that the VAE-TSGS model can use the encoder to compress fault mode information into latent variables that meet the conditions, and use the decoder and Mach number guidance information to restore the latent variables to fault samples.
[0066] The visualization of a single sample is susceptible to random factors. Therefore, it is necessary to analyze the consistency between generated and real samples from the perspective of data distribution to minimize the influence of random factors. The t-distributed random neighborhood embedding (t-SNE) algorithm is used to reduce the dimensionality of both real and generated samples to a two-dimensional space and visualize them as a scatter plot, such as... Figure 12 As shown in the figure, there are 20 real samples and 50 generated samples for each class. Figure 12 The scatter plots of different colors represent fault samples under different fault modes and Mach numbers, with generated samples as circular scatter plots and real samples as triangular scatter plots. It can be seen that, regardless of whether they are real or generated samples, samples belonging to the same label cluster together relatively clearly, indicating intra-class consistency among fault samples; while samples belonging to different labels cluster into distinct clusters with clear boundaries, indicating inter-class differences among fault samples. From the perspective of sample generation, generated samples and real samples belonging to the same label cluster closely together, indicating good consistency between fault samples generated by the VAE-TSGS model and real fault samples; the fault samples generated by the VAE-TSGS model do not overlap with known real fault samples, indicating that the samples generated by the model are not simple repetitions of existing samples.
[0067] This specification's embodiments utilize VAE-TSGS, GAN, and DDPM to generate 100 samples of nine minority class faults, and calculate the EUS and MMD indices between the samples generated by each method and the real samples. In each generation task, the average consistency index of the nine minority class fault samples generated by the three methods is calculated and used as the consistency index for the current generation task, as shown in Tables 3 and 4. The results show that, in most cases, the samples generated by VAE-TSGS have the highest consistency level with the real samples, while GAN and DDPM have lower levels. The EUS index calculation results indicate that, at the level of individual samples, the samples generated by VAE-TSGS are most similar to the real samples; the MMD index calculation results indicate that, at the level of sample distribution, the distributions of the samples generated by VAE-TSGS are relatively similar to the real samples.
[0068] Table 3: EUS between minority class samples generated by different methods and real samples Table 4: MMD between minority class samples generated by different methods and real samples The fault diagnosis model in this embodiment is implemented using a fully connected network, consisting of three fully connected layers. Each layer has 512, 128, and 4 neurons, respectively, with the last layer's four neurons representing four different fault modes. During training, the cross-entropy loss function is used, the optimizer is Adam, the learning rate is 1e-4, the batch size is 32, and the training epochs are 100. The test set contains 100 samples of each class, totaling 1300 samples. To reduce random interference, three independent fault diagnosis experiments are conducted on each of the four sample sets, and the average fault diagnosis accuracy is calculated. Detailed results are shown in Table 5, and the visualization results are as follows: Figure 13 As shown.
[0069] Table 5: Detailed Results of Comparative Experimental Fault Diagnosis Accuracy The diagnostic results show that supplementing the imbalanced dataset with minority class fault samples generated by VAE-TSGS yields the greatest improvement in fault diagnosis accuracy. This indicates that the minority class fault samples generated by VAE-TSGS proposed in the embodiments of this specification are closest to the real fault samples, and therefore can, to a certain extent, replace the real fault samples, thereby helping the fault diagnosis model learn the characteristics of minority class fault samples and ultimately improving the diagnostic accuracy under imbalanced conditions. Conversely, the minority class fault samples generated by GAN and DDPM have a lower similarity to the real fault samples, and therefore cannot effectively improve the accuracy of the fault diagnosis model.
[0070] Corresponding to the above method embodiments, this specification also provides an embodiment of a fault diagnosis device based on a two-step guided sample generation strategy. Figure 14 This diagram illustrates a fault diagnosis device based on a two-step guided sample generation strategy, according to one embodiment of this specification. Figure 14 As shown, the device includes: The acquisition module 1402 is configured to acquire vibration sample data of the wind tunnel pressure regulating valve under different fault modes, and add a fault mode label and a Mach number label to each vibration sample data. The fault modes include normal, secondary seal leakage, valve stem wear, and valve disc jamming. The module 1404 is configured to build a VAE-TSGS sample generation model when the amount of data of the target vibration sample data under the determined target fault mode does not meet the conditions. The VAE-TSGS sample generation model includes an encoder network and a decoder network. The generation module 1406 is configured to input the target vibration sample data and the fault mode label of the target vibration sample data into the encoder network for processing, and generate latent variables related to the target fault mode. The sampling module 1408 is configured to sample random noise from the true distribution of the latent variable, and input the random noise and the Mach number label of the target vibration sample data into the decoder network for processing to generate reconstructed sample data of the target fault mode. The training module 1410 is configured to build a fault diagnosis model and input the vibration sample data and the reconstructed sample data into the fault diagnosis model for training. The fault diagnosis model is used to diagnose the faults in the wind tunnel pressure regulating valve.
[0071] Optionally, the acquisition module 1402 is further configured to: For different failure modes, vibration sample data of the wind tunnel pressure regulating valve at different Mach numbers were collected.
[0072] Optionally, the assembly module 1404 is further configured to: A VAE-TSGS sample generation model to be trained is constructed, wherein the VAE-TSGS sample generation model to be trained includes an encoder network to be trained and a decoder network to be trained. The vibration sample data and the fault mode labels are input into the encoder network to be trained for encoding processing to generate initial latent variables related to the fault mode labels, as shown in the following formula: in, They represent the initial hidden variables respectively. The mean and standard deviation of the normal distribution are determined by the encoder. Vibration sample data and failure mode labels Process and generate; It is a standard normally distributed random vector; This represents element-wise multiplication; The initial latent variables and the Mach number labels are input into the decoder network to be trained for decoding processing to generate reconstructed data similar to the vibration sample data; The loss value is calculated based on the vibration sample data and the reconstructed data, and the model parameters of the VAE-TSGS sample generation model to be trained are iteratively optimized based on the loss value to generate the trained VAE-TSGS sample generation model.
[0073] Optionally, the loss function of the VAE-TSGS sample generation model to be trained is as follows: in, For the reconstruction loss term of the model, The KL divergence loss term for the model is shown in the following equation: Where x represents the vibration sample data, To reconstruct the data; the distribution of the latent variables generated by the encoder is as follows: The true distribution of the latent variables is .
[0074] Optionally, the fault diagnosis device based on the two-step guided sample generation strategy further includes a processing module configured to: The vibration sample data and the reconstructed sample data are reduced to a two-dimensional space by using the t-distributed random neighborhood embedding algorithm. Based on the spatial coordinates of the vibration sample data and the reconstructed sample data in the two-dimensional space, calculate the Euclidean distance similarity and the maximum mean difference between the vibration sample data and the reconstructed sample data; Based on the calculation results of the Euclidean distance similarity and the maximum mean difference, a consistency evaluation result is generated between the vibration sample data and the reconstructed sample data.
[0075] Optionally, the Euclidean distance similarity between the vibration sample data and the reconstructed sample data is calculated using the following expression: Where EUD represents the mean Euclidean distance, and EUS represents the Euclidean distance similarity; Represents vibration sample data. This represents the reconstructed sample data; n is the total number of vibration sample data, m is the total number of reconstructed sample data; d represents the feature dimension of the vibration sample data and the reconstructed sample data; This represents the feature value of the i-th vibration sample data in the p-th dimension; Let represent the feature value of the j-th reconstructed sample data in the p-th dimension.
[0076] Optionally, the processing module is further configured to: The similarity evaluation result between the vibration sample data and the reconstructed sample data is determined by the following expression: in, , , Represents the number of combinations. Represents the kernel function; , For any two distinct vibration sample data; , For any two distinct reconstructed sample data.
[0077] The above is an illustrative scheme of a fault diagnosis device based on a two-step guided sample generation strategy according to this embodiment. It should be noted that the technical solution of this fault diagnosis device based on a two-step guided sample generation strategy belongs to the same concept as the technical solution of the fault diagnosis method based on a two-step guided sample generation strategy described above. Details not described in detail in the technical solution of the fault diagnosis device based on a two-step guided sample generation strategy can be found in the description of the technical solution of the fault diagnosis method based on a two-step guided sample generation strategy described above.
[0078] Figure 15 A structural block diagram of a computing device 1500 according to one embodiment of this specification is shown. The components of the computing device 1500 include, but are not limited to, a memory 1510 and a processor 1520. The processor 1520 is connected to the memory 1510 via a bus 1530, and a database 1550 is used to store data.
[0079] The computing device 1500 also includes an access device 1540, which enables the computing device 1500 to communicate via one or more networks 1560. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 1540 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Wi-MAX interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0080] In one embodiment of this specification, the above-described components of the computing device 1500 and Figure 15 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 15 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0081] The computing device 1500 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 1500 can also be a mobile or stationary server.
[0082] The processor 1520 is used to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the fault diagnosis method based on the two-step boot sample generation strategy described above.
[0083] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the fault diagnosis method based on the two-step guided sample generation strategy described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the fault diagnosis method based on the two-step guided sample generation strategy described above.
[0084] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the fault diagnosis method based on the two-step guide sample generation strategy described above.
[0085] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the fault diagnosis method based on the two-step guide sample generation strategy described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the fault diagnosis method based on the two-step guide sample generation strategy described above.
[0086] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the fault diagnosis method based on the two-step guided sample generation strategy described above.
[0087] The above is an illustrative scheme of a computer program according to this embodiment. It should be noted that the technical solution of this computer program belongs to the same concept as the technical solution of the fault diagnosis method based on the two-step guided sample generation strategy described above. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solution of the fault diagnosis method based on the two-step guided sample generation strategy described above.
[0088] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0089] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0090] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0091] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0092] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A fault diagnosis method based on a two-step guided sample generation strategy, comprising: Vibration sample data of the wind tunnel pressure regulating valve under different fault modes are obtained, and a fault mode label and a Mach number label are added to each vibration sample data. The fault modes include normal, secondary seal leakage, valve stem wear, and valve disc jamming. When the amount of data of target vibration sample data under the target fault mode is insufficient, a VAE-TSGS sample generation model is built, wherein the VAE-TSGS sample generation model includes an encoder network and a decoder network. The target vibration sample data and the fault mode label of the target vibration sample data are input into the encoder network for processing to generate latent variables related to the target fault mode. Random noise is sampled from the true distribution of the latent variables, and the random noise and the Mach number label of the target vibration sample data are input into the decoder network for processing to generate reconstructed sample data of the target fault mode. A fault diagnosis model is built, and the vibration sample data and the reconstructed sample data are input into the fault diagnosis model for training. The fault diagnosis model is used to diagnose the faults of the wind tunnel pressure regulating valve.
2. The fault diagnosis method based on a two-step guided sample generation strategy according to claim 1, wherein acquiring vibration sample data of the wind tunnel pressure regulating valve under different fault modes includes: For different failure modes, vibration sample data of the wind tunnel pressure regulating valve at different Mach numbers were collected.
3. The fault diagnosis method based on a two-step guided sample generation strategy according to claim 1, wherein building the VAE-TSGS sample generation model includes: A VAE-TSGS sample generation model to be trained is constructed, wherein the VAE-TSGS sample generation model to be trained includes an encoder network to be trained and a decoder network to be trained. The vibration sample data and the fault mode labels are input into the encoder network to be trained for encoding processing to generate initial latent variables related to the fault mode labels, as shown in the following formula: in, They represent the initial hidden variables respectively. The mean and standard deviation of the normal distribution are determined by the encoder. Vibration sample data and failure mode labels Process and generate; It is a standard normally distributed random vector; This represents element-wise multiplication; The initial latent variables and the Mach number labels are input into the decoder network to be trained for decoding processing to generate reconstructed data similar to the vibration sample data; The loss value is calculated based on the vibration sample data and the reconstructed data, and the model parameters of the VAE-TSGS sample generation model to be trained are iteratively optimized based on the loss value to generate the trained VAE-TSGS sample generation model.
4. The fault diagnosis method based on a two-step guided sample generation strategy according to claim 3, wherein the loss function of the VAE-TSGS sample generation model to be trained is as follows: in, For the reconstruction loss term of the model, The KL divergence loss term for the model is shown in the following equation: Where x represents the vibration sample data, To reconstruct the data; the distribution of the latent variables generated by the encoder is as follows: The true distribution of the latent variables is .
5. The fault diagnosis method based on a two-step guided sample generation strategy according to claim 1, further comprising, after generating the reconstructed sample data of the target fault mode: The vibration sample data and the reconstructed sample data are reduced to a two-dimensional space by using the t-distributed random neighborhood embedding algorithm. Based on the spatial coordinates of the vibration sample data and the reconstructed sample data in the two-dimensional space, calculate the Euclidean distance similarity and the maximum mean difference between the vibration sample data and the reconstructed sample data; Based on the calculation results of the Euclidean distance similarity and the maximum mean difference, a consistency evaluation result is generated between the vibration sample data and the reconstructed sample data.
6. In the fault diagnosis method based on a two-step guided sample generation strategy according to claim 5, the Euclidean distance similarity between the vibration sample data and the reconstructed sample data is calculated by the following expression: in, EUD represents the mean Euclidean distance, and EUS represents the Euclidean distance similarity. Represents vibration sample data, This represents the reconstructed sample data; n is the total number of vibration sample data, m is the total number of reconstructed sample data; d represents the feature dimension of the vibration sample data and the reconstructed sample data; This represents the feature value of the i-th vibration sample data in the p-th dimension; Let represent the feature value of the j-th reconstructed sample data in the p-th dimension.
7. The fault diagnosis method based on a two-step guided sample generation strategy according to claim 1 or 5, further comprising, after generating the reconstructed sample data of the target fault mode: The similarity evaluation result between the vibration sample data and the reconstructed sample data is determined by the following expression: in, , , Represents the number of combinations. Represents the kernel function; , For any two distinct vibration sample data; , For any two distinct reconstructed sample data.
8. A fault diagnosis device based on a two-step guided sample generation strategy, comprising: The acquisition module is configured to acquire vibration sample data of the wind tunnel pressure regulating valve under different fault modes, and add a fault mode label and a Mach number label to each vibration sample data. The fault modes include normal, secondary seal leakage, valve stem wear, and valve disc jamming. The module is configured to build a VAE-TSGS sample generation model when the amount of data of the target vibration sample data under the determined target fault mode does not meet the conditions. The VAE-TSGS sample generation model includes an encoder network and a decoder network. The generation module is configured to input the target vibration sample data and the fault mode label of the target vibration sample data into the encoder network for processing, and generate latent variables related to the target fault mode. The sampling module is configured to sample random noise from the true distribution of the latent variables, and input the random noise and the Mach number label of the target vibration sample data into the decoder network for processing to generate reconstructed sample data of the target fault mode. The training module is configured to build a fault diagnosis model and input the vibration sample data and the reconstructed sample data into the fault diagnosis model for training. The fault diagnosis model is used to diagnose faults in the wind tunnel pressure regulating valve.
9. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the fault diagnosis method based on the two-step guided sample generation strategy as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the fault diagnosis method based on a two-step guided sample generation strategy as described in any one of claims 1 to 7.