Training method for generative adversarial network, method and device for generating vibration signal

By generating adversarial network training methods, high-quality time domain signal samples are generated, which solves the problem of insufficient expansion of vibration signal data and improves the accuracy of the fault diagnosis model.

CN119416833BActive Publication Date: 2025-09-19CHINA SHIP SCIENTIFIC RESEARCH CENTER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411490845.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-09-19
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

In the existing fault diagnosis model training, the vibration signal data expansion method is limited by the number of original samples, and the generated data quality is poor, resulting in low model prediction accuracy.

Method used

The training method of generative adversarial network is adopted to generate time domain signal samples through two parallel deconvolution networks, and the feature extraction network in the discriminator is used to optimize the model parameters of the generative adversarial network until the consistency meets the preset value, thereby generating diverse high-quality time domain signal samples.

Benefits of technology

It achieves the generation of a large number of diversified time domain signal samples based on a small number of original samples, and improves the prediction accuracy of the fault diagnosis model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416833B_ABST
    Figure CN119416833B_ABST
Patent Text Reader

Abstract

The present application discloses a training method for a generative adversarial network, a method for generating vibration signals, and an apparatus, and relates to the field of data processing technology. The method comprises: obtaining vibration signal samples; generating time domain signal samples by two parallel deconvolution networks in a generator of a generative adversarial network; inputting the vibration signal samples and the time domain signal samples into a discriminator of the generative adversarial network, and outputting the predicted authenticity of each signal sample and the predicted category of each signal sample through the discriminator; and optimizing the model parameters of the generative adversarial network until the training is completed. The present application is used to solve the problems of small amount of expanded data and poor quality of expanded data when expanding vibration signals in the prior art, and to achieve rapid generation of diversified time domain signal samples with high data quality, thereby improving the preset accuracy of the fault diagnosis model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a training method for a generative adversarial network, and a method and device for generating a vibration signal. Background Art

[0002] Deep learning has achieved certain beneficial results in computer vision, natural language processing, and fault diagnosis, but model training still relies on large amounts of sample data. Fault diagnosis technology is often used in critical equipment, such as engines and generators, to ensure stable operation and prevent significant economic losses caused by equipment damage. Fault diagnosis model training typically uses a large amount of sample data to improve the accuracy of model predictions, but in actual use, fault data is relatively scarce. To obtain more sample data, existing technologies use data augmentation methods to enhance the quality or expand the quantity of existing fault data by simulating the distribution characteristics of existing fault data. This fault data is typically vibration signals from the equipment.

[0003] However, the vibration signal of a device is a time-series data with time dependencies. Existing technologies use difference-based data generation methods to expand vibration signals. However, this method is limited by the number of original samples, and the generated new data tends to propagate noise, lacks learning capabilities, and fails to enrich the diversity of data samples. This results in low accuracy in the final model for fault diagnosis and prediction. Summary of the Invention

[0004] In response to the above-mentioned problems and technical needs, the applicant has proposed a training method for a generative adversarial network, a vibration signal generation method and device to solve the problems of small amount of expanded data and poor quality of expanded data when expanding vibration signals in the prior art, and to achieve rapid generation of diverse time domain signal samples with high data quality, thereby improving the preset accuracy of the fault diagnosis model.

[0005] An embodiment of the present application provides a training method for a generative adversarial network for generating vibration signals, the method comprising:

[0006] Acquire a vibration signal sample, wherein the vibration signal sample includes: a vibration signal data segment and a category label sample corresponding to the vibration signal data segment, and the vibration signal sample is obtained based on fault data when a device fails;

[0007] Generate a time domain signal sample by two parallel deconvolution networks in a generator of a generative adversarial network, wherein the time domain signal sample includes: a time domain signal data segment having a data length consistent with the vibration signal data segment, and a generated category label corresponding to the time domain signal data segment;

[0008] Inputting the vibration signal sample and the time domain signal sample into the discriminator of the generative adversarial network, obtaining signal sample features through two parallel feature extraction networks in the discriminator, and outputting the predicted truth of each signal sample and the predicted category of each signal sample based on the signal sample features, wherein the predicted truth of the signal sample is used to indicate whether the signal sample is generated by the generator;

[0009] Based on the first consistency between the predicted authenticity and the actual authenticity corresponding to the signal sample, the first size relationship between the first consistency and a first preset value, the second consistency between the predicted category and the category label sample or the generated category label, and the second size relationship between the second consistency and a second preset value, the model parameters of the generative adversarial network are optimized, and the step of generating time domain signal samples through the generator of the generative adversarial network is performed until the first consistency is less than the first preset value and the second consistency is greater than the second preset value, wherein the first preset value is less than the second preset value.

[0010] According to an embodiment of the present application, a training method for a generative adversarial network for generating vibration signals obtains signal sample features through two parallel feature extraction networks in the discriminator, and outputs the predicted authenticity and predicted category of each signal sample based on the signal sample features, including:

[0011] The discriminator performs the following prediction process on each signal sample:

[0012] Performing Fourier transform on the signal samples to obtain real and imaginary components of the signal samples in the frequency domain;

[0013] Inputting the real component into a first feature extraction network to obtain a real component feature output by the first feature extraction network; and inputting the imaginary component into a second feature extraction network to obtain an imaginary component feature output by the second feature extraction network, wherein the first feature extraction network and the second feature extraction network are two parallel feature extraction networks;

[0014] The real component feature and the imaginary component feature are fused to obtain a fused feature, and the predicted truth and the predicted category are output based on the fused feature.

[0015] According to a training method for a generative adversarial network for generating vibration signals according to an embodiment of the present application, the discriminator includes: a true-false discriminator and a category classifier;

