Bearing fault diagnosis method based on semi-supervised generation countermeasure network

文档序号:1657586 发布日期:2019-12-27 浏览:9次 中文

阅读说明:本技术 一种基于半监督生成对抗网络的轴承故障诊断方法 (Bearing fault diagnosis method based on semi-supervised generation countermeasure network ) 是由 陶洪峰 王鹏 魏强 庄志和 周龙辉 王连云 于 2019-09-23 设计创作,主要内容包括:本发明涉及一种基于半监督生成对抗网络的轴承故障诊断方法,包括:获取轴承在不同状态下的振动信号,并划分为多个样本;将样本随机划分为训练集和测试集,在训练集中构建少量不同故障的标签样本;构建一维半监督生成对抗网络模型;将训练集输入该对抗网络进行训练;训练好的对抗网络用于测试集中轴承故障的诊断。本发明直接输入原始采集的振动信号,经过训练直接输出测试集中轴承故障类别,实现了端到端的最优诊断模型;并通过使用一维卷积层和一维反卷积层,强化了一维半监督生成对抗网络提取特征的能力;本发明为一种半监督训练方式,不需要大量的人工标签样本,大大节约了时间和人力成本,并且轴承故障诊断效果和抗噪声能力强,稳定性好。(The invention relates to a bearing fault diagnosis method based on a semi-supervised generation countermeasure network, which comprises the following steps: obtaining vibration signals of a bearing in different states, and dividing the vibration signals into a plurality of samples; randomly dividing the samples into a training set and a testing set, and constructing a small number of label samples with different faults in the training set; constructing a one-dimensional semi-supervised generation confrontation network model; inputting a training set into the confrontation network for training; the trained countermeasure network is used for testing the diagnosis of concentrated bearing faults. The method directly inputs the originally acquired vibration signal, directly outputs the concentrated bearing fault category after training, and realizes an end-to-end optimal diagnosis model; the capability of one-dimensional semi-supervised generation of the confrontation network for extracting features is enhanced by using the one-dimensional convolution layer and the one-dimensional deconvolution layer; the invention is a semi-supervised training mode, does not need a large number of manual label samples, greatly saves time and labor cost, and has strong bearing fault diagnosis effect and anti-noise capability and good stability.)

1. A bearing fault diagnosis method based on a semi-supervised generation countermeasure network is characterized by comprising the following steps: the method comprises the following steps:

the first step is as follows: acquiring a bearing vibration signal through vibration signal acquisition equipment, wherein the vibration signal is one-dimensional time sequence data and has the characteristics of periodicity and time sequence;

the second step is that: taking discrete data acquired by one bearing rotation circle as a sample, and dividing a data set acquired in the first step into a plurality of samples;

the third step: randomly dividing the samples in the second step into a training set and a testing set, and enabling the number ratio of the samples in the training set to the samples in the testing set to be 9: 1; determining the number of samples with labels in a training set, and labeling the samples with the labels;

the fourth step: inputting the training set in the third step into a pre-established one-dimensional semi-supervised generated countermeasure network for iterative training, and adjusting the network weight by using an Adam algorithm in iteration;

the one-dimensional semi-supervised generation confrontation network mainly comprises a generator and a classifier; the generator generates a set of false samples matching the statistical distribution in the training set; the generator and the classifier both comprise an input layer, an intermediate layer and an output layer;

the structure of the generator is as follows: the input of an input layer is 128-dimensional Gaussian noise with the mean value of-1 and the variance of 1 Gaussian distribution, the activation function of an output layer of the generator is a Tanh function, the middle layer of the generator comprises two fully-connected layers and four one-dimensional deconvolution layers, convolution kernels of the one-dimensional deconvolution layers are set to be 5x1, and the four one-dimensional deconvolution layers are located between the two fully-connected layers; the activation function between the one-dimensional deconvolution layers is a ReLU function, and batch normalization processing is performed after each deconvolution;

the loss function of the generator is:

Lnew=Ez~p(z)[log(1-C(G(z)))]+0.01*Lmatch

