Numerical control machine tool milling cutter abrasion real-time monitoring method based on deep convolutional neural network
Technical Field
The invention relates to a method for monitoring the abrasion of a milling cutter of a numerical control machine tool in real time based on a deep convolutional neural network, relates to the technical field of monitoring the abrasion loss of the milling cutter of the numerical control machine tool and identifying the critical state of the abrasion of the milling cutter, and belongs to the technical field of automatic monitoring and identification.
Background
In the milling process of the numerical control machine tool, the milling cutter inevitably generates abrasion, and the abrasion of the cutter can cause low processing precision of workpieces and unqualified product quality. In order to meet the requirement of the product on machining precision, the abrasion loss of the milling cutter needs to be monitored in real time, and the threshold value of the critical state of the abrasion of the cutter needs to be accurately identified, so that the abnormal state of the cutter is found in time, preventive measures are taken, and the product percent of pass is effectively improved.
The existing research and application show that the wear monitoring and critical state recognition technology of the milling cutter reach a certain level, but the application range of the existing method still has a certain limitation, the automatic real-time monitoring degree is not reached, the problems of false alarm of cutter wear, delayed cutter damage alarm, cutter wear amount exceeding a critical state threshold value and the like caused by single signal data source often occur in the actual production, the product qualification rate is low, and the economic loss is serious.
Disclosure of Invention
Aiming at the technical requirements and problems, the invention aims to provide a method for monitoring the abrasion of a milling cutter of a numerical control machine tool in real time based on a deep convolutional neural network, which can avoid the problems of low cutter abrasion value prediction accuracy rate, large deviation of predicted critical state and the like caused by unreasonable input of a single-state signal source and model parameter setting. And inputting the multi-source heterogeneous state signal data into a tool wear value regression model, and selecting optimal model parameters by using a control variable method, thereby effectively improving the precision of the tool wear value prediction model. On the basis, the tool wear critical state is further subdivided into 10 thresholds, which is beneficial to more accurately early warning the abnormal state of the tool so as to take measures in advance to prevent the tool from failing. More specifically, in the milling process, the monitoring method includes the steps of obtaining multi-source heterogeneous state data of a cutter and full-life-cycle cutter wear state data corresponding to the multi-source heterogeneous state data from a sensor, cleaning, compressing and reconstructing original data, adding noise and normalizing the original data, dividing a data set into a training set and a testing set, substituting a training sample into deep learning network training, selecting an optimal model parameter by using a control variable method, and visualizing the change condition of the model parameter. After the model training is finished, substituting the model into a test sample set for verification, making a difference between an obtained predicted cutter wear value and an actual value, if the predicted cutter wear value is smaller than a set threshold value, inputting a real-time numerical control machine tool state signal to perform online cutter wear value monitoring, otherwise, retraining the model again, and finally extracting state and wear loss characteristics by using a deep learning network to obtain a cutter wear loss regression result; and (3) taking the milling cutter wear value output by the deep learning network model as the input of a deep convolution neural network, taking the further subdivided cutter wear critical state threshold as the output, taking the identification precision as a main consideration factor, preferably selecting the super-parameter of the cutter wear critical state identification model by using a control variable method, and visualizing the parameter change condition. After the training is completed, substituting the test sample set for verification, comparing the output predicted tool critical state with the actual wear critical state, if the accuracy requirement is met, inputting a real-time tool wear value to perform online tool wear state identification, otherwise retraining a state identification model again until the model can accurately identify the tool wear critical state, and accordingly monitoring the tool wear of the machine tool. Therefore, the tool wear critical state prediction method has the advantages of being capable of accurately predicting the tool wear value in real time and recognizing the tool wear critical state threshold value corresponding to the current wear value by increasing the state data source, optimizing the parameters and the hyper-parameters of the regression model and the recognition model and subdividing the tool wear critical state, and being high in prediction accuracy and accurate in state recognition.
In order to achieve the above object, according to one aspect of the present invention, there is provided a method for monitoring wear of a milling cutter of a numerically-controlled machine tool in real time based on a deep convolutional neural network, the method mainly includes the following steps:
(1) collecting historical multisource heterogeneous state data (vibration signals, milling force signals, power signals and acoustic emission signals) and corresponding tool wear full-life cycle states in the milling process of the numerical control machine tool, obtaining tool evaluation index data, including tool wear value threshold data, providing data basis for tool wear amount monitoring, preprocessing a state data set and labeling;
(2) and inputting the training sample set into the constructed deep learning network model, taking multi-source heterogeneous state data as input, taking a tool wear value as output, taking the mean square deviation value as a main consideration factor, continuously correcting the parameter value of the network model, training a tool wear amount regression model, and visualizing the parameter change condition. After training, substituting the training sample set for verification, making a difference between an obtained predicted cutter wear value and an actual value, if the difference is smaller than a set threshold value, inputting a real-time numerical control machine tool state signal to perform online cutter wear value monitoring, and if the difference is not smaller than the set threshold value, returning to the step 1;
(3) and (3) taking the milling cutter wear value output by the deep learning network model as the input of a deep convolution neural network, taking the further subdivided cutter wear critical state threshold as the output, taking the identification precision as a main consideration factor, preferably selecting the super-parameter of the cutter wear critical state identification model by using a control variable method, and visualizing the parameter change condition. After the training is finished, substituting the test sample set for verification, comparing the output predicted tool critical state with the actual wear critical state, if the production accuracy requirement is met, inputting a real-time tool wear value for online tool wear state identification, and otherwise, returning to the step 2;
(4) and (3) combining and analyzing the predicted real-time wear value of the milling cutter and a corresponding cutter wear critical state threshold value, and taking measures such as cutter replacement or parameter adjustment in time according to the condition that the cutter wear cannot be reprocessed.
Further, preprocessing the original data of the cutter comprises repeated value processing, vacancy value processing, abnormal value processing and the like, compressing and reconstructing the data, randomly taking 50% of samples as training samples of the deep learning network, taking the rest samples as testing samples, adding noise to process the training samples, and adding random Gaussian noise to increase the number of the samples. Finally, the samples are normalized to normalize the data to a range of [0,1 ].
Further, the first four layers of the deep learning network are a stacked self-encoder network, the last four layers of the deep learning network are a neural network with a data compression function, and a Dropout (packet loss) layer is arranged between the fifth layer and the sixth layer. The method comprises the steps of initializing various parameters of a deep neural network and Dropout parameters randomly, training the network layer by utilizing a forward propagation algorithm and a backward propagation algorithm, minimizing a cost function, continuously updating the Dropout parameters, extracting low-dimensional features, solving a tool wear value, and storing optimal network weight and bias, network hyper-parameters and the Dropout parameters.
Further, a tool wear amount critical state identification model based on a deep convolutional network is constructed. And randomly initializing various parameters of the deep neural network. Setting the regression analysis result of the input tool wear amount as x ═ x1,x2,x3,…,xnAnd performing convolution operation on the regression analysis result by the convolution layer, wherein the expression is as follows:
the output result of the convolution is denoted as a. According to the basic structure of the convolutional neural network, sequentially calculating and outputting a convolution calculation result a layer by using a forward propagation formula, wherein the expression is as follows:
further, updating the optimized weight W and the bias b of each layer of the network parameter by using an adaptive momentum estimation method, wherein the expression is as follows:
mt=β1mt-1+(1-β1)gt
thereby minimizing the cost function of the network, whose expression is:
and obtaining the optimal weight and bias of the network when the cost function C is minimum, continuously updating Dropout parameters, extracting low-dimensional features, and performing classification and identification by using a Softmax (soft maximum) classifier.
Further, the error between the classification result and the actual value is fed back to the convolution layer and the pooling layer by using a back propagation algorithm, the weight value and the bias value of each layer of neural network are adjusted by using an adaptive momentum estimation method, and the expression is as follows:
and inputting the test sample into a deep learning network model for verification, multiplying the stored optimal network weight and the bias parameter by the test sample by using the stored network hyper-parameter and Dropout parameter to obtain a low-dimensional characteristic, and outputting a tool wear monitoring result.
In general, by comparing the above technical solution of the present invention with the prior art, the method for monitoring the abrasion of the milling cutter of the numerical control machine tool based on the deep convolutional neural network in real time provided by the present invention mainly has the following beneficial effects:
1. the collected multi-source heterogeneous state signal data (force signals, vibration signals, power signals and acoustic emission signals) are input into the deep learning network model to train the regression model, compared with the state data of a single signal source, the multi-signal source fusion can enable supplement verification among prediction results, and the accuracy of the regression prediction value of the tool wear loss is higher.
2. The training sample set is input into a deep learning neural network and a deep convolution neural network for model training, network parameters are continuously corrected by using a control variable method, and the change condition of the model parameters is visualized, so that the optimal parameters and the hyper-parameters of the model are selected, and the prediction and identification precision of the tool wear model is improved.
3. The tool wear critical state is further divided into 10 state threshold values, so that the tool wear critical state can be more accurately identified, measures are taken in advance to prevent tool failure, and the actual production needs are met.
4. In the aspect of milling cutter wear monitoring technology, the invention respectively adopts a deep learning neural network and a deep convolution neural network to construct a cutter wear amount prediction model and a cutter wear critical state identification model, effectively improves cutter wear monitoring efficiency through self-adaptive feature extraction and parameter correction of the network, reduces subjectivity generated by manual monitoring, and can effectively and accurately complete cutter wear real-time monitoring.
Drawings
Fig. 1 is a schematic flow chart of a method for predicting a wear value of a tool of a numerical control machine tool based on a deep learning regression algorithm according to an embodiment of the present invention.
Fig. 2 is a diagram of a deep convolutional neural network structure.
FIG. 3 is a deep convolutional neural network training flow diagram.
Fig. 4(1) -4(4) are graphs showing the influence of the number of hidden layers, the learning rate, the weight attenuation parameter, and Dropout on the regression accuracy, respectively.
Fig. 5 is a (partial) diagram of the distribution of bias and weights of the deep learning network.
FIGS. 6(a) and 6(b) are graphs of the accuracy verification of the state recognition model, in which FIG. 6(a) is the regression result of the training samples as input and the network output; FIG. 6(b) shows the regression results of the test samples as input and the output of the network.
Fig. 7 is a milling force signal diagram of the milling tool.
FIG. 8 is a graph of loss functions of training and testing of a critical state model of tool wear.
Fig. 9 is a diagram of recognition accuracy of training and testing of a tool wear amount critical state model.
FIG. 10 is a comparison graph of the monitoring accuracy of the monitoring method of the present invention and other methods.
Fig. 11 is a milling tool wear diagram.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples, but it should be understood that the examples are illustrative of the present invention and are not intended to limit the present invention.
The invention provides a real-time monitoring method for milling cutter abrasion of a numerical control machine tool based on a deep convolutional neural network, which is completed according to the following steps: firstly, acquiring multi-source heterogeneous state data signals (force signals, vibration signals, power signals and acoustic emission signals) and relevant information of a full life cycle of tool abrasion from a sensor, and carrying out data cleaning, compressed sensing, noise adding processing and normalization processing on the data; secondly, the labeled data set is used for training a tool wear value regression model, network model parameters are continuously corrected, the influence condition of parameter change is visualized, after model training is completed, a real-time state signal is input, and a real-time tool wear value is output; and substituting the real-time tool wear value into a tool wear critical state recognition model trained by using the historical data set, selecting an optimal network model hyper-parameter by using a control variable method, and improving the model recognition precision, so as to obtain a tool critical state threshold value corresponding to the real-time tool wear value, monitor the tool wear state, and take preventive measures in time. In order to verify the method provided by the invention, the method collects the cutter related signals and the cutter full life cycle abrasion information on a milling production line of the numerical control machine, wherein the cutter related signals and the cutter full life cycle abrasion information are respectively force signals, vibration signals, power signals, acoustic emission signals, cutter abrasion loss, cutter critical state threshold values and the like, a cutter abrasion loss regression model and a cutter abrasion critical state recognition model are trained by utilizing the processed historical data set, and model parameters are continuously corrected until the model accuracy requirement is met; and finally, substituting the real-time tool state signal data into the regression model and the recognition model, thereby realizing real-time monitoring of the tool wear state and taking preventive measures in advance before the tool fails.
In the tool wear amount prediction method based on the deep learning network, a deep learning frame is TensorFlow2.0, a development environment is Anaconda + Pycharm2017, and an algorithm language is Python. Before actual experiment operation, 600 samples of multisource heterogeneous cutter wear data are obtained from an automatic monitoring system of a certain numerical control machine tool, and wear data of a certain cutter in a full life cycle are obtained.
The method for monitoring the abrasion of the milling cutter of the numerical control machine tool based on the deep convolutional neural network in real time mainly comprises the following steps:
step 1, data acquisition and pretreatment
Historical multi-source heterogeneous state data (vibration signals, milling force signals, power signals and acoustic emission signals) and corresponding tool wear values in the milling process of the numerical control machine tool are collected, tool evaluation index data are obtained, the tool evaluation index data comprise tool wear value threshold data, and data basis is provided for tool wear amount monitoring.
Step 2, preprocessing the state data signal and labeling
Preprocessing the original data of the cutter, including repeated value processing, vacancy value processing, abnormal value processing and the like, compressing and reconstructing the data, randomly taking 50% of samples as training samples, and the rest of samples as test samples, adding noise to process the training samples, adding random Gaussian noise, simultaneously normalizing the processed samples, and normalizing the data to be in [0,1 ].
Step 3, constructing a tool wear regression model and training, and setting parameters
The first four layers of the deep learning network are a stack self-encoder network, the last four layers of the deep learning network are a neural network with a data compression function, and the Dropout layer is arranged between the fifth layer and the sixth layer. The method comprises the steps of initializing various parameters of a deep neural network and Dropout parameters randomly, training the network layer by utilizing a forward propagation algorithm and a backward propagation algorithm, minimizing a cost function, continuously updating the Dropout parameters, extracting low-dimensional features, solving a tool wear value, and storing optimal network weight and bias, network hyper-parameters and the Dropout parameters.
The number of different hidden layer network nodes and the training effect of the network are different, and the setting of the node parameters of the network is set as shown in table 1 through repeated experiments and according to the experimental results.
TABLE 1 neural node parameter settings for deep neural networks
The step (3) comprises the following substeps:
(31) inputting the multi-source heterogeneous state data and the corresponding tool wear amount data set into a deep learning network training tool wear amount prediction model, taking the mean square error as a model accuracy evaluation index, and continuously correcting a model parameter value;
(32) when the influence of model parameters on the accuracy or reconstruction errors of the deep learning network is researched, the rule of a control variable method is adopted for carrying out an experiment, and the influence of the parameters on the model is visualized;
(33) in the regression model, a RuLe function is used as an activation function of a hidden layer and an input layer, and a Sigmoid function is used as an activation function of an output layer;
(34) and (3) after the deep neural network performs feature extraction, outputting a regression result, namely a normalized cutter wear value, in the last output layer of the network, inputting a real-time numerical control machine tool state signal to perform online cutter wear value monitoring if the difference between the predicted cutter wear value and the actual wear value is smaller than a set threshold, and otherwise, repeating the steps (31) - (32) until the error value is smaller than the set threshold.
Step 4, constructing and training a tool wear critical state recognition model, and setting parameters
And constructing a tool wear amount critical state identification model based on a deep convolutional network. And randomly initializing various parameters of the deep neural network. Setting the regression analysis result of the input tool wear amount as x ═ x1,x2,x3,…,xnAnd performing convolution operation on the regression analysis result by the convolution layer, wherein the expression is as follows:
the output result of the convolution is denoted as a. According to the basic structure of the convolutional neural network, sequentially calculating and outputting a convolution calculation result a layer by using a forward propagation formula, wherein the expression is as follows:
updating the optimized weight W and the bias b of each layer of the network parameter by using an adaptive momentum estimation method, wherein the expression is as follows:
thereby minimizing the cost function of the network, whose expression is:
and obtaining the optimal weight and bias of the network when the cost function C is minimum, continuously updating Dropout parameters, extracting low-dimensional features, and performing classification and identification by using a Softmax classifier.
The performance of the network is seriously affected by the setting of the hyper-parameters, and the identification accuracy of the deep convolutional network for the tool abrasion loss is different under different structures and parameters, so that the proper network structure and parameters need to be adjusted and searched. The final super-parameter settings for the deep convolutional network are shown in table 2.
TABLE 2 deep convolutional neural network hyper-parameter settings
And feeding back errors between the classification result and the actual value to the convolutional layer and the pooling layer by using a back propagation algorithm, and adjusting the weight value and the bias value of each layer of neural network by using an adaptive momentum estimation method, wherein the expression is as follows:
and inputting the test sample into a deep learning network model for verification, multiplying the stored optimal network weight and the bias parameter by the test sample by using the stored network hyper-parameter and Dropout parameter to obtain a low-dimensional characteristic, and outputting a tool wear monitoring result.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the protection scope of the present invention, although the present invention is described in detail with reference to the preferred embodiments, it should be analyzed by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.