[0016] The discriminator outputs the predicted authenticity of each signal sample and the predicted category of each signal sample, including:

[0017] The fused features are input into the authenticity discriminator to obtain the predicted authenticity output by the authenticity discriminator; and the fused features are input into the category classifier to obtain the predicted classification output by the category classifier.

[0018] According to an embodiment of the present application, a training method for a generative adversarial network for generating vibration signals generates time domain signal samples by using two parallel deconvolution networks in a generator of the generative adversarial network, including:

[0019] Inputting a random signal sample into the generator, and dimensionally integrating the random signal sample and the sample label of the random signal sample through the fully connected layer of the generator to obtain a target vector;

[0020] Inputting the target vector into the first deconvolution network and the second deconvolution network respectively, to obtain a real feature vector output by the first deconvolution network and an imaginary feature vector output by the second deconvolution network, wherein the first deconvolution network and the second deconvolution network are two parallel deconvolution networks;

[0021] The real eigenvector and the imaginary eigenvector are combined into a complex domain spectrum, and Fourier transform processing is performed to obtain the time domain signal sample.

[0022] According to a training method for a generative adversarial network for generating vibration signals according to an embodiment of the present application, during the training of the generative adversarial network, a preset loss function is used to perform model training;

[0023] The preset loss function includes: a first loss function corresponding to the generator and a second loss function corresponding to the discriminator;

[0024] The first loss function includes:

[0025]

[0026] Among them, L G Represents the loss value obtained based on the first loss function, X real Represents the vibration signal sample, X fake represents the time domain signal sample, C represents the classification, c represents the classification result, P(C=c|X real ) represents the probability of correct classification of vibration signal samples, P(C=c|X fake ) represents the probability of correct classification of time domain signal samples, D(x) represents the discriminator, where x represents the current training input data, P g Represents the data distribution of time domain signal samples;

[0027] The second loss function includes:

[0028]

[0029] Among them, L D Represents the loss value obtained based on the second loss function, λ represents the regularization coefficient, represents the difference sample between the vibration signal sample and the artificial data after interpolation, ε represents the coefficient, || || p represents the p-norm, represents the gradient operator, P data represents the data distribution of vibration signal samples, Represents the data distribution of the difference samples.

[0030] According to an embodiment of the present application, a training method for a generative adversarial network for generating a vibration signal, optimizing model parameters of the generative adversarial network until the first consistency is less than a first preset value, includes:

[0031] Training the generative adversarial network based on a preset learning rate change formula to optimize the model parameters;

[0032] The learning rate change formula includes:

[0033] lr=lr0 / (1+exp(-k*((e max -e+1) / W-x0)));

[0034] Among them, lr represents the learning rate, e represents the number of iterations in the model training process, and e max Indicates the maximum number of iterations, e∈(1,e max ), W=(e max -1) / C i Represents the rate of change of the model function of the generated adversarial network; C i Indicates the number of propagations required for the learning rate to reach the flat stage; x0 = L*(e max +1)(e max -1) / 2, lr0 represents the initial learning rate, k is the coefficient, which is a constant.

[0035] An embodiment of the present application further provides a method for generating a vibration signal based on any of the above-described generative adversarial networks, the method comprising:

[0036] generating a control instruction for instructing the generative adversarial network to generate a vibration signal;

[0037] Based on the control instruction, vibration information is generated by the generator of the generative adversarial network, so as to use the vibration signal as a training sample of the fault recognition model to train the fault recognition model.

[0038] The present application also provides a training device for a generative adversarial network for generating vibration signals, including:

[0039] An acquisition module is configured to acquire a vibration signal sample, wherein the vibration signal sample includes: a vibration signal data segment and a category label sample corresponding to the vibration signal data segment, and the vibration signal sample is obtained based on fault data when a device fails;

[0040] a first generation module, configured to generate a time domain signal sample by using two parallel deconvolution networks in a generator of a generative adversarial network, wherein the time domain signal sample includes: a time domain signal data segment having a data length consistent with that of the vibration signal data segment, and a generated category label corresponding to the time domain signal data segment;

[0041] a prediction module, configured to input the vibration signal samples and the time domain signal samples into the discriminator of the generative adversarial network, obtain signal sample features through two parallel feature extraction networks in the discriminator, and output the predicted authenticity of each signal sample and the predicted category of each signal sample based on the signal sample features, wherein the predicted authenticity of the signal sample is used to indicate whether the signal sample is generated by the generator;

[0042] A training module is used to optimize the model parameters of the generative adversarial network based on a first consistency between the predicted authenticity and the actual authenticity corresponding to the signal sample, a first size relationship between the first consistency and a first preset value, a second consistency between the predicted category and the category label sample or the generated category label, and a second size relationship between the second consistency and a second preset value, and to execute the step of generating time domain signal samples through the generator of the generative adversarial network until the first consistency is less than the first preset value and the second consistency is greater than the second preset value, wherein the first preset value is less than the second preset value.

[0043] The embodiment of the present application further provides a device for generating a vibration signal based on a generative adversarial network, comprising:

[0044] A second generating module is used to generate a control instruction for instructing the generative adversarial network to generate a vibration signal;

[0045] The third generating module is used to generate vibration information based on the control instruction through the generator of the generative adversarial network, so as to use the vibration signal as a training sample of the fault recognition model to train the fault recognition model.

[0046] An embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and runnable on the processor. When the processor executes the program, the steps of the training method for generating a generative adversarial network for generating a vibration signal as described in any one of the above items are implemented, or the steps of the method for generating a vibration signal based on a generative adversarial network are implemented.