wherein: l ismatchThe loss function of the generator under the characteristic matching method is shown as the following equation:x is the sample in the training set, pdata(x) The data distribution of x, q (x) is the characteristic value of x in the middle layer of the classifier, p (z) is the data distribution of z, and q (G (z)) is the characteristic value of the sample in the false sample set in the middle layer of the classifier; c (g (z)) is the probability that a sample in the set of false samples belongs to a certain fault category;

the structure of the classifier is as follows: the input of an input layer is a sample set mixed by a training set and a false sample set, the activation function of an output layer of the classifier is a Softmax function, a middle layer of the classifier comprises a full connection layer and five one-dimensional convolutional layers, the convolutional core of the first one-dimensional convolutional layer is set to be 5x1, the convolutional cores of the other four one-dimensional convolutional layers are set to be 3x1, and the full connection layer is positioned behind the five one-dimensional convolutional layers; the activation function between the one-dimensional convolution layers is a LeakyReLU function, and batch normalization processing is performed after convolution is completed each time;

the loss function of the classifier is:

wherein:

Lunsup=Lunlabel+Lgen

Lgen=-Ex~Glog[pmod(y=m+1|x)]

x is the real sample collected;y is a label; e is desired; p is a radical ofmod(y | x, y < m +1) represents the probability that x is a certain label; p is a radical ofmod(y +1| x) represents the probability that x is a false sample; l issupRepresenting a loss function when the classifier trains the labeled samples; l isunsupRepresenting a loss function when the classifier trains unlabeled exemplars, the unlabeled exemplars including unlabeled exemplars in the training set and false exemplars generated by the generator; l isunlabelRepresenting a loss function when no label sample exists in a classifier training set; l isgenRepresenting a loss function when the classifier trains the samples in the false sample set;

the iterative training comprises the following steps:

1) sampling in Gaussian noise to generate a vector z, inputting the vector to a generator, and outputting the vector through a one-dimensional deconvolution layer and a full-link layer to obtain a false sample set G (z);

2) inputting samples in a training set and samples in a false sample set into a classifier according to batches, extracting features through a one-dimensional convolution layer and a full connection layer, and outputting normalized probability values C (x) and C (G (z)) through a Softmax function;

3) updating the weight parameter of the one-dimensional semi-supervised generated countermeasure network:

3.1) fixing the generator parameters to train a classifier; if the input in the classifier is the unlabeled sample in the training set, L is addedunlabelAs a loss function, if the input of the classifier is the labeled sample in the training set, then L is setsupAs a loss function, if the input to the classifier is a sample generated by the generator, L will begenAs a loss function; adjusting parameters of the classifier by using an Adam algorithm;

3.2) fixing the classifier parameters to train the generator; the generator performs feature matching on the sample training set and the false sample set G (z) by LnewAs a loss function, and adjusting the parameters of the generator by using an Adam algorithm;

4) repeating 1) to 3) until a predetermined number of iterations is reached;

the fifth step: inputting the test set in the third step into the one-dimensional semi-supervised generation antagonistic network trained in the fourth step, enabling the test set samples to enter a classifier trained in the fourth step, extracting features through a one-dimensional convolution layer and a full connection layer, performing batch normalization processing, outputting results through an output layer of the classifier, namely finishing fault category judgment of the test set samples, and outputting diagnosis results;

the capability of one-dimensional semi-supervised generation of the confrontation network for extracting features is enhanced by using the one-dimensional convolution layer and the one-dimensional deconvolution layer; and performing iterative training on the classifier by utilizing a training set consisting of labeled samples and unlabeled samples and combining a false sample set generated by the generator, so that the classifier performs fault classification on the unlabeled samples in the test set.

Technical Field

The invention relates to the technical field of bearing fault diagnosis, in particular to a bearing fault diagnosis method based on a semi-supervised generation countermeasure network.

Background

In mechanical systems and electric systems, rolling bearings are one of important basic components, and under various complex conditions, defects of various forms such as deformation, abrasion, corrosion, cracks and the like of rolling elements often occur easily. Damaged rolling bearings may cause significant economic losses in the production process in engineering practice and may even cause personnel safety accidents. Therefore, the method has important significance for the research on the fault diagnosis of the rolling bearing.

