The invention belongs to the field of mechanical processing state monitoring and specifically relates to a data augmentation method based on generative adversarial networks in tool condition monitoring.
Tool wear is a common problem in metal cutting. The cutting edge of the tool is passivated by the machining of the material, which increases the friction between the tool and the workpiece, and also increases the power consumption. If the tool wear state cannot be judged in time, the machining quality and efficiency will be affected.
Thanks to the development of deep learning technology, it has become a very effective method to indirectly monitor tool condition by using deep learning network. However, these methods are all based on big data of processing process. In most machining processes, the tool usually works in normal state, and the data under abnormal state can be collected very small, which is prone to the problem of unbalanced data set. The lack of abnormal state sample data and the problem of data imbalance seriously affect the prediction accuracy of deep learning networks. The traditional way to expand sample data set is oversampling, but oversampling only reuses a small amount of sample information, and cannot automatically learn the data distribution characteristics of samples. Therefore, how to obtain the sample data of abnormal state has become an urgent problem to be solved.
Generative Adversarial Networks (GANs), as unsupervised learning models proposed in 2014, have broad application prospects in the field of data enhancement and processing condition monitoring. It can generate a large number of sample data by learning the distribution of a small number of samples. This feature is very suitable for solving the problem of lack of balanced sample data sets in processing condition monitoring.
The invention provides a data augmentation method based on generative adversarial networks in tool condition monitoring, aiming at the problem that the prediction accuracy of deep learning network is difficult to improve due to the imbalance of tool condition monitoring data set. The generator and discriminator in the generative adversarial network are both multi-layer perceptron structures. Adversarial training is used between the two to complete the process of establishing the generative adversarial network model. Use the trained generator to generate sample data, and combine the deep learning network prediction model to verify the availability of the generated sample data.
The technical solution of the invention: a data augmentation method based on generative adversarial networks in tool condition monitoring. Firstly, the sensor acquisition system is used to obtain the vibration signal and noise signal during the cutting process of the tool; second, the noise data subject to the prior distribution is input to the generator to generate data, and the generated data and the collected real sample data are input to the discriminator for identification, the confrontation training between the generator and the discriminator until the training is completed; then, use the trained generator to generate sample data, and determine whether the generated sample data and the actual tool state sample data are similar in distribution; finally, combined with the accuracy of the deep learning network model to predict the state of the tool to verify the availability of the generated data; the specific steps are as follows:
First step, collect vibration and sound signals during tool cutting
Two acceleration sensors are installed on the nose of the spindle and the front bearing of the spindle respectively to collect the vibration signals during the machining process, and the acoustic sensor was installed on the worktable to collect the cutting noise signals during the machining process;
Second step, build a generative adversarial network model and conduct adversarial training
The generative adversarial network framework adopted by this method is composed of a generator and a discriminator; both the generator and the discriminator are multi-layer perceptron structures, where the generator is responsible for generating pseudo data with the same dimensions as the real data, and the discriminator is responsible for distinguishing the real data from the generated data; during the adversarial training process, the generator attempts to use the generated pseudo data to fool the discriminator to make it discriminate true, and the discriminator distinguishes the generated data and the real data by improving its discriminating ability, and the two play the game, and eventually reach Nash equilibrium, that is, the sample data generated by the generator is no different from the real sample data, and the discriminator cannot distinguish the generated sample data from the real sample data;
The number of tool state samples collected by this method is 1, and the dimension of the vibration signal is 6000, which is set to {v(i)}i=1l, where v(i)∈(m), m=6000, the dimension of the noise data set is 1000, which is set to {n(i)}i=1l, where n(i)∈(k), k=1000, the tool state data set {tool(i)}i=ll={v(i), N(i)}i=ll, where tool(i)∈(u), u=7000; the tool state data set of the input discriminator is normalized by the maximum-minimum method, so that the input data is converted into a number between [0,1], and after the sample data is generated, the inverse normalization processing is carried out, the form of normalization function is shown in formula (1), and the form of inverse normalization function is shown in formula (2):
Where, tool(i) is the original data of the tool state, tool(i)′ is the normalized data, toolmin(i) is the minimum number in the data sequence, toolmax(i) is the maximum number in the sequence;
Both the generator and the discriminator use a three-layer fully connected neural network. The input data set is the normalized data set. The mapping formula from the input layer to the hidden layer and the hidden layer to the output layer is shown in equation (3):
h
iƒθ(w*tool(i)′+b) (3)
Where, ƒ is the activation function and θ={w, b} is the parameter matrix of the network, where w is the connection weight between neurons in the input layer, hidden layer, and output layer, and b is the threshold of neurons in the hidden layer and output layer;
The activation function of the hidden layer uses the ReLU function, and the function form is as shown in formula (4):
The activation function of the output layer uses the Sigmoid function, and the function form is as shown in formula (5):
The output of the discriminator is a binary classification, the last layer uses the Sigmoid function, and the output probability value is shown in equation (6):
The objective function set by this method is shown in equation (7):
The objective function and optimal solution of the discriminator are shown in equations (8) and (9):
The objective function of the generator is shown in equation (10):
Where, Pdata(x) is the data distribution of the tool state data set {tool(i)′}i=1l, and Pz(z) is a prior noise distribution; D(x) represents the probability that x comes from {tool)i)′}i=1l; D(G(z)) represents the probability that G(z) comes from generated data, where G(z) is the sample data generated by the generator from the noise data that obey the prior distribution; Ex˜P
Based on the objective function, the Adam optimization algorithm is used to update the parameters;
The training steps of the generative adversarial network are as follows:
Third step, compare the similarity between the generated data and the real data
Use the trained generator to generate sample data, compare and analyze the time-frequency graph of the generated tool state sample data {toolF(i)′}i=1p and the real tool state sample data {toolF(i)′}i=1p, and determine whether the distribution of the generated sample data and the real sample data is the same; if they are the same, the generated sample data is denormalized, {toolF(i)′}i=1p is the generated tool state sample data after denormalization, and {toolF(i)′}i=1p will be added to the original unbalanced data set {toolF(i)′}i=1p, the enhanced data set is {toolmix(i)}i=1l+p{{toolF(i)}i=1p; {tool(i)}i=1l}; if they are not the same, return to the generative adversarial network to continue adversarial training, until the distribution of the generated sample data and the real sample data is the same;
Fourth step, verify the availability of the generated sample data
The original unbalanced data set and the enhanced data set are used to train the deep learning network model to test the prediction accuracy of the two and verify the availability of the generated data; the training set and the test set do not have any intersection, and the test set is composed of real data.
Compared with the prior art, the beneficial effects of the present invention are:
In the picture: 1 workpiece holder; 2 workpiece; 3 machine tool gear box; 4 microphone; 5 bed; 61# three-way acceleration sensor; 7 cutter bar; 82# three-way acceleration sensor; 9 cutter bar holder.
In order to make the objects, technical solutions, and advantages of the present invention more clear, an embodiment of the present invention will be described in detail with reference to
The two three-way acceleration sensors are adsorbed and pasted on the two cage bearings of the deep hole boring bar through the magnetic base, and the sound sensor is placed at one end of the inner hole of the workpiece to collect the cutter bar vibration and cutting noise in the process of machining. The installation position of the sensor is shown in
The sample data of the blunt state in Table 1 is obviously less than the sample data of the normal state and the broken state, so we generate the sample data of the blunt state.
In the generative adversarial network model adopted by the invention, the generator and the discriminator both adopt a three-layer fully connected neural network model, in which the number of neurons in the hidden layer of the generator and discriminator is set to 125, and the number of neurons in the input layer of the generator is 100. The network structure is shown in
The trained generator is used to generate sample data, and MATLAB is used to make the time-frequency diagram of the real sample data and the generated sample data, as shown in
The deep learning network adopts the deep belief networks model, and the parameter settings are as follows: the learning rate is 0.001; the number of iterations of the unsupervised training process is 100, and the number of iterations of the fine-tuning process is 200. The hidden layer has three layers, and the number of neurons in each layer is 100, 60, and 30, respectively. Since the momentum gradient descent method is superior to the gradient descent method, we use the momentum gradient descent method to optimize the parameters, and the momentum term is 0.9. The sample data is shown in Table 2. The original unbalanced data set and enhanced data set are divided into training set and test set according to the ratio of 4:1, respectively. The network is trained by training set and tested on the test set.
From the results, the test accuracy of the unbalanced data set is 97.1%, and the error rate is 2.9%; the test accuracy of the enhanced data set is 99.2%, and the error rate is 0.8%. The comparison between the two shows that the prediction accuracy of the deep learning network model has increased by 2.9%, while the error rate has dropped by more than three times. This verifies the availability of the generated sample data. The training process and training results of the enhanced data set on the deep learning network are shown in
Number | Date | Country | Kind |
---|---|---|---|
201911361333.6 | Dec 2019 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2020/077095 | 2/28/2020 | WO | 00 |