[0047] The training method of a generative adversarial network, the method and device for generating a vibration signal provided by the embodiments of the present application obtain vibration signal samples; generate time domain signal samples through two parallel deconvolution networks in the generator of the generative adversarial network; input the vibration signal samples and the time domain signal samples into the discriminator of the generative adversarial network, obtain the signal sample features through two parallel feature extraction networks in the discriminator, and output the predicted authenticity of each signal sample and the predicted category of each signal sample based on the signal sample features; optimize the model parameters of the generative adversarial network based on the first consistency between the predicted authenticity and the actual authenticity corresponding to the signal sample, and the second consistency between the predicted category and the category label sample or the generated category label, and execute the pass. The step of generating time domain signal samples by the generator of the generative adversarial network, until the first consistency is less than the first preset value, and the second consistency is greater than the second preset value. It can be seen that the present application determines that the generative adversarial network training is completed when it is determined that the discriminator cannot effectively distinguish whether the signal sample is the original sample or the sample generated by the generator, and the discriminator can effectively predict the category of the signal sample. The generator of the trained generative adversarial network can be used to generate a vibration signal that meets the timing requirements. The present application can generate a large number of time domain signal samples based on a small number of original samples, realize the diversity of time domain signal samples, and provide an effective data basis for the training of the fault diagnosis model, thereby improving the accuracy of the fault diagnosis model prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 This is one of the flow charts of the training method of a generative adversarial network for generating vibration signals provided in an embodiment of the present application;

[0050] Figure 2 This is a schematic diagram of the structure of the generator provided in the embodiment of the present application;

[0051] Figure 3 Schematic diagram of the structure of the discriminator provided in an embodiment of the present application;

[0052] Figure 4 This is a second flow chart of a method for generating a vibration signal based on a generative adversarial network provided in an embodiment of the present application;

[0053] Figure 5 1 is a schematic structural diagram of a training device for a generative adversarial network for generating vibration signals provided in an embodiment of the present application;

[0054] Figure 6 1 is a schematic structural diagram of a device for generating a vibration signal based on a generative adversarial network according to an embodiment of the present application;

[0055] Figure 7 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] To make the purpose, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0057] In order to clearly explain this application, the sample generation of the prior art is further explained:

[0058] Since vibration signals are time-series, existing technologies use time-series data enhancement methods to expand data. There are two types of time-series data enhancement methods. The first type is to directly perform basic enhancement operations on time domain and frequency domain data, including overlapping sampling, cropping, flipping, slicing, and noise injection. The second type is to use machine learning or deep learning methods to learn the distribution characteristics of the original samples and generate new virtual signals based on the distribution characteristics. The second method specifically includes an interpolation-based generation method, which expands the sample set by interpolating between a certain sample point and its neighboring sample points to obtain a new sample. However, the interpolation method is limited by the number of original samples, and the generated new data tends to spread noise, does not have learning capabilities, and does not essentially enrich the diversity of data samples.

[0059] In order to solve the above problems, the embodiment of the present application provides a training method for a generative adversarial network for generating vibration signals, so that the generative adversarial network obtained by training can quickly and accurately generate a large number of time domain signal samples. This method can be applied to smart terminals and can also be applied to servers. Some other descriptions in the embodiments of the present application are for illustrative purposes only and are not used to limit the scope of protection of this application, so they will not be described one by one later. The specific implementation of this method is as follows Figure 1 As shown:

[0060] Step 101: Obtain vibration signal samples.

[0061] The vibration signal sample includes: a vibration signal data segment, and a category label sample corresponding to the vibration signal data segment. The vibration signal sample is obtained based on fault data when a device fails.

[0062] The equipment is, for example, an engine, a generator, etc., and the fault data is a vibration signal on the surface of the equipment when the equipment fails.

[0063] Step 102: Generate time domain signal samples through two parallel deconvolution networks in the generator of the generative adversarial network.

[0064] The time domain signal sample includes: a time domain signal data segment having the same data length as the vibration signal data segment, and a generated category label corresponding to the time domain signal data segment.

[0065] Among them, the length of the production category label is consistent with the length of the category label sample.

[0066] In step 103, the vibration signal samples and the time domain signal samples are input into the discriminator of the generative adversarial network, the signal sample features are obtained through the two parallel feature extraction networks in the discriminator, and the predicted authenticity and predicted category of each signal sample are output based on the signal sample features.

[0067] The predicted authenticity of the signal sample is used to indicate whether the signal sample is generated by the generator.

[0068] Step 104, based on the first consistency between the predicted authenticity and the actual authenticity corresponding to the signal sample, the first size relationship between the first consistency and the first preset value, the second consistency between the predicted category and the category label sample or the generated category label, and the second size relationship between the second consistency and the second preset value, optimize the model parameters of the generative adversarial network, and execute the step of generating time domain signal samples through the generator of the generative adversarial network until the first consistency is less than the first preset value and the second consistency is greater than the second preset value.

[0069] The first preset value is smaller than the second preset value.

[0070] The training method of the generative adversarial network provided in the embodiment of the present application obtains vibration signal samples; generates time domain signal samples through two parallel deconvolution networks in the generator of the generative adversarial network; inputs the vibration signal samples and the time domain signal samples into the discriminator of the generative adversarial network, obtains the signal sample features through two parallel feature extraction networks in the discriminator, and outputs the predicted authenticity of each signal sample and the predicted category of each signal sample based on the signal sample features; optimizes the model parameters of the generative adversarial network based on the first consistency between the predicted authenticity and the actual authenticity corresponding to the signal sample, and the second consistency between the predicted category and the category label sample or the generated category label, and executes the training through the generative adversarial network. The generator of the network generates time domain signal samples until the first consistency is less than the first preset value and the second consistency is greater than the second preset value. It can be seen that the present application determines that the training of the generative adversarial network is completed when it is determined that the discriminator cannot effectively distinguish whether the signal sample is the original sample or the sample generated by the generator, and the discriminator can effectively predict the category of the signal sample. The generator of the trained generative adversarial network can be used to generate a vibration signal that meets the timing requirements. The present application can generate a large number of time domain signal samples based on a small number of original samples, realize the diversity of time domain signal samples, and provide an effective data basis for the training of the fault diagnosis model, thereby improving the accuracy of the fault diagnosis model prediction.