The failure types of the rolling bearing are classified according to the failure modes, mainly comprise peeling, abrasion, corrosion and the like, the reasons for the failures are quite complex, the structural design problems are solved, and the failure of the bearing can be caused by improper assembly, use and maintenance in the operation process. During the operation of the bearing, if some parts are in failure, the failure point and the contact part thereof can generate impact pulses along with the rotation of the bearing, and the pulses can form a pulse modulation phenomenon on the natural frequency of the bearing. The failure occurs in different parts of the bearing, and the impact pulse forms of the failure are different, particularly the frequency of the contact part passing through the damaged part is different, and the frequency is called as the characteristic frequency of the failure. Therefore, the failure of the rolling bearing can be classified into 4 types of failure of the inner ring, failure of the outer ring, failure of the rolling element, and failure of the cage, according to the location where the failure occurs.

Disclosure of Invention

The bearing fault diagnosis method based on the semi-supervised generation countermeasure network is reasonable in structure, so that bearing fault diagnosis is realized based on fewer label samples, time and labor cost are greatly saved, and the bearing fault diagnosis method based on the semi-supervised generation countermeasure network is high in diagnosis accuracy, strong in anti-noise capability and good in stability.

The technical scheme adopted by the invention is as follows:

a bearing fault diagnosis method based on a semi-supervised generation countermeasure network comprises the following steps:

the first step is as follows: acquiring a bearing vibration signal through vibration signal acquisition equipment, wherein the vibration signal is one-dimensional time sequence data and has the characteristics of periodicity and time sequence;

the second step is that: taking discrete data acquired by one bearing rotation circle as a sample, and dividing a data set acquired in the first step into a plurality of samples;

the third step: randomly dividing the samples in the second step into a training set and a testing set, and enabling the number ratio of the samples in the training set to the samples in the testing set to be 9: 1; determining the number of samples with labels in a training set, and labeling the samples with the labels;

the fourth step: inputting the training set in the third step into a pre-established one-dimensional semi-supervised generated countermeasure network for iterative training, and adjusting the network weight by using an Adam algorithm in iteration;

the one-dimensional semi-supervised generation confrontation network mainly comprises a generator and a classifier; the generator generates a set of false samples matching the statistical distribution in the training set; the generator and the classifier both comprise an input layer, an intermediate layer and an output layer;

the structure of the generator is as follows: the input of an input layer is 128-dimensional Gaussian noise with the mean value of-1 and the variance of 1 Gaussian distribution, the activation function of an output layer of the generator is a Tanh function, the middle layer of the generator comprises two fully-connected layers and four one-dimensional deconvolution layers, convolution kernels of the one-dimensional deconvolution layers are set to be 5x1, and the four one-dimensional deconvolution layers are located between the two fully-connected layers; the activation function between the one-dimensional deconvolution layers is a ReLU function, and batch normalization processing is performed after each deconvolution;

the loss function of the generator is:

Lnew=Ez~p(z)[log(1-C(G(z)))]+0.01*Lmatch

wherein: l ismatchThe loss function of the generator under the characteristic matching method is shown as the following equation:x is the sample in the training set, pdata(x) The data distribution of x, q (x) is the characteristic value of x in the middle layer of the classifier, p (z) is the data distribution of z, and q (G (z)) is the characteristic value of the sample in the false sample set in the middle layer of the classifier; c (g (z)) is the probability that a sample in the set of false samples belongs to a certain fault category;

the structure of the classifier is as follows: the input of an input layer is a sample set mixed by a training set and a false sample set, the activation function of an output layer of the classifier is a Softmax function, a middle layer of the classifier comprises a full connection layer and five one-dimensional convolutional layers, the convolutional core of the first one-dimensional convolutional layer is set to be 5x1, the convolutional cores of the other four one-dimensional convolutional layers are set to be 3x1, and the full connection layer is positioned behind the five one-dimensional convolutional layers; the activation function between the one-dimensional convolution layers is a LeakyReLU function, and batch normalization processing is performed after convolution is completed each time;

the loss function of the classifier is:

wherein:

Lunsup=Lunlabel+Lgen

