Transfer learning network model, model training method and model-based monitoring system
By using the transfer learning network model in CNC machine tools, combined with processing condition coding, the problem of poor adaptability of tool wear status monitoring under different processing conditions is solved, real-time prediction under different workpiece conditions is achieved, and the flexibility of the system and the workpiece are improved. Production pass rate.
Patent Information
- Application Number
- CN202210382680.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-13
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-04-13
AI Technical Summary
The existing technology is difficult to effectively monitor the wear status of CNC machine tool tools under different processing conditions. It lacks adaptability and generalization, resulting in limited calculation and sample size, and cannot predict the tool wear status in real time.
A transfer learning network model is proposed. Through the residual network model based on the cross-stage local feature fusion strategy, combined with the processing condition encoding, the prediction of tool wear status under different workpiece processing conditions is achieved. The model includes a signal input layer, a convolution layer, a batch normalization layer, an activation layer, a residual layer and a local residual module. It adjusts feature fusion through processing condition coding to improve the adaptability and generalization of the model.
It achieves real-time prediction of tool wear status under different processing conditions, improves the flexibility and adaptability of the model, saves data calculation time, and greatly improves the pass rate of workpiece production and the convenience of the system.
Smart Images

Figure CN114818795B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of transfer learning network models, and in particular to a transfer learning network model, a model training method and a monitoring system based on the model. Background Art
[0002] At present, there are many types of workpieces processed by CNC machine tools, so there are many working conditions for machine tool cutting. In addition, there are also requirements for customization and small batches of products, which leads to limited calculation and sample volume. It is impossible to exhaust all types of processed workpieces to establish network models one by one to predict the wear state of tools in CNC machine tools under different working conditions in real time. Different workpieces will have different processing conditions in actual processing, such as processing methods, tool materials, workpiece materials, etc., which will be different due to different types of workpieces.
[0003] Transfer learning is a method of using existing knowledge to learn from unknown fields. The present invention combines transfer learning to study tool wear status monitoring under different processing conditions to solve the problem of poor adaptability of tool monitoring technology to different processing conditions. Summary of the invention
[0004] In order to improve the generalization of the residual network model based on the cross-stage local feature fusion strategy so as to predict the state of tool wear in real time under different processing conditions, the present invention proposes a transfer learning network model, which is a network model that locally adjusts the residual network model based on the cross-stage local feature fusion strategy so as to predict the state of tool wear in a CNC machine tool under various workpiece processing conditions, wherein each processing condition is provided with a corresponding processing condition code; the transfer learning network model comprises:
[0005] Residual network model based on cross-stage local feature fusion strategy;
[0006] And between the local residual module and the Flatten layer of the residual network model based on the cross-stage local feature fusion strategy:
[0007] A fusion layer is used to obtain a processing condition code and connect the feature fusion vector output by the local residual module with the processing condition code to obtain a feature connection vector;
[0008] The first convolutional layer is used to perform convolution calculation on the feature connection vector to obtain the feature learning connection vector;
[0009] Batch normalization layer, used to batch normalize the feature learning connection vector;
[0010] The activation layer is used to perform nonlinear operations on the feature learning connection vector after batch normalization to obtain the feature activation vector;
[0011] The second convolutional layer is used to perform convolution calculation on the feature activation vector to obtain the feature re-learning vector.
[0012] Furthermore, the residual network model based on the cross-stage local feature fusion strategy is used to predict the wear state of the tool in the CNC machine tool, which includes:
[0013] Signal input layer, used to input tool monitoring signals;
[0014] The convolution layer is used to perform convolution calculation on the tool monitoring signal to obtain the signal feature vector;
[0015] Batch normalization layer, used to perform batch normalization on signal feature vectors;
[0016] The activation layer is used to perform nonlinear operations on the signal feature vector after batch normalization to obtain the signal activation feature vector;
[0017] A residual layer, comprising a residual block, wherein the residual block is provided with a left operation channel, a right operation channel and a merging unit, wherein the left operation channel is used to perform feature operation on the signal activation feature vector to obtain a residual left feature vector and output it; the right operation channel is used to downsample the signal activation feature vector to obtain a residual right feature vector and output it; the merging unit is used to merge the output residual left feature vector and residual right feature vector to obtain a residual feature merged vector;
[0018] A local residual module, comprising at least one local residual block, wherein the local residual block is used to split the merged vector to obtain a right eigenvector and a left eigenvector, and perform a residual operation on the right eigenvector through a right gradient operation channel in the local residual block, and perform a feature operation on the left eigenvector through a left gradient operation channel in the local residual block, and fuse the feature vectors obtained after the residual operation and the feature operation to obtain a feature fusion vector; the merged vector comprises a residual feature merged vector and a feature fusion vector.
[0019] Furthermore, the residual network model based on the cross-stage local feature fusion strategy also includes:
[0020] The Flatten layer is used to expand the feature relearning vector; the second normalization layer is used to normalize the expanded feature relearning vector; the second activation layer is used to activate the normalized feature relearning vector; the fully connected layer is used to perform nonlinear changes on the activated feature relearning vector to obtain the tool wear state predicted by the model.
[0021] Furthermore, the processing condition code includes:
[0022] Coding of processing method, coding of tool material and coding of workpiece material.
[0023] The present invention also proposes a training method for a transfer learning network model, which is used to train the transfer learning network model as described above, comprising the steps of:
[0024] Acquire a training data set under preset workpiece processing conditions, wherein the training data set includes a tool monitoring signal with a training label, and the training label is the tool wear amount at the monitoring moment corresponding to the tool monitoring signal;
[0025] The transfer learning network model is trained through the training data set, and before training, the preset network layers in the residual network model based on the cross-stage local feature fusion strategy are frozen to avoid training the frozen preset network layers during the training process.
[0026] Furthermore, the preset network layer includes: a signal input layer, a convolution layer, a batch normalization layer, an activation layer, a residual layer and a local residual module, which are connected in sequence in a residual network model based on a cross-stage local feature fusion strategy.
[0027] The present invention also proposes an online tool wear state monitoring system based on a transfer learning network model, comprising: a processing condition setting module, for setting a corresponding processing condition code for a preset processing condition of a workpiece;
[0028] The model creation module includes a sample selection unit and a model training unit, wherein:
[0029] A sample selection unit, used to obtain a training data set under a preset workpiece processing condition, wherein the training data set includes a tool monitoring signal with a training label, and the training label is the tool wear amount at the monitoring moment corresponding to the tool monitoring signal;
[0030] A model training unit, used to encode and train a transfer learning network model according to a training data set and set processing conditions and save it;
[0031] The operation monitoring module is used to obtain the tool monitoring signal of the workpiece during the machining process in real time, and input it into the transfer learning network model trained in the model training unit to predict the current tool wear status.
[0032] Furthermore, the processing condition setting module is also used to select the processing condition code according to the preset requirements;
[0033] The model creation module also includes a model selection unit, which is used to select a corresponding transfer learning network model saved in the database according to the selected processing condition code;
[0034] The operation monitoring module is also used to input the tool monitoring signal obtained in real time into the transfer learning network model selected by the model selection unit to predict the wear state of the current tool.
[0035] Furthermore, the predicted tool wear state includes the wear amount of the tool, and the system further includes:
[0036] The alarm module includes a wear status warning light. The alarm module is used to alarm through the wear status warning light when the predicted tool wear amount is not within the standard wear range, and record the alarm information in real time.
[0037] Furthermore, the system further comprises:
[0038] The history record module is used to view the time spectrum, frequency spectrum and time domain spectrum of the tool monitoring signal in the preset period before and after the alarm.
[0039] Compared with the prior art, the present invention has at least the following beneficial effects:
[0040] (1) The present invention sets a fusion layer, a first convolutional layer, a batch normalization layer, an activation layer, and a second convolutional layer between a local residual module of a residual network model based on a cross-stage local feature fusion strategy and a Flatten layer, and introduces processing condition coding in the fusion layer, thereby realizing the prediction of the wear state of the tool under different processing conditions based on the same model;
[0041] (2) The present invention obtains a training data set under preset workpiece processing conditions, and freezes the preset network layer in the residual network model based on the cross-stage local feature fusion strategy before training the transfer learning network model through the training data set, so as to avoid training the frozen preset network layer during the training process. By training part of the network layers of a mature model (i.e., a residual network model based on the cross-stage local feature fusion strategy that has been trained) through the training data set, the network model corresponding to the processing conditions of the preset workpiece can be obtained, which makes full use of the resources of the mature model and saves a lot of data calculation time;
[0042] (3) The tool wear state online monitoring system of the present invention adds a new processing condition code through the processing condition setting module, or selects the processing condition code saved in the database according to the preset requirements, which greatly improves the flexibility of the system. In addition, in the model selection unit, the corresponding transfer learning network model saved in the database is selected according to the selected processing condition code, which improves the convenience of the system and eliminates repeated model training;
[0043] (4) During the real-time monitoring process of the operation monitoring module, when the predicted tool wear is not within the standard wear range, the wear status warning light will sound an alarm, and relevant personnel will be notified in time to replace the tool, which greatly improves the qualified rate of workpiece production. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1This is a model structure diagram of a transfer learning network model;
[0045] Figure 2 This is a model structure diagram of a residual network model based on a cross-stage local feature fusion strategy;
[0046] Figure 3 It is the module structure diagram of the local residual module;
[0047] Figure 4 It is the module structure diagram of the basic residual block;
[0048] Figure 5 This is a curve chart showing the decrease in training loss of the transfer learning network model on each data set;
[0049] Figure 6 This is the system module diagram of the online monitoring system for tool wear status based on the transfer learning network model. DETAILED DESCRIPTION
[0050] The following are specific embodiments of the present invention and the accompanying drawings to further describe the technical solution of the present invention, but the present invention is not limited to these embodiments.
[0051] Embodiment 1
[0052] Transfer learning is generally defined as: applying the knowledge learned in the source domain and source domain tasks to the learning of the target domain and target domain tasks. A common strategy in transfer learning is to migrate the network model. Model migration is based on the high similarity between the source domain and the target domain. It is assumed that most of the structures and parameters of their models are universal. It is only necessary to use small samples to retrain part of the structure and parameters of the mature model in the source domain to achieve learning of the target domain tasks. It can be well combined with deep learning to make full use of the similarities between models. In order to predict the wear state of the tool in CNC machine tools under different working conditions in real time based on the same residual network model based on the cross-stage local feature fusion strategy, such as Figures 1 to 4 As shown in FIG, a transfer learning network model is proposed, which is a network model that locally adjusts the residual network model based on the cross-stage local feature fusion strategy to predict the tool wear state in the CNC machine tool under various workpiece processing conditions, and each processing condition is provided with a corresponding processing condition code; as shown in FIG. Figure 1 As shown, the transfer learning network model includes:
[0053] like Figure 2 As shown, the residual network model based on the cross-stage local feature fusion strategy;
[0054] The residual network model based on the cross-stage local feature fusion strategy is used to predict the wear state of the tool in the CNC machine tool, which includes:
[0055] Signal input layer, used to input tool monitoring signals (specifically including: radial vibration signal, tangential vibration signal, axial vibration signal and sound signal);
[0056] The convolution layer is used to perform convolution calculation on the tool monitoring signal to obtain the signal feature vector;
[0057] Batch normalization layer, used to perform batch normalization on signal feature vectors;
[0058] The activation layer is used to perform nonlinear operations on the signal feature vector after batch normalization to obtain the signal activation feature vector;
[0059] A residual layer, comprising a residual block, wherein the residual block is provided with a left operation channel, a right operation channel and a merging unit, wherein the left operation channel is used to perform feature operation on the signal activation feature vector to obtain a residual left feature vector and output it; the right operation channel is used to downsample the signal activation feature vector to obtain a residual right feature vector and output it; the merging unit is used to merge the output residual left feature vector and residual right feature vector to obtain a residual feature merged vector;
[0060] The left operation channel of the residual block in the residual layer includes the following channels connected in sequence:
[0061] The first convolutional layer is used to perform convolution calculation on the signal activation feature vector to obtain a feature learning vector;
[0062] Batch normalization layer, used to batch normalize feature learning vectors;
[0063] The activation layer is used to perform nonlinear operations on the feature learning vector after batch normalization to obtain the reactivated feature vector;
[0064] The second convolutional layer is used to perform convolution calculation on the reactivated feature vector to obtain the residual left feature vector.
[0065] The right operation channel of the residual block in the residual layer includes:
[0066] The maximum pooling layer is used to downsample the signal activation feature vector to obtain the residual right feature vector.
[0067] like Figure 3As shown, a local residual module includes at least one local residual block, wherein the local residual block is used to split the merged vector to obtain a right eigenvector and a left eigenvector, and perform a residual operation on the right eigenvector through the right gradient operation channel in the local residual block, perform a feature operation on the left eigenvector through the left gradient operation channel in the local residual block, and fuse the feature vectors obtained after the residual operation and the feature operation to obtain a feature fusion vector; the merged vector includes a residual feature merged vector and a feature fusion vector.
[0068] The local residual block in the local residual module includes:
[0069] A splitting layer is used to split the merged vector to obtain a right eigenvector and a left eigenvector;
[0070] The left gradient operation channel includes a batch normalization layer, an activation layer, a convolution layer and a maximum pooling layer connected in sequence, wherein: the batch normalization layer is used to perform batch normalization on the left feature vector; the activation layer is used to perform nonlinear operation on the batch-normalized left feature vector to obtain a left activation feature vector; the convolution layer is used to perform convolution calculation on the left activation feature vector to obtain a left learning feature vector; the maximum pooling layer is used to downsample the left learning feature vector to obtain a left gradient feature vector;
[0071] a right gradient operation channel, comprising at least one basic residual block, for performing a residual operation on the right eigenvector to obtain a right gradient eigenvector;
[0072] The fusion layer is used to fuse the left gradient feature vector with the right gradient feature vector to obtain a feature fusion vector.
[0073] like Figure 4 As shown, the basic residual block includes:
[0074] The left operation channel includes the first batch of normalized layers, the first activation layer, the first convolutional layer, the second batch of normalized layers, the second activation layer and the second convolutional layer connected in sequence, where:
[0075] The first batch normalization layer is used to perform batch normalization on the right feature vector;
[0076] The first activation layer is used to perform nonlinear operations on the batch-normalized right feature vector to obtain the left channel activation feature vector;
[0077] The first convolution layer is used to perform convolution calculation on the left channel activation feature vector to obtain the left channel learning feature vector;
[0078] The second batch normalization layer is used to batch normalize the left channel learning feature vector;
[0079] The second activation layer is used to perform nonlinear operation on the batch-normalized left channel learning feature vector to obtain a left channel reactivated feature vector;
[0080] The second convolution layer is used to perform convolution calculation on the left channel reactivated feature vector to obtain the left channel relearned feature vector;
[0081] A right operation channel, comprising a maximum pooling layer, for downsampling the right feature vector to obtain a right channel pooled feature vector;
[0082] The merging unit is used to merge the left channel relearned feature vector and the right channel pooled feature vector to obtain the right gradient feature vector.
[0083] And between the local residual module and the Flatten layer of the residual network model based on the cross-stage local feature fusion strategy:
[0084] A fusion layer is used to obtain a processing condition code and connect the feature fusion vector output by the local residual module with the processing condition code to obtain a feature connection vector;
[0085] The present invention encodes the processing conditions and introduces them into the fusion layer of the model, thereby avoiding the need to establish network models for all types of processing workpieces one by one, greatly improving the flexibility of the model, the adaptability and generalization of the model under different processing conditions, and saving a lot of resources.
[0086] The first convolutional layer is used to perform convolution calculation on the feature connection vector to obtain the feature learning connection vector;
[0087] Batch normalization layer, used to batch normalize the feature learning connection vector;
[0088] The activation layer is used to perform nonlinear operations on the feature learning connection vector after batch normalization to obtain the feature activation vector;
[0089] The second convolutional layer is used to perform convolution calculation on the feature activation vector to obtain the feature re-learning vector.
[0090] The present invention sets a fusion layer, a first convolutional layer, a batch normalization layer, an activation layer and a second convolutional layer between the local residual module of the residual network model based on the cross-stage local feature fusion strategy and the Flatten layer, and introduces processing condition encoding in the fusion layer, thereby realizing the prediction of the wear state of the tool under different processing conditions based on the same model.
[0091] The residual network model based on the cross-stage local feature fusion strategy also includes:
[0092] The Flatten layer is used to expand the feature relearning vector; the second normalization layer is used to normalize the expanded feature relearning vector; the second activation layer is used to activate the normalized feature relearning vector; the fully connected layer is used to perform nonlinear changes on the activated feature relearning vector to obtain the tool wear state predicted by the model.
[0093] The tool wear state includes an initial wear state, a normal wear state and a rapid wear state.
[0094] The processing condition code includes:
[0095] Coding of processing method, coding of tool material and coding of workpiece material.
[0096] To give a specific example, assuming that the processing condition code is 010101, the first 01 represents turning (i.e. the code of the processing method), the second 01 represents the carbide tool (i.e. the code of the tool material), and the third 01 represents 45# steel (i.e. the code of the workpiece material).
[0097] Assuming that the processing condition code is 101010, the first 10 represents milling (i.e. the code of the processing method), the second 10 represents the ceramic tool (i.e. the code of the tool material), and the third 10 represents 35# steel (i.e. the code of the workpiece material).
[0098] Embodiment 2
[0099] The present invention also proposes a training method for a transfer learning network model, which is used to train the transfer learning network model as described above, comprising the steps of:
[0100] Acquire a training data set under preset workpiece processing conditions, wherein the training data set includes a tool monitoring signal with a training label, and the training label is the tool wear amount at the monitoring moment corresponding to the tool monitoring signal;
[0101] The transfer learning network model is trained through the training data set, and before training, the preset network layers in the residual network model based on the cross-stage local feature fusion strategy are frozen to avoid training the frozen preset network layers during the training process.
[0102] It should be noted that, in this embodiment, before training the transfer learning network model, the residual network model based on the cross-stage local feature fusion strategy is already a trained model, and the training data sets of the two are highly similar. Model-based transfer learning is actually to first train a mature and available network model on the source domain (i.e., the residual network model based on the cross-stage local feature fusion strategy that has been trained in this embodiment), and then freeze part of the structure of the model, and retrain the remaining network layers on the target domain (i.e., the training data set obtained under the preset workpiece processing conditions in this embodiment). The obtained model can achieve a better prediction effect, and it does not need to train the entire model from scratch, saving a lot of resources.
[0103] The preset network layer includes: a signal input layer, a convolution layer, a batch normalization layer, an activation layer, a residual layer and a local residual module, which are connected in sequence in a residual network model based on a cross-stage local feature fusion strategy.
[0104] The present invention obtains a training data set under preset workpiece processing conditions, and freezes the preset network layer in the residual network model based on the cross-stage local feature fusion strategy before training the transfer learning network model through the training data set, so as to avoid training the frozen preset network layer during the training process. It can obtain the network model corresponding to the processing conditions of the preset workpiece by training part of the network layers of the mature model (i.e. the residual network model based on the cross-stage local feature fusion strategy that has been trained) through the training data set, which makes full use of the resources of the mature model, saves a lot of data calculation time, and greatly improves the generalization of the model.
[0105] It should be explained that the training method of the residual network model based on the cross-stage local feature fusion strategy in this embodiment is:
[0106] Acquire a training data set, wherein the training data set includes a tool monitoring signal with a training label, wherein the training label is the tool wear amount at the monitoring time corresponding to the tool monitoring signal;
[0107] The training dataset is used to train the residual network model based on the cross-stage local feature fusion strategy.
[0108] Embodiment 3
[0109] This embodiment demonstrates the prediction effect of the transfer learning network model corresponding to different processing condition encodings through specific experiments. In the classification problem, the samples can be divided into four cases according to the relationship between their actual categories and the model prediction results, and the classification results of the model can be more intuitively displayed through the confusion matrix.
[0110]
[0111] We can use accuracy (A), precision (P), recall (R) and F1 score as evaluation indicators of network model performance. Accuracy A reflects the overall prediction accuracy of the model; precision P reflects the prediction accuracy in samples predicted as positive examples, which is the focus of spam identification; recall R reflects the prediction accuracy in samples that are actually positive examples, which is the focus of risk control; F1 score is the harmonic mean of precision and recall. Their respective calculation formulas are:
[0112]
[0113] In addition, the following data sets are used for testing in this embodiment:
[0114] Data set A selection: turning of M18 threaded rod (processing method is turning), tool material is cemented carbide, workpiece material is 35#, tool monitoring signal during the processing (including three-way vibration signal and sound signal);
[0115] Data set B selection: turning and finishing of a circular shaft with an outer diameter of 80 mm (machining method is turning), the tool material is a ceramic tool, the workpiece material is 45#, and the tool monitoring signal during the machining process;
[0116] Data set C selection: milling workpiece plane 100×100mm (machining method is milling), tool material is cemented carbide, workpiece material is 45#, and tool monitoring signal during the machining process;
[0117] The training loss curve of the transfer learning network model on each data set is as follows: Figure 5 As shown;
[0118] It can be seen from the figure that the data sets basically converged and fluctuated slightly when the training cycle was 400, so the training cycle of the transfer learning network model was selected as 400. The confusion matrix and evaluation indicators of the transfer learning network model in data sets A, B, and C are shown in the following table.
[0119] The confusion matrix of the transfer learning network model in dataset A is shown in Table 1 below:
[0120]
[0121] The evaluation indicators of the transfer learning network model in dataset A are shown in Table 2 below:
[0122]
[0123] The confusion matrix of the transfer learning network model in dataset B is shown in Table 3 below:
[0124]
[0125] The evaluation indicators of the transfer learning network model in dataset B are shown in Table 4 below:
[0126]
[0127] The confusion matrix of the transfer learning network model in dataset C is shown in Table 5 below:
[0128]
[0129] The evaluation indicators of the transfer learning network model in dataset C are shown in Table 6 below:
[0130]
[0131] In each table, S1 represents an initial wear state (initial wear stage), S2 represents a normal wear state (normal wear stage), and S3 represents a rapid wear state (rapid wear stage).
[0132] From the analysis of the tabular data, it can be seen that the prediction results of the transfer learning network model on data sets A and B are good, and the performance difference is not large. There is no situation where the initial wear sample point (i.e., the tool monitoring signal corresponding to the initial wear period) is predicted as a sharp wear state and the sharp wear sample point (i.e., the tool monitoring signal corresponding to the sharp wear period) is predicted as an initial wear state. The network has the best prediction effect for normal wear sample points, and all indicators remain at a high level. At the same time, it also shows that the changes in workpiece material and tool material have little effect on the network monitoring of tool wear status, which is within the adjustable range of the model.
[0133] The performance of the transfer learning network model on dataset C is not as good as that on dataset A and dataset B, indicating that the cutting method has changed from turning to milling, and this change has a greater impact on the network than the change in tool material and workpiece material. The overall prediction accuracy of the transfer network on dataset C is 91.5%, and each item in the initial wear and normal wear stages also remains above 90%, but the precision and recall rates are lower in the rapid wear stage. In this regard, it is necessary to adjust the loss function, and its formula is:
[0134]
[0135] Where N represents the total number of tool monitoring signals in the data set; represents the tool wear amount predicted by the model corresponding to the i-th tool monitoring signal in the data set; y irepresents the tool wear amount (actual wear amount, i.e., training label) corresponding to the i-th tool monitoring signal in the data set; λ1 and λ2 are both preset proportional coefficients; β is the basic coefficient; b1 is the first boundary distinction value, i.e., the tool wear amount between the initial wear state and the normal wear state; b2 is the second boundary distinction value, i.e., the tool wear amount between the normal wear state and the acute wear state; is the training effect value of the model.
[0136] In deep neural networks, the loss function is a quantitative statistical method that measures the learning effect of the model on the sample set by quantifying the difference between the output label predicted by the model for the sample point and the actual label of the sample. A large model training loss value indicates that there is a large gap between the model prediction result and the actual result, and the learning effect is not ideal. A small value indicates that the learning effect is good.
[0137] In this embodiment, the predicted tool wear amount is used to obtain the tool wear state, and in fact, more attention is paid to the sample points (tool monitoring signals) near the wear state distinction boundary (the boundary is between the initial wear state and the normal wear state, and between the normal wear state and the sharp wear state). Assuming that there is a fluctuation error between the tool wear amount predicted by the model and the actual wear amount, for sample points far away from the distinction boundary, even if the error is large, it does not affect the accuracy of judging its wear state. For sample points close to the distinction boundary, if the error is large, it is very likely to lead to an error in judging the wear state.
[0138] Therefore, by setting different weight coefficients for the tool monitoring signal (sample point) in the loss function of the present invention The weight of the loss function on the quantitative statistical value corresponding to the sample point near the first boundary distinction value and the second boundary distinction value (the vicinity represents the sample point range, which is determined by λ1 and λ2) is improved, thereby improving the statistical accuracy and the accuracy of the tool wear state judgment.
[0139] In this embodiment, y i =100,y i =300 are used as the boundary between the initial wear state and the normal wear state, and the boundary between the normal wear state and the rapid wear state. The closer to the boundary, the greater the corresponding weight coefficient; the farther away from the boundary, the smaller the corresponding weight. λ1 and λ2 are preset proportional coefficients. The larger the λ1 and λ2, the larger the sample point range. In this embodiment, λ1 is 10 and λ2 is 30, which respectively indicate that more attention is paid to the sample points with wear amounts of 90-110μm and 270-330μm.
[0140] In addition, when the calculated training effect value is not within the preset range, the training parameters corresponding to the model of the present invention will be adaptively adjusted to retrain the model until the training effect value obtained by the loss function of the present invention after training is within the standard range.
[0141] After the transfer learning network model training meets the standards, as shown in Tables 7 and 8, the precision and recall rates of the transfer learning network model in the sharp wear stage of data set C increased by nearly 7 percentage points, and the overall accuracy also increased from 91.5% to 94.5%, which basically meets the application requirements.
[0142] The confusion matrix of the transfer learning network model after reaching the standard in data set C is shown in Table 7 below:
[0143]
[0144] The evaluation indicators of the transfer learning network model after reaching the standard in dataset C are shown in Table 8 below:
[0145]
[0146]
[0147] In order to further prove that the transfer learning network model can generalize and learn the tool wear patterns under different processing conditions, the transfer learning network model and the residual network model (original model) based on the cross-stage local feature fusion strategy are compared and analyzed with the overall accuracy A as the evaluation index, see Table 9.
[0148]
[0149] It can be seen from the data in the table that the original model cannot be directly applied to tool wear status monitoring under various processing conditions. Compared with the original model, the accuracy of the model after migration (i.e., the transfer learning network model) has been greatly improved, and the prediction accuracy of data set C has been increased from 71% to 94.5%. This is because the original model only learned the tool wear pattern under specific processing conditions. When the processing conditions change, the tool wear pattern changes, and the original model cannot make corresponding adjustments. Experiments show that the transfer learning network model involved in the present invention integrates the processing condition encoding information and can solve this problem well.
[0150] Embodiment 4
[0151] like Figure 6 As shown, the present invention also proposes an online monitoring system for tool wear status based on a transfer learning network model, comprising: a processing condition setting module, used to set the corresponding processing condition code for the processing condition of a preset workpiece;
[0152] The model creation module includes a sample selection unit and a model training unit, wherein:
[0153] A sample selection unit, used to obtain a training data set under a preset workpiece processing condition, wherein the training data set includes a tool monitoring signal with a training label, and the training label is the tool wear amount at the monitoring moment corresponding to the tool monitoring signal;
[0154] A model training unit, used to encode and train a transfer learning network model according to a training data set and set processing conditions and save it;
[0155] The operation monitoring module is used to obtain the tool monitoring signal of the workpiece during the machining process in real time, and input it into the transfer learning network model trained in the model training unit to predict the current tool wear status.
[0156] The processing condition setting module is also used to select the processing condition code according to the preset requirements;
[0157] The model creation module also includes a model selection unit, which is used to select a corresponding transfer learning network model saved in the database according to the selected processing condition code;
[0158] The operation monitoring module is also used to input the tool monitoring signal obtained in real time into the transfer learning network model selected by the model selection unit to predict the wear state of the current tool.
[0159] The predicted tool wear state includes the wear amount of the tool, and the system further includes:
[0160] The alarm module includes a wear status warning light. The alarm module is used to alarm through the wear status warning light when the predicted tool wear amount is not within the standard wear range, and record the alarm information in real time.
[0161] During the real-time monitoring process of the operation monitoring module, when the predicted tool wear is not within the standard wear range, the wear status warning light will sound an alarm, and relevant personnel will be notified in time to replace the tool, which greatly improves the qualified rate of workpiece production.
[0162] The system further comprises:
[0163] The history record module is used to view the time spectrum, frequency spectrum and time domain spectrum of the tool monitoring signal in the preset period before and after the alarm.
[0164] The tool wear status online monitoring system of the present invention adds a new processing condition code through a processing condition setting module, or selects a processing condition code saved in a database according to preset requirements, which greatly improves the flexibility of the system. In addition, in the model selection unit, the corresponding transfer learning network model saved in the database is selected according to the selected processing condition code, which improves the convenience of the system and eliminates repeated model training.
[0165] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0166] In addition, in the present invention, descriptions such as "first", "second", "one", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0167] In the present invention, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0168] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
Claims
1. A transfer learning network model, It is characterized in that It is a network model that locally adjusts the residual network model based on the cross-stage local feature fusion strategy to predict the tool wear state in the CNC machine tool under various workpiece processing conditions, and each processing condition is provided with a corresponding processing condition code; The transfer learning network model includes: Residual network model based on cross-stage local feature fusion strategy; And between the local residual module and the Flatten layer of the residual network model based on the cross-stage local feature fusion strategy: A fusion layer is used to obtain a processing condition code and connect the feature fusion vector output by the local residual module with the processing condition code to obtain a feature connection vector; The first convolutional layer is used to perform convolution calculation on the feature connection vector to obtain the feature learning connection vector; Batch normalization layer, used to batch normalize the feature learning connection vector; The activation layer is used to perform nonlinear operations on the feature learning connection vector after batch normalization to obtain the feature activation vector; The second convolutional layer is used to perform convolution calculation on the feature activation vector to obtain the feature re-learning vector.
2. A transfer learning network model according to claim 1, It is characterized in that The residual network model based on the cross-stage local feature fusion strategy is used to predict the wear state of the tool in the CNC machine tool, which includes: Signal input layer, used to input tool monitoring signals; The convolution layer is used to perform convolution calculation on the tool monitoring signal to obtain the signal feature vector; Batch normalization layer, used to perform batch normalization on signal feature vectors; The activation layer is used to perform nonlinear operations on the signal feature vector after batch normalization to obtain the signal activation feature vector; A residual layer, comprising a residual block, wherein the residual block is provided with a left operation channel, a right operation channel and a merging unit, wherein the left operation channel is used to perform feature operation on the signal activation feature vector to obtain a residual left feature vector and output it; the right operation channel is used to downsample the signal activation feature vector to obtain a residual right feature vector and output it; the merging unit is used to merge the output residual left feature vector and residual right feature vector to obtain a residual feature merged vector; A local residual module, comprising at least one local residual block, wherein the local residual block is used to split the merged vector to obtain a right eigenvector and a left eigenvector, and perform a residual operation on the right eigenvector through a right gradient operation channel in the local residual block, and perform a feature operation on the left eigenvector through a left gradient operation channel in the local residual block, and fuse the feature vectors obtained after the residual operation and the feature operation to obtain a feature fusion vector; the merged vector comprises a residual feature merged vector and a feature fusion vector.
3. A transfer learning network model according to claim 2, It is characterized in that The residual network model based on the cross-stage local feature fusion strategy also includes: The Flatten layer is used to expand the feature relearning vector; the second normalization layer is used to normalize the expanded feature relearning vector; the second activation layer is used to activate the normalized feature relearning vector; the fully connected layer is used to perform nonlinear changes on the activated feature relearning vector to obtain the tool wear state predicted by the model.
4. A transfer learning network model according to claim 1, It is characterized in that The processing condition code includes: Coding of processing method, coding of tool material and coding of workpiece material.
5. A training method for a transfer learning network model, used for training the transfer learning network model according to any one of claims 1 to 4, It is characterized in that Includes steps: Acquire a training data set under preset workpiece processing conditions, wherein the training data set includes a tool monitoring signal with a training label, and the training label is the tool wear amount at the monitoring moment corresponding to the tool monitoring signal; The transfer learning network model is trained through the training data set, and before training, the preset network layers in the residual network model based on the cross-stage local feature fusion strategy are frozen to avoid training the frozen preset network layers during the training process.
6. A training method for a transfer learning network model according to claim 5, It is characterized in that The preset network layer includes: a signal input layer, a convolution layer, a batch normalization layer, an activation layer, a residual layer and a local residual module, which are connected in sequence in a residual network model based on a cross-stage local feature fusion strategy.
7. A tool wear state online monitoring system based on a transfer learning network model, applied to the transfer learning network model as claimed in any one of claims 1 to 4, It is characterized in that include: A processing condition setting module is used to set the corresponding processing condition code for the processing condition of the preset workpiece; The model creation module includes a sample selection unit and a model training unit, wherein: A sample selection unit, used to obtain a training data set under a preset workpiece processing condition, wherein the training data set includes a tool monitoring signal with a training label, and the training label is the tool wear amount at the monitoring moment corresponding to the tool monitoring signal; A model training unit, used to encode and train a transfer learning network model according to a training data set and set processing conditions and save it; The operation monitoring module is used to obtain the tool monitoring signal of the workpiece during the machining process in real time, and input it into the transfer learning network model trained in the model training unit to predict the current tool wear status.
8. The tool wear status online monitoring system based on the transfer learning network model according to claim 7, It is characterized in that The processing condition setting module is also used to select the processing condition code according to the preset requirements; The model creation module also includes a model selection unit, which is used to select a corresponding transfer learning network model saved in the database according to the selected processing condition code; The operation monitoring module is also used to input the tool monitoring signal obtained in real time into the transfer learning network model selected by the model selection unit to predict the wear state of the current tool.
9. The tool wear status online monitoring system based on the transfer learning network model according to claim 8, It is characterized in that The predicted tool wear state includes the wear amount of the tool, and the system further includes: The alarm module includes a wear status warning light. The alarm module is used to alarm through the wear status warning light when the predicted tool wear amount is not within the standard wear range, and record the alarm information in real time.
10. The tool wear status online monitoring system based on the transfer learning network model according to claim 9, It is characterized in that The system further comprises: The history record module is used to view the time spectrum, frequency spectrum and time domain spectrum of the tool monitoring signal in the preset period before and after the alarm.