[0071] In a specific embodiment, the specific implementation of generating time domain signal samples by a generator of a generative adversarial network includes:

[0072] A random signal sample is input into the generator, and the random signal sample and the sample label of the random signal sample are dimensionally integrated through the fully connected layer of the generator to obtain a target vector; the target vector is input into the first deconvolution network and the second deconvolution network respectively to obtain the real characteristic vector output by the first deconvolution network and the imaginary characteristic vector output by the second deconvolution network; the real characteristic vector and the imaginary characteristic vector are combined into a complex domain spectrum, and Fourier transform processing is performed to obtain a time domain signal sample.

[0073] The first feature extraction network and the second feature extraction network are two parallel feature extraction networks.

[0074] Specifically, a set of Gaussian random signals is pre-generated as random signal samples. The length of the signal data segment in the random signal sample is consistent with the data length of the vibration signal data segment, and the length of the sample label is consistent with the length of the production category label. For example, assume that the length of each signal sample is L, and each signal sample includes label information for supervised learning by the neural network.

[0075] Specifically, the generator includes: a fully connected layer (FC), an activation function (swish function) corresponding to the fully connected layer, a first deconvolution network, and a second deconvolution network. The first deconvolution network and the second deconvolution network have the same structure and are designed in parallel. The first deconvolution network includes: multiple deconvolution layers (ConvT), an activation function (swish function) corresponding to the deconvolution layer, a batch normalization layer (BN), a convolution layer (Conv), and an activation function (Tanh function) corresponding to the convolution layer. For details, please refer to Figure 2 .

[0076] Specifically, random signal samples are input into the generator and passed to a fully connected layer and swish function to convert the data dimension to the input size suitable for the deconvolution layer. Next, the data will be passed to two parallel deconvolution networks for upsampling. After layers of upsampling, a convolutional layer and the Tanh function finally convert its dimension to the required output length M (M is the smallest integer power of 2 greater than L). After obtaining the real and imaginary eigenvectors, the inverse Fourier transform is used to combine the real and imaginary eigenvectors and convert them into the generated time domain signal (length L).

[0077] This application preserves both the amplitude-frequency and phase-frequency characteristics of the spectrum when generating time-domain data. By designing a multi-layer deconvolution network to generate real and imaginary eigenvectors, which are then combined into a complex spectrum, and using an inverse Fourier transform to generate a time-domain signal, this effectively improves the weak ability of convolutional and deconvolutional networks to express the temporal characteristics of vibration signals, and optimizes the time-domain signal generation effect of the generative adversarial network.

[0078] In a specific embodiment, the specific implementation of outputting the predicted authenticity of each signal sample and the predicted category of each signal sample by the discriminator includes:

[0079] The discriminator performs the following prediction process for each signal sample:

[0080] The signal samples are Fourier transformed to obtain the real and imaginary components of the signal samples in the frequency domain; the real component is input into the first feature extraction network to obtain the real component feature output by the first feature extraction network; and the imaginary component is input into the second feature extraction network to obtain the imaginary component feature output by the second feature extraction network; the real component feature and the imaginary component feature are fused to obtain the fused feature, and the authenticity and prediction category are predicted based on the fused feature output.

[0081] Among them, the first convolutional network and the second convolutional network are two parallel convolutional networks.

[0082] In a specific embodiment, the discriminator includes: a true-false discriminator and a category classifier. The specific implementation of outputting the predicted true-false and predicted category of each signal sample by the discriminator includes:

[0083] The fused features are input into the authenticity discriminator to obtain the predicted authenticity output by the authenticity discriminator; and the fused features are input into the category classifier to obtain the predicted classification output by the category classifier.

[0084] This application uses two parallel feature extraction networks (convolutional networks) corresponding to the generator, and allows the discriminator to perform category prediction while judging the authenticity of the signal samples, which can enable the generative adversarial network to simultaneously generate multiple categories of time domain signals, effectively improving the data generation efficiency and data diversity.

[0085] Specifically, vibration signal samples and time-domain signal samples are mixed and input into the discriminator, which then performs a Fourier transform on the input signal samples to obtain the real and imaginary components of the signal in the frequency domain. These components are then fed into different feature extraction networks, each consisting of a multi-layer convolutional layer-activation function (CELU)-maximum pooling layer (MP) structure. After extracting the features of the real and imaginary components, these features are combined and fed into the authenticity discriminator and category classifier, respectively.

[0086] The true-false discriminator consists of a fully connected layer-Dropout layer-activation function-fully connected layer structure. The activation function is the Swish function, and the output result is either true or false. The category classifier consists of a Dropout layer-fully connected layer-activation function layer-fully connected layer structure. The activation function is the Swish function. The data is finally processed by the softmax function to become category information. Among them, the aforementioned Dropout layer is used to randomly block some neurons so that the model does not rely too much on certain neurons, which can effectively reduce the risk of overfitting. The ratio of blocked neurons can be 0.5. For details, please refer to Figure 3 .

[0087] In a specific embodiment, during the process of training the generative adversarial network, a preset loss function is used for model training. The preset loss function includes: a first loss function corresponding to the generator and a second loss function corresponding to the discriminator.

[0088] Among them, the first loss function is shown in formula (1):

[0089]

