Data Augmentation Method Based On Generative Adversarial Networks In Tool Condition Monitoring

20210197335 · 2021-07-01

    Inventors

    Cpc classification

    International classification

    Abstract

    The invention provides 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.

    Claims

    1. A data augmentation method based on generative adversarial networks in tool condition monitoring, firstly, sensor acquisition system is used to obtain vibration signal and noise signal during cutting process of the tool; second, noise data subject to prior distribution is input to generator to generate data, and the generated data and collected real sample data are input to discriminator for identification, confrontation training between the generator and the discriminator until training is completed; then, use the trained generator to generate sample data, and determine whether the generated sample data and actual tool state sample data are similar in distribution; finally, combined with accuracy of deep learning network model to predict state of the tool to verify availability of the generated data; wherein the steps are as follows: first step, collect vibration and sound signals during tool cutting two acceleration sensors are installed on nose of spindle and front bearing of the spindle respectively to collect the vibration signals during machining process, and acoustic sensor is installed on worktable to collect 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 the 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 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 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 the method is 1, and dimension of the vibration signal is 6000, which is set to {v.sup.(i)}.sub.i=1.sup.l, where v.sup.(i)∈custom-character.sup.(m), m=6000, dimension of the noise data set is 1000, which is set to {n.sup.(i)}.sub.i=1.sup.l, where n.sup.(i)∈custom-character.sup.(k), k=1000, tool state data set {tool.sup.(i)}.sub.i=1.sup.l={v.sup.(i), n.sup.(i)}.sub.i=1.sup.l, where tool.sup.(i)∈custom-character.sup.(u), u=7000; the tool state data set of 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, inverse normalization processing is carried out, form of normalization function is shown in formula (1), and form of inverse normalization function is shown in formula (2): tool ( i ) .Math. = tool ( i ) - tool min ( i ) tool max ( i ) - tool min ( i ) ( 1 ) tool ( i ) = ( tool max ( i ) - tool min ( i ) ) * tool ( i ) .Math. + tool min ( i ) ( 2 ) where, tool.sup.(i) is original data of the tool state, tool.sup.(i)′ is normalized data, tool.sub.min.sup.(i) is minimum number in the data sequence, tool.sub.max.sup.(i) is maximum number in the sequence; both the generator and the discriminator use a three-layer fully connected neural network; input data set is normalized data set; mapping formula from input layer to hidden layer and the hidden layer to output layer is shown in equation (3):
    h.sup.i=ƒ.sub.θ(w*tool.sup.(i)′+b)  (3) where, ƒ is activation function and θ={w,b} is parameter matrix of the network, where w is connection weight between neurons in the input layer, hidden layer, and output layer, and b is threshold of neurons in the hidden layer and output layer; the activation function of the hidden layer uses ReLU function, and the function form is as shown in formula (4): ReLU ( x ) = { x if .Math. .Math. x < 0 0 if .Math. .Math. x 0 ( 4 ) the activation function of the output layer uses Sigmoid function, and the function form is as shown in formula (5): f ( x ) = 1 1 + e - x ( 5 ) the output of the discriminator is a binary classification, the last layer uses Sigmoid function, and the output probability value is shown in equation (6): p ( y = 1 | x ) = 1 1 + e - θ T x .Math. .Math. p ( y = 0 | x ) = 1 - p ( y = 1 | x ) = e - θ T x 1 + e - θ T x ( 6 ) objective function set by the method is shown in equation (7): min G .Math. .Math. max D .Math. V ( D , G ) = E x P data ( x ) [ log .Math. .Math. D ( x ) ] + E z P z ( z ) [ log ( 1 - D ( G ( z ) ) ) ] ( 7 ) the objective function and optimal solution of the discriminator are shown in equations (8) and (9): max D .Math. V ( D , G ) = E x P data ( x ) [ log .Math. D ( x ) ] + E z P z ( z ) [ log ( 1 - D ( G ( z ) ) ) ] ( 8 ) .Math. D G * ( x ) = p data ( x ) p data ( x ) + p z ( x ) ( 9 ) the objective function of the generator is shown in equation (10): min G .Math. .Math. V ( D , G ) = E z P z ( z ) [ log ( 1 - D ( G ( z ) ) ) ] ( 10 ) where, P.sub.data(x) is data distribution of the tool state data set{tool.sup.(i)′}.sub.i=1.sup.l, and P.sub.z(z) is a prior noise distribution; D(x) represents probability that x comes from {tool.sup.(i)′}.sub.i=1.sup.l; D(G(z)) represents probability that G(z) comes from generated data, where G(z) is sample data generated by the generator from the noise data that obey the prior distribution; E.sub.x˜P.sub.data.sub.(x) represents expectation of x from the data distribution of {tool.sup.(i)′}.sub.i=1.sup.l, E.sub.z˜P.sub.z.sub.(z) represents expectation of z from the noise distribution; the goal of the discriminator is to maximize error function to distinguish between real data and generated data, and the generator is to minimize the error function and generate data samples that are closer to the real sample data distribution; based on the objective function, Adam optimization algorithm is used to update the parameters; the training steps of the generative adversarial network are as follows: (1) the generator generates p false tool state data samples {toolF.sup.(i)′}.sub.i=1.sup.p from random noise; (2) the generated sample data {toolF.sup.(i)′}.sub.i=1.sup.p and original sample data {tool.sup.(i)′}.sub.i=1.sup.l with label 1 are mixed and input into the discriminator; based on loss function, parameters of the generator are fixed, only parameters of the discriminator are updated, and the discriminator is trained to improve the discriminator's ability to distinguish true and false samples; (3) after the discriminator is trained, the label of the generated sample {toolF.sup.(i)′}.sub.i=1.sup.p is set to 1; based on the loss function, the error is back-propagation; in this stage, parameters of the discriminator are frozen and cannot be updated, only parameters in the generator can be updated, and the generator is trained to produce more real data samples; (4) steps (1) to (3) are a training period; after completing a period, training process starts again from (1); after repeating multiple cycles of training the discriminator and generator, the generator's network parameters are saved; third step, compare similarity between the generated data and the real data use the trained generator to generate sample data, compare and analyze time-frequency graph of generated tool state sample data {toolF.sup.(i)′}.sub.i=1.sup.p and real tool state sample data {tool.sup.(i)′}.sub.i=1.sup.l, and determine whether 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.sup.(i)′}.sub.i=1.sup.p is generated tool state sample data after denormalization, and {toolF.sup.(i)′}.sub.i=1.sup.p will be added to the original unbalanced data set {toolF.sup.(i)′}.sub.i=1.sup.l; enhanced data set is {toolmix.sup.(i)}.sub.i=1.sup.l+p={{toolF.sup.(i)}.sub.i=1.sup.p; {tool.sup.(i)}.sub.i=1.sup.l}; 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 prediction accuracy of the two and verify the availability of the generated data; training set and test set do not have any intersection, and the test set is composed of real data.

    Description

    DRAWINGS

    [0034] FIG. 1 is a flow chart for a data augmentation method based on generative adversarial networks in tool condition monitoring.

    [0035] FIG. 2 is a schematic diagram of the sensor installation location.

    [0036] FIG. 3 is a structural diagram of generative adversarial networks adopted by the present invention.

    [0037] FIG. 4(a) is the time domain diagram, 4(b) is the spectrum diagram.

    [0038] FIG. 5(a) is the training process of the deep learning network, and 5(b) is the prediction result of the deep learning network.

    [0039] In the picture: 1 workpiece holder; 2 workpiece; 3 machine tool gear box; 4 microphone; 5 bed; 6 1# three-way acceleration sensor; 7 cutter bar; 8 2# three-way acceleration sensor; 9 cutter bar holder.

    DETAILED DESCRIPTION

    [0040] 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 FIG. 1 by taking a boring process of a domestic-made deep hole boring machine as an example.

    [0041] 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 FIG. 2. The three types of sample data collected are shown in Table 1. Each sample contains 7000 data points (6000 for vibration signals and 1000 for noise signals):

    TABLE-US-00001 TABLE 1 Sample size tool state normal broken Blunt number of 1360 87 22 samples

    [0042] 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.

    [0043] 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 FIG. 3. The learning rate is set to 0.001, the batch size is 12, the number of iterations is set to 100, and the input noise distribution obeys the uniform distribution of interval [−1, 1]. The ratio of real sample data to generated sample data in the blunt state is 1:3.

    [0044] 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 FIGS. 4(a) and 4(b). It can be seen from the time domain diagram and spectrum diagram that the distribution similarity between the real sample data and the generated sample data is high.

    [0045] 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.

    [0046] 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 FIGS. 5(a) and 5(b).

    TABLE-US-00002 TABLE 2 Sample size tool state normal broken Blunt number of 1360 87 88 samples