Lgen=-Ex~Glog[pmod(y=m+1|x)

x is the real sample collected; y is a label; e is desired; p is a radical ofmod(y|x,y<m +1) represents the probability that x is a certain label; p is a radical ofmod(y +1| x) represents the probability that x is a false sample; l issupRepresenting a loss function when the classifier trains the labeled samples; l isunsupRepresenting a loss function when the classifier trains unlabeled exemplars, the unlabeled exemplars including unlabeled exemplars in the training set and false exemplars generated by the generator; l isunlabelRepresenting a loss function when no label sample exists in a classifier training set; l isgenRepresenting a loss function when the classifier trains the samples in the false sample set;

the iterative training comprises the following steps:

1) sampling in Gaussian noise to generate a vector z, inputting the vector to a generator, and outputting the vector through a one-dimensional deconvolution layer and a full-link layer to obtain a false sample set G (z);

2) inputting samples in a training set and samples in a false sample set into a classifier according to batches, extracting features through a one-dimensional convolution layer and a full connection layer, and outputting normalized probability values C (x) and C (G (z)) through a Softmax function;

3) updating the weight parameter of the one-dimensional semi-supervised generated countermeasure network:

3.1) fixing the generator parameters to train a classifier; if the input in the classifier is the unlabeled sample in the training set, L is addedunlabelAs a loss function, if the input of the classifier is the labeled sample in the training set, then L is setsupAs a loss function, if the input to the classifier is a sample generated by the generator, L will begenAs a loss function; adjusting parameters of the classifier by using an Adam algorithm;

3.2) fixing the classifier parameters to train the generator; the generator performs feature matching on the sample training set and the false sample set G (z) by LnewAs a loss function, and adjusting the parameters of the generator by using an Adam algorithm;

4) repeating 1) to 3) until a predetermined number of iterations is reached;

the fifth step: inputting the test set in the third step into the one-dimensional semi-supervised generation antagonistic network trained in the fourth step, enabling the test set samples to enter a classifier trained in the fourth step, extracting features through a one-dimensional convolution layer and a full connection layer, performing batch normalization processing, outputting results through an output layer of the classifier, namely finishing fault category judgment of the test set samples, and outputting diagnosis results;

the capability of one-dimensional semi-supervised generation of the confrontation network for extracting features is enhanced by using the one-dimensional convolution layer and the one-dimensional deconvolution layer; and performing iterative training on the classifier by utilizing a training set consisting of labeled samples and unlabeled samples and combining a false sample set generated by the generator, so that the classifier performs fault classification on the unlabeled samples in the test set.

The invention has the following beneficial effects:

the invention has compact and reasonable structure and convenient operation, directly inputs the original vibration signal, automatically learns the low-level characteristics through the constructed deep network, gradually forms more abstract high-level representation, and finally directly outputs the bearing fault category, thereby realizing an end-to-end optimal diagnosis model; the one-dimensional convolutional layer and the one-dimensional anti-convolutional layer are combined with the semi-supervised generation countermeasure network, so that the countermeasure network is more suitable for processing one-dimensional time sequence data, the capability of the one-dimensional semi-supervised generation countermeasure network for extracting deep characteristics of bearing signals is enhanced, and good diagnosis effect and noise resistance are achieved; and a semi-supervised training mode based on a small number of label samples greatly saves time and labor cost.

Drawings

Fig. 1 is a block diagram of a one-dimensional semi-supervised generation countermeasure network of the present invention.

Fig. 2 is a flow chart of the fault diagnosis method of the present invention.

Fig. 3 is a diagram of a full connection layer network structure of the present invention.

FIG. 4 is a network structure diagram of a one-dimensional convolutional layer according to the present invention.

Fig. 5 is a network architecture diagram of the generator of the present invention.

FIG. 6 is a network architecture diagram of the classifier of the present invention.

FIG. 7 is a graph showing the trend of the accuracy of the diagnostic result evaluation according to the present invention with different numbers of labeled samples.

FIG. 8 is a training set feature data distribution graph after the 5 th iteration of the present invention.

FIG. 9 is a training set feature data distribution graph after the 25 th iteration of the present invention.

FIG. 10 is a training set feature data distribution graph after the 100 th iteration of the present invention.

FIG. 11 is a graph of the training set feature data distribution after the 300 th iteration of the present invention.

FIG. 12 is a trend chart of the accuracy of the diagnostic result evaluation under different noises according to the present invention.

Detailed Description

The following describes embodiments of the present invention with reference to the drawings.