[0090] Among them, L G Represents the loss value obtained based on the first loss function, Xreal Represents the vibration signal sample, X fake represents the time domain signal sample, C represents the classification, c represents the classification result, P(C=c|X real ) represents the probability of correct classification of vibration signal samples, P(C=c|X fake ) represents the probability of correct classification of time domain signal samples, D(x) represents the discriminator, where x represents the current training input data, P g Represents the data distribution of time-domain signal samples.

[0091] Among them, the second loss function is shown in formula (2):

[0092]

[0093] Among them, L D Represents the loss value obtained based on the second loss function, λ represents the regularization coefficient, represents the difference sample between the vibration signal sample and the artificial data after interpolation, ε represents the coefficient, || || p represents the p-norm, represents the gradient operator, P data represents the data distribution of vibration signal samples, Represents the data distribution of the difference samples.

[0094] Specifically, this application obtains a loss function based on the Wasserstein distance to avoid gradient vanishing, and introduces a gradient penalty term for regularization. Since the training of the generator usually lags behind the discriminator, certain measures need to be taken during training to control the training progress of the two. That is, the ratio of the number of training times of the generator and the discriminator is set during each training so that the generator can be more fully trained. After practice, the effect is better when the ratio is 4:1 or above. Users can set the specific ratio according to their actual needs, and this application does not impose any restrictions.

[0095] In order to more clearly explain the first loss function and the second loss function, the following is a detailed description:

[0096] The Generative Adversarial Network (GAN) is an unsupervised deep learning model that continuously generates data close to the real world through a game between a generator G and a discriminator D. During the game, the input signal is transformed through the network to produce data close to the real input. The discriminator is used to distinguish the authenticity of the real data from the generated data. As the iterations proceed, the data generated by the generator is required to be able to "deceive" the discriminator, and the discriminator is required to continuously improve its identification ability. During the training process, the training objective function is shown in Formula (3):

[0097]

[0098] Among them, z represents the input data of the current training G, x represents the input data of the current training D, and P data represents the real data distribution, P z Represents Gaussian distribution, G(z) represents the generated data of G, E() represents expectation. When real data is input into D, the expected output is expected to be 1, and when the generated sample generated by G is input, the expected output is expected to be 0.

[0099] Among them, the real data corresponds to the vibration signal samples, and the generated data corresponds to the time domain signal samples.

[0100] According to formula (3), the goal of the generative adversarial network is to minimize the true data distribution P data and generate data distribution P g For a certain generator G, That means P data and P g Therefore, in order to obtain the smallest difference G, we solve The optimal G* can be obtained. First, fix G and transform the objective function into formula (4):

[0101]

[0102] To obtain the optimal D*, f(D) = P data (x)logD(x)+P g The maximum value of (x)log(1-D(x)).

[0103] By solving Formula (5) can be obtained

[0104]

[0105] Therefore, substituting formula (5) into formula (4) yields formula (6):

[0106]

[0107] Among them, KL(P1||P2) represents the KL divergence of the two distributions, JSD represents the JS divergence, P1 and P2 are schematic representations for explaining the physical meaning. For details, please refer to the information in the formula. The conversion relationship is shown in formula (7) and formula (8):

[0108]

[0109] Therefore, based on formula (3) to formula (8), the optimal solution G* is obtained, see formula (9):

[0110]

[0111] When JSD(P data (x)||P g When (x)) = 0, it means that the generated data and the real data are completely identically distributed, and the discriminator cannot distinguish them at all.

[0112] However, in GANs, the generator and discriminator are trained alternately, making it difficult for them to converge simultaneously. JSD is symmetric. According to formula (7), when the overlap between the distributions of P1 and P2 is low, JSD is difficult to distinguish between them, so the divergence between the two is fixed. In practice, classification tasks are usually simpler than generation tasks. When the discriminator is trained ahead of the generator, the fixed JSD causes the generator training to stagnate due to vanishing gradients.

[0113] In order to solve the above-mentioned problem of gradient disappearance, a loss function is introduced to solve this problem.

[0114] The optimal transmission distance is also called Wasserstein distance or bulldozer distance, see formula (10):

[0115]

[0116] Among them, Π(P data ,P g ) represents P data With P g The set of all joint distributions, γ represents a possible joint distribution, (x, y) represents a sampling point in the joint distribution, x is the real data, y is the difference data. inf represents the lower bound, E() represents the expectation. Then, based on the difference data y, the difference sample is obtained.

[0117] In all joint distributions, the distance expectation infimum is the Wasserstein distance. The advantage of the optimal transmission distance over JSD is that even if P data With P g The distributions of G and D do not overlap, and can also reflect the distance between the two distributions, without causing the gradient to disappear due to the different training levels of G and D.

[0118] According to the Kantorovich-Rubinstein duality, formula (10) is transformed into formula (11):

[0119]

[0120] Here, sup represents the supremum, and formula (11) is required to satisfy Lipschitz continuity, that is, there exists a Lipschitz constant K ≥ 0 such that any x in the domain satisfies |f(x1)-f(x2)| ≤ K|x1-x2|.

[0121] At this point, the problem is transformed into finding an f(x) that makes formula (11) obtain the supremum, through a set of functions f defined by the parameter ω ω (x) is used to represent the possible solutions, and formula (11) is transformed into formula (12):

[0122]

[0123] Among them, ω:||f ω || L ≤K means that the condition for determining ω is f ω The norm of is less than K, and L represents the preset value.

[0124] Ignore the multiplication factor of parameter K and transform the function f ω (x) is expressed as the discriminator D(x), then the formula of Wasserstein distance can be obtained, see formula (13):

[0125]

[0126] In order to make the discriminator D strictly meet the 1-Lipschitz constraint and avoid the fluctuation of Wasserstein distance caused by gradient explosion during training, the gradient penalty (GP) is introduced to regularize the optimization target of the discriminator and limit the range of its gradient change, resulting in formula (14):

[0127]

[0128] Among them, λ represents the regularization coefficient, represents the difference sample between the vibration signal sample and the artificial data after interpolation, ε represents the coefficient, || || p represents the p-norm, represents the gradient operator.

[0129] The generator and discriminator losses after the introduction of Wasserstein distance and gradient penalty are shown in formula (1) and formula (2) respectively:

[0130]

[0131] To address the vanishing gradient problem caused by asynchronous training of the generator and discriminator, this application introduces the Wasserstein distance as the network loss function, effectively reducing the probability of vanishing gradients during model training. At the same time, it increases the training ratio of the generator and discriminator, improving the training effect of the generator in each round of iterative training.

[0132] In a specific embodiment, the generative adversarial network is trained based on a preset learning rate variation formula to optimize model parameters.

[0133] The learning rate change formula is shown in formula (15):

[0134] lr=lr0 / (1+exp(-k*((e max -e+1) / W-x0)))………………(15)

[0135] Among them, lr represents the learning rate, e represents the number of iterations in the model training process, and e max Indicates the maximum number of iterations, e∈(1,e max ), W=(e max -1) / C i Represents the rate of change of the model function of the generated adversarial network; C i Indicates the number of propagations required for the learning rate to reach the flat stage; x0 = L*(e max +1)(e max -1) / 2, lr0 represents the initial learning rate, k is the coefficient, which is a constant.

[0136] Specifically, to improve the convergence performance of the generative adversarial network during training, this application uses a dynamic learning rate parameter to increase the learning rate in the early stages of model training to more quickly learn the distribution characteristics of the data. Furthermore, as training progresses, the learning rate is gradually reduced until it stops changing.

[0137] This application improves the convergence effect of the model through a dynamic learning rate.

[0138] The embodiment of the present application also provides a method for generating a vibration signal based on a generative adversarial network, wherein the generative adversarial network is obtained based on the training method described in any of the above embodiments, such as Figure 4 As shown, the method includes:

[0139] Step 401: Generate a control instruction for instructing a generative adversarial network to generate a vibration signal.

[0140] Step 402 : Based on the control instruction, vibration information is generated by a generator of a generative adversarial network, so as to use the vibration signal as a training sample of a fault recognition model to train the fault recognition model.

[0141] Among them, taking the engine as an example, equipment failures include: abnormal fuel injection quantity failure, valve clearance failure, abnormal injection advance angle failure, etc.

[0142] The embodiment of the present application also provides a training device for a generative adversarial network for generating vibration signals. The specific implementation of the device can refer to the description of the training method for a generative adversarial network for generating vibration signals, and the repeated parts are not repeated. Figure 5 As shown, the device includes:

[0143] An acquisition module 501 is configured to acquire a vibration signal sample, wherein the vibration signal sample includes a vibration signal data segment and a category label sample corresponding to the vibration signal data segment, and the vibration signal sample is obtained based on fault data when a device fails;

[0144] A first generating module 502 is configured to generate a time domain signal sample by using two parallel deconvolution networks in a generator of a generative adversarial network, wherein the time domain signal sample includes: a time domain signal data segment having a data length consistent with the vibration signal data segment, and a generated category label corresponding to the time domain signal data segment;

[0145] Prediction module 503, configured to input the vibration signal samples and the time domain signal samples into the discriminator of the generative adversarial network, obtain signal sample features through two parallel feature extraction networks in the discriminator, and output the predicted authenticity and predicted category of each signal sample based on the signal sample features, wherein the predicted authenticity of the signal sample is used to indicate whether the signal sample is generated by the generator;

[0146] The training module 504 is used to optimize the model parameters of the generative adversarial network based on a first consistency between the predicted authenticity and the actual authenticity corresponding to the signal sample, a first size relationship between the first consistency and a first preset value, a second consistency between the predicted category and the category label sample or the generated category label, and a second size relationship between the second consistency and a second preset value, and execute the step of generating time domain signal samples through the generator of the generative adversarial network until the first consistency is less than the first preset value and the second consistency is greater than the second preset value, wherein the first preset value is less than the second preset value.

[0147] In a specific embodiment, the prediction module 503 is configured to perform the following prediction process on each signal sample through the discriminator:

[0148] The signal samples are Fourier transformed to obtain the real and imaginary components of the signal samples in the frequency domain; the real component is input into the first feature extraction network to obtain the real component feature output by the first feature extraction network; and the imaginary component is input into the second feature extraction network to obtain the imaginary component feature output by the second feature extraction network, wherein the first feature extraction network and the second feature extraction network are two parallel feature extraction networks; the real component feature and the imaginary component feature are fused to obtain the fused feature, and the authenticity and prediction category are predicted based on the fused feature output.

[0149] In one embodiment, the discriminator includes a true / false discriminator and a category classifier. Prediction module 503 is configured to input the fused features into the true / false discriminator to obtain a predicted true / false output from the true / false discriminator, and to input the fused features into the category classifier to obtain a predicted category output from the category classifier.

[0150] In a specific embodiment, the first generation module 502 is used to input a random signal sample into the generator, dimensionally integrate the random signal sample and the sample label of the random signal sample through the fully connected layer of the generator to obtain a target vector; input the target vector into the first deconvolution network and the second deconvolution network respectively to obtain the real characteristic vector output by the first deconvolution network and the imaginary characteristic vector output by the second deconvolution network, wherein the first deconvolution network and the second deconvolution network are two parallel deconvolution networks; combine the real characteristic vector and the imaginary characteristic vector into a complex domain spectrum, and perform Fourier transform processing to obtain a time domain signal sample.