As shown in fig. 1, a bearing fault diagnosis method based on a semi-supervised generation countermeasure network of the present embodiment includes the following steps:

the first step is as follows: collecting signals: acquiring a bearing vibration signal through vibration signal acquisition equipment, wherein the vibration signal is one-dimensional time sequence data and has the characteristics of periodicity and time sequence along with the rotation of a bearing;

the second step is that: dividing samples: taking discrete data acquired by one bearing rotation circle as a sample, and dividing a data set acquired in the first step into a plurality of samples;

the third step: dividing a training set and a testing set: randomly dividing the samples in the second step into a training set and a testing set, and enabling the number ratio of the samples in the training set to the samples in the testing set to be 9: 1; determining the number of samples with labels in a training set, and labeling the samples with the labels; namely, the training set comprises labeled samples and unlabeled samples, and the testing set comprises unlabeled samples;

the fourth step: training: inputting the training set in the third step into a pre-established one-dimensional semi-supervised generated countermeasure network for iterative training;

the method comprises the steps that a one-dimensional semi-supervised generation countermeasure network, which is abbreviated as 1D-SGAN, mainly comprises a generator and a classifier; the generator generates a false sample set matched with the statistical distribution in the training set; the generator and the classifier respectively comprise an input layer, an intermediate layer and an output layer;

the structure of the generator is as follows: the input of an input layer is 128-dimensional Gaussian noise with the obedient mean value of-1 and the variance of 1 Gaussian distribution, the activation function of an output layer of a generator is a Tanh function, the middle layer of the generator comprises two fully-connected layers and four one-dimensional deconvolution layers, and the convolution kernels of the one-dimensional deconvolution layers are all set to be 5x 1; and the four one-dimensional deconvolution layers are located between the two fully-connected layers, as shown in fig. 5, where size represents the convolution kernel size, num represents the convolution kernel number, and s represents the convolution step size; the activation function between the one-dimensional deconvolution layers is a ReLU function, and batch normalization processing is performed after each deconvolution; the ReLU function helps the generator to realize nonlinear representation and enables the network to be trained more conveniently; the Tanh function is used to limit the generator output to [ -1,1 ];

the loss function of the generator is:

Lnew=Ez~p(z)[log(1-C(G(z)))]+0.01*Lmatch

wherein: l ismatchThe loss function of the generator under the characteristic matching method is shown as the following equation:x is the sample in the training set, pdata(x) The data distribution of x, q (x) is the characteristic value of x in the middle layer of the classifier, p (z) is the data distribution of z, and q (G (z)) is the characteristic value of the sample in the false sample set in the middle layer of the classifier; c (g (z)) is the probability that a sample in the set of false samples belongs to a certain fault category;

the structure of the classifier is as follows: the input of the input layer is a sample set mixed by a training set and a false sample set, the activation function of the output layer of the classifier is a Softmax function, the middle layer of the classifier comprises a full connection layer and five one-dimensional convolutional layers, the convolution kernel of the first one-dimensional convolutional layer is set to be 5x1, the convolution kernels of the other four one-dimensional convolutional layers are set to be 3x1, and the full connection layer is positioned behind the five one-dimensional convolutional layers, as shown in FIG. 6; the activation function between the one-dimensional convolution layers is a LeakyReLU function, and batch normalization processing is performed after convolution is completed each time; the LeakyReLU function helps the classifier to prevent the problem of gradient disappearance, and Softmax is used for predicting the corresponding category of the sample;

the loss function of the classifier is:

wherein:

Lunsup=Lunlabel+Lgen