[0151] In one specific embodiment, the training module 504 is further configured to perform model training using a preset loss function during training of the generative adversarial network. The preset loss function includes a first loss function corresponding to the generator and a second loss function corresponding to the discriminator.

[0152] Among them, the first loss function includes:

[0153] L G =-E x~Pg [D(x)]-E[logP(C=c|X real )]-E[logP(C=c|X fake )];

[0154] Among them, L G Represents the loss value obtained based on the first loss function, X real Represents the vibration signal sample, X fake represents the time domain signal sample, C represents the classification, c represents the classification result, P(C=c|X real ) represents the probability of correct classification of vibration signal samples, P(C=c|X fake ) represents the probability of correct classification of time domain signal samples, D(x) represents the discriminator, where x represents the current training input data, P g Represents the data distribution of time-domain signal samples.

[0155] Among them, the second loss function includes:

[0156]

[0157] Among them, L DRepresents the loss value obtained based on the second loss function, λ represents the regularization coefficient, represents the difference sample between the vibration signal sample and the artificial data after interpolation, ε represents the coefficient, || || p represents the p-norm, represents the gradient operator, P data represents the data distribution of vibration signal samples, Represents the data distribution of the difference samples.

[0158] In a specific embodiment, the training module 504 is used to train the generative adversarial network based on a preset learning rate change formula to optimize model parameters.

[0159] Among them, the learning rate change formula includes:

[0160] lr=lr0 / (1+exp(-k*((e max -e+1) / W-x0)));

[0161] Among them, lr represents the learning rate, e represents the number of iterations in the model training process, and e max Indicates the maximum number of iterations, e∈(1,e max ), W=(e max -1) / C i Represents the rate of change of the model function of the generated adversarial network; C i Indicates the number of propagations required for the learning rate to reach the flat stage; x0 = L*(e max +1)(e max -1) / 2, lr0 represents the initial learning rate, k is the coefficient, which is a constant.

[0162] The embodiment of the present application also provides a device for generating a vibration signal based on a generative adversarial network. The specific implementation of the device can refer to the description of the method for generating a vibration signal based on a generative adversarial network, and the repetitions are not repeated here. Figure 6 As shown, the device includes:

[0163] The second generating module 601 is used to generate a control instruction for instructing the generative adversarial network to generate a vibration signal;

[0164] The third generating module 602 is used to generate vibration information based on the control instruction through the generator of the generative adversarial network, so as to use the vibration signal as a training sample of the fault recognition model to train the fault recognition model.

[0165] Figure 7 An example of a physical structure diagram of an electronic device is shown below. Figure 7As shown, the electronic device may include: a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other via the communication bus 704. The processor 701 may call logic instructions in the memory 703 to execute a training method for a generative adversarial network for generating a vibration signal, or a method for generating a vibration signal based on a generative adversarial network.

[0166] In addition, the logic instructions in the above-mentioned memory 703 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0167] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the training method of the generative adversarial network for generating vibration signals provided by the above methods, or the method for generating vibration signals based on the generative adversarial network.

[0168] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the training method of a generative adversarial network for generating vibration signals provided in the above-mentioned embodiments, or the method for generating vibration signals based on a generative adversarial network.

[0169] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0170] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0171] Finally, it should be noted that the above description is merely a preferred embodiment of the present application and the present application is not limited to the above embodiments. It is understood that other improvements and variations directly derived or conceived by those skilled in the art without departing from the spirit and concept of the present application should be considered to be included within the scope of protection of the present application.

Claims

1. A training method for a generative adversarial network for generating vibration signals, characterized in that: The method comprises: Acquire a vibration signal sample, wherein the vibration signal sample includes: a vibration signal data segment and a category label sample corresponding to the vibration signal data segment, and the vibration signal sample is obtained based on fault data when a device fails; Generate a time domain signal sample by two parallel deconvolution networks in a generator of a generative adversarial network, wherein the time domain signal sample includes: a time domain signal data segment having a data length consistent with the vibration signal data segment, and a generated category label corresponding to the time domain signal data segment; Inputting the vibration signal sample and the time domain signal sample into the discriminator of the generative adversarial network, obtaining signal sample features through two parallel feature extraction networks in the discriminator, and outputting the predicted truth of each signal sample and the predicted category of each signal sample based on the signal sample features, wherein the predicted truth of the signal sample is used to indicate whether the signal sample is generated by the generator; Based on the first consistency between the predicted authenticity and the actual authenticity corresponding to the signal sample, the first size relationship between the first consistency and a first preset value, the second consistency between the predicted category and the category label sample or the generated category label, and the second size relationship between the second consistency and a second preset value, the model parameters of the generative adversarial network are optimized, and the step of generating time domain signal samples through the generator of the generative adversarial network is performed until the first consistency is less than the first preset value and the second consistency is greater than the second preset value, wherein the first preset value is less than the second preset value.

2. The training method of a generative adversarial network for generating vibration signals according to claim 1, characterized in that The signal sample features are obtained by two parallel feature extraction networks in the discriminator, and the predicted authenticity and predicted category of each signal sample are output based on the signal sample features, including: The discriminator performs the following prediction process on each signal sample: Performing Fourier transform on the signal samples to obtain real and imaginary components of the signal samples in the frequency domain; Inputting the real component into a first feature extraction network to obtain a real component feature output by the first feature extraction network; and inputting the imaginary component into a second feature extraction network to obtain an imaginary component feature output by the second feature extraction network, wherein the first feature extraction network and the second feature extraction network are two parallel feature extraction networks; The real component feature and the imaginary component feature are fused to obtain a fused feature, and the predicted truth and the predicted category are output based on the fused feature.

3. The training method of a generative adversarial network for generating vibration signals according to claim 2, characterized in that: The discriminator includes: a true-false discriminator and a category classifier; The discriminator outputs the predicted authenticity of each signal sample and the predicted category of each signal sample, including: The fused features are input into the authenticity discriminator to obtain the predicted authenticity output by the authenticity discriminator; and the fused features are input into the category classifier to obtain the predicted classification output by the category classifier.

4. The training method for a generative adversarial network for generating vibration signals according to any one of claims 1 to 3, characterized in that: The time domain signal samples are generated by two parallel deconvolution networks in the generator of the generative adversarial network, including: Inputting a random signal sample into the generator, and dimensionally integrating the random signal sample and the sample label of the random signal sample through the fully connected layer of the generator to obtain a target vector; Inputting the target vector into the first deconvolution network and the second deconvolution network respectively, to obtain a real feature vector output by the first deconvolution network and an imaginary feature vector output by the second deconvolution network, wherein the first deconvolution network and the second deconvolution network are two parallel deconvolution networks; The real eigenvector and the imaginary eigenvector are combined into a complex domain spectrum, and Fourier transform processing is performed to obtain the time domain signal sample.

5. The training method for a generative adversarial network for generating vibration signals according to any one of claims 1 to 3, characterized in that: In the process of training the generative adversarial network, a preset loss function is used to perform model training; The preset loss function includes: a first loss function corresponding to the generator and a second loss function corresponding to the discriminator; The first loss function includes: L G =-E x~Pg [D(x)]-E[logP(C=c|X real )]-E[logP(C=c|X fake )]; Among them, L G Represents the loss value obtained based on the first loss function, X real Represents the vibration signal sample, X fake represents the time domain signal sample, C represents the classification, c represents the classification result, P(C=c|X real ) represents the probability of correct classification of vibration signal samples, P(C=c|X fake ) represents the probability of correct classification of time domain signal samples, D(x) represents the discriminator, where x represents the current training input data, P g Represents the data distribution of time domain signal samples; The second loss function includes: Among them, L D Represents the loss value obtained based on the second loss function, λ represents the regularization coefficient, represents the difference sample between the vibration signal sample and the artificial data interpolation, ε represents the coefficient, p represents the p-norm, represents the gradient operator, P data represents the data distribution of vibration signal samples, Represents the data distribution of the difference samples.

6. The training method for a generative adversarial network for generating vibration signals according to any one of claims 1 to 3, characterized in that: Optimizing the model parameters of the generative adversarial network until the first consistency is less than a first preset value includes: Training the generative adversarial network based on a preset learning rate change formula to optimize the model parameters; The learning rate change formula includes: lr=lr0 / (1+exp(-k*((e max -e+1) / W-x0))); Among them, lr represents the learning rate, e represents the number of iterations in the model training process, and e max Indicates the maximum number of iterations, e∈(1,e max ), W=(e max -1) / C i Represents the rate of change of the model function of the generated adversarial network; C i Indicates the number of propagations required for the learning rate to reach the flat stage; x0 = L*(e max +1)(e max -1) / 2, lr0 represents the initial learning rate, k is the coefficient, which is a constant.

7. A method for generating a vibration signal based on the generative adversarial network according to any one of claims 1 to 6, characterized in that: The method comprises: generating a control instruction for instructing the generative adversarial network to generate a vibration signal; Based on the control instruction, vibration information is generated by the generator of the generative adversarial network, so as to use the vibration signal as a training sample of the fault recognition model to train the fault recognition model.

8. A training device for a generative adversarial network for generating vibration signals, characterized in that: The training device comprises: An acquisition module is configured to acquire a vibration signal sample, wherein the vibration signal sample includes: a vibration signal data segment and a category label sample corresponding to the vibration signal data segment, and the vibration signal sample is obtained based on fault data when a device fails; a first generation module, configured to generate a time domain signal sample by using two parallel deconvolution networks in a generator of a generative adversarial network, wherein the time domain signal sample includes: a time domain signal data segment having a data length consistent with that of the vibration signal data segment, and a generated category label corresponding to the time domain signal data segment; a prediction module, configured to input the vibration signal samples and the time domain signal samples into the discriminator of the generative adversarial network, obtain signal sample features through two parallel feature extraction networks in the discriminator, and output the predicted authenticity of each signal sample and the predicted category of each signal sample based on the signal sample features, wherein the predicted authenticity of the signal sample is used to indicate whether the signal sample is generated by the generator; A training module is used to optimize the model parameters of the generative adversarial network based on a first consistency between the predicted authenticity and the actual authenticity corresponding to the signal sample, a first size relationship between the first consistency and a first preset value, a second consistency between the predicted category and the category label sample or the generated category label, and a second size relationship between the second consistency and a second preset value, and to execute the step of generating time domain signal samples through the generator of the generative adversarial network until the first consistency is less than the first preset value and the second consistency is greater than the second preset value, wherein the first preset value is less than the second preset value.

9. A vibration signal generation device based on a generative adversarial network, characterized in that: The generating device comprises: A second generating module is used to generate a control instruction for instructing the generative adversarial network to generate a vibration signal; The third generating module is used to generate vibration information based on the control instruction through the generator of the generative adversarial network, so as to use the vibration signal as a training sample of the fault recognition model to train the fault recognition model.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the steps of the training method of the generative adversarial network for generating vibration signals as described in any one of claims 1 to 6, or implements the steps of the method for generating vibration signals based on the generative adversarial network as described in claim 7.

Citation Information

Patent Citations

  • Fault diagnosis method based on generative adversarial network and auto-encoder

    CN115238747A

  • Rotary machinery fault diagnosis method based on improved auxiliary classification generative adversarial network

    CN117290771A