Lgen=-Ex~Glog[pmod(y=m+1|x)

x is the real sample collected; y is a label; e is desired; p is a radical ofmod(y|x,y<m +1) represents the probability that x is a certain label, i.e. the probability of a fault indicated by a certain label; p is a radical ofmod(y +1| x) represents the probability that x is a false sample; l issupRepresenting a loss function when the classifier trains the labeled samples; l isunsupRepresenting a loss function when the classifier trains unlabeled exemplars, the unlabeled exemplars including unlabeled exemplars in the training set and false exemplars generated by the generator; l isunlabelRepresenting a loss function when no label sample exists in a classifier training set; l isgenRepresenting the loss function of the classifier in training samples in the set of false samples.

Fig. 3 is a network structure diagram of a full connection layer, and fig. 4 is a network structure diagram of a one-dimensional convolutional layer;

as can be seen from fig. 3 and 4, the calculation of the fully connected layer corresponds to summing the entirety of the input X; the one-dimensional convolutional layer is equivalent to translation summation on X, and each obtained f node value retains a certain continuity attribute; compared with a fully connected layer, a one-dimensional convolutional layer is more suitable for processing one-dimensional time series data.

Fig. 2 shows a flow chart of training and testing.

The iterative training of the one-dimensional semi-supervised generation countermeasure network comprises the following steps:

1) sampling in Gaussian noise to generate a vector z, inputting the vector to a generator, and outputting the vector through a one-dimensional deconvolution layer and a full-link layer to obtain a false sample set G (z);

2) inputting samples in a training set and samples in a false sample set into a classifier according to batches, extracting features through a one-dimensional convolution layer and a full connection layer, and outputting normalized probability values C (x) and C (G (z)) through a Softmax function;

3) updating the weight parameter of the one-dimensional semi-supervised generated countermeasure network:

3.1) fixing the generator parameters to train a classifier; if the input in the classifier is the unlabeled sample in the training set, L is addedunlabelAs a loss function, if the classifier inputs the labeled bands in the training setSample, then LsupAs a loss function, if the input to the classifier is a sample generated by the generator, L will begenAs a loss function; adjusting parameters of the classifier by using an Adam algorithm;

3.2) fixing the classifier parameters to train the generator; the generator performs feature matching on the sample training set and the false sample set G (z) by LnewAs a loss function, and adjusting the parameters of the generator by using an Adam algorithm;

4) repeating 1) to 3) until a predetermined number of iterations is reached.

The fifth step: and (3) diagnosis: inputting the test set in the third step into the one-dimensional semi-supervised generation antagonistic network trained in the fourth step, enabling the test set samples to enter the classifier trained in the fourth step, extracting features through the one-dimensional convolution layer and the full-connection layer, performing batch normalization processing, outputting results through the output layer of the classifier, namely finishing fault category judgment of the test set samples, and outputting diagnosis results.

By using the one-dimensional convolution layer and the one-dimensional deconvolution layer, the processing of an original vibration signal, namely bearing time sequence data is realized, and the capability of extracting characteristics of a one-dimensional semi-supervised generated countermeasure network is enhanced, so that the bearing fault diagnosis effect is good, and the anti-noise capability is strong; performing iterative training on the classifier by utilizing a training set consisting of labeled samples and unlabeled samples and combining a false sample set generated by a generator, so that the classifier performs fault classification on the unlabeled samples in a test set, and an end-to-end optimal diagnosis model is realized; and a semi-supervised training mode based on the label sample greatly saves time and labor cost.

The classifier of the 1D-SGAN is intended to distinguish whether the input data is labeled true samples, unlabeled true samples, or false samples produced by the generator in the training set, which tries to produce false samples that can spoof the classifier; supposing that for an m-class classification problem, the 1D-SGAN can attach a 'generation' label to a sample generated by a generator as an m + 1-th class, the output dimension of the classifier is increased from m to m +1, and the classifier is continuously trained to identify the difference between the generated sample, a labeled true sample and an unlabeled true sample, so that effective information in the unlabeled sample is learned, and further semi-supervised learning is realized.

When the one-dimensional semi-supervised generated confrontation network is subjected to iterative training, the confrontation network after each iteration is used for predicting a training set, and each iteration means that the 1D-SGAN is trained once by using the training set containing labeled samples and unlabeled samples. And (3) reducing the dimension of the features extracted by the classifier of the training set by using TSNE to obtain two-dimensional attributes so as to visualize the data distribution of the extracted features.

And testing the test set to obtain the accuracy of the one-dimensional semi-supervised generation confrontation network diagnosis.

If the total number of the types of the faults in the test set is m, the number of samples in each type is known and is c1, c 2.. once, cm, respectively, and the classifier predicts the correct number of samples in each type to be x1, x 2.. once, xm, respectively, the diagnosis accuracy is as follows:

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种通用发动机主轴平稳性检测设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!